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