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 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" |
9 | 10 |
10 namespace base { | 11 namespace base { |
11 class FilePath; | 12 class FilePath; |
12 class SequencedTaskRunner; | 13 class SequencedTaskRunner; |
13 } | 14 } |
14 | 15 |
15 namespace policy { | 16 namespace policy { |
16 class PolicyService; | 17 class PolicyService; |
17 } | 18 } |
18 | 19 |
(...skipping 17 matching lines...) Expand all Loading... |
36 // preferences and may be NULL. | 37 // preferences and may be NULL. |
37 // |policy_service| is used as the source for mandatory or recommended | 38 // |policy_service| is used as the source for mandatory or recommended |
38 // policies. | 39 // policies. |
39 // |pref_registry| keeps the list of registered prefs and their default values. | 40 // |pref_registry| keeps the list of registered prefs and their default values. |
40 // If |async| is true, asynchronous version is used. | 41 // If |async| is true, asynchronous version is used. |
41 // Notifies using PREF_INITIALIZATION_COMPLETED in the end. Details is set to | 42 // Notifies using PREF_INITIALIZATION_COMPLETED in the end. Details is set to |
42 // the created PrefService or NULL if creation has failed. Note, it is | 43 // the created PrefService or NULL if creation has failed. Note, it is |
43 // guaranteed that in asynchronous version initialization happens after this | 44 // guaranteed that in asynchronous version initialization happens after this |
44 // function returned. | 45 // function returned. |
45 | 46 |
46 PrefService* CreateLocalState( | 47 scoped_ptr<PrefService> CreateLocalState( |
47 const base::FilePath& pref_filename, | 48 const base::FilePath& pref_filename, |
48 base::SequencedTaskRunner* pref_io_task_runner, | 49 base::SequencedTaskRunner* pref_io_task_runner, |
49 policy::PolicyService* policy_service, | 50 policy::PolicyService* policy_service, |
50 const scoped_refptr<PrefRegistry>& pref_registry, | 51 const scoped_refptr<PrefRegistry>& pref_registry, |
51 bool async); | 52 bool async); |
52 | 53 |
53 PrefServiceSyncable* CreateProfilePrefs( | 54 scoped_ptr<PrefServiceSyncable> CreateProfilePrefs( |
54 const base::FilePath& pref_filename, | 55 const base::FilePath& pref_filename, |
55 base::SequencedTaskRunner* pref_io_task_runner, | 56 base::SequencedTaskRunner* pref_io_task_runner, |
56 policy::PolicyService* policy_service, | 57 policy::PolicyService* policy_service, |
57 ManagedUserSettingsService* managed_user_settings, | 58 ManagedUserSettingsService* managed_user_settings, |
58 const scoped_refptr<PrefStore>& extension_prefs, | 59 const scoped_refptr<PrefStore>& extension_prefs, |
59 const scoped_refptr<user_prefs::PrefRegistrySyncable>& pref_registry, | 60 const scoped_refptr<user_prefs::PrefRegistrySyncable>& pref_registry, |
60 bool async); | 61 bool async); |
61 | 62 |
62 } // namespace chrome_prefs | 63 } // namespace chrome_prefs |
63 | 64 |
64 #endif // CHROME_BROWSER_PREFS_CHROME_PREF_SERVICE_FACTORY_H_ | 65 #endif // CHROME_BROWSER_PREFS_CHROME_PREF_SERVICE_FACTORY_H_ |
OLD | NEW |