Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: chrome/browser/chromeos/login/login_utils.cc

Issue 6538098: [Chrome OS] Owner keys are generated outside Chrome now; handle appropriately (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 } 291 }
292 btl->AddLoginTimeMarker("TokensGotten", false); 292 btl->AddLoginTimeMarker("TokensGotten", false);
293 293
294 // Set the CrOS user by getting this constructor run with the 294 // Set the CrOS user by getting this constructor run with the
295 // user's email on first retrieval. 295 // user's email on first retrieval.
296 profile->GetProfileSyncService(username)->SetPassphrase(password, 296 profile->GetProfileSyncService(username)->SetPassphrase(password,
297 false, 297 false,
298 true); 298 true);
299 btl->AddLoginTimeMarker("SyncStarted", false); 299 btl->AddLoginTimeMarker("SyncStarted", false);
300 300
301 // Attempt to take ownership; this will fail if device is already owned.
302 OwnershipService::GetSharedInstance()->StartTakeOwnershipAttempt(
303 UserManager::Get()->logged_in_user().email());
304 // Own TPM device if, for any reason, it has not been done in EULA 301 // Own TPM device if, for any reason, it has not been done in EULA
305 // wizard screen. 302 // wizard screen.
306 if (CrosLibrary::Get()->EnsureLoaded()) { 303 if (CrosLibrary::Get()->EnsureLoaded()) {
307 CryptohomeLibrary* cryptohome = CrosLibrary::Get()->GetCryptohomeLibrary(); 304 CryptohomeLibrary* cryptohome = CrosLibrary::Get()->GetCryptohomeLibrary();
308 if (cryptohome->TpmIsEnabled() && !cryptohome->TpmIsBeingOwned()) { 305 if (cryptohome->TpmIsEnabled() && !cryptohome->TpmIsBeingOwned()) {
309 if (cryptohome->TpmIsOwned()) { 306 if (cryptohome->TpmIsOwned()) {
310 cryptohome->TpmClearStoredPassword(); 307 cryptohome->TpmClearStoredPassword();
311 } else { 308 } else {
312 cryptohome->TpmCanAttemptOwnership(); 309 cryptohome->TpmCanAttemptOwnership();
313 } 310 }
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 BrowserInit browser_init; 579 BrowserInit browser_init;
583 int return_code; 580 int return_code;
584 browser_init.LaunchBrowser(*CommandLine::ForCurrentProcess(), 581 browser_init.LaunchBrowser(*CommandLine::ForCurrentProcess(),
585 profile, 582 profile,
586 FilePath(), 583 FilePath(),
587 true, 584 true,
588 &return_code); 585 &return_code);
589 } 586 }
590 587
591 } // namespace chromeos 588 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/mock_login_library.h ('k') | chrome/browser/chromeos/login/mock_owner_key_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698