Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/profiles/profile_io_data.h" | 5 #include "chrome/browser/profiles/profile_io_data.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1083 use_system_key_slot_ = profile_params_->use_system_key_slot; | 1083 use_system_key_slot_ = profile_params_->use_system_key_slot; |
| 1084 if (use_system_key_slot_) | 1084 if (use_system_key_slot_) |
| 1085 EnableNSSSystemKeySlotForResourceContext(resource_context_.get()); | 1085 EnableNSSSystemKeySlotForResourceContext(resource_context_.get()); |
| 1086 | 1086 |
| 1087 crypto::ScopedPK11Slot public_slot = | 1087 crypto::ScopedPK11Slot public_slot = |
| 1088 crypto::GetPublicSlotForChromeOSUser(username_hash_); | 1088 crypto::GetPublicSlotForChromeOSUser(username_hash_); |
| 1089 // The private slot won't be ready by this point. It shouldn't be necessary | 1089 // The private slot won't be ready by this point. It shouldn't be necessary |
| 1090 // for cert trust purposes anyway. | 1090 // for cert trust purposes anyway. |
| 1091 scoped_refptr<net::CertVerifyProc> verify_proc( | 1091 scoped_refptr<net::CertVerifyProc> verify_proc( |
| 1092 new chromeos::CertVerifyProcChromeOS(public_slot.Pass())); | 1092 new chromeos::CertVerifyProcChromeOS(public_slot.Pass())); |
| 1093 if (policy_cert_verifier_) { | 1093 if (policy_cert_verifier_) { |
|
estark
2015/07/09 17:27:21
I'm not quite sure how to deal with policy_cert_ve
| |
| 1094 DCHECK_EQ(policy_cert_verifier_, cert_verifier_.get()); | 1094 DCHECK_EQ(policy_cert_verifier_, cert_verifier_.get()); |
| 1095 policy_cert_verifier_->InitializeOnIOThread(verify_proc); | 1095 policy_cert_verifier_->InitializeOnIOThread(verify_proc); |
| 1096 } else { | 1096 } else { |
| 1097 cert_verifier_.reset(new net::MultiThreadedCertVerifier(verify_proc.get())); | 1097 cert_verifier_.reset( |
| 1098 net::CertVerifier::CreateWithVerifyProc(verify_proc.get())); | |
| 1098 } | 1099 } |
| 1099 main_request_context_->set_cert_verifier(cert_verifier_.get()); | 1100 main_request_context_->set_cert_verifier(cert_verifier_.get()); |
| 1100 #else | 1101 #else |
| 1101 main_request_context_->set_cert_verifier( | 1102 main_request_context_->set_cert_verifier( |
| 1102 io_thread_globals->cert_verifier.get()); | 1103 io_thread_globals->cert_verifier.get()); |
| 1103 #endif | 1104 #endif |
| 1104 | 1105 |
| 1105 // Install the New Tab Page Interceptor. | 1106 // Install the New Tab Page Interceptor. |
| 1106 if (profile_params_->new_tab_page_interceptor.get()) { | 1107 if (profile_params_->new_tab_page_interceptor.get()) { |
| 1107 request_interceptors.push_back( | 1108 request_interceptors.push_back( |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1297 new DevToolsNetworkTransactionFactory( | 1298 new DevToolsNetworkTransactionFactory( |
| 1298 network_controller_.get(), shared_session), | 1299 network_controller_.get(), shared_session), |
| 1299 shared_session->net_log(), backend)); | 1300 shared_session->net_log(), backend)); |
| 1300 } | 1301 } |
| 1301 | 1302 |
| 1302 void ProfileIOData::SetCookieSettingsForTesting( | 1303 void ProfileIOData::SetCookieSettingsForTesting( |
| 1303 content_settings::CookieSettings* cookie_settings) { | 1304 content_settings::CookieSettings* cookie_settings) { |
| 1304 DCHECK(!cookie_settings_.get()); | 1305 DCHECK(!cookie_settings_.get()); |
| 1305 cookie_settings_ = cookie_settings; | 1306 cookie_settings_ = cookie_settings; |
| 1306 } | 1307 } |
| OLD | NEW |