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