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

Unified Diff: chrome/browser/extensions/api/settings_private/prefs_util.h

Issue 2792163003: chrome.settingsPrivate: Check whitelist for getPref / setPref (Closed)
Patch Set: Created 3 years, 9 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
Index: chrome/browser/extensions/api/settings_private/prefs_util.h
diff --git a/chrome/browser/extensions/api/settings_private/prefs_util.h b/chrome/browser/extensions/api/settings_private/prefs_util.h
index a2f229e0862f53615a0d2b528c55bd518580e57f..8695af459ca5f5924a028ede7b51757690b0d905 100644
--- a/chrome/browser/extensions/api/settings_private/prefs_util.h
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.h
@@ -42,6 +42,11 @@ class PrefsUtil {
// manipulate.
const TypedPrefMap& GetWhitelistedKeys();
+ // Returns the pref type for |pref_name| or PREF_TYPE_NONE if not in the
+ // whitelist.
+ api::settings_private::PrefType GetWhitelistedPrefType(
+ const std::string& pref_name);
+
// Gets the value of the pref with the given |name|. Returns a pointer to an
// empty PrefObject if no pref is found for |name|.
virtual std::unique_ptr<api::settings_private::PrefObject> GetPref(

Powered by Google App Engine
This is Rietveld 408576698