Chromium Code Reviews| 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 // This provides a way to access the application's current preferences. | 5 // This provides a way to access the application's current preferences. |
| 6 | 6 |
| 7 // Chromium settings and storage represent user-selected preferences and | 7 // Chromium settings and storage represent user-selected preferences and |
| 8 // information and MUST not be extracted, overwritten or modified except | 8 // information and MUST not be extracted, overwritten or modified except |
| 9 // through Chromium defined APIs. | 9 // through Chromium defined APIs. |
| 10 | 10 |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 263 // register all preferences for a class Xyz up front in a static | 263 // register all preferences for a class Xyz up front in a static |
| 264 // Xyz::RegisterPrefs function, which gets invoked early in the | 264 // Xyz::RegisterPrefs function, which gets invoked early in the |
| 265 // application's start-up, before a PrefService is created. | 265 // application's start-up, before a PrefService is created. |
| 266 // | 266 // |
| 267 // As an example, prefs registration in Chrome is triggered by the | 267 // As an example, prefs registration in Chrome is triggered by the |
| 268 // functions chrome::RegisterPrefs (for global preferences) and | 268 // functions chrome::RegisterPrefs (for global preferences) and |
| 269 // chrome::RegisterProfilePrefs (for user-specific preferences) | 269 // chrome::RegisterProfilePrefs (for user-specific preferences) |
| 270 // implemented in chrome/browser/prefs/browser_prefs.cc. | 270 // implemented in chrome/browser/prefs/browser_prefs.cc. |
| 271 PrefRegistry* DeprecatedGetPrefRegistry(); | 271 PrefRegistry* DeprecatedGetPrefRegistry(); |
| 272 | 272 |
| 273 // This is only to be used to migrate unregistered prefs to become registered. | |
|
Bernhard Bauer
2014/09/04 11:06:02
One thing we could do to ensure no one else uses t
dgrogan
2014/09/04 20:26:33
Changed (for this patchset, at least). I don't lik
| |
| 274 // TODO(dgrogan): Remove after a suitable migration period. See | |
|
Bernhard Bauer
2014/09/04 11:06:02
Can you add what a suitable migration period is? (
dgrogan
2014/09/04 20:26:32
Done.
| |
| 275 // http://crbug.com/167256. | |
| 276 scoped_ptr<base::DictionaryValue> GetBrowserDictionary() const; | |
|
dgrogan
2014/09/04 00:50:51
This is the ugliest. See browser_ui_prefs.cc for i
| |
| 277 | |
| 273 protected: | 278 protected: |
| 274 // The PrefNotifier handles registering and notifying preference observers. | 279 // The PrefNotifier handles registering and notifying preference observers. |
| 275 // It is created and owned by this PrefService. Subclasses may access it for | 280 // It is created and owned by this PrefService. Subclasses may access it for |
| 276 // unit testing. | 281 // unit testing. |
| 277 scoped_ptr<PrefNotifierImpl> pref_notifier_; | 282 scoped_ptr<PrefNotifierImpl> pref_notifier_; |
| 278 | 283 |
| 279 // The PrefValueStore provides prioritized preference values. It is owned by | 284 // The PrefValueStore provides prioritized preference values. It is owned by |
| 280 // this PrefService. Subclasses may access it for unit testing. | 285 // this PrefService. Subclasses may access it for unit testing. |
| 281 scoped_ptr<PrefValueStore> pref_value_store_; | 286 scoped_ptr<PrefValueStore> pref_value_store_; |
| 282 | 287 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 350 | 355 |
| 351 // Local cache of registered Preference objects. The pref_registry_ | 356 // Local cache of registered Preference objects. The pref_registry_ |
| 352 // is authoritative with respect to what the types and default values | 357 // is authoritative with respect to what the types and default values |
| 353 // of registered preferences are. | 358 // of registered preferences are. |
| 354 mutable PreferenceMap prefs_map_; | 359 mutable PreferenceMap prefs_map_; |
| 355 | 360 |
| 356 DISALLOW_COPY_AND_ASSIGN(PrefService); | 361 DISALLOW_COPY_AND_ASSIGN(PrefService); |
| 357 }; | 362 }; |
| 358 | 363 |
| 359 #endif // BASE_PREFS_PREF_SERVICE_H_ | 364 #endif // BASE_PREFS_PREF_SERVICE_H_ |
| OLD | NEW |