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