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

Side by Side Diff: android_webview/browser/aw_browser_context.cc

Issue 449973002: Use data reduction proxy when managed proxy config returns direct (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no-uma-in-proxy-service
Patch Set: Addressed comment and nit Created 6 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "android_webview/browser/aw_browser_context.h" 5 #include "android_webview/browser/aw_browser_context.h"
6 6
7 #include "android_webview/browser/aw_form_database_service.h" 7 #include "android_webview/browser/aw_form_database_service.h"
8 #include "android_webview/browser/aw_pref_store.h" 8 #include "android_webview/browser/aw_pref_store.h"
9 #include "android_webview/browser/aw_quota_manager_bridge.h" 9 #include "android_webview/browser/aw_quota_manager_bridge.h"
10 #include "android_webview/browser/aw_resource_context.h" 10 #include "android_webview/browser/aw_resource_context.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 data_reduction_proxy::DataReductionProxyParams::kAllowed))); 106 data_reduction_proxy::DataReductionProxyParams::kAllowed)));
107 #endif 107 #endif
108 scoped_ptr<DataReductionProxyConfigService> 108 scoped_ptr<DataReductionProxyConfigService>
109 data_reduction_proxy_config_service( 109 data_reduction_proxy_config_service(
110 new DataReductionProxyConfigService( 110 new DataReductionProxyConfigService(
111 scoped_ptr<net::ProxyConfigService>( 111 scoped_ptr<net::ProxyConfigService>(
112 net::ProxyService::CreateSystemProxyConfigService( 112 net::ProxyService::CreateSystemProxyConfigService(
113 BrowserThread::GetMessageLoopProxyForThread( 113 BrowserThread::GetMessageLoopProxyForThread(
114 BrowserThread::IO), 114 BrowserThread::IO),
115 NULL /* Ignored on Android */)).Pass())); 115 NULL /* Ignored on Android */)).Pass()));
116 if (data_reduction_proxy_settings_.get()) { 116 if (data_reduction_proxy_settings_.get()) {
117 scoped_ptr<data_reduction_proxy::DataReductionProxyConfigurator> 117 data_reduction_proxy_configurator_.reset(
118 configurator(new data_reduction_proxy::DataReductionProxyConfigTracker( 118 new data_reduction_proxy::DataReductionProxyConfigTracker(
119 base::Bind(&DataReductionProxyConfigService::UpdateProxyConfig, 119 base::Bind(&DataReductionProxyConfigService::UpdateProxyConfig,
120 base::Unretained( 120 base::Unretained(
121 data_reduction_proxy_config_service.get())), 121 data_reduction_proxy_config_service.get())),
122 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); 122 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)));
123 data_reduction_proxy_settings_->SetProxyConfigurator(configurator.Pass()); 123 data_reduction_proxy_settings_->SetProxyConfigurator(
124 data_reduction_proxy_configurator_.get());
124 } 125 }
125 126
126 url_request_context_getter_ = 127 url_request_context_getter_ =
127 new AwURLRequestContextGetter(GetPath(), 128 new AwURLRequestContextGetter(GetPath(),
128 cookie_store_.get(), 129 cookie_store_.get(),
129 data_reduction_proxy_config_service.Pass()); 130 data_reduction_proxy_config_service.Pass());
130 131
131 visitedlink_master_.reset( 132 visitedlink_master_.reset(
132 new visitedlink::VisitedLinkMaster(this, this, false)); 133 new visitedlink::VisitedLinkMaster(this, this, false));
133 visitedlink_master_->Init(); 134 visitedlink_master_->Init();
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 287
287 void AwBrowserContext::RebuildTable( 288 void AwBrowserContext::RebuildTable(
288 const scoped_refptr<URLEnumerator>& enumerator) { 289 const scoped_refptr<URLEnumerator>& enumerator) {
289 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client 290 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client
290 // can change in the lifetime of this WebView and may not yet be set here. 291 // can change in the lifetime of this WebView and may not yet be set here.
291 // Therefore this initialization path is not used. 292 // Therefore this initialization path is not used.
292 enumerator->OnComplete(true); 293 enumerator->OnComplete(true);
293 } 294 }
294 295
295 } // namespace android_webview 296 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698