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

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

Issue 1165323004: We should use UserID object to identify users instead of username. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
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/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chromeos/login/auth/auth_status_consumer.h" 10 #include "chromeos/login/auth/auth_status_consumer.h"
11 #include "components/user_manager/user.h" 11 #include "components/user_manager/user.h"
12 #include "components/user_manager/user_id.h"
12 13
13 namespace chromeos { 14 namespace chromeos {
14 15
15 class UserContext; 16 class UserContext;
16 17
17 class LoginDisplayHost; 18 class LoginDisplayHost;
18 // Defines possible variants of user flow upon logging in. 19 // Defines possible variants of user flow upon logging in.
19 // See UserManager::SetUserFlow for usage contract. 20 // See UserManager::SetUserFlow for usage contract.
20 class UserFlow { 21 class UserFlow {
21 public: 22 public:
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 void HandleLoginSuccess(const UserContext& context) override; 63 void HandleLoginSuccess(const UserContext& context) override;
63 bool HandlePasswordChangeDetected() override; 64 bool HandlePasswordChangeDetected() override;
64 void HandleOAuthTokenStatusChange( 65 void HandleOAuthTokenStatusChange(
65 user_manager::User::OAuthTokenStatus status) override; 66 user_manager::User::OAuthTokenStatus status) override;
66 void LaunchExtraSteps(Profile* profile) override; 67 void LaunchExtraSteps(Profile* profile) override;
67 }; 68 };
68 69
69 // UserFlow stub for non-regular flows. 70 // UserFlow stub for non-regular flows.
70 class ExtendedUserFlow : public UserFlow { 71 class ExtendedUserFlow : public UserFlow {
71 public: 72 public:
72 explicit ExtendedUserFlow(const std::string& user_id); 73 explicit ExtendedUserFlow(const user_manager::UserID& user_id);
73 ~ExtendedUserFlow() override; 74 ~ExtendedUserFlow() override;
74 75
75 void AppendAdditionalCommandLineSwitches() override; 76 void AppendAdditionalCommandLineSwitches() override;
76 bool ShouldShowSettings() override; 77 bool ShouldShowSettings() override;
77 void HandleOAuthTokenStatusChange( 78 void HandleOAuthTokenStatusChange(
78 user_manager::User::OAuthTokenStatus status) override; 79 user_manager::User::OAuthTokenStatus status) override;
79 80
80 protected: 81 protected:
81 // Subclasses can call this method to unregister flow in the next event. 82 // Subclasses can call this method to unregister flow in the next event.
82 virtual void UnregisterFlowSoon(); 83 virtual void UnregisterFlowSoon();
83 std::string user_id() { 84 user_manager::UserID user_id() {
84 return user_id_; 85 return user_id_;
85 } 86 }
86 87
87 private: 88 private:
88 std::string user_id_; 89 user_manager::UserID user_id_;
89 }; 90 };
90 91
91 } // namespace chromeos 92 } // namespace chromeos
92 93
93 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_FLOW_H_ 94 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_FLOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698