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

Unified Diff: components/prefs/json_pref_store.cc

Issue 2204943002: Integrate registry_hash_store_contents with the rest of tracked prefs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove dcheck, add comment Created 4 years, 2 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
Index: components/prefs/json_pref_store.cc
diff --git a/components/prefs/json_pref_store.cc b/components/prefs/json_pref_store.cc
index e91a4063f7bf4307486017741afe8b666a27c25d..fe19f9573444ce9a8f6ee0a4f2b71b9faad8b1d7 100644
--- a/components/prefs/json_pref_store.cc
+++ b/components/prefs/json_pref_store.cc
@@ -382,10 +382,11 @@ void JsonPrefStore::RegisterOnNextSuccessfulWriteReply(
void JsonPrefStore::RegisterOnNextWriteSynchronousCallbacks(
OnWriteCallbackPair callbacks) {
DCHECK(CalledOnValidThread());
- DCHECK(!has_pending_write_callbacks_);
has_pending_write_callbacks_ = true;
+ // Note that this shouldn't clobber callbacks previously added by this method,
+ // as |writer_|'s WriteNow() will be called in sequence.
gab 2016/10/04 19:05:32 I don't think this comment is required, it's never
proberge 2016/10/04 20:17:58 Done.
writer_.RegisterOnNextWriteCallbacks(
callbacks.first,
base::Bind(
« no previous file with comments | « chrome/browser/prefs/tracked/pref_hash_browsertest.cc ('k') | components/user_prefs/tracked/dictionary_hash_store_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698