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

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

Issue 10207016: Developer help: Avoid crash on starting in desktop mode (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added comment Created 8 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/user_manager_impl.h" 5 #include "chrome/browser/chromeos/login/user_manager_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/desktop_background/desktop_background_controller.h" 10 #include "ash/desktop_background/desktop_background_controller.h"
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 void UserManagerImpl::LoadKeyStore() { 900 void UserManagerImpl::LoadKeyStore() {
901 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 901 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
902 if (key_store_loaded_) 902 if (key_store_loaded_)
903 return; 903 return;
904 904
905 // Ensure we've opened the real user's key/certificate database. 905 // Ensure we've opened the real user's key/certificate database.
906 crypto::OpenPersistentNSSDB(); 906 crypto::OpenPersistentNSSDB();
907 907
908 // Only load the Opencryptoki library into NSS if we have this switch. 908 // Only load the Opencryptoki library into NSS if we have this switch.
909 // TODO(gspencer): Remove this switch once cryptohomed work is finished: 909 // TODO(gspencer): Remove this switch once cryptohomed work is finished:
910 // http://crosbug.com/12295 and http://crosbug.com/12304 910 // http://crosbug.com/12295 and 12304
911 // Note: ChromeOS login with or without loginmanager will crash when
912 // the CertLibrary is not there (http://crosbug.com/121456). Before removing
913 // make sure that that case still works.
911 if (CommandLine::ForCurrentProcess()->HasSwitch( 914 if (CommandLine::ForCurrentProcess()->HasSwitch(
912 switches::kLoadOpencryptoki)) { 915 switches::kLoadOpencryptoki) ||
916 CommandLine::ForCurrentProcess()->HasSwitch(
917 switches::kStubCros)) {
913 crypto::EnableTPMTokenForNSS(new RealTPMTokenInfoDelegate()); 918 crypto::EnableTPMTokenForNSS(new RealTPMTokenInfoDelegate());
914 CertLibrary* cert_library; 919 CertLibrary* cert_library;
915 cert_library = chromeos::CrosLibrary::Get()->GetCertLibrary(); 920 cert_library = chromeos::CrosLibrary::Get()->GetCertLibrary();
916 // Note: this calls crypto::EnsureTPMTokenReady() 921 // Note: this calls crypto::EnsureTPMTokenReady()
917 cert_library->RequestCertificates(); 922 cert_library->RequestCertificates();
918 } 923 }
919 key_store_loaded_ = true; 924 key_store_loaded_ = true;
920 } 925 }
921 926
922 void UserManagerImpl::SetInitialUserImage(const std::string& username) { 927 void UserManagerImpl::SetInitialUserImage(const std::string& username) {
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 BrowserThread::PostTask( 1266 BrowserThread::PostTask(
1262 BrowserThread::FILE, 1267 BrowserThread::FILE,
1263 FROM_HERE, 1268 FROM_HERE,
1264 base::Bind(&UserManagerImpl::DeleteUserImage, 1269 base::Bind(&UserManagerImpl::DeleteUserImage,
1265 base::Unretained(this), 1270 base::Unretained(this),
1266 image_path)); 1271 image_path));
1267 } 1272 }
1268 } 1273 }
1269 1274
1270 } // namespace chromeos 1275 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698