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

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

Issue 473723002: Update data reduction proxy statistics prefs less often on desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tooManyWritesPatch
Patch Set: Addressed bengr and mmenke comments 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
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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 base::PrefServiceFactory pref_service_factory; 202 base::PrefServiceFactory pref_service_factory;
203 pref_service_factory.set_user_prefs(make_scoped_refptr(new AwPrefStore())); 203 pref_service_factory.set_user_prefs(make_scoped_refptr(new AwPrefStore()));
204 pref_service_factory.set_read_error_callback(base::Bind(&HandleReadError)); 204 pref_service_factory.set_read_error_callback(base::Bind(&HandleReadError));
205 user_pref_service_ = pref_service_factory.Create(pref_registry).Pass(); 205 user_pref_service_ = pref_service_factory.Create(pref_registry).Pass();
206 206
207 user_prefs::UserPrefs::Set(this, user_pref_service_.get()); 207 user_prefs::UserPrefs::Set(this, user_pref_service_.get());
208 208
209 if (data_reduction_proxy_settings_.get()) { 209 if (data_reduction_proxy_settings_.get()) {
210 data_reduction_proxy_settings_->InitDataReductionProxySettings( 210 data_reduction_proxy_settings_->InitDataReductionProxySettings(
211 user_pref_service_.get(), 211 user_pref_service_.get(),
212 user_pref_service_.get(),
213 GetRequestContext()); 212 GetRequestContext());
214 213
215 data_reduction_proxy_settings_->SetDataReductionProxyEnabled( 214 data_reduction_proxy_settings_->SetDataReductionProxyEnabled(
216 data_reduction_proxy_enabled_); 215 data_reduction_proxy_enabled_);
217 } 216 }
218 } 217 }
219 218
220 base::FilePath AwBrowserContext::GetPath() const { 219 base::FilePath AwBrowserContext::GetPath() const {
221 return context_storage_path_; 220 return context_storage_path_;
222 } 221 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 286
288 void AwBrowserContext::RebuildTable( 287 void AwBrowserContext::RebuildTable(
289 const scoped_refptr<URLEnumerator>& enumerator) { 288 const scoped_refptr<URLEnumerator>& enumerator) {
290 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client 289 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client
291 // can change in the lifetime of this WebView and may not yet be set here. 290 // can change in the lifetime of this WebView and may not yet be set here.
292 // Therefore this initialization path is not used. 291 // Therefore this initialization path is not used.
293 enumerator->OnComplete(true); 292 enumerator->OnComplete(true);
294 } 293 }
295 294
296 } // namespace android_webview 295 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | android_webview/browser/net/aw_url_request_context_getter.cc » ('j') | chrome/browser/profiles/profile_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698