| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/prefs/chrome_pref_service_factory.h" | 5 #include "chrome/browser/prefs/chrome_pref_service_factory.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 // pref which is required for it to be visible when queried via the | 165 // pref which is required for it to be visible when queried via the |
| 166 // SegregatedPrefStore. This is because it's written directly in the | 166 // SegregatedPrefStore. This is because it's written directly in the |
| 167 // protected JsonPrefStore by that store's PrefHashFilter if there was | 167 // protected JsonPrefStore by that store's PrefHashFilter if there was |
| 168 // a reset in FilterOnLoad and SegregatedPrefStore will not look for it | 168 // a reset in FilterOnLoad and SegregatedPrefStore will not look for it |
| 169 // in the protected JsonPrefStore unless it's declared as a protected | 169 // in the protected JsonPrefStore unless it's declared as a protected |
| 170 // preference here. | 170 // preference here. |
| 171 15, prefs::kPreferenceResetTime, | 171 15, prefs::kPreferenceResetTime, |
| 172 PrefHashFilter::ENFORCE_ON_LOAD, | 172 PrefHashFilter::ENFORCE_ON_LOAD, |
| 173 PrefHashFilter::TRACKING_STRATEGY_ATOMIC | 173 PrefHashFilter::TRACKING_STRATEGY_ATOMIC |
| 174 }, | 174 }, |
| 175 { |
| 176 16, prefs::kSafeBrowsingIncidentReportSent, |
| 177 PrefHashFilter::ENFORCE_ON_LOAD, |
| 178 PrefHashFilter::TRACKING_STRATEGY_ATOMIC |
| 179 }, |
| 175 }; | 180 }; |
| 176 | 181 |
| 177 // The count of tracked preferences IDs across all platforms. | 182 // The count of tracked preferences IDs across all platforms. |
| 178 const size_t kTrackedPrefsReportingIDsCount = 16; | 183 const size_t kTrackedPrefsReportingIDsCount = 17; |
| 179 COMPILE_ASSERT(kTrackedPrefsReportingIDsCount >= arraysize(kTrackedPrefs), | 184 COMPILE_ASSERT(kTrackedPrefsReportingIDsCount >= arraysize(kTrackedPrefs), |
| 180 need_to_increment_ids_count); | 185 need_to_increment_ids_count); |
| 181 | 186 |
| 182 // Each group enforces a superset of the protection provided by the previous | 187 // Each group enforces a superset of the protection provided by the previous |
| 183 // one. | 188 // one. |
| 184 enum SettingsEnforcementGroup { | 189 enum SettingsEnforcementGroup { |
| 185 GROUP_NO_ENFORCEMENT, | 190 GROUP_NO_ENFORCEMENT, |
| 186 // Enforce protected settings on profile loads. | 191 // Enforce protected settings on profile loads. |
| 187 GROUP_ENFORCE_ALWAYS, | 192 GROUP_ENFORCE_ALWAYS, |
| 188 // Also enforce extension default search. | 193 // Also enforce extension default search. |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 | 485 |
| 481 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 486 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
| 482 ProfilePrefStoreManager::RegisterProfilePrefs(registry); | 487 ProfilePrefStoreManager::RegisterProfilePrefs(registry); |
| 483 } | 488 } |
| 484 | 489 |
| 485 void RegisterPrefs(PrefRegistrySimple* registry) { | 490 void RegisterPrefs(PrefRegistrySimple* registry) { |
| 486 ProfilePrefStoreManager::RegisterPrefs(registry); | 491 ProfilePrefStoreManager::RegisterPrefs(registry); |
| 487 } | 492 } |
| 488 | 493 |
| 489 } // namespace chrome_prefs | 494 } // namespace chrome_prefs |
| OLD | NEW |