Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 207 void LoginUtilsImpl::CompleteLogin( | 207 void LoginUtilsImpl::CompleteLogin( |
| 208 const std::string& username, | 208 const std::string& username, |
| 209 const std::string& password, | 209 const std::string& password, |
| 210 const GaiaAuthConsumer::ClientLoginResult& credentials, | 210 const GaiaAuthConsumer::ClientLoginResult& credentials, |
| 211 bool pending_requests) { | 211 bool pending_requests) { |
| 212 BootTimesLoader* btl = BootTimesLoader::Get(); | 212 BootTimesLoader* btl = BootTimesLoader::Get(); |
| 213 | 213 |
| 214 VLOG(1) << "Completing login for " << username; | 214 VLOG(1) << "Completing login for " << username; |
| 215 btl->AddLoginTimeMarker("CompletingLogin", false); | 215 btl->AddLoginTimeMarker("CompletingLogin", false); |
| 216 | 216 |
| 217 // Own the lockbox if still not owned. This is not critical if it fails | |
|
Will Drewry
2011/04/15 02:38:19
s/own/Finalize/gi (lock, seal, whatever :)
| |
| 218 // because the lockbox will be sealed on the first home mount anyway. | |
| 219 if (CrosLibrary::Get()->EnsureLoaded()) { | |
| 220 CryptohomeLibrary* cryptohome = CrosLibrary::Get()->GetCryptohomeLibrary(); | |
| 221 if (cryptohome && cryptohome->InstallAttributesIsReady() && | |
| 222 cryptohome->InstallAttributesIsFirstInstall()) { | |
| 223 cryptohome->InstallAttributesSet("enterprise.owned", "false"); | |
| 224 cryptohome->InstallAttributesFinalize(); | |
| 225 } | |
| 226 } | |
| 227 | |
| 217 if (CrosLibrary::Get()->EnsureLoaded()) { | 228 if (CrosLibrary::Get()->EnsureLoaded()) { |
| 218 CrosLibrary::Get()->GetLoginLibrary()->StartSession(username, ""); | 229 CrosLibrary::Get()->GetLoginLibrary()->StartSession(username, ""); |
| 219 btl->AddLoginTimeMarker("StartedSession", false); | 230 btl->AddLoginTimeMarker("StartedSession", false); |
| 220 } | 231 } |
| 221 | 232 |
| 222 bool first_login = !UserManager::Get()->IsKnownUser(username); | 233 bool first_login = !UserManager::Get()->IsKnownUser(username); |
| 223 UserManager::Get()->UserLoggedIn(username); | 234 UserManager::Get()->UserLoggedIn(username); |
| 224 btl->AddLoginTimeMarker("UserLoggedIn", false); | 235 btl->AddLoginTimeMarker("UserLoggedIn", false); |
| 225 | 236 |
| 226 // Now get the new profile. | 237 // Now get the new profile. |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 592 BrowserInit browser_init; | 603 BrowserInit browser_init; |
| 593 int return_code; | 604 int return_code; |
| 594 browser_init.LaunchBrowser(*CommandLine::ForCurrentProcess(), | 605 browser_init.LaunchBrowser(*CommandLine::ForCurrentProcess(), |
| 595 profile, | 606 profile, |
| 596 FilePath(), | 607 FilePath(), |
| 597 true, | 608 true, |
| 598 &return_code); | 609 &return_code); |
| 599 } | 610 } |
| 600 | 611 |
| 601 } // namespace chromeos | 612 } // namespace chromeos |
| OLD | NEW |