Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / components / syncable_prefs / testing_pref_service_syncable.h
blob8235c6e11082e3d0ba53bcfb677cd39a7658cc46
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.
5 #ifndef COMPONENTS_SYNCABLE_PREFS_TESTING_PREF_SERVICE_SYNCABLE_H_
6 #define COMPONENTS_SYNCABLE_PREFS_TESTING_PREF_SERVICE_SYNCABLE_H_
8 #include "base/basictypes.h"
9 #include "base/prefs/testing_pref_service.h"
10 #include "components/syncable_prefs/pref_service_syncable.h"
12 namespace user_prefs {
13 class PrefRegistrySyncable;
16 namespace syncable_prefs {
18 class PrefModelAssociatorClient;
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;
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();
38 using PrefServiceSyncable::SetPrefModelAssociatorClientForTesting;
40 private:
41 DISALLOW_COPY_AND_ASSIGN(TestingPrefServiceSyncable);
44 } // namespace syncable_prefs
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);
55 #endif // COMPONENTS_SYNCABLE_PREFS_TESTING_PREF_SERVICE_SYNCABLE_H_