| 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 #include "chrome/browser/chromeos/login/login_utils.h" | 5 #include "chrome/browser/chromeos/login/login_utils.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "base/sys_info.h" | 29 #include "base/sys_info.h" |
| 30 #include "base/task_runner_util.h" | 30 #include "base/task_runner_util.h" |
| 31 #include "base/threading/worker_pool.h" | 31 #include "base/threading/worker_pool.h" |
| 32 #include "base/time/time.h" | 32 #include "base/time/time.h" |
| 33 #include "chrome/browser/about_flags.h" | 33 #include "chrome/browser/about_flags.h" |
| 34 #include "chrome/browser/app_mode/app_mode_utils.h" | 34 #include "chrome/browser/app_mode/app_mode_utils.h" |
| 35 #include "chrome/browser/browser_process.h" | 35 #include "chrome/browser/browser_process.h" |
| 36 #include "chrome/browser/browser_shutdown.h" | 36 #include "chrome/browser/browser_shutdown.h" |
| 37 #include "chrome/browser/chrome_notification_types.h" | 37 #include "chrome/browser/chrome_notification_types.h" |
| 38 #include "chrome/browser/chromeos/boot_times_loader.h" | 38 #include "chrome/browser/chromeos/boot_times_loader.h" |
| 39 #include "chrome/browser/chromeos/login/auth/parallel_authenticator.h" | 39 #include "chrome/browser/chromeos/login/auth/chrome_cryptohome_authenticator.h" |
| 40 #include "chrome/browser/chromeos/login/chrome_restart_request.h" | 40 #include "chrome/browser/chromeos/login/chrome_restart_request.h" |
| 41 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" | 41 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" |
| 42 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 42 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
| 43 #include "chrome/browser/chromeos/login/lock/screen_locker.h" | 43 #include "chrome/browser/chromeos/login/lock/screen_locker.h" |
| 44 #include "chrome/browser/chromeos/login/profile_auth_data.h" | 44 #include "chrome/browser/chromeos/login/profile_auth_data.h" |
| 45 #include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.h" | 45 #include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.h" |
| 46 #include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter_factory
.h" | 46 #include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter_factory
.h" |
| 47 #include "chrome/browser/chromeos/login/session/user_session_manager.h" | 47 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
| 48 #include "chrome/browser/chromeos/login/signin/oauth2_login_manager.h" | 48 #include "chrome/browser/chromeos/login/signin/oauth2_login_manager.h" |
| 49 #include "chrome/browser/chromeos/login/signin/oauth2_login_manager_factory.h" | 49 #include "chrome/browser/chromeos/login/signin/oauth2_login_manager_factory.h" |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 scoped_refptr<Authenticator> LoginUtilsImpl::CreateAuthenticator( | 414 scoped_refptr<Authenticator> LoginUtilsImpl::CreateAuthenticator( |
| 415 AuthStatusConsumer* consumer) { | 415 AuthStatusConsumer* consumer) { |
| 416 // Screen locker needs new Authenticator instance each time. | 416 // Screen locker needs new Authenticator instance each time. |
| 417 if (ScreenLocker::default_screen_locker()) { | 417 if (ScreenLocker::default_screen_locker()) { |
| 418 if (authenticator_.get()) | 418 if (authenticator_.get()) |
| 419 authenticator_->SetConsumer(NULL); | 419 authenticator_->SetConsumer(NULL); |
| 420 authenticator_ = NULL; | 420 authenticator_ = NULL; |
| 421 } | 421 } |
| 422 | 422 |
| 423 if (authenticator_.get() == NULL) { | 423 if (authenticator_.get() == NULL) { |
| 424 authenticator_ = new ParallelAuthenticator(consumer); | 424 authenticator_ = new ChromeCryptohomeAuthenticator(consumer); |
| 425 } else { | 425 } else { |
| 426 // TODO(nkostylev): Fix this hack by improving Authenticator dependencies. | 426 // TODO(nkostylev): Fix this hack by improving Authenticator dependencies. |
| 427 authenticator_->SetConsumer(consumer); | 427 authenticator_->SetConsumer(consumer); |
| 428 } | 428 } |
| 429 return authenticator_; | 429 return authenticator_; |
| 430 } | 430 } |
| 431 | 431 |
| 432 void LoginUtilsImpl::OnProfilePrepared(Profile* profile) { | 432 void LoginUtilsImpl::OnProfilePrepared(Profile* profile) { |
| 433 if (delegate_) | 433 if (delegate_) |
| 434 delegate_->OnProfilePrepared(profile); | 434 delegate_->OnProfilePrepared(profile); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 CrosSettings* cros_settings = CrosSettings::Get(); | 486 CrosSettings* cros_settings = CrosSettings::Get(); |
| 487 bool allow_new_user = false; | 487 bool allow_new_user = false; |
| 488 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); | 488 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); |
| 489 if (allow_new_user) | 489 if (allow_new_user) |
| 490 return true; | 490 return true; |
| 491 return cros_settings->FindEmailInList( | 491 return cros_settings->FindEmailInList( |
| 492 kAccountsPrefUsers, username, wildcard_match); | 492 kAccountsPrefUsers, username, wildcard_match); |
| 493 } | 493 } |
| 494 | 494 |
| 495 } // namespace chromeos | 495 } // namespace chromeos |
| OLD | NEW |