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

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

Issue 652743004: Migrate data reduction proxy statistics prefs to profile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 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 | chrome/browser/profiles/profile_impl.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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 // We only use the autocomplete feature of the Autofill, which is 192 // We only use the autocomplete feature of the Autofill, which is
193 // controlled via the manager_delegate. We don't use the rest 193 // controlled via the manager_delegate. We don't use the rest
194 // of autofill, which is why it is hardcoded as disabled here. 194 // of autofill, which is why it is hardcoded as disabled here.
195 pref_registry->RegisterBooleanPref( 195 pref_registry->RegisterBooleanPref(
196 autofill::prefs::kAutofillEnabled, false); 196 autofill::prefs::kAutofillEnabled, false);
197 pref_registry->RegisterDoublePref( 197 pref_registry->RegisterDoublePref(
198 autofill::prefs::kAutofillPositiveUploadRate, 0.0); 198 autofill::prefs::kAutofillPositiveUploadRate, 0.0);
199 pref_registry->RegisterDoublePref( 199 pref_registry->RegisterDoublePref(
200 autofill::prefs::kAutofillNegativeUploadRate, 0.0); 200 autofill::prefs::kAutofillNegativeUploadRate, 0.0);
201 data_reduction_proxy::RegisterSimpleProfilePrefs(pref_registry); 201 data_reduction_proxy::RegisterSimpleProfilePrefs(pref_registry);
202 data_reduction_proxy::RegisterPrefs(pref_registry);
203 202
204 base::PrefServiceFactory pref_service_factory; 203 base::PrefServiceFactory pref_service_factory;
205 pref_service_factory.set_user_prefs(make_scoped_refptr(new AwPrefStore())); 204 pref_service_factory.set_user_prefs(make_scoped_refptr(new AwPrefStore()));
206 pref_service_factory.set_read_error_callback(base::Bind(&HandleReadError)); 205 pref_service_factory.set_read_error_callback(base::Bind(&HandleReadError));
207 user_pref_service_ = pref_service_factory.Create(pref_registry).Pass(); 206 user_pref_service_ = pref_service_factory.Create(pref_registry).Pass();
208 207
209 user_prefs::UserPrefs::Set(this, user_pref_service_.get()); 208 user_prefs::UserPrefs::Set(this, user_pref_service_.get());
210 209
211 if (data_reduction_proxy_settings_.get()) { 210 if (data_reduction_proxy_settings_.get()) {
212 data_reduction_proxy_settings_->InitDataReductionProxySettings( 211 data_reduction_proxy_settings_->InitDataReductionProxySettings(
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 287
289 void AwBrowserContext::RebuildTable( 288 void AwBrowserContext::RebuildTable(
290 const scoped_refptr<URLEnumerator>& enumerator) { 289 const scoped_refptr<URLEnumerator>& enumerator) {
291 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client 290 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client
292 // 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.
293 // Therefore this initialization path is not used. 292 // Therefore this initialization path is not used.
294 enumerator->OnComplete(true); 293 enumerator->OnComplete(true);
295 } 294 }
296 295
297 } // namespace android_webview 296 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698