| Index: extensions/renderer/extension_injection_host.cc
|
| diff --git a/extensions/renderer/extension_injection_host.cc b/extensions/renderer/extension_injection_host.cc
|
| index a3783d94f20e0d4ebd83eb7f64be9f0b440cb6a1..5b3c463b0b8e909938696b50f569b3fc3a62ad27 100644
|
| --- a/extensions/renderer/extension_injection_host.cc
|
| +++ b/extensions/renderer/extension_injection_host.cc
|
| @@ -55,4 +55,14 @@ PermissionsData::AccessType ExtensionInjectionHost::CanExecuteOnFrame(
|
| }
|
| }
|
|
|
| +bool ExtensionInjectionHost::ShouldNotifyBrowserOfInjection() const {
|
| + // We notify the browser of any injection if the extension has no withheld
|
| + // permissions (i.e., the permissions weren't restricted), but would have
|
| + // otherwise been affected by the scripts-require-action feature.
|
| + return extension_->permissions_data()->withheld_permissions()->IsEmpty() &&
|
| + PermissionsData::ScriptsMayRequireActionForExtension(
|
| + extension_.get(),
|
| + extension_->permissions_data()->active_permissions().get());
|
| +}
|
| +
|
| } // namespace extensions
|
|
|