| 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_EXISTING_USER_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 void StartPublicSessionAutoLoginTimer(); | 69 void StartPublicSessionAutoLoginTimer(); |
| 70 | 70 |
| 71 // Stop the public session auto-login timer when a login attempt begins. | 71 // Stop the public session auto-login timer when a login attempt begins. |
| 72 void StopPublicSessionAutoLoginTimer(); | 72 void StopPublicSessionAutoLoginTimer(); |
| 73 | 73 |
| 74 // LoginDisplay::Delegate: implementation | 74 // LoginDisplay::Delegate: implementation |
| 75 virtual void CancelPasswordChangedFlow() OVERRIDE; | 75 virtual void CancelPasswordChangedFlow() OVERRIDE; |
| 76 virtual void CreateAccount() OVERRIDE; | 76 virtual void CreateAccount() OVERRIDE; |
| 77 virtual void CreateLocallyManagedUser(const string16& display_name, | 77 virtual void CreateLocallyManagedUser(const string16& display_name, |
| 78 const std::string& password) OVERRIDE; | 78 const std::string& password) OVERRIDE; |
| 79 virtual void CompleteLogin(const std::string& username, | 79 virtual void CompleteLogin(const UserCredentials& credentials) OVERRIDE; |
| 80 const std::string& password) OVERRIDE; | |
| 81 virtual string16 GetConnectedNetworkName() OVERRIDE; | 80 virtual string16 GetConnectedNetworkName() OVERRIDE; |
| 82 virtual void Login(const std::string& username, | 81 virtual void Login(const UserCredentials& credentials) OVERRIDE; |
| 83 const std::string& password) OVERRIDE; | |
| 84 virtual void MigrateUserData(const std::string& old_password) OVERRIDE; | 82 virtual void MigrateUserData(const std::string& old_password) OVERRIDE; |
| 85 virtual void LoginAsRetailModeUser() OVERRIDE; | 83 virtual void LoginAsRetailModeUser() OVERRIDE; |
| 86 virtual void LoginAsGuest() OVERRIDE; | 84 virtual void LoginAsGuest() OVERRIDE; |
| 87 virtual void LoginAsPublicAccount(const std::string& username) OVERRIDE; | 85 virtual void LoginAsPublicAccount(const std::string& username) OVERRIDE; |
| 88 virtual void OnSigninScreenReady() OVERRIDE; | 86 virtual void OnSigninScreenReady() OVERRIDE; |
| 89 virtual void OnUserSelected(const std::string& username) OVERRIDE; | 87 virtual void OnUserSelected(const std::string& username) OVERRIDE; |
| 90 virtual void OnStartEnterpriseEnrollment() OVERRIDE; | 88 virtual void OnStartEnterpriseEnrollment() OVERRIDE; |
| 91 virtual void OnStartDeviceReset() OVERRIDE; | 89 virtual void OnStartDeviceReset() OVERRIDE; |
| 92 virtual void ResetPublicSessionAutoLoginTimer() OVERRIDE; | 90 virtual void ResetPublicSessionAutoLoginTimer() OVERRIDE; |
| 93 virtual void ResyncUserData() OVERRIDE; | 91 virtual void ResyncUserData() OVERRIDE; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 123 |
| 126 // Retrieve public session auto-login policy and update the timer. | 124 // Retrieve public session auto-login policy and update the timer. |
| 127 void ConfigurePublicSessionAutoLogin(); | 125 void ConfigurePublicSessionAutoLogin(); |
| 128 | 126 |
| 129 // Trigger public session auto-login. | 127 // Trigger public session auto-login. |
| 130 void OnPublicSessionAutoLoginTimerFire(); | 128 void OnPublicSessionAutoLoginTimerFire(); |
| 131 | 129 |
| 132 // LoginPerformer::Delegate implementation: | 130 // LoginPerformer::Delegate implementation: |
| 133 virtual void OnLoginFailure(const LoginFailure& error) OVERRIDE; | 131 virtual void OnLoginFailure(const LoginFailure& error) OVERRIDE; |
| 134 virtual void OnLoginSuccess( | 132 virtual void OnLoginSuccess( |
| 135 const std::string& username, | 133 const UserCredentials& credentials, |
| 136 const std::string& password, | |
| 137 bool pending_requests, | 134 bool pending_requests, |
| 138 bool using_oauth) OVERRIDE; | 135 bool using_oauth) OVERRIDE; |
| 139 virtual void OnOffTheRecordLoginSuccess() OVERRIDE; | 136 virtual void OnOffTheRecordLoginSuccess() OVERRIDE; |
| 140 virtual void OnPasswordChangeDetected() OVERRIDE; | 137 virtual void OnPasswordChangeDetected() OVERRIDE; |
| 141 virtual void WhiteListCheckFailed(const std::string& email) OVERRIDE; | 138 virtual void WhiteListCheckFailed(const std::string& email) OVERRIDE; |
| 142 virtual void PolicyLoadFailed() OVERRIDE; | 139 virtual void PolicyLoadFailed() OVERRIDE; |
| 143 virtual void OnOnlineChecked( | 140 virtual void OnOnlineChecked( |
| 144 const std::string& username, bool success) OVERRIDE; | 141 const std::string& username, bool success) OVERRIDE; |
| 145 | 142 |
| 146 // LoginUtils::Delegate implementation: | 143 // LoginUtils::Delegate implementation: |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 | 180 |
| 184 // Shows "critical TPM error" screen and starts reboot timer. | 181 // Shows "critical TPM error" screen and starts reboot timer. |
| 185 void ShowTPMErrorAndScheduleReboot(); | 182 void ShowTPMErrorAndScheduleReboot(); |
| 186 | 183 |
| 187 // Reboot timer handler. | 184 // Reboot timer handler. |
| 188 void OnRebootTimeElapsed(); | 185 void OnRebootTimeElapsed(); |
| 189 | 186 |
| 190 // Invoked to complete login. Login might be suspended if auto-enrollment | 187 // Invoked to complete login. Login might be suspended if auto-enrollment |
| 191 // has to be performed, and will resume once auto-enrollment completes. | 188 // has to be performed, and will resume once auto-enrollment completes. |
| 192 void CompleteLoginInternal( | 189 void CompleteLoginInternal( |
| 193 const std::string& username, | 190 const UserCredentials& credentials, |
| 194 const std::string& password, | |
| 195 DeviceSettingsService::OwnershipStatus ownership_status, | 191 DeviceSettingsService::OwnershipStatus ownership_status, |
| 196 bool is_owner); | 192 bool is_owner); |
| 197 | 193 |
| 198 // Creates |login_performer_| if necessary and calls login() on it. | 194 // Creates |login_performer_| if necessary and calls login() on it. |
| 199 // The string arguments aren't passed by const reference because this is | 195 // The string arguments aren't passed by const reference because this is |
| 200 // posted as |resume_login_callback_| and resets it. | 196 // posted as |resume_login_callback_| and resets it. |
| 201 void PerformLogin(std::string username, | 197 void PerformLogin(const UserCredentials& credentials, |
| 202 std::string password, | |
| 203 LoginPerformer::AuthorizationMode auth_mode); | 198 LoginPerformer::AuthorizationMode auth_mode); |
| 204 | 199 |
| 205 void set_login_performer_delegate(LoginPerformer::Delegate* d) { | 200 void set_login_performer_delegate(LoginPerformer::Delegate* d) { |
| 206 login_performer_delegate_.reset(d); | 201 login_performer_delegate_.reset(d); |
| 207 } | 202 } |
| 208 | 203 |
| 209 // Updates the |login_display_| attached to this controller. | 204 // Updates the |login_display_| attached to this controller. |
| 210 void UpdateLoginDisplay(const UserList& users); | 205 void UpdateLoginDisplay(const UserList& users); |
| 211 | 206 |
| 212 // Public session auto-login timer. | 207 // Public session auto-login timer. |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 base::OneShotTimer<ExistingUserController> reboot_timer_; | 290 base::OneShotTimer<ExistingUserController> reboot_timer_; |
| 296 | 291 |
| 297 FRIEND_TEST_ALL_PREFIXES(ExistingUserControllerTest, ExistingUserLogin); | 292 FRIEND_TEST_ALL_PREFIXES(ExistingUserControllerTest, ExistingUserLogin); |
| 298 | 293 |
| 299 DISALLOW_COPY_AND_ASSIGN(ExistingUserController); | 294 DISALLOW_COPY_AND_ASSIGN(ExistingUserController); |
| 300 }; | 295 }; |
| 301 | 296 |
| 302 } // namespace chromeos | 297 } // namespace chromeos |
| 303 | 298 |
| 304 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ | 299 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ |
| OLD | NEW |