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 #include "chrome/browser/prefs/pref_service_mock_builder.h" | |
6 | |
7 #include "base/prefs/testing_pref_store.h" | |
8 #include "components/user_prefs/pref_registry_syncable.h" | |
9 | |
10 PrefServiceMockBuilder::PrefServiceMockBuilder() { | |
11 ResetDefaultState(); | |
12 } | |
13 | |
14 PrefServiceMockBuilder::~PrefServiceMockBuilder() {} | |
15 | |
16 PrefService* PrefServiceMockBuilder::Create(PrefRegistry* pref_registry) { | |
17 PrefService* service = PrefServiceBuilder::Create(pref_registry); | |
18 return service; | |
19 } | |
20 | |
21 PrefServiceSyncable* PrefServiceMockBuilder::CreateSyncable( | |
22 user_prefs::PrefRegistrySyncable* pref_registry) { | |
23 PrefServiceSyncable* service = | |
24 PrefServiceSyncableBuilder::CreateSyncable(pref_registry); | |
25 return service; | |
26 } | |
27 | |
28 void PrefServiceMockBuilder::ResetDefaultState() { | |
29 user_prefs_ = new TestingPrefStore; | |
30 } | |
OLD | NEW |