Add diagnostics_writer.cc to the list of files allowed to printf.
[chromium-blink-merge.git] / components / data_reduction_proxy / browser / data_reduction_proxy_prefs.cc
blobc4770d2cb5f9d40b6c6b45769068a74c48af7b8b
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.
5 #include "components/data_reduction_proxy/browser/data_reduction_proxy_prefs.h"
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"
11 namespace data_reduction_proxy {
13 // Make sure any changes here that have the potential to impact android_webview
14 // are reflected in RegisterSimpleProfilePrefs.
15 void 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);
30 void 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);
39 void 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);
68 } // namespace data_reduction_proxy