OLD | NEW |
| (Empty) |
1 // Copyright 2013 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_PREF_SERVICE_SYNCABLE_FACTORY_H_ | |
6 #define CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_FACTORY_H_ | |
7 | |
8 #include "base/prefs/pref_service_factory.h" | |
9 | |
10 class PrefModelAssociatorClient; | |
11 class PrefServiceSyncable; | |
12 | |
13 namespace base { | |
14 class CommandLine; | |
15 } | |
16 | |
17 namespace policy { | |
18 class BrowserPolicyConnector; | |
19 class PolicyService; | |
20 } | |
21 | |
22 namespace user_prefs { | |
23 class PrefRegistrySyncable; | |
24 } | |
25 | |
26 // A PrefServiceFactory that also knows how to build a | |
27 // PrefServiceSyncable, and may know about Chrome concepts such as | |
28 // PolicyService. | |
29 class PrefServiceSyncableFactory : public base::PrefServiceFactory { | |
30 public: | |
31 PrefServiceSyncableFactory(); | |
32 ~PrefServiceSyncableFactory() override; | |
33 | |
34 #if defined(ENABLE_CONFIGURATION_POLICY) | |
35 // Set up policy pref stores using the given policy service and connector. | |
36 void SetManagedPolicies(policy::PolicyService* service, | |
37 policy::BrowserPolicyConnector* connector); | |
38 void SetRecommendedPolicies(policy::PolicyService* service, | |
39 policy::BrowserPolicyConnector* connector); | |
40 #endif | |
41 | |
42 void SetPrefModelAssociatorClient( | |
43 PrefModelAssociatorClient* pref_model_associator_client); | |
44 | |
45 scoped_ptr<PrefServiceSyncable> CreateSyncable( | |
46 user_prefs::PrefRegistrySyncable* registry); | |
47 | |
48 private: | |
49 PrefModelAssociatorClient* pref_model_associator_client_; | |
50 | |
51 DISALLOW_COPY_AND_ASSIGN(PrefServiceSyncableFactory); | |
52 }; | |
53 | |
54 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_FACTORY_H_ | |
OLD | NEW |