Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Side by Side Diff: chrome/browser/prefs/chrome_pref_service_factory.h

Issue 23376002: Move ManagedModePolicyProvider functionality to ManagedUserSettingsService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 9
10 namespace base { 10 namespace base {
11 class FilePath; 11 class FilePath;
12 class SequencedTaskRunner; 12 class SequencedTaskRunner;
13 } 13 }
14 14
15 namespace policy { 15 namespace policy {
16 class PolicyService; 16 class PolicyService;
17 } 17 }
18 18
19 namespace user_prefs {
20 class PrefRegistrySyncable;
21 }
22
23 class ManagedUserSettingsService;
19 class PrefRegistry; 24 class PrefRegistry;
20 class PrefService; 25 class PrefService;
21 class PrefServiceSyncable; 26 class PrefServiceSyncable;
22 class PrefStore; 27 class PrefStore;
23 28
24 namespace user_prefs {
25 class PrefRegistrySyncable;
26 }
27
28 namespace chrome_prefs { 29 namespace chrome_prefs {
29 30
30 // Factory methods that create and initialize a new instance of a 31 // Factory methods that create and initialize a new instance of a
31 // PrefService for Chrome with the applicable PrefStores. The 32 // PrefService for Chrome with the applicable PrefStores. The
32 // |pref_filename| points to the user preference file. This is the 33 // |pref_filename| points to the user preference file. This is the
33 // usual way to create a new PrefService. 34 // usual way to create a new PrefService.
34 // |extension_pref_store| is used as the source for extension-controlled 35 // |extension_pref_store| is used as the source for extension-controlled
35 // preferences and may be NULL. 36 // preferences and may be NULL.
36 // |policy_service| is used as the source for mandatory or recommended 37 // |policy_service| is used as the source for mandatory or recommended
37 // policies. 38 // policies.
38 // |pref_registry| keeps the list of registered prefs and their default values. 39 // |pref_registry| keeps the list of registered prefs and their default values.
39 // If |async| is true, asynchronous version is used. 40 // If |async| is true, asynchronous version is used.
40 // Notifies using PREF_INITIALIZATION_COMPLETED in the end. Details is set to 41 // Notifies using PREF_INITIALIZATION_COMPLETED in the end. Details is set to
41 // the created PrefService or NULL if creation has failed. Note, it is 42 // the created PrefService or NULL if creation has failed. Note, it is
42 // guaranteed that in asynchronous version initialization happens after this 43 // guaranteed that in asynchronous version initialization happens after this
43 // function returned. 44 // function returned.
44 45
45 PrefService* CreateLocalState( 46 PrefService* CreateLocalState(
46 const base::FilePath& pref_filename, 47 const base::FilePath& pref_filename,
47 base::SequencedTaskRunner* pref_io_task_runner, 48 base::SequencedTaskRunner* pref_io_task_runner,
48 policy::PolicyService* policy_service, 49 policy::PolicyService* policy_service,
49 const scoped_refptr<PrefStore>& extension_prefs,
50 const scoped_refptr<PrefRegistry>& pref_registry, 50 const scoped_refptr<PrefRegistry>& pref_registry,
51 bool async); 51 bool async);
52 52
53 PrefServiceSyncable* CreateProfilePrefs( 53 PrefServiceSyncable* CreateProfilePrefs(
54 const base::FilePath& pref_filename, 54 const base::FilePath& pref_filename,
55 base::SequencedTaskRunner* pref_io_task_runner, 55 base::SequencedTaskRunner* pref_io_task_runner,
56 policy::PolicyService* policy_service, 56 policy::PolicyService* policy_service,
57 ManagedUserSettingsService* managed_user_settings,
57 const scoped_refptr<PrefStore>& extension_prefs, 58 const scoped_refptr<PrefStore>& extension_prefs,
58 const scoped_refptr<user_prefs::PrefRegistrySyncable>& pref_registry, 59 const scoped_refptr<user_prefs::PrefRegistrySyncable>& pref_registry,
59 bool async); 60 bool async);
60 61
61 } // namespace chrome_prefs 62 } // namespace chrome_prefs
62 63
63 #endif // CHROME_BROWSER_PREFS_CHROME_PREF_SERVICE_FACTORY_H_ 64 #endif // CHROME_BROWSER_PREFS_CHROME_PREF_SERVICE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698