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

Unified Diff: components/prefs/pref_service.cc

Issue 2812863002: Pref service: Add a ScopedDictionaryPrefUpdate to track value changes. (Closed)
Patch Set: rebase Created 3 years, 8 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 | « components/prefs/pref_service.h ('k') | components/prefs/writeable_pref_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/prefs/pref_service.cc
diff --git a/components/prefs/pref_service.cc b/components/prefs/pref_service.cc
index 6858839110b158b139c7e68fed680e5f50ddeb75..cf140d840e13107499ed66004fad9596d75027ec 100644
--- a/components/prefs/pref_service.cc
+++ b/components/prefs/pref_service.cc
@@ -492,6 +492,14 @@ void PrefService::ReportUserPrefChanged(const std::string& key) {
user_pref_store_->ReportValueChanged(key, GetWriteFlags(FindPreference(key)));
}
+void PrefService::ReportUserPrefChanged(
+ const std::string& key,
+ std::set<std::vector<std::string>> path_components) {
+ DCHECK(CalledOnValidThread());
+ user_pref_store_->ReportSubValuesChanged(key, std::move(path_components),
+ GetWriteFlags(FindPreference(key)));
+}
+
void PrefService::SetUserPrefValue(const std::string& path,
std::unique_ptr<base::Value> new_value) {
DCHECK(CalledOnValidThread());
« no previous file with comments | « components/prefs/pref_service.h ('k') | components/prefs/writeable_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698