| 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/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/prefs/default_pref_store.h" | 9 #include "base/prefs/default_pref_store.h" |
| 10 #include "base/prefs/pref_notifier_impl.h" |
| 11 #include "base/prefs/pref_registry_simple.h" |
| 12 #include "base/prefs/pref_value_store.h" |
| 10 #include "chrome/browser/prefs/browser_prefs.h" | 13 #include "chrome/browser/prefs/browser_prefs.h" |
| 11 #include "chrome/browser/prefs/pref_notifier_impl.h" | |
| 12 #include "chrome/browser/prefs/pref_registry_simple.h" | |
| 13 #include "chrome/browser/prefs/pref_registry_syncable.h" | 14 #include "chrome/browser/prefs/pref_registry_syncable.h" |
| 14 #include "chrome/browser/prefs/pref_value_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 namespace { | 18 namespace { |
| 19 | 19 |
| 20 // Do-nothing implementation for TestingPrefService. | 20 // Do-nothing implementation for TestingPrefService. |
| 21 void HandleReadError(PersistentPrefStore::PrefReadError error) { | 21 void HandleReadError(PersistentPrefStore::PrefReadError error) { |
| 22 } | 22 } |
| 23 | 23 |
| 24 } // namespace | 24 } // namespace |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 chrome::RegisterLocalState(&local_state_, | 111 chrome::RegisterLocalState(&local_state_, |
| 112 local_state_.registry()); | 112 local_state_.registry()); |
| 113 EXPECT_FALSE(browser_process->local_state()); | 113 EXPECT_FALSE(browser_process->local_state()); |
| 114 browser_process->SetLocalState(&local_state_); | 114 browser_process->SetLocalState(&local_state_); |
| 115 } | 115 } |
| 116 | 116 |
| 117 ScopedTestingLocalState::~ScopedTestingLocalState() { | 117 ScopedTestingLocalState::~ScopedTestingLocalState() { |
| 118 EXPECT_EQ(&local_state_, browser_process_->local_state()); | 118 EXPECT_EQ(&local_state_, browser_process_->local_state()); |
| 119 browser_process_->SetLocalState(NULL); | 119 browser_process_->SetLocalState(NULL); |
| 120 } | 120 } |
| OLD | NEW |