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

Side by Side Diff: chrome/test/testing_pref_service.cc

Issue 6312121: Add initial device policy infrastructure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix race condition and tests. Created 9 years, 10 months 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/testing_pref_service.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/test/testing_pref_service.h" 5 #include "chrome/test/testing_pref_service.h"
6 6
7 #include "chrome/browser/policy/configuration_policy_pref_store.h" 7 #include "chrome/browser/policy/configuration_policy_pref_store.h"
8 #include "chrome/browser/prefs/command_line_pref_store.h" 8 #include "chrome/browser/prefs/command_line_pref_store.h"
9 #include "chrome/browser/prefs/default_pref_store.h" 9 #include "chrome/browser/prefs/default_pref_store.h"
10 #include "chrome/browser/prefs/pref_notifier.h" 10 #include "chrome/browser/prefs/pref_notifier.h"
11 #include "chrome/browser/prefs/pref_value_store.h" 11 #include "chrome/browser/prefs/pref_value_store.h"
12 #include "chrome/browser/prefs/testing_pref_store.h" 12 #include "chrome/browser/prefs/testing_pref_store.h"
13 13
14 TestingPrefServiceBase::TestingPrefServiceBase( 14 TestingPrefServiceBase::TestingPrefServiceBase(
15 TestingPrefStore* managed_platform_prefs, 15 TestingPrefStore* managed_platform_prefs,
16 TestingPrefStore* device_management_prefs,
17 TestingPrefStore* user_prefs) 16 TestingPrefStore* user_prefs)
18 : PrefService(managed_platform_prefs, 17 : PrefService(managed_platform_prefs,
19 device_management_prefs, 18 NULL,
20 NULL, 19 NULL,
21 NULL, 20 NULL,
22 user_prefs, 21 user_prefs,
23 NULL, 22 NULL,
23 NULL,
24 new DefaultPrefStore()), 24 new DefaultPrefStore()),
25 managed_platform_prefs_(managed_platform_prefs), 25 managed_platform_prefs_(managed_platform_prefs),
26 device_management_prefs_(device_management_prefs),
27 user_prefs_(user_prefs) { 26 user_prefs_(user_prefs) {
28 } 27 }
29 28
30 TestingPrefServiceBase::~TestingPrefServiceBase() { 29 TestingPrefServiceBase::~TestingPrefServiceBase() {
31 } 30 }
32 31
33 const Value* TestingPrefServiceBase::GetManagedPref(const char* path) const { 32 const Value* TestingPrefServiceBase::GetManagedPref(const char* path) const {
34 return GetPref(managed_platform_prefs_, path); 33 return GetPref(managed_platform_prefs_, path);
35 } 34 }
36 35
(...skipping 29 matching lines...) Expand all
66 pref_store->SetValue(path, value); 65 pref_store->SetValue(path, value);
67 } 66 }
68 67
69 void TestingPrefServiceBase::RemovePref(TestingPrefStore* pref_store, 68 void TestingPrefServiceBase::RemovePref(TestingPrefStore* pref_store,
70 const char* path) { 69 const char* path) {
71 pref_store->RemoveValue(path); 70 pref_store->RemoveValue(path);
72 } 71 }
73 72
74 TestingPrefService::TestingPrefService() 73 TestingPrefService::TestingPrefService()
75 : TestingPrefServiceBase(new TestingPrefStore(), 74 : TestingPrefServiceBase(new TestingPrefStore(),
76 new TestingPrefStore(),
77 new TestingPrefStore()) { 75 new TestingPrefStore()) {
78 } 76 }
79 77
80 TestingPrefService::~TestingPrefService() { 78 TestingPrefService::~TestingPrefService() {
81 } 79 }
OLDNEW
« no previous file with comments | « chrome/test/testing_pref_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698