Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / components / data_reduction_proxy / browser / data_reduction_proxy_prefs.cc
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/user_prefs/pref_registry_syncable.h"
10
11 namespace data_reduction_proxy {
12
13 void RegisterSyncableProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
14   registry->RegisterBooleanPref(
15       data_reduction_proxy::prefs::kDataReductionProxyEnabled,
16       false,
17       user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
18   registry->RegisterBooleanPref(
19       data_reduction_proxy::prefs::kDataReductionProxyWasEnabledBefore,
20       false,
21       user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
22 }
23
24 void RegisterSimpleProfilePrefs(PrefRegistrySimple* registry) {
25   registry->RegisterBooleanPref(
26       data_reduction_proxy::prefs::kDataReductionProxyEnabled,
27       false);
28   registry->RegisterBooleanPref(
29       data_reduction_proxy::prefs::kDataReductionProxyWasEnabledBefore,
30       false);
31 }
32
33 void RegisterPrefs(PrefRegistrySimple* registry) {
34   registry->RegisterInt64Pref(
35       prefs::kHttpReceivedContentLength, 0);
36   registry->RegisterInt64Pref(
37       prefs::kHttpOriginalContentLength, 0);
38   registry->RegisterListPref(
39       prefs::kDailyHttpOriginalContentLength);
40   registry->RegisterListPref(
41       prefs::kDailyHttpReceivedContentLength);
42   registry->RegisterListPref(
43       prefs::kDailyOriginalContentLengthWithDataReductionProxyEnabled);
44   registry->RegisterListPref(
45       prefs::kDailyContentLengthWithDataReductionProxyEnabled);
46   registry->RegisterListPref(
47       prefs::kDailyContentLengthHttpsWithDataReductionProxyEnabled);
48   registry->RegisterListPref(
49       prefs::kDailyContentLengthShortBypassWithDataReductionProxyEnabled);
50   registry->RegisterListPref(
51       prefs::kDailyContentLengthLongBypassWithDataReductionProxyEnabled);
52   registry->RegisterListPref(
53       prefs::kDailyContentLengthUnknownWithDataReductionProxyEnabled);
54   registry->RegisterListPref(
55       prefs::kDailyOriginalContentLengthViaDataReductionProxy);
56   registry->RegisterListPref(
57       prefs::kDailyContentLengthViaDataReductionProxy);
58   registry->RegisterInt64Pref(
59       prefs::kDailyHttpContentLengthLastUpdateDate, 0L);
60 }
61
62 }  // namespace data_reduction_proxy