| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 "components/data_reduction_proxy/browser/data_reduction_proxy_prefs.h" | 5 #include "components/data_reduction_proxy/browser/data_reduction_proxy_prefs.h" |
| 6 | 6 |
| 7 #include "base/prefs/pref_registry_simple.h" | 7 #include "base/prefs/pref_registry_simple.h" |
| 8 #include "components/data_reduction_proxy/common/data_reduction_proxy_pref_names
.h" | 8 #include "components/data_reduction_proxy/common/data_reduction_proxy_pref_names
.h" |
| 9 #include "components/pref_registry/pref_registry_syncable.h" | 9 #include "components/pref_registry/pref_registry_syncable.h" |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 void RegisterSimpleProfilePrefs(PrefRegistrySimple* registry) { | 30 void RegisterSimpleProfilePrefs(PrefRegistrySimple* registry) { |
| 31 registry->RegisterBooleanPref( | 31 registry->RegisterBooleanPref( |
| 32 data_reduction_proxy::prefs::kDataReductionProxyEnabled, false); | 32 data_reduction_proxy::prefs::kDataReductionProxyEnabled, false); |
| 33 registry->RegisterBooleanPref( | 33 registry->RegisterBooleanPref( |
| 34 data_reduction_proxy::prefs::kDataReductionProxyAltEnabled, false); | 34 data_reduction_proxy::prefs::kDataReductionProxyAltEnabled, false); |
| 35 registry->RegisterBooleanPref( | 35 registry->RegisterBooleanPref( |
| 36 data_reduction_proxy::prefs::kDataReductionProxyWasEnabledBefore, false); | 36 data_reduction_proxy::prefs::kDataReductionProxyWasEnabledBefore, false); |
| 37 } | 37 } |
| 38 | 38 |
| 39 // Add any new data reduction proxy prefs to the |pref_map_| or the |
| 40 // |list_pref_map_| in Init() of DataReductionProxyStatisticsPrefs. |
| 39 void RegisterPrefs(PrefRegistrySimple* registry) { | 41 void RegisterPrefs(PrefRegistrySimple* registry) { |
| 40 registry->RegisterInt64Pref( | 42 registry->RegisterInt64Pref( |
| 41 prefs::kHttpReceivedContentLength, 0); | 43 prefs::kHttpReceivedContentLength, 0); |
| 42 registry->RegisterInt64Pref( | 44 registry->RegisterInt64Pref( |
| 43 prefs::kHttpOriginalContentLength, 0); | 45 prefs::kHttpOriginalContentLength, 0); |
| 44 registry->RegisterListPref( | 46 registry->RegisterListPref( |
| 45 prefs::kDailyHttpOriginalContentLength); | 47 prefs::kDailyHttpOriginalContentLength); |
| 46 registry->RegisterListPref( | 48 registry->RegisterListPref( |
| 47 prefs::kDailyHttpReceivedContentLength); | 49 prefs::kDailyHttpReceivedContentLength); |
| 48 registry->RegisterListPref( | 50 registry->RegisterListPref( |
| (...skipping 10 matching lines...) Expand all Loading... |
| 59 prefs::kDailyContentLengthUnknownWithDataReductionProxyEnabled); | 61 prefs::kDailyContentLengthUnknownWithDataReductionProxyEnabled); |
| 60 registry->RegisterListPref( | 62 registry->RegisterListPref( |
| 61 prefs::kDailyOriginalContentLengthViaDataReductionProxy); | 63 prefs::kDailyOriginalContentLengthViaDataReductionProxy); |
| 62 registry->RegisterListPref( | 64 registry->RegisterListPref( |
| 63 prefs::kDailyContentLengthViaDataReductionProxy); | 65 prefs::kDailyContentLengthViaDataReductionProxy); |
| 64 registry->RegisterInt64Pref( | 66 registry->RegisterInt64Pref( |
| 65 prefs::kDailyHttpContentLengthLastUpdateDate, 0L); | 67 prefs::kDailyHttpContentLengthLastUpdateDate, 0L); |
| 66 } | 68 } |
| 67 | 69 |
| 68 } // namespace data_reduction_proxy | 70 } // namespace data_reduction_proxy |
| OLD | NEW |