Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: chrome/browser/chromeos/login/user_flow.h

Issue 12929026: Load sync token upon login (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with ToT Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_USER_FLOW_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_FLOW_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_FLOW_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_FLOW_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "chrome/browser/chromeos/login/login_status_consumer.h" 9 #include "chrome/browser/chromeos/login/login_status_consumer.h"
10 #include "chrome/browser/profiles/profile.h"
10 11
11 namespace chromeos { 12 namespace chromeos {
12 13
13 class LoginDisplayHost; 14 class LoginDisplayHost;
14 // Defines possible variants of user flow upon logging in. 15 // Defines possible variants of user flow upon logging in.
15 // See UserManager::SetUserFlow for usage contract. 16 // See UserManager::SetUserFlow for usage contract.
16 class UserFlow { 17 class UserFlow {
17 public: 18 public:
18 virtual ~UserFlow() = 0; 19 virtual ~UserFlow() = 0;
19 virtual bool ShouldLaunchBrowser() = 0; 20 virtual bool ShouldLaunchBrowser() = 0;
20 virtual bool ShouldSkipPostLoginScreens() = 0; 21 virtual bool ShouldSkipPostLoginScreens() = 0;
21 virtual bool HandleLoginFailure(const LoginFailure& failure, 22 virtual bool HandleLoginFailure(const LoginFailure& failure,
22 LoginDisplayHost* host) = 0; 23 LoginDisplayHost* host) = 0;
23 virtual bool HandlePasswordChangeDetected(LoginDisplayHost* host) = 0; 24 virtual bool HandlePasswordChangeDetected(LoginDisplayHost* host) = 0;
24 virtual void LaunchExtraSteps(LoginDisplayHost* host) = 0; 25 virtual void LaunchExtraSteps(Profile* profile, LoginDisplayHost* host) = 0;
25 }; 26 };
26 27
27 // UserFlow implementation for regular login flow. 28 // UserFlow implementation for regular login flow.
28 class DefaultUserFlow : public UserFlow { 29 class DefaultUserFlow : public UserFlow {
29 public: 30 public:
30 virtual ~DefaultUserFlow(); 31 virtual ~DefaultUserFlow();
31 32
32 virtual bool ShouldLaunchBrowser() OVERRIDE; 33 virtual bool ShouldLaunchBrowser() OVERRIDE;
33 virtual bool ShouldSkipPostLoginScreens() OVERRIDE; 34 virtual bool ShouldSkipPostLoginScreens() OVERRIDE;
34 virtual bool HandleLoginFailure(const LoginFailure& failure, 35 virtual bool HandleLoginFailure(const LoginFailure& failure,
35 LoginDisplayHost* host) OVERRIDE; 36 LoginDisplayHost* host) OVERRIDE;
36 virtual bool HandlePasswordChangeDetected(LoginDisplayHost* host) OVERRIDE; 37 virtual bool HandlePasswordChangeDetected(LoginDisplayHost* host) OVERRIDE;
37 virtual void LaunchExtraSteps(LoginDisplayHost* host) OVERRIDE; 38 virtual void LaunchExtraSteps(Profile* profile,
39 LoginDisplayHost* host) OVERRIDE;
40 };
41
42 // UserFlow stub for non-regular flows.
43 class ExtendedUserFlow : public UserFlow {
44 public:
45 explicit ExtendedUserFlow(const std::string& user_id);
46 virtual ~ExtendedUserFlow();
47
48 protected:
49 // Subclasses can call this method to unregister flow in the next event.
50 virtual void UnregisterFlowSoon();
51 std::string user_id() {
52 return user_id_;
53 };
54
55 private:
56 std::string user_id_;
38 }; 57 };
39 58
40 } // namespace chromeos 59 } // namespace chromeos
41 60
42 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_FLOW_H_ 61 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_FLOW_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/managed/locally_managed_user_login_flow.cc ('k') | chrome/browser/chromeos/login/user_flow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698