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

Unified Diff: chrome/browser/extensions/permissions_updater.h

Issue 348313003: Create withheld permissions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/permissions_updater.h
diff --git a/chrome/browser/extensions/permissions_updater.h b/chrome/browser/extensions/permissions_updater.h
index 073dd10ff271c49f6018cc19df0952608596f09b..818a89829df7e0eaab3267302ee14bbd83ac15a5 100644
--- a/chrome/browser/extensions/permissions_updater.h
+++ b/chrome/browser/extensions/permissions_updater.h
@@ -48,7 +48,13 @@ class PermissionsUpdater {
// 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 GrantWithheldAllHosts(const Extension* extension);
+
+ // Revokes any requests all-hosts (or all-hosts-like) permissions.
+ void WithholdAllHosts(const Extension* extension);
private:
enum EventType {
@@ -56,10 +62,13 @@ class PermissionsUpdater {
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,
+ scoped_refptr<const PermissionSet> active,
not at google - send to devlin 2014/07/01 00:28:36 const scoped_refptr<>& active, to avoid unnecessar
Devlin 2014/07/01 16:27:05 Done.
+ scoped_refptr<const PermissionSet> withheld);
// Dispatches specified event to the extension.
void DispatchEvent(const std::string& extension_id,

Powered by Google App Engine
This is Rietveld 408576698