diff options
Diffstat (limited to 'chrome/common/json_pref_store.cc')
-rw-r--r-- | chrome/common/json_pref_store.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/chrome/common/json_pref_store.cc b/chrome/common/json_pref_store.cc index d20d05b..b8d323b 100644 --- a/chrome/common/json_pref_store.cc +++ b/chrome/common/json_pref_store.cc @@ -30,8 +30,13 @@ JsonPrefStore::~JsonPrefStore() { } PrefStore::ReadResult JsonPrefStore::GetValue(const std::string& key, - Value** result) const { - return prefs_->Get(key, result) ? READ_OK : READ_NO_VALUE; + const Value** result) const { + Value* tmp = NULL; + if (prefs_->Get(key, &tmp)) { + *result = tmp; + return READ_OK; + } + return READ_NO_VALUE; } void JsonPrefStore::AddObserver(PrefStore::Observer* observer) { @@ -42,6 +47,11 @@ void JsonPrefStore::RemoveObserver(PrefStore::Observer* observer) { observers_.RemoveObserver(observer); } +PrefStore::ReadResult JsonPrefStore::GetMutableValue(const std::string& key, + Value** result) { + return prefs_->Get(key, result) ? READ_OK : READ_NO_VALUE; +} + void JsonPrefStore::SetValue(const std::string& key, Value* value) { DCHECK(value); scoped_ptr<Value> new_value(value); |