// Initializes the |extension|'s active permission set to include only
// permissions currently requested by the extension and all the permissions
// required by the extension.
- void InitializeActivePermissions(const Extension* extension);
+ void InitializePermissions(const Extension* extension);
+
+ // Grants any withheld all-hosts (or all-hosts-like) permissions.
+ void GrantWithheldImpliedAllHosts(const Extension* extension);
+
+ // Revokes any requests all-hosts (or all-hosts-like) permissions.
+ void WithholdImpliedAllHosts(const Extension* extension);
private:
enum EventType {
REMOVED,
};
- // Sets the |extension|'s active permissions to |permissions| and records the
- // change in the prefs.
- void SetActivePermissions(const Extension* extension,
- const PermissionSet* permisssions);
+ // Sets the |extension|'s active permissions to |active| and records the
+ // change in the prefs. If |withheld| is non-null, also sets the extension's
+ // withheld permissions to |withheld|. Otherwise, |withheld| permissions are
+ // not changed.
+ void SetPermissions(const Extension* extension,
+ const scoped_refptr<const PermissionSet>& active,
+ scoped_refptr<const PermissionSet> withheld);
// Dispatches specified event to the extension.
void DispatchEvent(const std::string& extension_id,