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

Unified Diff: chrome/browser/prefs/scoped_pref_update.cc

Issue 5441002: Clean up pref change notification handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix extension prefs breakage Created 10 years 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 | « chrome/browser/prefs/pref_value_store_unittest.cc ('k') | chrome/browser/prefs/testing_pref_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/scoped_pref_update.cc
diff --git a/chrome/browser/prefs/scoped_pref_update.cc b/chrome/browser/prefs/scoped_pref_update.cc
index 05a607cfd0b7ea8df9ff8e2e5ec9950a80a9cda7..024d71bf1e258afd5da30155f50eb1f3dc483542 100644
--- a/chrome/browser/prefs/scoped_pref_update.cc
+++ b/chrome/browser/prefs/scoped_pref_update.cc
@@ -12,5 +12,8 @@ ScopedPrefUpdate::ScopedPrefUpdate(PrefService* service, const char* path)
path_(path) {}
ScopedPrefUpdate::~ScopedPrefUpdate() {
- service_->pref_notifier()->FireObservers(path_.c_str());
+ // TODO(mnissler, danno): This sends a notification unconditionally, which is
+ // wrong. We should rather tell the PrefService that the user pref got
+ // updated.
+ service_->pref_notifier()->OnPreferenceChanged(path_.c_str());
}
« no previous file with comments | « chrome/browser/prefs/pref_value_store_unittest.cc ('k') | chrome/browser/prefs/testing_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698