OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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/base/testing_pref_service.h" | 5 #include "chrome/test/base/testing_pref_service.h" |
6 | 6 |
| 7 #include "base/prefs/default_pref_store.h" |
| 8 #include "base/prefs/testing_pref_store.h" |
7 #include "chrome/browser/policy/configuration_policy_pref_store.h" | 9 #include "chrome/browser/policy/configuration_policy_pref_store.h" |
8 #include "chrome/browser/prefs/browser_prefs.h" | 10 #include "chrome/browser/prefs/browser_prefs.h" |
9 #include "chrome/browser/prefs/command_line_pref_store.h" | 11 #include "chrome/browser/prefs/command_line_pref_store.h" |
10 #include "chrome/browser/prefs/default_pref_store.h" | |
11 #include "chrome/browser/prefs/pref_model_associator.h" | 12 #include "chrome/browser/prefs/pref_model_associator.h" |
12 #include "chrome/browser/prefs/pref_notifier_impl.h" | 13 #include "chrome/browser/prefs/pref_notifier_impl.h" |
13 #include "chrome/browser/prefs/pref_value_store.h" | 14 #include "chrome/browser/prefs/pref_value_store.h" |
14 #include "chrome/browser/prefs/testing_pref_store.h" | |
15 #include "chrome/test/base/testing_browser_process.h" | 15 #include "chrome/test/base/testing_browser_process.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 | 17 |
18 TestingPrefServiceBase::TestingPrefServiceBase( | 18 TestingPrefServiceBase::TestingPrefServiceBase( |
19 TestingPrefStore* managed_prefs, | 19 TestingPrefStore* managed_prefs, |
20 TestingPrefStore* user_prefs, | 20 TestingPrefStore* user_prefs, |
21 TestingPrefStore* recommended_prefs, | 21 TestingPrefStore* recommended_prefs, |
22 DefaultPrefStore* default_store, | 22 DefaultPrefStore* default_store, |
23 PrefModelAssociator* pref_sync_associator, | 23 PrefModelAssociator* pref_sync_associator, |
24 PrefNotifierImpl* pref_notifier) | 24 PrefNotifierImpl* pref_notifier) |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 : browser_process_(browser_process) { | 116 : browser_process_(browser_process) { |
117 chrome::RegisterLocalState(&local_state_); | 117 chrome::RegisterLocalState(&local_state_); |
118 EXPECT_FALSE(browser_process->local_state()); | 118 EXPECT_FALSE(browser_process->local_state()); |
119 browser_process->SetLocalState(&local_state_); | 119 browser_process->SetLocalState(&local_state_); |
120 } | 120 } |
121 | 121 |
122 ScopedTestingLocalState::~ScopedTestingLocalState() { | 122 ScopedTestingLocalState::~ScopedTestingLocalState() { |
123 EXPECT_EQ(&local_state_, browser_process_->local_state()); | 123 EXPECT_EQ(&local_state_, browser_process_->local_state()); |
124 browser_process_->SetLocalState(NULL); | 124 browser_process_->SetLocalState(NULL); |
125 } | 125 } |
OLD | NEW |