| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 // If |details| string is not empty, it specify additional error text | 160 // If |details| string is not empty, it specify additional error text |
| 161 // provided by authenticator, it is not localized. | 161 // provided by authenticator, it is not localized. |
| 162 void ShowError(int error_id, const std::string& details); | 162 void ShowError(int error_id, const std::string& details); |
| 163 | 163 |
| 164 // Shows Gaia page because password change was detected. | 164 // Shows Gaia page because password change was detected. |
| 165 void ShowGaiaPasswordChanged(const std::string& username); | 165 void ShowGaiaPasswordChanged(const std::string& username); |
| 166 | 166 |
| 167 // Handles result of ownership check and starts enterprise or kiosk enrollment | 167 // Handles result of ownership check and starts enterprise or kiosk enrollment |
| 168 // if applicable. | 168 // if applicable. |
| 169 void OnEnrollmentOwnershipCheckCompleted( | 169 void OnEnrollmentOwnershipCheckCompleted( |
| 170 DeviceSettingsService::OwnershipStatus status, | 170 DeviceSettingsService::OwnershipStatus status); |
| 171 bool current_user_is_owner); | |
| 172 | 171 |
| 173 // Handles result of consumer kiosk configurability check and starts | 172 // Handles result of consumer kiosk configurability check and starts |
| 174 // enable kiosk screen if applicable. | 173 // enable kiosk screen if applicable. |
| 175 void OnConsumerKioskModeCheckCompleted( | 174 void OnConsumerKioskModeCheckCompleted( |
| 176 KioskAppManager::ConsumerKioskModeStatus status); | 175 KioskAppManager::ConsumerKioskModeStatus status); |
| 177 | 176 |
| 178 // Enters the enterprise enrollment screen. |forced| is true if this is the | 177 // Enters the enterprise enrollment screen. |forced| is true if this is the |
| 179 // result of an auto-enrollment check, and the user shouldn't be able to | 178 // result of an auto-enrollment check, and the user shouldn't be able to |
| 180 // easily cancel the enrollment. In that case, |user| is the user name that | 179 // easily cancel the enrollment. In that case, |user| is the user name that |
| 181 // first logged in. | 180 // first logged in. |
| 182 void ShowEnrollmentScreen(bool forced, const std::string& user); | 181 void ShowEnrollmentScreen(bool forced, const std::string& user); |
| 183 | 182 |
| 184 // Shows "reset device" screen. | 183 // Shows "reset device" screen. |
| 185 void ShowResetScreen(); | 184 void ShowResetScreen(); |
| 186 | 185 |
| 187 // Shows kiosk feature enable screen. | 186 // Shows kiosk feature enable screen. |
| 188 void ShowKioskEnableScreen(); | 187 void ShowKioskEnableScreen(); |
| 189 | 188 |
| 190 // Shows "kiosk auto-launch permission" screen. | 189 // Shows "kiosk auto-launch permission" screen. |
| 191 void ShowKioskAutolaunchScreen(); | 190 void ShowKioskAutolaunchScreen(); |
| 192 | 191 |
| 193 // Shows "critical TPM error" screen. | 192 // Shows "critical TPM error" screen. |
| 194 void ShowTPMError(); | 193 void ShowTPMError(); |
| 195 | 194 |
| 196 // Invoked to complete login. Login might be suspended if auto-enrollment | 195 // Invoked to complete login. Login might be suspended if auto-enrollment |
| 197 // has to be performed, and will resume once auto-enrollment completes. | 196 // has to be performed, and will resume once auto-enrollment completes. |
| 198 void CompleteLoginInternal( | 197 void CompleteLoginInternal( |
| 199 const UserContext& user_context, | 198 const UserContext& user_context, |
| 200 DeviceSettingsService::OwnershipStatus ownership_status, | 199 DeviceSettingsService::OwnershipStatus ownership_status); |
| 201 bool is_owner); | |
| 202 | 200 |
| 203 // Creates |login_performer_| if necessary and calls login() on it. | 201 // Creates |login_performer_| if necessary and calls login() on it. |
| 204 // The string arguments aren't passed by const reference because this is | 202 // The string arguments aren't passed by const reference because this is |
| 205 // posted as |resume_login_callback_| and resets it. | 203 // posted as |resume_login_callback_| and resets it. |
| 206 void PerformLogin(const UserContext& user_context, | 204 void PerformLogin(const UserContext& user_context, |
| 207 LoginPerformer::AuthorizationMode auth_mode); | 205 LoginPerformer::AuthorizationMode auth_mode); |
| 208 | 206 |
| 209 void set_login_performer_delegate(LoginPerformer::Delegate* d) { | 207 void set_login_performer_delegate(LoginPerformer::Delegate* d) { |
| 210 login_performer_delegate_.reset(d); | 208 login_performer_delegate_.reset(d); |
| 211 } | 209 } |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 scoped_ptr<login::NetworkStateHelper> network_state_helper_; | 299 scoped_ptr<login::NetworkStateHelper> network_state_helper_; |
| 302 | 300 |
| 303 FRIEND_TEST_ALL_PREFIXES(ExistingUserControllerTest, ExistingUserLogin); | 301 FRIEND_TEST_ALL_PREFIXES(ExistingUserControllerTest, ExistingUserLogin); |
| 304 | 302 |
| 305 DISALLOW_COPY_AND_ASSIGN(ExistingUserController); | 303 DISALLOW_COPY_AND_ASSIGN(ExistingUserController); |
| 306 }; | 304 }; |
| 307 | 305 |
| 308 } // namespace chromeos | 306 } // namespace chromeos |
| 309 | 307 |
| 310 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ | 308 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ |
| OLD | NEW |