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

Unified Diff: chrome/browser/profiles/profile_impl_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: Created 6 years, 1 month 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/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 4b0de2f4441add89ee75fd108f2fd3a2a780055a..0b3debb94955f7da47f7b67d7e01dfe93709b8a4 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -37,6 +37,7 @@
#include "chrome/common/url_constants.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_auth_request_handler.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor.h"
+#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_protocol.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_statistics_prefs.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats.h"
@@ -410,8 +411,9 @@ ProfileImplIOData::ProfileImplIOData()
}
ProfileImplIOData::~ProfileImplIOData() {
- if (initialized())
- network_delegate()->set_domain_reliability_monitor(NULL);
+ if (initialized()) {
+ chrome_network_delegate()->set_domain_reliability_monitor(NULL);
+ }
DestroyResourceContext();
@@ -443,23 +445,25 @@ void ProfileImplIOData::InitializeInternal(
data_reduction_proxy_usage_stats()->set_unavailable_callback(
data_reduction_proxy_unavailable_callback());
- network_delegate()->set_data_reduction_proxy_enabled_pref(
- &data_reduction_proxy_enabled_);
+ network_delegate()->
bengr 2014/11/18 19:30:55 These can be put into a single DRPNetworkDelegate:
megjablon 2014/11/19 19:23:40 Done.
+ set_data_reduction_proxy_enabled_pref(&data_reduction_proxy_enabled_);
network_delegate()->set_data_reduction_proxy_params(
data_reduction_proxy_params());
network_delegate()->set_data_reduction_proxy_usage_stats(
data_reduction_proxy_usage_stats());
- network_delegate()->set_data_reduction_proxy_auth_request_handler(
- data_reduction_proxy_auth_request_handler());
- network_delegate()->set_data_reduction_proxy_statistics_prefs(
- data_reduction_proxy_statistics_prefs());
+ network_delegate()->
+ set_data_reduction_proxy_auth_request_handler(
+ data_reduction_proxy_auth_request_handler());
+ network_delegate()->
+ set_data_reduction_proxy_statistics_prefs(
+ data_reduction_proxy_statistics_prefs());
network_delegate()->set_on_resolve_proxy_handler(
base::Bind(data_reduction_proxy::OnResolveProxyHandler));
network_delegate()->set_proxy_config_getter(
base::Bind(
&DataReductionProxyChromeConfigurator::GetProxyConfigOnIO,
base::Unretained(data_reduction_proxy_chrome_configurator())));
- network_delegate()->set_predictor(predictor_.get());
+ chrome_network_delegate()->set_predictor(predictor_.get());
// Initialize context members.
@@ -606,7 +610,7 @@ void ProfileImplIOData::InitializeInternal(
monitor->InitURLRequestContext(main_context);
monitor->AddBakedInConfigs();
monitor->SetDiscardUploads(!GetMetricsEnabledStateOnIOThread());
- network_delegate()->set_domain_reliability_monitor(monitor);
+ chrome_network_delegate()->set_domain_reliability_monitor(monitor);
}
lazy_params_.reset();

Powered by Google App Engine
This is Rietveld 408576698