| 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 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 namespace base { | 32 namespace base { |
| 33 class ListValue; | 33 class ListValue; |
| 34 } | 34 } |
| 35 | 35 |
| 36 namespace chromeos { | 36 namespace chromeos { |
| 37 | 37 |
| 38 class BootstrapUserContextInitializer; | 38 class BootstrapUserContextInitializer; |
| 39 class CrosSettings; | 39 class CrosSettings; |
| 40 class LoginDisplayHost; | 40 class LoginDisplayHost; |
| 41 class OAuth2TokenInitializer; | |
| 42 | 41 |
| 43 namespace login { | 42 namespace login { |
| 44 class NetworkStateHelper; | 43 class NetworkStateHelper; |
| 45 } | 44 } |
| 46 | 45 |
| 47 // ExistingUserController is used to handle login when someone has | 46 // ExistingUserController is used to handle login when someone has |
| 48 // already logged into the machine. | 47 // already logged into the machine. |
| 49 // To use ExistingUserController create an instance of it and invoke Init. | 48 // To use ExistingUserController create an instance of it and invoke Init. |
| 50 // When Init is called it creates LoginDisplay instance which encapsulates | 49 // When Init is called it creates LoginDisplay instance which encapsulates |
| 51 // all login UI implementation. | 50 // all login UI implementation. |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 | 231 |
| 233 // Signs in as a known user. This is a continuation of Login() that gets | 232 // Signs in as a known user. This is a continuation of Login() that gets |
| 234 // invoked after it has been verified that the device is not disabled. | 233 // invoked after it has been verified that the device is not disabled. |
| 235 void DoLogin(const UserContext& user_context, | 234 void DoLogin(const UserContext& user_context, |
| 236 const SigninSpecifics& specifics); | 235 const SigninSpecifics& specifics); |
| 237 | 236 |
| 238 // Callback invoked when |bootstrap_user_context_initializer_| has finished. | 237 // Callback invoked when |bootstrap_user_context_initializer_| has finished. |
| 239 void OnBootstrapUserContextInitialized(bool success, | 238 void OnBootstrapUserContextInitialized(bool success, |
| 240 const UserContext& user_context); | 239 const UserContext& user_context); |
| 241 | 240 |
| 242 // Callback invoked when |oauth2_token_initializer_| has finished. | |
| 243 void OnOAuth2TokensFetched(bool success, const UserContext& user_context); | |
| 244 | |
| 245 // Public session auto-login timer. | 241 // Public session auto-login timer. |
| 246 scoped_ptr<base::OneShotTimer<ExistingUserController> > auto_login_timer_; | 242 scoped_ptr<base::OneShotTimer<ExistingUserController> > auto_login_timer_; |
| 247 | 243 |
| 248 // Public session auto-login timeout, in milliseconds. | 244 // Public session auto-login timeout, in milliseconds. |
| 249 int public_session_auto_login_delay_; | 245 int public_session_auto_login_delay_; |
| 250 | 246 |
| 251 // Username for public session auto-login. | 247 // Username for public session auto-login. |
| 252 std::string public_session_auto_login_username_; | 248 std::string public_session_auto_login_username_; |
| 253 | 249 |
| 254 // Used to execute login operations. | 250 // Used to execute login operations. |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 scoped_ptr<CrosSettings::ObserverSubscription> allow_guest_subscription_; | 318 scoped_ptr<CrosSettings::ObserverSubscription> allow_guest_subscription_; |
| 323 scoped_ptr<CrosSettings::ObserverSubscription> users_subscription_; | 319 scoped_ptr<CrosSettings::ObserverSubscription> users_subscription_; |
| 324 scoped_ptr<CrosSettings::ObserverSubscription> | 320 scoped_ptr<CrosSettings::ObserverSubscription> |
| 325 local_account_auto_login_id_subscription_; | 321 local_account_auto_login_id_subscription_; |
| 326 scoped_ptr<CrosSettings::ObserverSubscription> | 322 scoped_ptr<CrosSettings::ObserverSubscription> |
| 327 local_account_auto_login_delay_subscription_; | 323 local_account_auto_login_delay_subscription_; |
| 328 | 324 |
| 329 scoped_ptr<BootstrapUserContextInitializer> | 325 scoped_ptr<BootstrapUserContextInitializer> |
| 330 bootstrap_user_context_initializer_; | 326 bootstrap_user_context_initializer_; |
| 331 | 327 |
| 332 scoped_ptr<OAuth2TokenInitializer> oauth2_token_initializer_; | |
| 333 | |
| 334 FRIEND_TEST_ALL_PREFIXES(ExistingUserControllerTest, ExistingUserLogin); | 328 FRIEND_TEST_ALL_PREFIXES(ExistingUserControllerTest, ExistingUserLogin); |
| 335 | 329 |
| 336 // Factory of callbacks. | 330 // Factory of callbacks. |
| 337 base::WeakPtrFactory<ExistingUserController> weak_factory_; | 331 base::WeakPtrFactory<ExistingUserController> weak_factory_; |
| 338 | 332 |
| 339 DISALLOW_COPY_AND_ASSIGN(ExistingUserController); | 333 DISALLOW_COPY_AND_ASSIGN(ExistingUserController); |
| 340 }; | 334 }; |
| 341 | 335 |
| 342 } // namespace chromeos | 336 } // namespace chromeos |
| 343 | 337 |
| 344 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ | 338 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ |
| OLD | NEW |