Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(799)

Unified Diff: base/prefs/json_pref_store.cc

Issue 226633002: Commit changes after a reset. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/prefs/pref_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/json_pref_store.cc
diff --git a/base/prefs/json_pref_store.cc b/base/prefs/json_pref_store.cc
index 0703075846fd59f95344060ecf8d6aafa60d8911..ca036bb99dbafbecb2f326c1125c03506591a5eb 100644
--- a/base/prefs/json_pref_store.cc
+++ b/base/prefs/json_pref_store.cc
@@ -314,8 +314,12 @@ void JsonPrefStore::OnFileRead(base::Value* value_owned,
NOTREACHED() << "Unknown error: " << error;
}
- if (pref_filter_)
- pref_filter_->FilterOnLoad(prefs_.get());
+ if (pref_filter_) {
+ if (pref_filter_->FilterOnLoad(prefs_.get())) {
+ writer_.ScheduleWrite(this);
+ writer_.DoScheduledWrite();
gab 2014/04/04 21:02:07 I don't think you need to commit changes, scheduli
erikwright (departed) 2014/04/07 14:57:14 Fair enough.
+ }
+ }
if (error_delegate_.get() && error != PREF_READ_ERROR_NONE)
error_delegate_->OnError(error);
« no previous file with comments | « no previous file | base/prefs/pref_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698