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 23 matching lines...) Expand all Loading... |
34 #include "chrome/browser/prefs/profile_pref_store_manager.h" | 34 #include "chrome/browser/prefs/profile_pref_store_manager.h" |
35 #include "chrome/browser/profiles/file_path_verifier_win.h" | 35 #include "chrome/browser/profiles/file_path_verifier_win.h" |
36 #include "chrome/browser/profiles/profile.h" | 36 #include "chrome/browser/profiles/profile.h" |
37 #include "chrome/browser/search_engines/default_search_pref_migration.h" | 37 #include "chrome/browser/search_engines/default_search_pref_migration.h" |
38 #include "chrome/browser/sync/glue/sync_start_util.h" | 38 #include "chrome/browser/sync/glue/sync_start_util.h" |
39 #include "chrome/browser/ui/profile_error_dialog.h" | 39 #include "chrome/browser/ui/profile_error_dialog.h" |
40 #include "chrome/common/chrome_constants.h" | 40 #include "chrome/common/chrome_constants.h" |
41 #include "chrome/common/pref_names.h" | 41 #include "chrome/common/pref_names.h" |
42 #include "chrome/grit/chromium_strings.h" | 42 #include "chrome/grit/chromium_strings.h" |
43 #include "chrome/grit/generated_resources.h" | 43 #include "chrome/grit/generated_resources.h" |
| 44 #include "components/component_updater/pref_names.h" |
44 #include "components/pref_registry/pref_registry_syncable.h" | 45 #include "components/pref_registry/pref_registry_syncable.h" |
45 #include "components/search_engines/default_search_manager.h" | 46 #include "components/search_engines/default_search_manager.h" |
46 #include "components/search_engines/search_engines_pref_names.h" | 47 #include "components/search_engines/search_engines_pref_names.h" |
47 #include "components/sync_driver/pref_names.h" | 48 #include "components/sync_driver/pref_names.h" |
48 #include "content/public/browser/browser_context.h" | 49 #include "content/public/browser/browser_context.h" |
49 #include "content/public/browser/browser_thread.h" | 50 #include "content/public/browser/browser_thread.h" |
50 #include "grit/browser_resources.h" | 51 #include "grit/browser_resources.h" |
51 #include "sync/internal_api/public/base/model_type.h" | 52 #include "sync/internal_api/public/base/model_type.h" |
52 #include "ui/base/resource/resource_bundle.h" | 53 #include "ui/base/resource/resource_bundle.h" |
53 | 54 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 PrefHashFilter::ENFORCE_ON_LOAD, | 148 PrefHashFilter::ENFORCE_ON_LOAD, |
148 PrefHashFilter::TRACKING_STRATEGY_ATOMIC | 149 PrefHashFilter::TRACKING_STRATEGY_ATOMIC |
149 }, | 150 }, |
150 #if !defined(OS_ANDROID) | 151 #if !defined(OS_ANDROID) |
151 { | 152 { |
152 11, prefs::kPinnedTabs, | 153 11, prefs::kPinnedTabs, |
153 PrefHashFilter::ENFORCE_ON_LOAD, | 154 PrefHashFilter::ENFORCE_ON_LOAD, |
154 PrefHashFilter::TRACKING_STRATEGY_ATOMIC | 155 PrefHashFilter::TRACKING_STRATEGY_ATOMIC |
155 }, | 156 }, |
156 { | 157 { |
157 13, prefs::kProfileResetPromptMementoInProfilePrefs, | 158 13, prefs::kProfileResetPromptMementoInProfilePrefs, |
158 PrefHashFilter::ENFORCE_ON_LOAD, | 159 PrefHashFilter::ENFORCE_ON_LOAD, |
159 PrefHashFilter::TRACKING_STRATEGY_ATOMIC | 160 PrefHashFilter::TRACKING_STRATEGY_ATOMIC |
160 }, | 161 }, |
161 #endif | 162 #endif |
162 { | 163 { |
163 14, DefaultSearchManager::kDefaultSearchProviderDataPrefName, | 164 14, DefaultSearchManager::kDefaultSearchProviderDataPrefName, |
164 PrefHashFilter::NO_ENFORCEMENT, | 165 PrefHashFilter::NO_ENFORCEMENT, |
165 PrefHashFilter::TRACKING_STRATEGY_ATOMIC | 166 PrefHashFilter::TRACKING_STRATEGY_ATOMIC |
166 }, | 167 }, |
167 { | 168 { |
168 // Protecting kPreferenceResetTime does two things: | 169 // Protecting kPreferenceResetTime does two things: |
169 // 1) It ensures this isn't accidently set by someone stomping the pref | 170 // 1) It ensures this isn't accidently set by someone stomping the pref |
(...skipping 17 matching lines...) Expand all Loading... |
187 { | 188 { |
188 17, sync_driver::prefs::kSyncRemainingRollbackTries, | 189 17, sync_driver::prefs::kSyncRemainingRollbackTries, |
189 PrefHashFilter::ENFORCE_ON_LOAD, | 190 PrefHashFilter::ENFORCE_ON_LOAD, |
190 PrefHashFilter::TRACKING_STRATEGY_ATOMIC | 191 PrefHashFilter::TRACKING_STRATEGY_ATOMIC |
191 }, | 192 }, |
192 { | 193 { |
193 18, prefs::kSafeBrowsingIncidentsSent, | 194 18, prefs::kSafeBrowsingIncidentsSent, |
194 PrefHashFilter::ENFORCE_ON_LOAD, | 195 PrefHashFilter::ENFORCE_ON_LOAD, |
195 PrefHashFilter::TRACKING_STRATEGY_ATOMIC | 196 PrefHashFilter::TRACKING_STRATEGY_ATOMIC |
196 }, | 197 }, |
| 198 #if defined(OS_WIN) |
| 199 { |
| 200 19, prefs::kSwReporterPromptState, |
| 201 PrefHashFilter::ENFORCE_ON_LOAD, |
| 202 PrefHashFilter::TRACKING_STRATEGY_ATOMIC |
| 203 }, |
| 204 #endif |
197 }; | 205 }; |
198 | 206 |
199 // One more than the last tracked preferences ID above. | 207 // One more than the last tracked preferences ID above. |
200 const size_t kTrackedPrefsReportingIDsCount = | 208 const size_t kTrackedPrefsReportingIDsCount = |
201 kTrackedPrefs[arraysize(kTrackedPrefs) - 1].reporting_id + 1; | 209 kTrackedPrefs[arraysize(kTrackedPrefs) - 1].reporting_id + 1; |
202 | 210 |
203 // Each group enforces a superset of the protection provided by the previous | 211 // Each group enforces a superset of the protection provided by the previous |
204 // one. | 212 // one. |
205 enum SettingsEnforcementGroup { | 213 enum SettingsEnforcementGroup { |
206 GROUP_NO_ENFORCEMENT, | 214 GROUP_NO_ENFORCEMENT, |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 | 541 |
534 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 542 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
535 ProfilePrefStoreManager::RegisterProfilePrefs(registry); | 543 ProfilePrefStoreManager::RegisterProfilePrefs(registry); |
536 } | 544 } |
537 | 545 |
538 void RegisterPrefs(PrefRegistrySimple* registry) { | 546 void RegisterPrefs(PrefRegistrySimple* registry) { |
539 ProfilePrefStoreManager::RegisterPrefs(registry); | 547 ProfilePrefStoreManager::RegisterPrefs(registry); |
540 } | 548 } |
541 | 549 |
542 } // namespace chrome_prefs | 550 } // namespace chrome_prefs |
OLD | NEW |