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

Unified Diff: services/preferences/public/cpp/pref_observer_store.cc

Issue 2474653003: PreferencesManager (Closed)
Patch Set: Rebase Created 4 years, 1 month 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
« chrome/browser/prefs/preferences_manager.cc ('K') | « chrome/test/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/preferences/public/cpp/pref_observer_store.cc
diff --git a/services/preferences/public/cpp/pref_observer_store.cc b/services/preferences/public/cpp/pref_observer_store.cc
index 5a5f9cb1671cee05034994489f8af7ea0ab80bf0..2b058d4c656463f66ecffed91d5406f2041f8c9a 100644
--- a/services/preferences/public/cpp/pref_observer_store.cc
+++ b/services/preferences/public/cpp/pref_observer_store.cc
@@ -91,7 +91,12 @@ void PrefObserverStore::OnPreferencesChanged(
if (keys_.find(it.key()) == keys_.end())
continue;
// We deliberately call the parent to avoid notifying the server again.
- ValueMapPrefStore::SetValue(it.key(), it.value().CreateDeepCopy(), 0);
+ if (!initialized_) {
+ ValueMapPrefStore::SetValueSilently(it.key(), it.value().CreateDeepCopy(),
+ 0);
+ } else {
+ ValueMapPrefStore::SetValue(it.key(), it.value().CreateDeepCopy(), 0);
+ }
}
if (!initialized_) {
« chrome/browser/prefs/preferences_manager.cc ('K') | « chrome/test/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698