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

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

Issue 2876463007: Revert of Make ProfileIOData's ProxyService fetch PACs with the main URLRequestContext (Closed)
Patch Set: Created 3 years, 7 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/profiles/profile_impl_io_data.h ('k') | chrome/browser/profiles/profile_io_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl_io_data.cc
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
index 00837772c5fe6cef90e4c587bb219a63d8194d49..ae46c2ba5428e59892f0c77cdfd96cd0a70707e4 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -435,32 +435,8 @@
media_request_context_->AssertNoURLRequests();
}
-std::unique_ptr<net::NetworkDelegate>
-ProfileImplIOData::ConfigureNetworkDelegate(
- IOThread* io_thread,
- std::unique_ptr<ChromeNetworkDelegate> chrome_network_delegate) const {
- if (lazy_params_->domain_reliability_monitor) {
- // Hold on to a raw pointer to call Shutdown() in ~ProfileImplIOData.
- domain_reliability_monitor_ =
- lazy_params_->domain_reliability_monitor.get();
-
- domain_reliability_monitor_->InitURLRequestContext(main_request_context());
- domain_reliability_monitor_->AddBakedInConfigs();
- domain_reliability_monitor_->SetDiscardUploads(
- !GetMetricsEnabledStateOnIOThread());
-
- chrome_network_delegate->set_domain_reliability_monitor(
- std::move(lazy_params_->domain_reliability_monitor));
- }
-
- return data_reduction_proxy_io_data()->CreateNetworkDelegate(
- io_thread->globals()->data_use_ascriber->CreateNetworkDelegate(
- std::move(chrome_network_delegate),
- io_thread->GetMetricsDataUseForwarder()),
- true);
-}
-
void ProfileImplIOData::InitializeInternal(
+ std::unique_ptr<ChromeNetworkDelegate> chrome_network_delegate,
ProfileParams* profile_params,
content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) const {
@@ -471,6 +447,20 @@
IOThread* const io_thread = profile_params->io_thread;
IOThread::Globals* const io_thread_globals = io_thread->globals();
+ if (lazy_params_->domain_reliability_monitor) {
+ // Hold on to a raw pointer to call Shutdown() in ~ProfileImplIOData.
+ domain_reliability_monitor_ =
+ lazy_params_->domain_reliability_monitor.get();
+
+ domain_reliability_monitor_->InitURLRequestContext(main_context);
+ domain_reliability_monitor_->AddBakedInConfigs();
+ domain_reliability_monitor_->SetDiscardUploads(
+ !GetMetricsEnabledStateOnIOThread());
+
+ chrome_network_delegate->set_domain_reliability_monitor(
+ std::move(lazy_params_->domain_reliability_monitor));
+ }
+
ApplyProfileParamsToContext(main_context);
if (lazy_params_->http_server_properties_manager) {
@@ -484,6 +474,16 @@
io_thread_globals->ct_policy_enforcer.get());
main_context->set_net_log(io_thread->net_log());
+
+ main_context_storage->set_network_delegate(
+ data_reduction_proxy_io_data()->CreateNetworkDelegate(
+ io_thread_globals->data_use_ascriber->CreateNetworkDelegate(
+ std::move(chrome_network_delegate),
+ io_thread->GetMetricsDataUseForwarder()),
+ true));
+
+ main_context->set_host_resolver(
+ io_thread_globals->host_resolver.get());
main_context->set_http_auth_handler_factory(
io_thread_globals->http_auth_handler_factory.get());
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.h ('k') | chrome/browser/profiles/profile_io_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698