| 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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 // | 300 // |
| 301 // As an example, prefs registration in Chrome is triggered by the | 301 // As an example, prefs registration in Chrome is triggered by the |
| 302 // functions chrome::RegisterPrefs (for global preferences) and | 302 // functions chrome::RegisterPrefs (for global preferences) and |
| 303 // chrome::RegisterProfilePrefs (for user-specific preferences) | 303 // chrome::RegisterProfilePrefs (for user-specific preferences) |
| 304 // implemented in chrome/browser/prefs/browser_prefs.cc. | 304 // implemented in chrome/browser/prefs/browser_prefs.cc. |
| 305 PrefRegistry* DeprecatedGetPrefRegistry(); | 305 PrefRegistry* DeprecatedGetPrefRegistry(); |
| 306 | 306 |
| 307 // Clears mutable values. | 307 // Clears mutable values. |
| 308 void ClearMutableValues(); | 308 void ClearMutableValues(); |
| 309 | 309 |
| 310 // Invoked when the store is deleted from disk. Allows this PrefService |
| 311 // to tangentially cleanup data it may have saved outside the store. |
| 312 void OnStoreDeletionFromDisk(); |
| 313 |
| 310 protected: | 314 protected: |
| 311 // The PrefNotifier handles registering and notifying preference observers. | 315 // The PrefNotifier handles registering and notifying preference observers. |
| 312 // It is created and owned by this PrefService. Subclasses may access it for | 316 // It is created and owned by this PrefService. Subclasses may access it for |
| 313 // unit testing. | 317 // unit testing. |
| 314 std::unique_ptr<PrefNotifierImpl> pref_notifier_; | 318 std::unique_ptr<PrefNotifierImpl> pref_notifier_; |
| 315 | 319 |
| 316 // The PrefValueStore provides prioritized preference values. It is owned by | 320 // The PrefValueStore provides prioritized preference values. It is owned by |
| 317 // this PrefService. Subclasses may access it for unit testing. | 321 // this PrefService. Subclasses may access it for unit testing. |
| 318 std::unique_ptr<PrefValueStore> pref_value_store_; | 322 std::unique_ptr<PrefValueStore> pref_value_store_; |
| 319 | 323 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 // is authoritative with respect to what the types and default values | 400 // is authoritative with respect to what the types and default values |
| 397 // of registered preferences are. | 401 // of registered preferences are. |
| 398 mutable PreferenceMap prefs_map_; | 402 mutable PreferenceMap prefs_map_; |
| 399 | 403 |
| 400 SEQUENCE_CHECKER(sequence_checker_); | 404 SEQUENCE_CHECKER(sequence_checker_); |
| 401 | 405 |
| 402 DISALLOW_COPY_AND_ASSIGN(PrefService); | 406 DISALLOW_COPY_AND_ASSIGN(PrefService); |
| 403 }; | 407 }; |
| 404 | 408 |
| 405 #endif // COMPONENTS_PREFS_PREF_SERVICE_H_ | 409 #endif // COMPONENTS_PREFS_PREF_SERVICE_H_ |
| OLD | NEW |