| 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_PREF_SERVICE_SYNCABLE_BUILDER_H_ | 5 #ifndef CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_BUILDER_H_ |
| 6 #define CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_BUILDER_H_ | 6 #define CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_BUILDER_H_ |
| 7 | 7 |
| 8 #include "base/prefs/pref_service_builder.h" | 8 #include "base/prefs/pref_service_builder.h" |
| 9 | 9 |
| 10 class CommandLine; | 10 class CommandLine; |
| 11 class PrefRegistrySyncable; | |
| 12 class PrefServiceSyncable; | 11 class PrefServiceSyncable; |
| 13 | 12 |
| 14 namespace policy { | 13 namespace policy { |
| 15 class PolicyService; | 14 class PolicyService; |
| 16 } | 15 } |
| 17 | 16 |
| 17 namespace user_prefs { |
| 18 class PrefRegistrySyncable; |
| 19 } |
| 20 |
| 18 // A PrefServiceBuilder that also knows how to build a | 21 // A PrefServiceBuilder that also knows how to build a |
| 19 // PrefServiceSyncable, and may know about Chrome concepts such as | 22 // PrefServiceSyncable, and may know about Chrome concepts such as |
| 20 // PolicyService. | 23 // PolicyService. |
| 21 class PrefServiceSyncableBuilder : public PrefServiceBuilder { | 24 class PrefServiceSyncableBuilder : public PrefServiceBuilder { |
| 22 public: | 25 public: |
| 23 PrefServiceSyncableBuilder(); | 26 PrefServiceSyncableBuilder(); |
| 24 virtual ~PrefServiceSyncableBuilder(); | 27 virtual ~PrefServiceSyncableBuilder(); |
| 25 | 28 |
| 26 #if defined(ENABLE_CONFIGURATION_POLICY) | 29 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 27 // Set up policy pref stores using the given policy service. | 30 // Set up policy pref stores using the given policy service. |
| 28 PrefServiceSyncableBuilder& WithManagedPolicies( | 31 PrefServiceSyncableBuilder& WithManagedPolicies( |
| 29 policy::PolicyService* service); | 32 policy::PolicyService* service); |
| 30 PrefServiceSyncableBuilder& WithRecommendedPolicies( | 33 PrefServiceSyncableBuilder& WithRecommendedPolicies( |
| 31 policy::PolicyService* service); | 34 policy::PolicyService* service); |
| 32 #endif | 35 #endif |
| 33 | 36 |
| 34 // Specifies to use an actual command-line backed command-line pref store. | 37 // Specifies to use an actual command-line backed command-line pref store. |
| 35 PrefServiceSyncableBuilder& WithCommandLine(CommandLine* command_line); | 38 PrefServiceSyncableBuilder& WithCommandLine(CommandLine* command_line); |
| 36 | 39 |
| 37 virtual PrefServiceSyncable* CreateSyncable(PrefRegistrySyncable* registry); | 40 virtual PrefServiceSyncable* CreateSyncable( |
| 41 user_prefs::PrefRegistrySyncable* registry); |
| 38 | 42 |
| 39 private: | 43 private: |
| 40 DISALLOW_COPY_AND_ASSIGN(PrefServiceSyncableBuilder); | 44 DISALLOW_COPY_AND_ASSIGN(PrefServiceSyncableBuilder); |
| 41 }; | 45 }; |
| 42 | 46 |
| 43 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_BUILDER_H_ | 47 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_BUILDER_H_ |
| OLD | NEW |