Index: extensions/common/permissions/permissions_data.h |
diff --git a/extensions/common/permissions/permissions_data.h b/extensions/common/permissions/permissions_data.h |
index f4f8bce4c223325294b9d0b7e28be05a01836d2e..791f94e03d437184c1e8eea5a8648c0ac82f5bb1 100644 |
--- a/extensions/common/permissions/permissions_data.h |
+++ b/extensions/common/permissions/permissions_data.h |
@@ -90,6 +90,13 @@ class PermissionsData { |
// Clears the tab-specific permissions of |tab_id|. |
static void ClearTabSpecificPermissions(const Extension* extension, |
int tab_id); |
+ // Returns true if the |extension| has tab-specific permission to operate on |
+ // the tab specified by |tab_id| with the given |url|. |
+ // Note that if this returns false, it doesn't mean the extension can't run on |
+ // the given tab, only that it does not have tab-specific permission to do so. |
+ static bool HasTabSpecificPermission(const Extension* extension, |
not at google - send to devlin
2014/05/21 20:10:20
this is not something I particularly want to expos
Devlin
2014/05/21 23:16:07
Done.
|
+ int tab_id, |
+ const GURL& url); |
// Returns true if the |extension| has the given |permission|. Prefer |
// IsExtensionWithPermissionOrSuggestInConsole when developers may be using an |
@@ -135,6 +142,11 @@ class PermissionsData { |
// network, etc.) |
static bool HasEffectiveAccessToAllHosts(const Extension* extension); |
+ // Whether the extension has access to so many hosts that we should treat it |
+ // as "all_hosts" for warning purposes. |
+ // For example, '*://*.com/*'. |
+ static bool HasAccessToMostHosts(const Extension* extension); |
not at google - send to devlin
2014/05/21 20:10:20
same comment as the other HasAccessToMostHosts
Devlin
2014/05/21 23:16:07
Done.
|
+ |
// Returns the full list of permission messages that the given |extension| |
// should display at install time. |
static PermissionMessages GetPermissionMessages(const Extension* extension); |
@@ -179,7 +191,9 @@ class PermissionsData { |
// Returns true if the user should be alerted that the |extension| is running |
// a script. |
- static bool RequiresActionForScriptExecution(const Extension* extension); |
+ static bool RequiresActionForScriptExecution(const Extension* extension, |
+ int tab_id, |
+ const GURL& document_url); |
// Parse the permissions of a given extension in the initialization process. |
bool ParsePermissions(Extension* extension, base::string16* error); |