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

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

Issue 382313003: Add data reduction functionality to all platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove incorrect DCHECK from drp_statistics_prefs.cc Created 6 years, 3 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
« no previous file with comments | « no previous file | android_webview/browser/net/aw_url_request_context_getter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 return; 92 return;
93 DataReductionProxySettings* proxy_settings = 93 DataReductionProxySettings* proxy_settings =
94 context->GetDataReductionProxySettings(); 94 context->GetDataReductionProxySettings();
95 if (proxy_settings == NULL) 95 if (proxy_settings == NULL)
96 return; 96 return;
97 proxy_settings->SetDataReductionProxyEnabled(data_reduction_proxy_enabled_); 97 proxy_settings->SetDataReductionProxyEnabled(data_reduction_proxy_enabled_);
98 } 98 }
99 99
100 void AwBrowserContext::PreMainMessageLoopRun() { 100 void AwBrowserContext::PreMainMessageLoopRun() {
101 cookie_store_ = CreateCookieStore(this); 101 cookie_store_ = CreateCookieStore(this);
102 #if defined(SPDY_PROXY_AUTH_ORIGIN)
103 data_reduction_proxy_settings_.reset( 102 data_reduction_proxy_settings_.reset(
104 new DataReductionProxySettings( 103 new DataReductionProxySettings(
105 new data_reduction_proxy::DataReductionProxyParams( 104 new data_reduction_proxy::DataReductionProxyParams(
106 data_reduction_proxy::DataReductionProxyParams::kAllowed))); 105 data_reduction_proxy::DataReductionProxyParams::kAllowed)));
107 #endif
108 scoped_ptr<DataReductionProxyConfigService> 106 scoped_ptr<DataReductionProxyConfigService>
109 data_reduction_proxy_config_service( 107 data_reduction_proxy_config_service(
110 new DataReductionProxyConfigService( 108 new DataReductionProxyConfigService(
111 scoped_ptr<net::ProxyConfigService>( 109 scoped_ptr<net::ProxyConfigService>(
112 net::ProxyService::CreateSystemProxyConfigService( 110 net::ProxyService::CreateSystemProxyConfigService(
113 BrowserThread::GetMessageLoopProxyForThread( 111 BrowserThread::GetMessageLoopProxyForThread(
114 BrowserThread::IO), 112 BrowserThread::IO),
115 NULL /* Ignored on Android */)).Pass())); 113 NULL /* Ignored on Android */)).Pass()));
116 if (data_reduction_proxy_settings_.get()) { 114 if (data_reduction_proxy_settings_.get()) {
117 data_reduction_proxy_configurator_.reset( 115 data_reduction_proxy_configurator_.reset(
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 288
291 void AwBrowserContext::RebuildTable( 289 void AwBrowserContext::RebuildTable(
292 const scoped_refptr<URLEnumerator>& enumerator) { 290 const scoped_refptr<URLEnumerator>& enumerator) {
293 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client 291 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client
294 // can change in the lifetime of this WebView and may not yet be set here. 292 // can change in the lifetime of this WebView and may not yet be set here.
295 // Therefore this initialization path is not used. 293 // Therefore this initialization path is not used.
296 enumerator->OnComplete(true); 294 enumerator->OnComplete(true);
297 } 295 }
298 296
299 } // namespace android_webview 297 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | android_webview/browser/net/aw_url_request_context_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698