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

Unified Diff: chrome/browser/profiles/profile_io_data.cc

Issue 150203007: ChromeOS: only use CertVerifyProcChromeOS if multiprofiles is allowed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: NOLINT, 2 spaces Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_io_data.cc
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
index d6350eca92a8202446bfb8394f2a1e72e932a740..93a949d1993570e65ee8fcc1371f399cff750809 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -970,12 +970,16 @@ void ProfileIOData::Init(content::ProtocolHandlerMap* protocol_handlers) const {
#if defined(OS_CHROMEOS)
username_hash_ = profile_params_->username_hash;
- crypto::ScopedPK11Slot public_slot =
- crypto::GetPublicSlotForChromeOSUser(username_hash_);
- // The private slot won't be ready by this point. It shouldn't be necessary
- // for cert trust purposes anyway.
- scoped_refptr<net::CertVerifyProc> verify_proc =
- new chromeos::CertVerifyProcChromeOS(public_slot.Pass());
+ scoped_refptr<net::CertVerifyProc> verify_proc;
+ if (chromeos::UserManager::IsMultipleProfilesAllowed()) {
+ crypto::ScopedPK11Slot public_slot =
+ crypto::GetPublicSlotForChromeOSUser(username_hash_);
+ // The private slot won't be ready by this point. It shouldn't be necessary
+ // for cert trust purposes anyway.
+ verify_proc = new chromeos::CertVerifyProcChromeOS(public_slot.Pass());
+ } else {
+ verify_proc = net::CertVerifyProc::CreateDefault();
+ }
if (cert_verifier_) {
cert_verifier_->InitializeOnIOThread(verify_proc);
main_request_context_->set_cert_verifier(cert_verifier_.get());
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698