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

Unified Diff: components/prefs/pref_service.h

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/BUILD.gn ('k') | components/prefs/pref_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/prefs/pref_service.h
diff --git a/components/prefs/pref_service.h b/components/prefs/pref_service.h
index e08e361c40b618da1637b995323745dfc1e0052f..208fc0ce0ddc07c0addeb53128cd29c0fbc5b7d8 100644
--- a/components/prefs/pref_service.h
+++ b/components/prefs/pref_service.h
@@ -39,6 +39,10 @@ namespace base {
class FilePath;
}
+namespace prefs {
+class ScopedDictionaryPrefUpdate;
+}
+
namespace subtle {
class PrefMemberBase;
class ScopedUserPrefUpdateBase;
@@ -327,6 +331,7 @@ class COMPONENTS_PREFS_EXPORT PrefService : public base::NonThreadSafe {
// Give access to ReportUserPrefChanged() and GetMutableUserPref().
friend class subtle::ScopedUserPrefUpdateBase;
friend class PrefServiceTest_WriteablePrefStoreFlags_Test;
+ friend class prefs::ScopedDictionaryPrefUpdate;
// Registration of pref change observers must be done using the
// PrefChangeRegistrar, which is declared as a friend here to grant it
@@ -352,6 +357,9 @@ class COMPONENTS_PREFS_EXPORT PrefService : public base::NonThreadSafe {
// Sends notification of a changed preference. This needs to be called by
// a ScopedUserPrefUpdate if a DictionaryValue or ListValue is changed.
void ReportUserPrefChanged(const std::string& key);
+ void ReportUserPrefChanged(
+ const std::string& key,
+ std::set<std::vector<std::string>> path_components);
// Sets the value for this pref path in the user pref store and informs the
// PrefNotifier of the change.
« no previous file with comments | « components/prefs/BUILD.gn ('k') | components/prefs/pref_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698