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

Unified Diff: base/prefs/pref_service.h

Issue 1141793003: Update from https://crrev.com/329939 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 | « base/prefs/pref_registry.h ('k') | base/prefs/pref_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/pref_service.h
diff --git a/base/prefs/pref_service.h b/base/prefs/pref_service.h
index d9b03c9388ec9c7540ade8c1a5ede1867c1eb8f1..1fc6c127c050f6780fb31b38c6ffef226218fa4e 100644
--- a/base/prefs/pref_service.h
+++ b/base/prefs/pref_service.h
@@ -128,6 +128,10 @@ class BASE_PREFS_EXPORT PrefService : public base::NonThreadSafe {
// the Preference.
bool IsExtensionModifiable() const;
+ // Return the registration flags for this pref as a bitmask of
+ // PrefRegistry::PrefRegistrationFlags.
+ uint32 registration_flags() const { return registration_flags_; }
+
private:
friend class PrefService;
@@ -139,6 +143,8 @@ class BASE_PREFS_EXPORT PrefService : public base::NonThreadSafe {
const base::Value::Type type_;
+ uint32 registration_flags_;
+
// Reference to the PrefService in which this pref was created.
const PrefService* pref_service_;
};
@@ -307,6 +313,7 @@ class BASE_PREFS_EXPORT PrefService : public base::NonThreadSafe {
// Give access to ReportUserPrefChanged() and GetMutableUserPref().
friend class subtle::ScopedUserPrefUpdateBase;
+ friend class PrefServiceTest_WriteablePrefStoreFlags_Test;
// Registration of pref change observers must be done using the
// PrefChangeRegistrar, which is declared as a friend here to grant it
« no previous file with comments | « base/prefs/pref_registry.h ('k') | base/prefs/pref_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698