OLD | NEW |
| (Empty) |
1 // Copyright (c) 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_TESTING_PREF_SERVICE_SYNCABLE_H_ | |
6 #define COMPONENTS_SYNCABLE_PREFS_TESTING_PREF_SERVICE_SYNCABLE_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "components/prefs/testing_pref_service.h" | |
10 #include "components/syncable_prefs/pref_service_syncable.h" | |
11 | |
12 namespace user_prefs { | |
13 class PrefRegistrySyncable; | |
14 } | |
15 | |
16 namespace syncable_prefs { | |
17 | |
18 class PrefModelAssociatorClient; | |
19 | |
20 // Test version of PrefServiceSyncable. | |
21 class TestingPrefServiceSyncable | |
22 : public TestingPrefServiceBase<PrefServiceSyncable, | |
23 user_prefs::PrefRegistrySyncable> { | |
24 public: | |
25 TestingPrefServiceSyncable(); | |
26 TestingPrefServiceSyncable(TestingPrefStore* managed_prefs, | |
27 TestingPrefStore* user_prefs, | |
28 TestingPrefStore* recommended_prefs, | |
29 user_prefs::PrefRegistrySyncable* pref_registry, | |
30 PrefNotifierImpl* pref_notifier); | |
31 ~TestingPrefServiceSyncable() override; | |
32 | |
33 // This is provided as a convenience; on a production PrefService | |
34 // you would do all registrations before constructing it, passing it | |
35 // a PrefRegistry via its constructor (or via e.g. PrefServiceFactory). | |
36 user_prefs::PrefRegistrySyncable* registry(); | |
37 | |
38 using PrefServiceSyncable::SetPrefModelAssociatorClientForTesting; | |
39 | |
40 private: | |
41 DISALLOW_COPY_AND_ASSIGN(TestingPrefServiceSyncable); | |
42 }; | |
43 | |
44 } // namespace syncable_prefs | |
45 | |
46 template <> | |
47 TestingPrefServiceBase<syncable_prefs::PrefServiceSyncable, | |
48 user_prefs::PrefRegistrySyncable>:: | |
49 TestingPrefServiceBase(TestingPrefStore* managed_prefs, | |
50 TestingPrefStore* user_prefs, | |
51 TestingPrefStore* recommended_prefs, | |
52 user_prefs::PrefRegistrySyncable* pref_registry, | |
53 PrefNotifierImpl* pref_notifier); | |
54 | |
55 #endif // COMPONENTS_SYNCABLE_PREFS_TESTING_PREF_SERVICE_SYNCABLE_H_ | |
56 | |
OLD | NEW |