| Index: chrome/common/json_pref_store.cc
|
| diff --git a/chrome/common/json_pref_store.cc b/chrome/common/json_pref_store.cc
|
| index b6e76c9670bd84fce931fd3bdb929ed565f4c132..c7ce0810b7804ed9626d22b5c486f0d71346fa23 100644
|
| --- a/chrome/common/json_pref_store.cc
|
| +++ b/chrome/common/json_pref_store.cc
|
| @@ -26,8 +26,7 @@ JsonPrefStore::JsonPrefStore(const FilePath& filename,
|
| }
|
|
|
| JsonPrefStore::~JsonPrefStore() {
|
| - if (writer_.HasPendingWrite() && !read_only_)
|
| - writer_.DoScheduledWrite();
|
| + CommitPendingWrites();
|
| }
|
|
|
| PrefStore::ReadResult JsonPrefStore::GetValue(const std::string& key,
|
| @@ -159,6 +158,11 @@ void JsonPrefStore::ScheduleWritePrefs() {
|
| writer_.ScheduleWrite(this);
|
| }
|
|
|
| +void JsonPrefStore::CommitPendingWrites() {
|
| + if (writer_.HasPendingWrite() && !read_only_)
|
| + writer_.DoScheduledWrite();
|
| +}
|
| +
|
| void JsonPrefStore::ReportValueChanged(const std::string& key) {
|
| FOR_EACH_OBSERVER(PrefStore::Observer, observers_, OnPrefValueChanged(key));
|
| }
|
|
|