| 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 COMPONENTS_SYNCABLE_PREFS_PREF_SERVICE_SYNCABLE_FACTORY_H_ |  | 
|   6 #define COMPONENTS_SYNCABLE_PREFS_PREF_SERVICE_SYNCABLE_FACTORY_H_ |  | 
|   7  |  | 
|   8 #include <memory> |  | 
|   9  |  | 
|  10 #include "base/macros.h" |  | 
|  11 #include "components/prefs/pref_service_factory.h" |  | 
|  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 namespace syncable_prefs { |  | 
|  27  |  | 
|  28 class PrefModelAssociatorClient; |  | 
|  29 class PrefServiceSyncable; |  | 
|  30  |  | 
|  31 // A PrefServiceFactory that also knows how to build a |  | 
|  32 // PrefServiceSyncable, and may know about Chrome concepts such as |  | 
|  33 // PolicyService. |  | 
|  34 class PrefServiceSyncableFactory : public PrefServiceFactory { |  | 
|  35  public: |  | 
|  36   PrefServiceSyncableFactory(); |  | 
|  37   ~PrefServiceSyncableFactory() override; |  | 
|  38  |  | 
|  39   // Set up policy pref stores using the given policy service and connector. |  | 
|  40   // These will assert when policy is not used. |  | 
|  41   void SetManagedPolicies(policy::PolicyService* service, |  | 
|  42                           policy::BrowserPolicyConnector* connector); |  | 
|  43   void SetRecommendedPolicies(policy::PolicyService* service, |  | 
|  44                               policy::BrowserPolicyConnector* connector); |  | 
|  45  |  | 
|  46   void SetPrefModelAssociatorClient( |  | 
|  47       PrefModelAssociatorClient* pref_model_associator_client); |  | 
|  48  |  | 
|  49   std::unique_ptr<PrefServiceSyncable> CreateSyncable( |  | 
|  50       user_prefs::PrefRegistrySyncable* registry); |  | 
|  51  |  | 
|  52  private: |  | 
|  53   PrefModelAssociatorClient* pref_model_associator_client_; |  | 
|  54  |  | 
|  55   DISALLOW_COPY_AND_ASSIGN(PrefServiceSyncableFactory); |  | 
|  56 }; |  | 
|  57  |  | 
|  58 }  // namespace syncable_prefs |  | 
|  59  |  | 
|  60 #endif  // COMPONENTS_SYNCABLE_PREFS_PREF_SERVICE_SYNCABLE_FACTORY_H_ |  | 
| OLD | NEW |