| 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 25 matching lines...) Expand all Loading... |
| 36 #include "chrome/browser/chrome_notification_types.h" | 36 #include "chrome/browser/chrome_notification_types.h" |
| 37 #include "chrome/browser/chromeos/boot_times_loader.h" | 37 #include "chrome/browser/chromeos/boot_times_loader.h" |
| 38 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 38 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
| 39 #include "chrome/browser/chromeos/login/chrome_restart_request.h" | 39 #include "chrome/browser/chromeos/login/chrome_restart_request.h" |
| 40 #include "chrome/browser/chromeos/login/input_events_blocker.h" | 40 #include "chrome/browser/chromeos/login/input_events_blocker.h" |
| 41 #include "chrome/browser/chromeos/login/login_display_host.h" | 41 #include "chrome/browser/chromeos/login/login_display_host.h" |
| 42 #include "chrome/browser/chromeos/login/oauth2_login_manager.h" | 42 #include "chrome/browser/chromeos/login/oauth2_login_manager.h" |
| 43 #include "chrome/browser/chromeos/login/oauth2_login_manager_factory.h" | 43 #include "chrome/browser/chromeos/login/oauth2_login_manager_factory.h" |
| 44 #include "chrome/browser/chromeos/login/parallel_authenticator.h" | 44 #include "chrome/browser/chromeos/login/parallel_authenticator.h" |
| 45 #include "chrome/browser/chromeos/login/profile_auth_data.h" | 45 #include "chrome/browser/chromeos/login/profile_auth_data.h" |
| 46 #include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.h" |
| 47 #include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter_factory
.h" |
| 46 #include "chrome/browser/chromeos/login/screen_locker.h" | 48 #include "chrome/browser/chromeos/login/screen_locker.h" |
| 47 #include "chrome/browser/chromeos/login/supervised_user_manager.h" | 49 #include "chrome/browser/chromeos/login/supervised_user_manager.h" |
| 50 #include "chrome/browser/chromeos/login/user.h" |
| 48 #include "chrome/browser/chromeos/login/user_manager.h" | 51 #include "chrome/browser/chromeos/login/user_manager.h" |
| 49 #include "chrome/browser/chromeos/settings/cros_settings.h" | 52 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 50 #include "chrome/browser/extensions/extension_service.h" | 53 #include "chrome/browser/extensions/extension_service.h" |
| 51 #include "chrome/browser/first_run/first_run.h" | 54 #include "chrome/browser/first_run/first_run.h" |
| 52 #include "chrome/browser/google/google_util_chromeos.h" | 55 #include "chrome/browser/google/google_util_chromeos.h" |
| 53 #include "chrome/browser/lifetime/application_lifetime.h" | 56 #include "chrome/browser/lifetime/application_lifetime.h" |
| 54 #include "chrome/browser/net/nss_context.h" | 57 #include "chrome/browser/net/nss_context.h" |
| 55 #include "chrome/browser/pref_service_flags_storage.h" | 58 #include "chrome/browser/pref_service_flags_storage.h" |
| 56 #include "chrome/browser/profiles/profile.h" | 59 #include "chrome/browser/profiles/profile.h" |
| 57 #include "chrome/browser/profiles/profile_manager.h" | 60 #include "chrome/browser/profiles/profile_manager.h" |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 btl->AddLoginTimeMarker("TPMOwn-Start", false); | 582 btl->AddLoginTimeMarker("TPMOwn-Start", false); |
| 580 if (cryptohome_util::TpmIsEnabled() && !cryptohome_util::TpmIsBeingOwned()) { | 583 if (cryptohome_util::TpmIsEnabled() && !cryptohome_util::TpmIsBeingOwned()) { |
| 581 if (cryptohome_util::TpmIsOwned()) { | 584 if (cryptohome_util::TpmIsOwned()) { |
| 582 client->CallTpmClearStoredPasswordAndBlock(); | 585 client->CallTpmClearStoredPasswordAndBlock(); |
| 583 } else { | 586 } else { |
| 584 client->TpmCanAttemptOwnership(EmptyVoidDBusMethodCallback()); | 587 client->TpmCanAttemptOwnership(EmptyVoidDBusMethodCallback()); |
| 585 } | 588 } |
| 586 } | 589 } |
| 587 btl->AddLoginTimeMarker("TPMOwn-End", false); | 590 btl->AddLoginTimeMarker("TPMOwn-End", false); |
| 588 | 591 |
| 592 if (UserManager::Get()->IsLoggedInAsRegularUser()) { |
| 593 SAMLOfflineSigninLimiter* saml_offline_signin_limiter = |
| 594 SAMLOfflineSigninLimiterFactory::GetForProfile(user_profile); |
| 595 if (saml_offline_signin_limiter) |
| 596 saml_offline_signin_limiter->SignedIn(user_context_.auth_flow); |
| 597 } |
| 598 |
| 589 user_profile->OnLogin(); | 599 user_profile->OnLogin(); |
| 590 | 600 |
| 591 // Send the notification before creating the browser so additional objects | 601 // Send the notification before creating the browser so additional objects |
| 592 // that need the profile (e.g. the launcher) can be created first. | 602 // that need the profile (e.g. the launcher) can be created first. |
| 593 content::NotificationService::current()->Notify( | 603 content::NotificationService::current()->Notify( |
| 594 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 604 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
| 595 content::NotificationService::AllSources(), | 605 content::NotificationService::AllSources(), |
| 596 content::Details<Profile>(user_profile)); | 606 content::Details<Profile>(user_profile)); |
| 597 | 607 |
| 598 // Initialize RLZ and CertLoader only for primary user. | 608 // Initialize RLZ and CertLoader only for primary user. |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 903 CrosSettings* cros_settings = CrosSettings::Get(); | 913 CrosSettings* cros_settings = CrosSettings::Get(); |
| 904 bool allow_new_user = false; | 914 bool allow_new_user = false; |
| 905 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); | 915 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); |
| 906 if (allow_new_user) | 916 if (allow_new_user) |
| 907 return true; | 917 return true; |
| 908 return cros_settings->FindEmailInList( | 918 return cros_settings->FindEmailInList( |
| 909 kAccountsPrefUsers, username, wildcard_match); | 919 kAccountsPrefUsers, username, wildcard_match); |
| 910 } | 920 } |
| 911 | 921 |
| 912 } // namespace chromeos | 922 } // namespace chromeos |
| OLD | NEW |