Chromium Code Reviews| 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_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/signin/core/account_id/account_id.h" | |
| 11 #include "components/user_manager/user.h" | 12 #include "components/user_manager/user.h" |
| 12 | 13 |
| 14 class AccountId; | |
|
achuithb
2015/12/04 10:12:52
don't think you need this?
Alexander Alekseev
2015/12/04 12:44:06
Done.
| |
| 15 | |
| 13 namespace chromeos { | 16 namespace chromeos { |
| 14 | 17 |
| 15 class UserContext; | 18 class UserContext; |
| 16 | 19 |
| 17 class LoginDisplayHost; | 20 class LoginDisplayHost; |
| 18 // Defines possible variants of user flow upon logging in. | 21 // Defines possible variants of user flow upon logging in. |
| 19 // See UserManager::SetUserFlow for usage contract. | 22 // See UserManager::SetUserFlow for usage contract. |
| 20 class UserFlow { | 23 class UserFlow { |
| 21 public: | 24 public: |
| 22 UserFlow(); | 25 UserFlow(); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 62 void HandleLoginSuccess(const UserContext& context) override; | 65 void HandleLoginSuccess(const UserContext& context) override; |
| 63 bool HandlePasswordChangeDetected() override; | 66 bool HandlePasswordChangeDetected() override; |
| 64 void HandleOAuthTokenStatusChange( | 67 void HandleOAuthTokenStatusChange( |
| 65 user_manager::User::OAuthTokenStatus status) override; | 68 user_manager::User::OAuthTokenStatus status) override; |
| 66 void LaunchExtraSteps(Profile* profile) override; | 69 void LaunchExtraSteps(Profile* profile) override; |
| 67 }; | 70 }; |
| 68 | 71 |
| 69 // UserFlow stub for non-regular flows. | 72 // UserFlow stub for non-regular flows. |
| 70 class ExtendedUserFlow : public UserFlow { | 73 class ExtendedUserFlow : public UserFlow { |
| 71 public: | 74 public: |
| 72 explicit ExtendedUserFlow(const std::string& user_id); | 75 explicit ExtendedUserFlow(const AccountId& account_id); |
| 73 ~ExtendedUserFlow() override; | 76 ~ExtendedUserFlow() override; |
| 74 | 77 |
| 75 void AppendAdditionalCommandLineSwitches() override; | 78 void AppendAdditionalCommandLineSwitches() override; |
| 76 bool ShouldShowSettings() override; | 79 bool ShouldShowSettings() override; |
| 77 void HandleOAuthTokenStatusChange( | 80 void HandleOAuthTokenStatusChange( |
| 78 user_manager::User::OAuthTokenStatus status) override; | 81 user_manager::User::OAuthTokenStatus status) override; |
| 79 | 82 |
| 80 protected: | 83 protected: |
| 81 // Subclasses can call this method to unregister flow in the next event. | 84 // Subclasses can call this method to unregister flow in the next event. |
| 82 virtual void UnregisterFlowSoon(); | 85 virtual void UnregisterFlowSoon(); |
| 83 std::string user_id() { | 86 const AccountId& account_id() { return account_id_; } |
| 84 return user_id_; | |
| 85 } | |
| 86 | 87 |
| 87 private: | 88 private: |
| 88 std::string user_id_; | 89 AccountId account_id_; |
|
achuithb
2015/12/04 10:12:52
const?
Alexander Alekseev
2015/12/04 12:44:06
Done.
| |
| 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_ |
| OLD | NEW |