From aa60872e346eaf354bb15dbd698546b1bdddd132 Mon Sep 17 00:00:00 2001 From: raymes Date: Sun, 26 Apr 2015 20:00:25 -0700 Subject: Remove most occurences of PrefRegistrySyncable::UNSYNCABLE_PREF Now that we have added PrefRegistry registration functions that do not need to accept a flags argument, passing PrefRegistrySyncable::UNSYNCABLE_PREF is redundant and we can remove it altogether. Ran the following command: for x in $(git ls-files | grep -E "\.(cc|h|mm)$") ; do perl -0777 -i -pe 's/,[ \n]*(user_prefs::)+PrefRegistrySyncable::UNSYNCABLE_PREF//igs' $x ; done && git cl format There are still some occurences that need to be manually fixed. BUG=476800 Review URL: https://codereview.chromium.org/1102733002 Cr-Commit-Position: refs/heads/master@{#326993} --- .../core/browser/data_reduction_proxy_prefs.cc | 72 ++++++---------------- 1 file changed, 19 insertions(+), 53 deletions(-) (limited to 'components/data_reduction_proxy') diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.cc index 00acd88..2b59e3a 100644 --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.cc +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.cc @@ -30,69 +30,35 @@ namespace data_reduction_proxy { // Make sure any changes here that have the potential to impact android_webview // are reflected in RegisterSimpleProfilePrefs. void RegisterSyncableProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterBooleanPref( - prefs::kDataReductionProxyEnabled, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kDataReductionProxyAltEnabled, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kDataReductionProxyWasEnabledBefore, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kDataReductionProxyEnabled, false); + registry->RegisterBooleanPref(prefs::kDataReductionProxyAltEnabled, false); + registry->RegisterBooleanPref(prefs::kDataReductionProxyWasEnabledBefore, + false); - registry->RegisterInt64Pref( - prefs::kHttpReceivedContentLength, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterInt64Pref( - prefs::kHttpOriginalContentLength, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterInt64Pref(prefs::kHttpReceivedContentLength, 0); + registry->RegisterInt64Pref(prefs::kHttpOriginalContentLength, 0); - registry->RegisterBooleanPref( - prefs::kStatisticsPrefsMigrated, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kStatisticsPrefsMigrated, false); registry->RegisterBooleanPref(prefs::kUpdateDailyReceivedContentLengths, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref( - prefs::kDailyHttpOriginalContentLength, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref( - prefs::kDailyHttpReceivedContentLength, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref( - prefs::kDailyOriginalContentLengthWithDataReductionProxyEnabled, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + false); + registry->RegisterListPref(prefs::kDailyHttpOriginalContentLength); + registry->RegisterListPref(prefs::kDailyHttpReceivedContentLength); registry->RegisterListPref( - prefs::kDailyContentLengthWithDataReductionProxyEnabled, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs::kDailyOriginalContentLengthWithDataReductionProxyEnabled); registry->RegisterListPref( - prefs::kDailyContentLengthHttpsWithDataReductionProxyEnabled, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs::kDailyContentLengthWithDataReductionProxyEnabled); registry->RegisterListPref( - prefs::kDailyContentLengthShortBypassWithDataReductionProxyEnabled, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs::kDailyContentLengthHttpsWithDataReductionProxyEnabled); registry->RegisterListPref( - prefs::kDailyContentLengthLongBypassWithDataReductionProxyEnabled, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs::kDailyContentLengthShortBypassWithDataReductionProxyEnabled); registry->RegisterListPref( - prefs::kDailyContentLengthUnknownWithDataReductionProxyEnabled, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs::kDailyContentLengthLongBypassWithDataReductionProxyEnabled); registry->RegisterListPref( - prefs::kDailyOriginalContentLengthViaDataReductionProxy, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs::kDailyContentLengthUnknownWithDataReductionProxyEnabled); registry->RegisterListPref( - prefs::kDailyContentLengthViaDataReductionProxy, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterInt64Pref( - prefs::kDailyHttpContentLengthLastUpdateDate, - 0L, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs::kDailyOriginalContentLengthViaDataReductionProxy); + registry->RegisterListPref(prefs::kDailyContentLengthViaDataReductionProxy); + registry->RegisterInt64Pref(prefs::kDailyHttpContentLengthLastUpdateDate, 0L); } void RegisterSimpleProfilePrefs(PrefRegistrySimple* registry) { -- cgit v1.1