OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 COMPONENTS_SYNCABLE_PREFS_PREF_SERVICE_SYNCABLE_FACTORY_H_ | 5 #ifndef COMPONENTS_SYNCABLE_PREFS_PREF_SERVICE_SYNCABLE_FACTORY_H_ |
6 #define COMPONENTS_SYNCABLE_PREFS_PREF_SERVICE_SYNCABLE_FACTORY_H_ | 6 #define COMPONENTS_SYNCABLE_PREFS_PREF_SERVICE_SYNCABLE_FACTORY_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "components/prefs/pref_service_factory.h" | 9 #include "components/prefs/pref_service_factory.h" |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 } | 22 } |
23 | 23 |
24 namespace syncable_prefs { | 24 namespace syncable_prefs { |
25 | 25 |
26 class PrefModelAssociatorClient; | 26 class PrefModelAssociatorClient; |
27 class PrefServiceSyncable; | 27 class PrefServiceSyncable; |
28 | 28 |
29 // A PrefServiceFactory that also knows how to build a | 29 // A PrefServiceFactory that also knows how to build a |
30 // PrefServiceSyncable, and may know about Chrome concepts such as | 30 // PrefServiceSyncable, and may know about Chrome concepts such as |
31 // PolicyService. | 31 // PolicyService. |
32 class PrefServiceSyncableFactory : public base::PrefServiceFactory { | 32 class PrefServiceSyncableFactory : public PrefServiceFactory { |
33 public: | 33 public: |
34 PrefServiceSyncableFactory(); | 34 PrefServiceSyncableFactory(); |
35 ~PrefServiceSyncableFactory() override; | 35 ~PrefServiceSyncableFactory() override; |
36 | 36 |
37 #if defined(ENABLE_CONFIGURATION_POLICY) | 37 #if defined(ENABLE_CONFIGURATION_POLICY) |
38 // Set up policy pref stores using the given policy service and connector. | 38 // Set up policy pref stores using the given policy service and connector. |
39 void SetManagedPolicies(policy::PolicyService* service, | 39 void SetManagedPolicies(policy::PolicyService* service, |
40 policy::BrowserPolicyConnector* connector); | 40 policy::BrowserPolicyConnector* connector); |
41 void SetRecommendedPolicies(policy::PolicyService* service, | 41 void SetRecommendedPolicies(policy::PolicyService* service, |
42 policy::BrowserPolicyConnector* connector); | 42 policy::BrowserPolicyConnector* connector); |
43 #endif | 43 #endif |
44 | 44 |
45 void SetPrefModelAssociatorClient( | 45 void SetPrefModelAssociatorClient( |
46 PrefModelAssociatorClient* pref_model_associator_client); | 46 PrefModelAssociatorClient* pref_model_associator_client); |
47 | 47 |
48 scoped_ptr<PrefServiceSyncable> CreateSyncable( | 48 scoped_ptr<PrefServiceSyncable> CreateSyncable( |
49 user_prefs::PrefRegistrySyncable* registry); | 49 user_prefs::PrefRegistrySyncable* registry); |
50 | 50 |
51 private: | 51 private: |
52 PrefModelAssociatorClient* pref_model_associator_client_; | 52 PrefModelAssociatorClient* pref_model_associator_client_; |
53 | 53 |
54 DISALLOW_COPY_AND_ASSIGN(PrefServiceSyncableFactory); | 54 DISALLOW_COPY_AND_ASSIGN(PrefServiceSyncableFactory); |
55 }; | 55 }; |
56 | 56 |
57 } // namespace syncable_prefs | 57 } // namespace syncable_prefs |
58 | 58 |
59 #endif // COMPONENTS_SYNCABLE_PREFS_PREF_SERVICE_SYNCABLE_FACTORY_H_ | 59 #endif // COMPONENTS_SYNCABLE_PREFS_PREF_SERVICE_SYNCABLE_FACTORY_H_ |
OLD | NEW |