| Index: chrome/common/json_pref_store.cc | 
| diff --git a/chrome/common/json_pref_store.cc b/chrome/common/json_pref_store.cc | 
| index d68307f622261b919ffdd4e907c2e231955d79ac..a3fe5b8cbd7692354638dfc76efcead76f319dda 100644 | 
| --- a/chrome/common/json_pref_store.cc | 
| +++ b/chrome/common/json_pref_store.cc | 
| @@ -30,7 +30,40 @@ JsonPrefStore::~JsonPrefStore() { | 
| writer_.DoScheduledWrite(); | 
| } | 
|  | 
| -PrefStore::PrefReadError JsonPrefStore::ReadPrefs() { | 
| +PrefStore::ReadResult JsonPrefStore::GetValue(const std::string& key, | 
| +                                              Value** result) const { | 
| +  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); | 
| +  Value* old_value = NULL; | 
| +  prefs_->Get(key, &old_value); | 
| +  if (!old_value || !value->Equals(old_value)) { | 
| +    prefs_->Set(key, new_value.release()); | 
| +    FOR_EACH_OBSERVER(PrefStore::ObserverInterface, observers_, | 
| +                      OnPrefValueChanged(key)); | 
| +  } | 
| +} | 
| + | 
| +void JsonPrefStore::SetValueSilently(const std::string& key, Value* value) { | 
| +  DCHECK(value); | 
| +  scoped_ptr<Value> new_value(value); | 
| +  Value* old_value = NULL; | 
| +  prefs_->Get(key, &old_value); | 
| +  if (!old_value || !value->Equals(old_value)) | 
| +    prefs_->Set(key, new_value.release()); | 
| +} | 
| + | 
| +void JsonPrefStore::RemoveValue(const std::string& key) { | 
| +  if (prefs_->Remove(key, NULL)) { | 
| +    FOR_EACH_OBSERVER(PrefStore::ObserverInterface, observers_, | 
| +                      OnPrefValueChanged(key)); | 
| +  } | 
| +} | 
| + | 
| +PersistentPrefStore::PrefReadError JsonPrefStore::ReadPrefs() { | 
| if (path_.empty()) { | 
| read_only_ = true; | 
| return PREF_READ_ERROR_FILE_NOT_SPECIFIED; | 
| @@ -131,3 +164,11 @@ bool JsonPrefStore::SerializeData(std::string* output) { | 
| scoped_ptr<DictionaryValue> copy(prefs_->DeepCopyWithoutEmptyChildren()); | 
| return serializer.Serialize(*(copy.get())); | 
| } | 
| + | 
| +void JsonPrefStore::AddObserver(PrefStore::ObserverInterface* observer) { | 
| +  observers_.AddObserver(observer); | 
| +} | 
| + | 
| +void JsonPrefStore::RemoveObserver(PrefStore::ObserverInterface* observer) { | 
| +  observers_.RemoveObserver(observer); | 
| +} | 
|  |