| 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" |
| 11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "base/strings/string16.h" | 16 #include "base/strings/string16.h" |
| 17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
| 18 #include "base/timer/timer.h" | 18 #include "base/timer/timer.h" |
| 19 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 19 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
| 20 #include "chrome/browser/chromeos/login/session/user_session_manager.h" | 20 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
| 21 #include "chrome/browser/chromeos/login/signin/token_handle_util.h" | |
| 22 #include "chrome/browser/chromeos/login/ui/login_display.h" | 21 #include "chrome/browser/chromeos/login/ui/login_display.h" |
| 23 #include "chrome/browser/chromeos/settings/cros_settings.h" | 22 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 24 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 23 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
| 25 #include "chromeos/login/auth/login_performer.h" | 24 #include "chromeos/login/auth/login_performer.h" |
| 26 #include "chromeos/login/auth/user_context.h" | 25 #include "chromeos/login/auth/user_context.h" |
| 27 #include "components/user_manager/user.h" | 26 #include "components/user_manager/user.h" |
| 28 #include "content/public/browser/notification_observer.h" | 27 #include "content/public/browser/notification_observer.h" |
| 29 #include "content/public/browser/notification_registrar.h" | 28 #include "content/public/browser/notification_registrar.h" |
| 30 #include "ui/gfx/geometry/rect.h" | 29 #include "ui/gfx/geometry/rect.h" |
| 31 #include "url/gurl.h" | 30 #include "url/gurl.h" |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 void DoLogin(const UserContext& user_context, | 235 void DoLogin(const UserContext& user_context, |
| 237 const SigninSpecifics& specifics); | 236 const SigninSpecifics& specifics); |
| 238 | 237 |
| 239 // Callback invoked when |bootstrap_user_context_initializer_| has finished. | 238 // Callback invoked when |bootstrap_user_context_initializer_| has finished. |
| 240 void OnBootstrapUserContextInitialized(bool success, | 239 void OnBootstrapUserContextInitialized(bool success, |
| 241 const UserContext& user_context); | 240 const UserContext& user_context); |
| 242 | 241 |
| 243 // Callback invoked when |oauth2_token_initializer_| has finished. | 242 // Callback invoked when |oauth2_token_initializer_| has finished. |
| 244 void OnOAuth2TokensFetched(bool success, const UserContext& user_context); | 243 void OnOAuth2TokensFetched(bool success, const UserContext& user_context); |
| 245 | 244 |
| 246 // Callback invoked when |token_handle_util_| has finished. | |
| 247 void OnTokenHandleObtained(const user_manager::UserID& id, | |
| 248 TokenHandleUtil::TokenHandleStatus status); | |
| 249 | |
| 250 // Returns |true| if token handles should be used on this device. | |
| 251 bool TokenHandlesEnabled(); | |
| 252 | |
| 253 // Public session auto-login timer. | 245 // Public session auto-login timer. |
| 254 scoped_ptr<base::OneShotTimer<ExistingUserController> > auto_login_timer_; | 246 scoped_ptr<base::OneShotTimer<ExistingUserController> > auto_login_timer_; |
| 255 | 247 |
| 256 // Public session auto-login timeout, in milliseconds. | 248 // Public session auto-login timeout, in milliseconds. |
| 257 int public_session_auto_login_delay_; | 249 int public_session_auto_login_delay_; |
| 258 | 250 |
| 259 // Username for public session auto-login. | 251 // Username for public session auto-login. |
| 260 std::string public_session_auto_login_username_; | 252 std::string public_session_auto_login_username_; |
| 261 | 253 |
| 262 // Used to execute login operations. | 254 // Used to execute login operations. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 scoped_ptr<CrosSettings::ObserverSubscription> users_subscription_; | 323 scoped_ptr<CrosSettings::ObserverSubscription> users_subscription_; |
| 332 scoped_ptr<CrosSettings::ObserverSubscription> | 324 scoped_ptr<CrosSettings::ObserverSubscription> |
| 333 local_account_auto_login_id_subscription_; | 325 local_account_auto_login_id_subscription_; |
| 334 scoped_ptr<CrosSettings::ObserverSubscription> | 326 scoped_ptr<CrosSettings::ObserverSubscription> |
| 335 local_account_auto_login_delay_subscription_; | 327 local_account_auto_login_delay_subscription_; |
| 336 | 328 |
| 337 scoped_ptr<BootstrapUserContextInitializer> | 329 scoped_ptr<BootstrapUserContextInitializer> |
| 338 bootstrap_user_context_initializer_; | 330 bootstrap_user_context_initializer_; |
| 339 | 331 |
| 340 scoped_ptr<OAuth2TokenInitializer> oauth2_token_initializer_; | 332 scoped_ptr<OAuth2TokenInitializer> oauth2_token_initializer_; |
| 341 scoped_ptr<TokenHandleUtil> token_handle_util_; | |
| 342 | 333 |
| 343 FRIEND_TEST_ALL_PREFIXES(ExistingUserControllerTest, ExistingUserLogin); | 334 FRIEND_TEST_ALL_PREFIXES(ExistingUserControllerTest, ExistingUserLogin); |
| 344 | 335 |
| 345 // Factory of callbacks. | 336 // Factory of callbacks. |
| 346 base::WeakPtrFactory<ExistingUserController> weak_factory_; | 337 base::WeakPtrFactory<ExistingUserController> weak_factory_; |
| 347 | 338 |
| 348 DISALLOW_COPY_AND_ASSIGN(ExistingUserController); | 339 DISALLOW_COPY_AND_ASSIGN(ExistingUserController); |
| 349 }; | 340 }; |
| 350 | 341 |
| 351 } // namespace chromeos | 342 } // namespace chromeos |
| 352 | 343 |
| 353 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ | 344 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ |
| OLD | NEW |