| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/chromeos/chromeos_version.h" | 10 #include "base/chromeos/chromeos_version.h" |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 : NULL, | 500 : NULL, |
| 501 session_restore_strategy_, | 501 session_restore_strategy_, |
| 502 oauth2_refresh_token_, | 502 oauth2_refresh_token_, |
| 503 user_context_.auth_code); | 503 user_context_.auth_code); |
| 504 } | 504 } |
| 505 | 505 |
| 506 void LoginUtilsImpl::FinalizePrepareProfile(Profile* user_profile) { | 506 void LoginUtilsImpl::FinalizePrepareProfile(Profile* user_profile) { |
| 507 BootTimesLoader* btl = BootTimesLoader::Get(); | 507 BootTimesLoader* btl = BootTimesLoader::Get(); |
| 508 // Own TPM device if, for any reason, it has not been done in EULA | 508 // Own TPM device if, for any reason, it has not been done in EULA |
| 509 // wizard screen. | 509 // wizard screen. |
| 510 CryptohomeLibrary* cryptohome = CryptohomeLibrary::Get(); | |
| 511 CryptohomeClient* client = DBusThreadManager::Get()->GetCryptohomeClient(); | 510 CryptohomeClient* client = DBusThreadManager::Get()->GetCryptohomeClient(); |
| 512 btl->AddLoginTimeMarker("TPMOwn-Start", false); | 511 btl->AddLoginTimeMarker("TPMOwn-Start", false); |
| 513 if (cryptohome->TpmIsEnabled() && !cryptohome->TpmIsBeingOwned()) { | 512 if (cryptohome_util::TpmIsEnabled() && !cryptohome_util::TpmIsBeingOwned()) { |
| 514 if (cryptohome->TpmIsOwned()) { | 513 if (cryptohome_util::TpmIsOwned()) { |
| 515 client->CallTpmClearStoredPasswordAndBlock(); | 514 client->CallTpmClearStoredPasswordAndBlock(); |
| 516 } else { | 515 } else { |
| 517 client->TpmCanAttemptOwnership(EmptyVoidDBusMethodCallback()); | 516 client->TpmCanAttemptOwnership(EmptyVoidDBusMethodCallback()); |
| 518 } | 517 } |
| 519 } | 518 } |
| 520 btl->AddLoginTimeMarker("TPMOwn-End", false); | 519 btl->AddLoginTimeMarker("TPMOwn-End", false); |
| 521 | 520 |
| 522 user_profile->OnLogin(); | 521 user_profile->OnLogin(); |
| 523 | 522 |
| 524 // Send the notification before creating the browser so additional objects | 523 // Send the notification before creating the browser so additional objects |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 833 bool LoginUtils::IsWhitelisted(const std::string& username) { | 832 bool LoginUtils::IsWhitelisted(const std::string& username) { |
| 834 CrosSettings* cros_settings = CrosSettings::Get(); | 833 CrosSettings* cros_settings = CrosSettings::Get(); |
| 835 bool allow_new_user = false; | 834 bool allow_new_user = false; |
| 836 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); | 835 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); |
| 837 if (allow_new_user) | 836 if (allow_new_user) |
| 838 return true; | 837 return true; |
| 839 return cros_settings->FindEmailInList(kAccountsPrefUsers, username); | 838 return cros_settings->FindEmailInList(kAccountsPrefUsers, username); |
| 840 } | 839 } |
| 841 | 840 |
| 842 } // namespace chromeos | 841 } // namespace chromeos |
| OLD | NEW |