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

Unified Diff: components/cronet/android/cronet_url_request_context_adapter.cc

Issue 1725123005: Passing in a Data Reduction Proxy Delegate from Cronet with Data Reduction Proxy Enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated CL description Created 4 years, 10 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
Index: components/cronet/android/cronet_url_request_context_adapter.cc
diff --git a/components/cronet/android/cronet_url_request_context_adapter.cc b/components/cronet/android/cronet_url_request_context_adapter.cc
index 776fec70b46eaa29b1c340b134c3a31feaf4c3a7..e42ed2095628c11fb25cd52e00b645e64d9be24c 100644
--- a/components/cronet/android/cronet_url_request_context_adapter.cc
+++ b/components/cronet/android/cronet_url_request_context_adapter.cc
@@ -411,20 +411,22 @@ void CronetURLRequestContextAdapter::InitializeOnNetworkThread(
// For now, the choice to enable the data reduction proxy happens once,
// at initialization. It cannot be disabled thereafter.
if (!config->data_reduction_proxy_key.empty()) {
data_reduction_proxy_.reset(new CronetDataReductionProxy(
config->data_reduction_proxy_key, config->data_reduction_primary_proxy,
config->data_reduction_fallback_proxy,
config->data_reduction_secure_proxy_check_url, config->user_agent,
GetNetworkTaskRunner(), net_log_.get()));
network_delegate = data_reduction_proxy_->CreateNetworkDelegate(
std::move(network_delegate));
+ context_builder.set_proxy_delegate(
+ data_reduction_proxy_->CreateProxyDelegate());
std::vector<scoped_ptr<net::URLRequestInterceptor>> interceptors;
interceptors.push_back(data_reduction_proxy_->CreateInterceptor());
context_builder.SetInterceptors(std::move(interceptors));
}
#endif // defined(DATA_REDUCTION_PROXY_SUPPORT)
context_builder.set_network_delegate(std::move(network_delegate));
context_builder.set_net_log(net_log_.get());
// Android provides a local HTTP proxy server that handles proxying when a PAC
// URL is present. Create a proxy service without a resolver and rely on this

Powered by Google App Engine
This is Rietveld 408576698