Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_PREFS_CHROME_PREF_SERVICE_FACTORY_H_ | |
| 6 #define CHROME_BROWSER_PREFS_CHROME_PREF_SERVICE_FACTORY_H_ | |
| 7 | |
| 8 namespace base { | |
| 9 class SequencedTaskRunner; | |
| 10 } | |
| 11 | |
| 12 namespace policy { | |
| 13 class PolicyService; | |
| 14 } | |
| 15 | |
| 16 class FilePath; | |
| 17 class PrefServiceSimple; | |
| 18 class PrefServiceSyncable; | |
| 19 class PrefServiceSyncableBuilder; | |
|
Mattias Nissler (ping if slow)
2012/12/21 15:03:20
required?
Jói
2012/12/21 15:29:52
Done.
| |
| 20 class PrefStore; | |
| 21 | |
| 22 namespace chrome_prefs { | |
| 23 | |
| 24 // Factory methods that create and initialize a new instance of a | |
| 25 // PrefService for Chrome with the applicable PrefStores. The | |
| 26 // |pref_filename| points to the user preference file. This is the | |
| 27 // usual way to create a new PrefService. | |
| 28 // |extension_pref_store| is used as the source for extension-controlled | |
| 29 // preferences and may be NULL. | |
| 30 // |policy_service| is used as the source for mandatory or recommended | |
| 31 // policies. | |
| 32 // If |async| is true, asynchronous version is used. | |
| 33 // Notifies using PREF_INITIALIZATION_COMPLETED in the end. Details is set to | |
| 34 // the created PrefService or NULL if creation has failed. Note, it is | |
| 35 // guaranteed that in asynchronous version initialization happens after this | |
| 36 // function returned. | |
| 37 | |
| 38 PrefServiceSimple* CreateLocalState( | |
| 39 const FilePath& pref_filename, | |
| 40 base::SequencedTaskRunner* pref_io_task_runner, | |
| 41 policy::PolicyService* policy_service, | |
| 42 PrefStore* extension_prefs, | |
| 43 bool async); | |
| 44 | |
| 45 PrefServiceSyncable* CreateProfilePrefs( | |
| 46 const FilePath& pref_filename, | |
| 47 base::SequencedTaskRunner* pref_io_task_runner, | |
| 48 policy::PolicyService* policy_service, | |
| 49 PrefStore* extension_prefs, | |
| 50 bool async); | |
| 51 | |
| 52 } // namespace chrome_prefs | |
| 53 | |
| 54 #endif // CHROME_BROWSER_PREFS_CHROME_PREF_SERVICE_FACTORY_H_ | |
| OLD | NEW |