OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_CREATION_FLOW
_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_LOGIN_FLOW_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_CREATION_FLOW
_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_LOGIN_FLOW_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
11 #include "chrome/browser/chromeos/login/user_flow.h" | 11 #include "chrome/browser/chromeos/login/user_flow.h" |
12 | 12 |
13 namespace chromeos { | 13 namespace chromeos { |
14 | 14 |
15 // UserFlow implementation for creating new locally managed user. | 15 // UserFlow implementation for signing in locally managed user. |
16 class LocallyManagedUserCreationFlow : public UserFlow { | 16 class LocallyManagedUserLoginFlow : public ExtendedUserFlow { |
17 public: | 17 public: |
18 LocallyManagedUserCreationFlow(string16 name, | 18 explicit LocallyManagedUserLoginFlow(const std::string& user_id); |
19 std::string password); | 19 virtual ~LocallyManagedUserLoginFlow(); |
20 virtual ~LocallyManagedUserCreationFlow(); | 20 |
| 21 // Registers flow preferences. |
| 22 // static void RegisterPrefs(PrefRegistrySimple* registry); |
21 | 23 |
22 virtual bool ShouldLaunchBrowser() OVERRIDE; | 24 virtual bool ShouldLaunchBrowser() OVERRIDE; |
23 virtual bool ShouldSkipPostLoginScreens() OVERRIDE; | 25 virtual bool ShouldSkipPostLoginScreens() OVERRIDE; |
24 virtual bool HandleLoginFailure(const LoginFailure& failure, | 26 virtual bool HandleLoginFailure(const LoginFailure& failure, |
25 LoginDisplayHost* host) OVERRIDE; | 27 LoginDisplayHost* host) OVERRIDE; |
26 virtual bool HandlePasswordChangeDetected(LoginDisplayHost* host) OVERRIDE; | 28 virtual bool HandlePasswordChangeDetected(LoginDisplayHost* host) OVERRIDE; |
27 virtual void LaunchExtraSteps(LoginDisplayHost* host) OVERRIDE; | 29 virtual void LaunchExtraSteps(Profile* profile, |
| 30 LoginDisplayHost* host) OVERRIDE; |
| 31 |
| 32 virtual void LoadSyncSetupData(); |
| 33 virtual void OnSyncSetupDataLoaded(const std::string& token); |
| 34 virtual void ConfigureSync(const std::string& token); |
28 | 35 |
29 private: | 36 private: |
30 // Display name for user being created. | 37 bool data_loaded_; |
31 string16 name_; | 38 Profile* profile_; |
32 // Password for user being created. | 39 LoginDisplayHost* host_; |
33 std::string password_; | 40 base::WeakPtrFactory<LocallyManagedUserLoginFlow> weak_factory_; |
34 | 41 |
35 DISALLOW_COPY_AND_ASSIGN(LocallyManagedUserCreationFlow); | 42 DISALLOW_COPY_AND_ASSIGN(LocallyManagedUserLoginFlow); |
36 }; | 43 }; |
37 | 44 |
38 } // namespace chromeos | 45 } // namespace chromeos |
39 | 46 |
40 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_CREATION_F
LOW_H_ | 47 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_LOGIN_FLOW
_H_ |
OLD | NEW |