| 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 "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" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 new PrefModelAssociator(), | 107 new PrefModelAssociator(), |
| 108 new PrefNotifierImpl()) { | 108 new PrefNotifierImpl()) { |
| 109 } | 109 } |
| 110 | 110 |
| 111 TestingPrefService::~TestingPrefService() { | 111 TestingPrefService::~TestingPrefService() { |
| 112 } | 112 } |
| 113 | 113 |
| 114 ScopedTestingLocalState::ScopedTestingLocalState( | 114 ScopedTestingLocalState::ScopedTestingLocalState( |
| 115 TestingBrowserProcess* browser_process) | 115 TestingBrowserProcess* browser_process) |
| 116 : browser_process_(browser_process) { | 116 : browser_process_(browser_process) { |
| 117 browser::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 |