OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_LOGIN_FLOW_H_ | |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_LOGIN_FLOW_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "base/compiler_specific.h" | |
10 #include "base/memory/weak_ptr.h" | |
11 #include "base/strings/string16.h" | |
12 #include "chrome/browser/chromeos/login/user_flow.h" | |
13 | |
14 namespace chromeos { | |
15 | |
16 // UserFlow implementation for signing in locally managed user. | |
17 class LocallyManagedUserLoginFlow : public ExtendedUserFlow { | |
18 public: | |
19 explicit LocallyManagedUserLoginFlow(const std::string& user_id); | |
20 virtual ~LocallyManagedUserLoginFlow(); | |
21 | |
22 // Registers flow preferences. | |
23 // static void RegisterPrefs(PrefRegistrySimple* registry); | |
24 | |
25 virtual bool ShouldLaunchBrowser() OVERRIDE; | |
26 virtual bool ShouldSkipPostLoginScreens() OVERRIDE; | |
27 virtual bool HandleLoginFailure(const LoginFailure& failure) OVERRIDE; | |
28 virtual bool HandlePasswordChangeDetected() OVERRIDE; | |
29 virtual void HandleOAuthTokenStatusChange(User::OAuthTokenStatus status) | |
30 OVERRIDE; | |
31 virtual void LaunchExtraSteps(Profile* profile) OVERRIDE; | |
32 | |
33 virtual void OnSyncSetupDataLoaded(const std::string& token); | |
34 virtual void ConfigureSync(const std::string& token); | |
35 | |
36 private: | |
37 void Launch(); | |
38 | |
39 bool data_loaded_; | |
40 Profile* profile_; | |
41 base::WeakPtrFactory<LocallyManagedUserLoginFlow> weak_factory_; | |
42 | |
43 DISALLOW_COPY_AND_ASSIGN(LocallyManagedUserLoginFlow); | |
44 }; | |
45 | |
46 } // namespace chromeos | |
47 | |
48 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_LOGIN_FLOW
_H_ | |
OLD | NEW |