| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 | 261 |
| 262 // For existing users there's usually a pending online auth request. | 262 // For existing users there's usually a pending online auth request. |
| 263 // Tokens will be fetched after it's is succeeded. | 263 // Tokens will be fetched after it's is succeeded. |
| 264 if (!pending_requests) { | 264 if (!pending_requests) { |
| 265 FetchTokens(profile, credentials); | 265 FetchTokens(profile, credentials); |
| 266 } | 266 } |
| 267 btl->AddLoginTimeMarker("TokensGotten", false); | 267 btl->AddLoginTimeMarker("TokensGotten", false); |
| 268 | 268 |
| 269 // Set the CrOS user by getting this constructor run with the | 269 // Set the CrOS user by getting this constructor run with the |
| 270 // user's email on first retrieval. | 270 // user's email on first retrieval. |
| 271 profile->GetProfileSyncService(username)->SetPassphrase(password, false); | 271 profile->GetProfileSyncService(username)->SetPassphrase(password, |
| 272 false, |
| 273 true); |
| 272 btl->AddLoginTimeMarker("SyncStarted", false); | 274 btl->AddLoginTimeMarker("SyncStarted", false); |
| 273 | 275 |
| 274 // Attempt to take ownership; this will fail if device is already owned. | 276 // Attempt to take ownership; this will fail if device is already owned. |
| 275 OwnershipService::GetSharedInstance()->StartTakeOwnershipAttempt( | 277 OwnershipService::GetSharedInstance()->StartTakeOwnershipAttempt( |
| 276 UserManager::Get()->logged_in_user().email()); | 278 UserManager::Get()->logged_in_user().email()); |
| 277 // Own TPM device if, for any reason, it has not been done in EULA | 279 // Own TPM device if, for any reason, it has not been done in EULA |
| 278 // wizard screen. | 280 // wizard screen. |
| 279 if (CrosLibrary::Get()->EnsureLoaded()) { | 281 if (CrosLibrary::Get()->EnsureLoaded()) { |
| 280 CryptohomeLibrary* cryptohome = CrosLibrary::Get()->GetCryptohomeLibrary(); | 282 CryptohomeLibrary* cryptohome = CrosLibrary::Get()->GetCryptohomeLibrary(); |
| 281 if (cryptohome->TpmIsEnabled() && !cryptohome->TpmIsBeingOwned()) { | 283 if (cryptohome->TpmIsEnabled() && !cryptohome->TpmIsBeingOwned()) { |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 BrowserInit browser_init; | 528 BrowserInit browser_init; |
| 527 int return_code; | 529 int return_code; |
| 528 browser_init.LaunchBrowser(*CommandLine::ForCurrentProcess(), | 530 browser_init.LaunchBrowser(*CommandLine::ForCurrentProcess(), |
| 529 profile, | 531 profile, |
| 530 FilePath(), | 532 FilePath(), |
| 531 true, | 533 true, |
| 532 &return_code); | 534 &return_code); |
| 533 } | 535 } |
| 534 | 536 |
| 535 } // namespace chromeos | 537 } // namespace chromeos |
| OLD | NEW |