| 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 15 matching lines...) Expand all Loading... |
| 26 class DefaultPrefStore; | 26 class DefaultPrefStore; |
| 27 class PersistentPrefStore; | 27 class PersistentPrefStore; |
| 28 class PrefModelAssociator; | 28 class PrefModelAssociator; |
| 29 class PrefNotifier; | 29 class PrefNotifier; |
| 30 class PrefNotifierImpl; | 30 class PrefNotifierImpl; |
| 31 class PrefObserver; | 31 class PrefObserver; |
| 32 class PrefServiceObserver; | 32 class PrefServiceObserver; |
| 33 class PrefStore; | 33 class PrefStore; |
| 34 class PrefValueStore; | 34 class PrefValueStore; |
| 35 | 35 |
| 36 namespace base { |
| 37 class SequencedTaskRunner; |
| 38 } |
| 39 |
| 36 namespace syncer { | 40 namespace syncer { |
| 37 class SyncableService; | 41 class SyncableService; |
| 38 } | 42 } |
| 39 | 43 |
| 40 namespace policy { | 44 namespace policy { |
| 41 class PolicyService; | 45 class PolicyService; |
| 42 } | 46 } |
| 43 | 47 |
| 44 namespace subtle { | 48 namespace subtle { |
| 45 class ScopedUserPrefUpdateBase; | 49 class ScopedUserPrefUpdateBase; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // |extension_pref_store| is used as the source for extension-controlled | 107 // |extension_pref_store| is used as the source for extension-controlled |
| 104 // preferences and may be NULL. | 108 // preferences and may be NULL. |
| 105 // |policy_service| is used as the source for mandatory or recommended | 109 // |policy_service| is used as the source for mandatory or recommended |
| 106 // policies. | 110 // policies. |
| 107 // The PrefService takes ownership of |extension_pref_store|. | 111 // The PrefService takes ownership of |extension_pref_store|. |
| 108 // If |async| is true, asynchronous version is used. | 112 // If |async| is true, asynchronous version is used. |
| 109 // Notifies using PREF_INITIALIZATION_COMPLETED in the end. Details is set to | 113 // Notifies using PREF_INITIALIZATION_COMPLETED in the end. Details is set to |
| 110 // the created PrefService or NULL if creation has failed. Note, it is | 114 // the created PrefService or NULL if creation has failed. Note, it is |
| 111 // guaranteed that in asynchronous version initialization happens after this | 115 // guaranteed that in asynchronous version initialization happens after this |
| 112 // function returned. | 116 // function returned. |
| 113 static PrefService* CreatePrefService(const FilePath& pref_filename, | 117 static PrefService* CreatePrefService( |
| 114 policy::PolicyService* policy_service, | 118 const FilePath& pref_filename, |
| 115 PrefStore* extension_pref_store, | 119 base::SequencedTaskRunner* pref_io_task_runner, |
| 116 bool async); | 120 policy::PolicyService* policy_service, |
| 121 PrefStore* extension_pref_store, |
| 122 bool async); |
| 117 | 123 |
| 118 // Creates an incognito copy of the pref service that shares most pref stores | 124 // Creates an incognito copy of the pref service that shares most pref stores |
| 119 // but uses a fresh non-persistent overlay for the user pref store and an | 125 // but uses a fresh non-persistent overlay for the user pref store and an |
| 120 // individual extension pref store (to cache the effective extension prefs for | 126 // individual extension pref store (to cache the effective extension prefs for |
| 121 // incognito windows). | 127 // incognito windows). |
| 122 PrefService* CreateIncognitoPrefService(PrefStore* incognito_extension_prefs); | 128 PrefService* CreateIncognitoPrefService(PrefStore* incognito_extension_prefs); |
| 123 | 129 |
| 124 virtual ~PrefService(); | 130 virtual ~PrefService(); |
| 125 | 131 |
| 126 // Reloads the data from file. This should only be called when the importer | 132 // Reloads the data from file. This should only be called when the importer |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 // CreatePrefServiceWithPerTabPrefStore() have been called to create a | 367 // CreatePrefServiceWithPerTabPrefStore() have been called to create a |
| 362 // "forked" PrefService. | 368 // "forked" PrefService. |
| 363 bool pref_service_forked_; | 369 bool pref_service_forked_; |
| 364 | 370 |
| 365 ObserverList<PrefServiceObserver> observer_list_; | 371 ObserverList<PrefServiceObserver> observer_list_; |
| 366 | 372 |
| 367 DISALLOW_COPY_AND_ASSIGN(PrefService); | 373 DISALLOW_COPY_AND_ASSIGN(PrefService); |
| 368 }; | 374 }; |
| 369 | 375 |
| 370 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_H_ | 376 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_H_ |
| OLD | NEW |