| Index: extensions/common/permissions/permissions_data.cc
|
| diff --git a/extensions/common/permissions/permissions_data.cc b/extensions/common/permissions/permissions_data.cc
|
| index 85000a21e6388583bf27b0134ce2173817b82f1d..8fde19930d003330ac8cb73c01e09506dd850a82 100644
|
| --- a/extensions/common/permissions/permissions_data.cc
|
| +++ b/extensions/common/permissions/permissions_data.cc
|
| @@ -584,12 +584,13 @@ bool PermissionsData::RequiresActionForScriptExecution(
|
| int tab_id,
|
| const GURL& url) {
|
| // For now, the user should be notified when an extension with all hosts
|
| - // permission tries to execute a script on a page, with exceptions for policy-
|
| - // enabled and component extensions. If this doesn't meet those criteria,
|
| - // return immediately.
|
| + // permission tries to execute a script on a page. Exceptions for policy-
|
| + // enabled and component extensions, and extensions which are whitelisted to
|
| + // execute scripts everywhere.
|
| if (!extension->ShouldDisplayInExtensionSettings() ||
|
| Manifest::IsPolicyLocation(extension->location()) ||
|
| Manifest::IsComponentLocation(extension->location()) ||
|
| + CanExecuteScriptEverywhere(extension) ||
|
| !ShouldWarnAllHosts(extension)) {
|
| return false;
|
| }
|
|
|