| 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_offline_signin_limiter.h" |
| 47 #include "chrome/browser/chromeos/login/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/pref_service_flags_storage.h" | 57 #include "chrome/browser/pref_service_flags_storage.h" |
| 55 #include "chrome/browser/profiles/profile.h" | 58 #include "chrome/browser/profiles/profile.h" |
| 56 #include "chrome/browser/profiles/profile_manager.h" | 59 #include "chrome/browser/profiles/profile_manager.h" |
| 57 #include "chrome/browser/rlz/rlz.h" | 60 #include "chrome/browser/rlz/rlz.h" |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 btl->AddLoginTimeMarker("TPMOwn-Start", false); | 571 btl->AddLoginTimeMarker("TPMOwn-Start", false); |
| 569 if (cryptohome_util::TpmIsEnabled() && !cryptohome_util::TpmIsBeingOwned()) { | 572 if (cryptohome_util::TpmIsEnabled() && !cryptohome_util::TpmIsBeingOwned()) { |
| 570 if (cryptohome_util::TpmIsOwned()) { | 573 if (cryptohome_util::TpmIsOwned()) { |
| 571 client->CallTpmClearStoredPasswordAndBlock(); | 574 client->CallTpmClearStoredPasswordAndBlock(); |
| 572 } else { | 575 } else { |
| 573 client->TpmCanAttemptOwnership(EmptyVoidDBusMethodCallback()); | 576 client->TpmCanAttemptOwnership(EmptyVoidDBusMethodCallback()); |
| 574 } | 577 } |
| 575 } | 578 } |
| 576 btl->AddLoginTimeMarker("TPMOwn-End", false); | 579 btl->AddLoginTimeMarker("TPMOwn-End", false); |
| 577 | 580 |
| 581 if (UserManager::Get()->IsLoggedInAsRegularUser()) { |
| 582 SAMLOfflineSigninLimiter* saml_offline_signin_limiter = |
| 583 SAMLOfflineSigninLimiterFactory::GetForProfile(user_profile); |
| 584 if (saml_offline_signin_limiter) |
| 585 saml_offline_signin_limiter->SignedIn(user_context_.auth_flow); |
| 586 } |
| 587 |
| 578 user_profile->OnLogin(); | 588 user_profile->OnLogin(); |
| 579 | 589 |
| 580 // Send the notification before creating the browser so additional objects | 590 // Send the notification before creating the browser so additional objects |
| 581 // that need the profile (e.g. the launcher) can be created first. | 591 // that need the profile (e.g. the launcher) can be created first. |
| 582 content::NotificationService::current()->Notify( | 592 content::NotificationService::current()->Notify( |
| 583 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 593 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
| 584 content::NotificationService::AllSources(), | 594 content::NotificationService::AllSources(), |
| 585 content::Details<Profile>(user_profile)); | 595 content::Details<Profile>(user_profile)); |
| 586 | 596 |
| 587 // Initialize RLZ only for primary user. | 597 // Initialize RLZ only for primary user. |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 878 | 888 |
| 879 CrosSettings* cros_settings = CrosSettings::Get(); | 889 CrosSettings* cros_settings = CrosSettings::Get(); |
| 880 bool allow_new_user = false; | 890 bool allow_new_user = false; |
| 881 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); | 891 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); |
| 882 if (allow_new_user) | 892 if (allow_new_user) |
| 883 return true; | 893 return true; |
| 884 return cros_settings->FindEmailInList(kAccountsPrefUsers, username); | 894 return cros_settings->FindEmailInList(kAccountsPrefUsers, username); |
| 885 } | 895 } |
| 886 | 896 |
| 887 } // namespace chromeos | 897 } // namespace chromeos |
| OLD | NEW |