diff options
-rw-r--r-- | extensions/common/permissions/permissions_data.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/extensions/common/permissions/permissions_data.cc b/extensions/common/permissions/permissions_data.cc index 809865d..65359d9 100644 --- a/extensions/common/permissions/permissions_data.cc +++ b/extensions/common/permissions/permissions_data.cc @@ -564,8 +564,12 @@ bool PermissionsData::CanCaptureVisiblePage(const Extension* extension, bool PermissionsData::RequiresActionForScriptExecution( const Extension* extension) { // For now, the user should be notified when an extension with all hosts - // permission tries to execute a script on a page. - return HasEffectiveAccessToAllHosts(extension); + // permission tries to execute a script on a page. Exceptions for policy- + // enabled and component extensions. + return extension->ShouldDisplayInExtensionSettings() && + !Manifest::IsPolicyLocation(extension->location()) && + !Manifest::IsComponentLocation(extension->location()) && + HasEffectiveAccessToAllHosts(extension); } bool PermissionsData::ParsePermissions(Extension* extension, |