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

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: . 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
« chrome/browser/io_thread.cc ('K') | « 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 f8a5dc80c24ce43d9d5d8aeacf1832f0195a4f10..a9775e0aa3bbc57d30846013fda6fa361448a245 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());
« chrome/browser/io_thread.cc ('K') | « chrome/browser/io_thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698