| Index: chrome/browser/extensions/extension_prefs.h
|
| diff --git a/chrome/browser/extensions/extension_prefs.h b/chrome/browser/extensions/extension_prefs.h
|
| index 6b5ffd4a12ab997210119e154fd0e31bac844fa1..92f86726c2d5b27fde97f79794734a5ec392e794 100644
|
| --- a/chrome/browser/extensions/extension_prefs.h
|
| +++ b/chrome/browser/extensions/extension_prefs.h
|
| @@ -187,6 +187,16 @@ class ExtensionPrefs : public ExtensionContentSettingsStore::Observer {
|
| void AddGrantedPermissions(const std::string& extension_id,
|
| const ExtensionPermissionSet* permissions);
|
|
|
| + // Gets the active permission set for the specified extension. This may
|
| + // differ from the permissions in the manifest due to the optional
|
| + // permissions API. This passes ownership of the set to the caller.
|
| + ExtensionPermissionSet* GetActivePermissions(
|
| + const std::string& extension_id);
|
| +
|
| + // Sets the active |permissions| for the extension with |extension_id|.
|
| + void SetActivePermissions(const std::string& extension_id,
|
| + const ExtensionPermissionSet* permissions);
|
| +
|
| // Returns true if the user enabled this extension to be loaded in incognito
|
| // mode.
|
| bool IsIncognitoEnabled(const std::string& extension_id);
|
| @@ -409,6 +419,18 @@ class ExtensionPrefs : public ExtensionContentSettingsStore::Observer {
|
| const std::string& pref_key,
|
| const URLPatternSet& new_value);
|
|
|
| + // Interprets |pref_key| in |extension_id|'s preferences as an
|
| + // ExtensionPermissionSet, and passes ownership of the set to the caller.
|
| + ExtensionPermissionSet* ReadExtensionPrefPermissionSet(
|
| + const std::string& extension_id,
|
| + const std::string& pref_key);
|
| +
|
| + // Converts the |new_value| to its value and sets the |pref_key| pref
|
| + // belonging to |extension_id|.
|
| + void SetExtensionPrefPermissionSet(const std::string& extension_id,
|
| + const std::string& pref_key,
|
| + const ExtensionPermissionSet* new_value);
|
| +
|
| // Returns a dictionary for extension |id|'s prefs or NULL if it doesn't
|
| // exist.
|
| const base::DictionaryValue* GetExtensionPref(const std::string& id) const;
|
|
|