OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/prefs/testing_pref_store.h" |
| 6 |
| 7 #include "base/values.h" |
| 8 |
| 9 TestingPrefStore::TestingPrefStore() |
| 10 : prefs_(new DictionaryValue()), |
| 11 read_only_(true), |
| 12 prefs_written_(false), |
| 13 init_complete_(false) { } |
| 14 |
| 15 PrefStore::PrefReadError TestingPrefStore::ReadPrefs() { |
| 16 prefs_.reset(new DictionaryValue()); |
| 17 return PrefStore::PREF_READ_ERROR_NONE; |
| 18 } |
| 19 |
| 20 bool TestingPrefStore::WritePrefs() { |
| 21 prefs_written_ = true; |
| 22 return prefs_written_; |
| 23 } |
| 24 |
| 25 void TestingPrefStore::NotifyPrefValueChanged(const std::string& key) { |
| 26 PrefStoreBase::NotifyPrefValueChanged(key); |
| 27 } |
| 28 |
| 29 void TestingPrefStore::NotifyInitializationCompleted() { |
| 30 PrefStoreBase::NotifyInitializationCompleted(); |
| 31 } |
| 32 |
| 33 void TestingPrefStore::SetInitializationCompleted() { |
| 34 init_complete_ = true; |
| 35 NotifyInitializationCompleted(); |
| 36 } |
OLD | NEW |