Chromium Code Reviews| Index: base/prefs/default_pref_store.cc |
| diff --git a/base/prefs/default_pref_store.cc b/base/prefs/default_pref_store.cc |
| index c031221496e54eeb89601c87ba09259ccf387ebc..eb14a5043ebc9588093801f4945822b9987c3907 100644 |
| --- a/base/prefs/default_pref_store.cc |
| +++ b/base/prefs/default_pref_store.cc |
| @@ -3,19 +3,26 @@ |
| // found in the LICENSE file. |
| #include "base/prefs/default_pref_store.h" |
| +#include "base/logging.h" |
|
battre
2012/11/07 11:50:49
not necessary
|
| using base::Value; |
| DefaultPrefStore::DefaultPrefStore() {} |
| +PrefStore::ReadResult DefaultPrefStore::GetValue( |
| + const std::string& key, |
| + const base::Value** result) const { |
| + return prefs_.GetValue(key, result) ? READ_OK : READ_NO_VALUE; |
| +} |
| + |
| void DefaultPrefStore::SetDefaultValue(const std::string& key, Value* value) { |
| CHECK(GetValue(key, NULL) == READ_NO_VALUE); |
| - SetValue(key, value); |
| + prefs_.SetValue(key, value); |
| } |
| void DefaultPrefStore::RemoveDefaultValue(const std::string& key) { |
| CHECK(GetValue(key, NULL) == READ_OK); |
| - RemoveValue(key); |
| + prefs_.RemoveValue(key); |
| } |
| base::Value::Type DefaultPrefStore::GetType(const std::string& key) const { |
| @@ -23,4 +30,12 @@ base::Value::Type DefaultPrefStore::GetType(const std::string& key) const { |
| return GetValue(key, &value) == READ_OK ? value->GetType() : Value::TYPE_NULL; |
| } |
| +DefaultPrefStore::const_iterator DefaultPrefStore::begin() const { |
| + return prefs_.begin(); |
| +} |
| + |
| +DefaultPrefStore::const_iterator DefaultPrefStore::end() const { |
| + return prefs_.end(); |
| +} |
| + |
| DefaultPrefStore::~DefaultPrefStore() {} |