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