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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 142 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
143 #include "chrome/browser/chromeos/settings/cros_settings.h" | 143 #include "chrome/browser/chromeos/settings/cros_settings.h" |
144 #include "chrome/browser/net/nss_context.h" | 144 #include "chrome/browser/net/nss_context.h" |
145 #include "chromeos/dbus/dbus_thread_manager.h" | 145 #include "chromeos/dbus/dbus_thread_manager.h" |
146 #include "chromeos/settings/cros_settings_names.h" | 146 #include "chromeos/settings/cros_settings_names.h" |
147 #include "chromeos/tpm/tpm_token_info_getter.h" | 147 #include "chromeos/tpm/tpm_token_info_getter.h" |
148 #include "components/user_manager/user.h" | 148 #include "components/user_manager/user.h" |
149 #include "components/user_manager/user_manager.h" | 149 #include "components/user_manager/user_manager.h" |
150 #include "crypto/nss_util.h" | 150 #include "crypto/nss_util.h" |
151 #include "crypto/nss_util_internal.h" | 151 #include "crypto/nss_util_internal.h" |
152 #include "net/cert/cert_verifier.h" | 152 #include "net/cert/caching_cert_verifier.h" |
153 #include "net/cert/multi_threaded_cert_verifier.h" | 153 #include "net/cert/multi_threaded_cert_verifier.h" |
154 #endif // defined(OS_CHROMEOS) | 154 #endif // defined(OS_CHROMEOS) |
155 | 155 |
156 #if defined(USE_NSS_CERTS) | 156 #if defined(USE_NSS_CERTS) |
157 #include "chrome/browser/ui/crypto_module_delegate_nss.h" | 157 #include "chrome/browser/ui/crypto_module_delegate_nss.h" |
158 #include "net/ssl/client_cert_store_nss.h" | 158 #include "net/ssl/client_cert_store_nss.h" |
159 #endif | 159 #endif |
160 | 160 |
161 #if defined(OS_WIN) | 161 #if defined(OS_WIN) |
162 #include "net/ssl/client_cert_store_win.h" | 162 #include "net/ssl/client_cert_store_win.h" |
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1121 crypto::ScopedPK11Slot public_slot = | 1121 crypto::ScopedPK11Slot public_slot = |
1122 crypto::GetPublicSlotForChromeOSUser(username_hash_); | 1122 crypto::GetPublicSlotForChromeOSUser(username_hash_); |
1123 // The private slot won't be ready by this point. It shouldn't be necessary | 1123 // The private slot won't be ready by this point. It shouldn't be necessary |
1124 // for cert trust purposes anyway. | 1124 // for cert trust purposes anyway. |
1125 scoped_refptr<net::CertVerifyProc> verify_proc( | 1125 scoped_refptr<net::CertVerifyProc> verify_proc( |
1126 new chromeos::CertVerifyProcChromeOS(std::move(public_slot))); | 1126 new chromeos::CertVerifyProcChromeOS(std::move(public_slot))); |
1127 if (policy_cert_verifier_) { | 1127 if (policy_cert_verifier_) { |
1128 DCHECK_EQ(policy_cert_verifier_, cert_verifier_.get()); | 1128 DCHECK_EQ(policy_cert_verifier_, cert_verifier_.get()); |
1129 policy_cert_verifier_->InitializeOnIOThread(verify_proc); | 1129 policy_cert_verifier_->InitializeOnIOThread(verify_proc); |
1130 } else { | 1130 } else { |
1131 cert_verifier_.reset( | 1131 cert_verifier_ = base::MakeUnique<net::CachingCertVerifier>( |
1132 new net::MultiThreadedCertVerifier(verify_proc.get())); | 1132 base::MakeUnique<net::MultiThreadedCertVerifier>(verify_proc.get())); |
1133 } | 1133 } |
1134 main_request_context_->set_cert_verifier(cert_verifier_.get()); | 1134 main_request_context_->set_cert_verifier(cert_verifier_.get()); |
1135 #else | 1135 #else |
1136 main_request_context_->set_cert_verifier( | 1136 main_request_context_->set_cert_verifier( |
1137 io_thread_globals->cert_verifier.get()); | 1137 io_thread_globals->cert_verifier.get()); |
1138 #endif | 1138 #endif |
1139 } | 1139 } |
1140 | 1140 |
1141 // Install the New Tab Page Interceptor. | 1141 // Install the New Tab Page Interceptor. |
1142 if (profile_params_->new_tab_page_interceptor.get()) { | 1142 if (profile_params_->new_tab_page_interceptor.get()) { |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1356 void ProfileIOData::SetCookieSettingsForTesting( | 1356 void ProfileIOData::SetCookieSettingsForTesting( |
1357 content_settings::CookieSettings* cookie_settings) { | 1357 content_settings::CookieSettings* cookie_settings) { |
1358 DCHECK(!cookie_settings_.get()); | 1358 DCHECK(!cookie_settings_.get()); |
1359 cookie_settings_ = cookie_settings; | 1359 cookie_settings_ = cookie_settings; |
1360 } | 1360 } |
1361 | 1361 |
1362 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( | 1362 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( |
1363 const GURL& url) const { | 1363 const GURL& url) const { |
1364 return url_blacklist_manager_->GetURLBlacklistState(url); | 1364 return url_blacklist_manager_->GetURLBlacklistState(url); |
1365 } | 1365 } |
OLD | NEW |