data_reduction_proxy_prefs.cc revision 46d4c2bc3267f3f028f39e7e311b0f89aba2e4fd
1// Copyright 2014 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#include "components/data_reduction_proxy/browser/data_reduction_proxy_prefs.h" 6 7#include "base/prefs/pref_registry_simple.h" 8#include "components/data_reduction_proxy/common/data_reduction_proxy_pref_names.h" 9#include "components/pref_registry/pref_registry_syncable.h" 10 11namespace data_reduction_proxy { 12 13// Make sure any changes here that have the potential to impact android_webview 14// are reflected in RegisterSimpleProfilePrefs. 15void RegisterSyncableProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { 16 registry->RegisterBooleanPref( 17 data_reduction_proxy::prefs::kDataReductionProxyEnabled, 18 false, 19 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 20 registry->RegisterBooleanPref( 21 data_reduction_proxy::prefs::kDataReductionProxyAltEnabled, 22 false, 23 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 24 registry->RegisterBooleanPref( 25 data_reduction_proxy::prefs::kDataReductionProxyWasEnabledBefore, 26 false, 27 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 28} 29 30void RegisterSimpleProfilePrefs(PrefRegistrySimple* registry) { 31 registry->RegisterBooleanPref( 32 data_reduction_proxy::prefs::kDataReductionProxyEnabled, false); 33 registry->RegisterBooleanPref( 34 data_reduction_proxy::prefs::kDataReductionProxyAltEnabled, false); 35 registry->RegisterBooleanPref( 36 data_reduction_proxy::prefs::kDataReductionProxyWasEnabledBefore, false); 37} 38 39void RegisterPrefs(PrefRegistrySimple* registry) { 40 registry->RegisterInt64Pref( 41 prefs::kHttpReceivedContentLength, 0); 42 registry->RegisterInt64Pref( 43 prefs::kHttpOriginalContentLength, 0); 44 registry->RegisterListPref( 45 prefs::kDailyHttpOriginalContentLength); 46 registry->RegisterListPref( 47 prefs::kDailyHttpReceivedContentLength); 48 registry->RegisterListPref( 49 prefs::kDailyOriginalContentLengthWithDataReductionProxyEnabled); 50 registry->RegisterListPref( 51 prefs::kDailyContentLengthWithDataReductionProxyEnabled); 52 registry->RegisterListPref( 53 prefs::kDailyContentLengthHttpsWithDataReductionProxyEnabled); 54 registry->RegisterListPref( 55 prefs::kDailyContentLengthShortBypassWithDataReductionProxyEnabled); 56 registry->RegisterListPref( 57 prefs::kDailyContentLengthLongBypassWithDataReductionProxyEnabled); 58 registry->RegisterListPref( 59 prefs::kDailyContentLengthUnknownWithDataReductionProxyEnabled); 60 registry->RegisterListPref( 61 prefs::kDailyOriginalContentLengthViaDataReductionProxy); 62 registry->RegisterListPref( 63 prefs::kDailyContentLengthViaDataReductionProxy); 64 registry->RegisterInt64Pref( 65 prefs::kDailyHttpContentLengthLastUpdateDate, 0L); 66} 67 68} // namespace data_reduction_proxy 69