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

Unified Diff: android_webview/browser/net/aw_url_request_context_getter.cc

Issue 286013002: Added alternative configuration for the data reduction proxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
Index: android_webview/browser/net/aw_url_request_context_getter.cc
diff --git a/android_webview/browser/net/aw_url_request_context_getter.cc b/android_webview/browser/net/aw_url_request_context_getter.cc
index a49d8939f57a026832d02f200b556024246f8308..6e69eeaf2b9672897710a8c01ee76dfc019a221c 100644
--- a/android_webview/browser/net/aw_url_request_context_getter.cc
+++ b/android_webview/browser/net/aw_url_request_context_getter.cc
@@ -194,11 +194,12 @@ void AwURLRequestContextGetter::InitializeURLRequestContext() {
AwContentBrowserClient::GetAcceptLangsImpl()));
ApplyCmdlineOverridesToURLRequestContextBuilder(&builder);
-
+ data_reduction_proxy::DataReductionProxyParams drp_params(
+ true, false, false, false);
sgurun-gerrit only 2014/05/20 23:55:21 nit: same comment about the bool list.
builder.add_http_auth_handler_factory(
data_reduction_proxy::HttpAuthHandlerDataReductionProxy::Scheme(),
new data_reduction_proxy::HttpAuthHandlerDataReductionProxy::Factory(
- DataReductionProxySettings::GetDataReductionProxies()));
+ drp_params.GetAllowedProxies()));
url_request_context_.reset(builder.Build());
// TODO(mnaganov): Fix URLRequestContextBuilder to use proper threads.
@@ -221,12 +222,12 @@ void AwURLRequestContextGetter::InitializeURLRequestContext() {
DataReductionProxySettings* drp_settings =
browser_context->GetDataReductionProxySettings();
DCHECK(drp_settings);
- std::string drp_key = drp_settings->key();
+ std::string drp_key = drp_settings->params()->key();
// Only precache credentials if a key is available at URLRequestContext
// initialization.
if (!drp_key.empty()) {
DataReductionProxySettings::InitDataReductionProxySession(
- main_cache->GetSession(), drp_settings->key());
+ main_cache->GetSession(), &drp_params);
}
main_http_factory_.reset(main_cache);

Powered by Google App Engine
This is Rietveld 408576698