Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Side by Side Diff: components/syncable_prefs/testing_pref_service_syncable.cc

Issue 2459823002: [Sync] Rename syncable_prefs to sync_preferences. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/syncable_prefs/testing_pref_service_syncable.h ('k') | ios/chrome/browser/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 #include "components/syncable_prefs/testing_pref_service_syncable.h"
6
7 #include "base/bind.h"
8 #include "components/pref_registry/pref_registry_syncable.h"
9 #include "components/prefs/pref_notifier_impl.h"
10 #include "components/prefs/pref_value_store.h"
11 #include "testing/gtest/include/gtest/gtest.h"
12
13 template <>
14 TestingPrefServiceBase<syncable_prefs::PrefServiceSyncable,
15 user_prefs::PrefRegistrySyncable>::
16 TestingPrefServiceBase(TestingPrefStore* managed_prefs,
17 TestingPrefStore* user_prefs,
18 TestingPrefStore* recommended_prefs,
19 user_prefs::PrefRegistrySyncable* pref_registry,
20 PrefNotifierImpl* pref_notifier)
21 : syncable_prefs::PrefServiceSyncable(
22 pref_notifier,
23 new PrefValueStore(managed_prefs,
24 nullptr, // supervised_user_prefs
25 nullptr, // extension_prefs
26 nullptr, // command_line_prefs
27 user_prefs,
28 recommended_prefs,
29 pref_registry->defaults().get(),
30 pref_notifier),
31 user_prefs,
32 pref_registry,
33 nullptr, // pref_model_associator_client
34 base::Bind(&TestingPrefServiceBase<
35 PrefServiceSyncable,
36 user_prefs::PrefRegistrySyncable>::HandleReadError),
37 false),
38 managed_prefs_(managed_prefs),
39 user_prefs_(user_prefs),
40 recommended_prefs_(recommended_prefs) {}
41
42 namespace syncable_prefs {
43
44 TestingPrefServiceSyncable::TestingPrefServiceSyncable()
45 : TestingPrefServiceBase<PrefServiceSyncable,
46 user_prefs::PrefRegistrySyncable>(
47 new TestingPrefStore(),
48 new TestingPrefStore(),
49 new TestingPrefStore(),
50 new user_prefs::PrefRegistrySyncable(),
51 new PrefNotifierImpl()) {
52 }
53
54 TestingPrefServiceSyncable::TestingPrefServiceSyncable(
55 TestingPrefStore* managed_prefs,
56 TestingPrefStore* user_prefs,
57 TestingPrefStore* recommended_prefs,
58 user_prefs::PrefRegistrySyncable* pref_registry,
59 PrefNotifierImpl* pref_notifier)
60 : TestingPrefServiceBase<PrefServiceSyncable,
61 user_prefs::PrefRegistrySyncable>(
62 managed_prefs,
63 user_prefs,
64 recommended_prefs,
65 pref_registry,
66 pref_notifier) {
67 }
68
69 TestingPrefServiceSyncable::~TestingPrefServiceSyncable() {
70 }
71
72 user_prefs::PrefRegistrySyncable* TestingPrefServiceSyncable::registry() {
73 return static_cast<user_prefs::PrefRegistrySyncable*>(
74 DeprecatedGetPrefRegistry());
75 }
76
77 } // namespace syncable_prefs
OLDNEW
« no previous file with comments | « components/syncable_prefs/testing_pref_service_syncable.h ('k') | ios/chrome/browser/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698