Chromium Code Reviews| 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..b0acf3824215382fab0b5090b24e48f0dc97740d 100644 |
| --- a/extensions/common/permissions/permissions_data.h |
| +++ b/extensions/common/permissions/permissions_data.h |
| @@ -135,6 +135,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 ShouldWarnAllHosts(const Extension* extension); |
| + |
| // Returns the full list of permission messages that the given |extension| |
| // should display at install time. |
| static PermissionMessages GetPermissionMessages(const Extension* extension); |
| @@ -179,7 +184,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& url); |
| // Parse the permissions of a given extension in the initialization process. |
| bool ParsePermissions(Extension* extension, base::string16* error); |
| @@ -194,6 +201,14 @@ class PermissionsData { |
| struct InitialPermissions; |
| typedef std::map<int, scoped_refptr<const PermissionSet> > TabPermissionsMap; |
| + // 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 HasTabSpecificScriptPermission(const Extension* extension, |
|
not at google - send to devlin
2014/05/21 23:33:45
well it seems like it can be in an anonymous names
Devlin
2014/05/22 15:52:14
Done.
|
| + int tab_id, |
| + const GURL& url); |
| + |
| // Temporary permissions during the initialization process; NULL after |
| // initialization completes. |
| scoped_ptr<InitialPermissions> initial_required_permissions_; |