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 PrefStore; |
| 20 |
| 21 namespace chrome_prefs { |
| 22 |
| 23 // Factory methods that create and initialize a new instance of a |
| 24 // PrefService for Chrome with the applicable PrefStores. The |
| 25 // |pref_filename| points to the user preference file. This is the |
| 26 // usual way to create a new PrefService. |
| 27 // |extension_pref_store| is used as the source for extension-controlled |
| 28 // preferences and may be NULL. |
| 29 // |policy_service| is used as the source for mandatory or recommended |
| 30 // policies. |
| 31 // If |async| is true, asynchronous version is used. |
| 32 // Notifies using PREF_INITIALIZATION_COMPLETED in the end. Details is set to |
| 33 // the created PrefService or NULL if creation has failed. Note, it is |
| 34 // guaranteed that in asynchronous version initialization happens after this |
| 35 // function returned. |
| 36 |
| 37 PrefServiceSimple* CreateLocalState( |
| 38 const FilePath& pref_filename, |
| 39 base::SequencedTaskRunner* pref_io_task_runner, |
| 40 policy::PolicyService* policy_service, |
| 41 PrefStore* extension_prefs, |
| 42 bool async); |
| 43 |
| 44 PrefServiceSyncable* CreateProfilePrefs( |
| 45 const FilePath& pref_filename, |
| 46 base::SequencedTaskRunner* pref_io_task_runner, |
| 47 policy::PolicyService* policy_service, |
| 48 PrefStore* extension_prefs, |
| 49 bool async); |
| 50 |
| 51 } // namespace chrome_prefs |
| 52 |
| 53 #endif // CHROME_BROWSER_PREFS_CHROME_PREF_SERVICE_FACTORY_H_ |
OLD | NEW |