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

Side by Side Diff: chrome/browser/profiles/profile_io_data.cc

Issue 2910643003: Move more SystemURLRequestContext members into its ContextStorage (Closed)
Patch Set: Response Created 3 years, 6 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 | « chrome/browser/profiles/profile_impl_io_data.cc ('k') | 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/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 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 chrome_network_delegate->set_allowed_domains_for_apps( 1023 chrome_network_delegate->set_allowed_domains_for_apps(
1024 &allowed_domains_for_apps_); 1024 &allowed_domains_for_apps_);
1025 chrome_network_delegate->set_data_use_aggregator( 1025 chrome_network_delegate->set_data_use_aggregator(
1026 io_thread_globals->data_use_aggregator.get(), IsOffTheRecord()); 1026 io_thread_globals->data_use_aggregator.get(), IsOffTheRecord());
1027 1027
1028 std::unique_ptr<net::NetworkDelegate> network_delegate = 1028 std::unique_ptr<net::NetworkDelegate> network_delegate =
1029 ConfigureNetworkDelegate(profile_params_->io_thread, 1029 ConfigureNetworkDelegate(profile_params_->io_thread,
1030 std::move(chrome_network_delegate)); 1030 std::move(chrome_network_delegate));
1031 1031
1032 main_request_context_->set_host_resolver( 1032 main_request_context_->set_host_resolver(
1033 io_thread_globals->host_resolver.get()); 1033 io_thread_globals->system_request_context->host_resolver());
1034 1034
1035 // NOTE: Proxy service uses the default io thread network delegate, not the 1035 // NOTE: Proxy service uses the default io thread network delegate, not the
1036 // delegate just created. 1036 // delegate just created.
1037 proxy_service_ = ProxyServiceFactory::CreateProxyService( 1037 proxy_service_ = ProxyServiceFactory::CreateProxyService(
1038 io_thread->net_log(), main_request_context_.get(), network_delegate.get(), 1038 io_thread->net_log(), main_request_context_.get(), network_delegate.get(),
1039 std::move(profile_params_->proxy_config_service), command_line, 1039 std::move(profile_params_->proxy_config_service), command_line,
1040 io_thread->WpadQuickCheckEnabled(), 1040 io_thread->WpadQuickCheckEnabled(),
1041 io_thread->PacHttpsUrlStrippingEnabled()); 1041 io_thread->PacHttpsUrlStrippingEnabled());
1042 1042
1043 main_request_context_storage_->set_network_delegate( 1043 main_request_context_storage_->set_network_delegate(
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 transport_security_state_->SetRequireCTDelegate( 1090 transport_security_state_->SetRequireCTDelegate(
1091 ct_policy_manager_->GetDelegate()); 1091 ct_policy_manager_->GetDelegate());
1092 1092
1093 // Take ownership over these parameters. 1093 // Take ownership over these parameters.
1094 cookie_settings_ = profile_params_->cookie_settings; 1094 cookie_settings_ = profile_params_->cookie_settings;
1095 host_content_settings_map_ = profile_params_->host_content_settings_map; 1095 host_content_settings_map_ = profile_params_->host_content_settings_map;
1096 #if BUILDFLAG(ENABLE_EXTENSIONS) 1096 #if BUILDFLAG(ENABLE_EXTENSIONS)
1097 extension_info_map_ = profile_params_->extension_info_map; 1097 extension_info_map_ = profile_params_->extension_info_map;
1098 #endif 1098 #endif
1099 1099
1100 resource_context_->host_resolver_ = io_thread_globals->host_resolver.get(); 1100 resource_context_->host_resolver_ =
1101 io_thread_globals->system_request_context->host_resolver();
1101 resource_context_->request_context_ = main_request_context_.get(); 1102 resource_context_->request_context_ = main_request_context_.get();
1102 1103
1103 if (profile_params_->loading_predictor_observer_) { 1104 if (profile_params_->loading_predictor_observer_) {
1104 loading_predictor_observer_ = 1105 loading_predictor_observer_ =
1105 std::move(profile_params_->loading_predictor_observer_); 1106 std::move(profile_params_->loading_predictor_observer_);
1106 } 1107 }
1107 1108
1108 #if defined(OS_CHROMEOS) 1109 #if defined(OS_CHROMEOS)
1109 username_hash_ = profile_params_->username_hash; 1110 username_hash_ = profile_params_->username_hash;
1110 use_system_key_slot_ = profile_params_->use_system_key_slot; 1111 use_system_key_slot_ = profile_params_->use_system_key_slot;
(...skipping 16 matching lines...) Expand all
1127 if (policy_cert_verifier_) { 1128 if (policy_cert_verifier_) {
1128 DCHECK_EQ(policy_cert_verifier_, cert_verifier_.get()); 1129 DCHECK_EQ(policy_cert_verifier_, cert_verifier_.get());
1129 policy_cert_verifier_->InitializeOnIOThread(verify_proc); 1130 policy_cert_verifier_->InitializeOnIOThread(verify_proc);
1130 } else { 1131 } else {
1131 cert_verifier_ = base::MakeUnique<net::CachingCertVerifier>( 1132 cert_verifier_ = base::MakeUnique<net::CachingCertVerifier>(
1132 base::MakeUnique<net::MultiThreadedCertVerifier>(verify_proc.get())); 1133 base::MakeUnique<net::MultiThreadedCertVerifier>(verify_proc.get()));
1133 } 1134 }
1134 main_request_context_->set_cert_verifier(cert_verifier_.get()); 1135 main_request_context_->set_cert_verifier(cert_verifier_.get());
1135 #else 1136 #else
1136 main_request_context_->set_cert_verifier( 1137 main_request_context_->set_cert_verifier(
1137 io_thread_globals->cert_verifier.get()); 1138 io_thread_globals->system_request_context->cert_verifier());
1138 #endif 1139 #endif
1139 } 1140 }
1140 1141
1141 // Install the New Tab Page Interceptor. 1142 // Install the New Tab Page Interceptor.
1142 if (profile_params_->new_tab_page_interceptor.get()) { 1143 if (profile_params_->new_tab_page_interceptor.get()) {
1143 request_interceptors.push_back( 1144 request_interceptors.push_back(
1144 std::move(profile_params_->new_tab_page_interceptor)); 1145 std::move(profile_params_->new_tab_page_interceptor));
1145 } 1146 }
1146 1147
1147 std::unique_ptr<net::MultiLogCTVerifier> ct_verifier( 1148 std::unique_ptr<net::MultiLogCTVerifier> ct_verifier(
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1356 void ProfileIOData::SetCookieSettingsForTesting( 1357 void ProfileIOData::SetCookieSettingsForTesting(
1357 content_settings::CookieSettings* cookie_settings) { 1358 content_settings::CookieSettings* cookie_settings) {
1358 DCHECK(!cookie_settings_.get()); 1359 DCHECK(!cookie_settings_.get());
1359 cookie_settings_ = cookie_settings; 1360 cookie_settings_ = cookie_settings;
1360 } 1361 }
1361 1362
1362 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( 1363 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState(
1363 const GURL& url) const { 1364 const GURL& url) const {
1364 return url_blacklist_manager_->GetURLBlacklistState(url); 1365 return url_blacklist_manager_->GetURLBlacklistState(url);
1365 } 1366 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698