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

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

Issue 6894020: Adds async interface method to PersistentPrefStore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 2010->2011 Created 9 years, 7 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/common/pref_store_observer_mock.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/browser_prefs.h" 8 #include "chrome/browser/prefs/browser_prefs.h"
9 #include "chrome/browser/prefs/command_line_pref_store.h" 9 #include "chrome/browser/prefs/command_line_pref_store.h"
10 #include "chrome/browser/prefs/default_pref_store.h" 10 #include "chrome/browser/prefs/default_pref_store.h"
11 #include "chrome/browser/prefs/pref_notifier.h" 11 #include "chrome/browser/prefs/pref_notifier.h"
12 #include "chrome/browser/prefs/pref_value_store.h" 12 #include "chrome/browser/prefs/pref_value_store.h"
13 #include "chrome/browser/prefs/testing_pref_store.h" 13 #include "chrome/browser/prefs/testing_pref_store.h"
14 #include "chrome/test/testing_browser_process.h" 14 #include "chrome/test/testing_browser_process.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 16
17 TestingPrefServiceBase::TestingPrefServiceBase( 17 TestingPrefServiceBase::TestingPrefServiceBase(
18 TestingPrefStore* managed_platform_prefs, 18 TestingPrefStore* managed_platform_prefs,
19 TestingPrefStore* user_prefs, 19 TestingPrefStore* user_prefs,
20 TestingPrefStore* recommended_platform_prefs) 20 TestingPrefStore* recommended_platform_prefs)
21 : PrefService(managed_platform_prefs, 21 : PrefService(managed_platform_prefs,
22 NULL, 22 NULL,
23 NULL, 23 NULL,
24 NULL, 24 NULL,
25 user_prefs, 25 user_prefs,
26 recommended_platform_prefs, 26 recommended_platform_prefs,
27 NULL, 27 NULL,
28 new DefaultPrefStore(), 28 new DefaultPrefStore(),
29 NULL), 29 false),
30 managed_platform_prefs_(managed_platform_prefs), 30 managed_platform_prefs_(managed_platform_prefs),
31 user_prefs_(user_prefs), 31 user_prefs_(user_prefs),
32 recommended_platform_prefs_(recommended_platform_prefs) { 32 recommended_platform_prefs_(recommended_platform_prefs) {
33 } 33 }
34 34
35 TestingPrefServiceBase::~TestingPrefServiceBase() { 35 TestingPrefServiceBase::~TestingPrefServiceBase() {
36 } 36 }
37 37
38 const Value* TestingPrefServiceBase::GetManagedPref(const char* path) const { 38 const Value* TestingPrefServiceBase::GetManagedPref(const char* path) const {
39 return GetPref(managed_platform_prefs_, path); 39 return GetPref(managed_platform_prefs_, path);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 : browser_process_(browser_process) { 104 : browser_process_(browser_process) {
105 browser::RegisterLocalState(&local_state_); 105 browser::RegisterLocalState(&local_state_);
106 EXPECT_FALSE(browser_process->local_state()); 106 EXPECT_FALSE(browser_process->local_state());
107 browser_process->SetLocalState(&local_state_); 107 browser_process->SetLocalState(&local_state_);
108 } 108 }
109 109
110 ScopedTestingLocalState::~ScopedTestingLocalState() { 110 ScopedTestingLocalState::~ScopedTestingLocalState() {
111 EXPECT_EQ(&local_state_, browser_process_->local_state()); 111 EXPECT_EQ(&local_state_, browser_process_->local_state());
112 browser_process_->SetLocalState(NULL); 112 browser_process_->SetLocalState(NULL);
113 } 113 }
114
OLDNEW
« no previous file with comments | « chrome/common/pref_store_observer_mock.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698