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

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

Issue 734263003: Move data reduction proxy logic out of chrome and android webview network delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing mmenke comments Created 6 years 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
Index: chrome/browser/profiles/off_the_record_profile_io_data.cc
diff --git a/chrome/browser/profiles/off_the_record_profile_io_data.cc b/chrome/browser/profiles/off_the_record_profile_io_data.cc
index b13a701e714297d12bc3dd77bfc2a41fea7af118..705e7352bcbf9c21e6d9029f4d8773ecb2977bd1 100644
--- a/chrome/browser/profiles/off_the_record_profile_io_data.cc
+++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc
@@ -196,9 +196,11 @@ OffTheRecordProfileIOData::~OffTheRecordProfileIOData() {
}
void OffTheRecordProfileIOData::InitializeInternal(
+ scoped_ptr<ChromeNetworkDelegate> chrome_network_delegate,
ProfileParams* profile_params,
content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) const {
+
mmenke 2014/12/04 20:50:56 nit: Remove blank line
megjablon 2014/12/05 22:24:20 Done.
net::URLRequestContext* main_context = main_request_context();
IOThread* const io_thread = profile_params->io_thread;
@@ -210,7 +212,9 @@ void OffTheRecordProfileIOData::InitializeInternal(
main_context->set_net_log(io_thread->net_log());
- main_context->set_network_delegate(network_delegate());
+ main_context->set_network_delegate(chrome_network_delegate.get());
+
+ network_delegate_ = chrome_network_delegate.Pass();
main_context->set_host_resolver(
io_thread_globals->host_resolver.get());
@@ -266,7 +270,7 @@ void OffTheRecordProfileIOData::InitializeInternal(
main_job_factory.Pass(),
request_interceptors.Pass(),
profile_params->protocol_handler_interceptor.Pass(),
- network_delegate(),
+ main_context->network_delegate(),
ftp_factory_.get());
main_context->set_job_factory(main_job_factory_.get());
@@ -364,7 +368,7 @@ net::URLRequestContext* OffTheRecordProfileIOData::InitializeAppRequestContext(
top_job_factory = SetUpJobFactoryDefaults(job_factory.Pass(),
request_interceptors.Pass(),
protocol_handler_interceptor.Pass(),
- network_delegate(),
+ main_context->network_delegate(),
ftp_factory_.get());
context->SetJobFactory(top_job_factory.Pass());
return context;

Powered by Google App Engine
This is Rietveld 408576698