| Index: extensions/renderer/extension_injection_host.cc
|
| diff --git a/extensions/renderer/extension_injection_host.cc b/extensions/renderer/extension_injection_host.cc
|
| index 5b3c463b0b8e909938696b50f569b3fc3a62ad27..55ee1cc6b4dec047145471c9688321812c713ba1 100644
|
| --- a/extensions/renderer/extension_injection_host.cc
|
| +++ b/extensions/renderer/extension_injection_host.cc
|
| @@ -29,10 +29,15 @@ const std::string& ExtensionInjectionHost::name() const {
|
| }
|
|
|
| PermissionsData::AccessType ExtensionInjectionHost::CanExecuteOnFrame(
|
| - const GURL& document_url,
|
| - const GURL& top_frame_url,
|
| - int tab_id,
|
| - bool is_declarative) const {
|
| + const GURL& document_url,
|
| + const GURL& top_frame_url,
|
| + int tab_id,
|
| + bool is_declarative) const {
|
| + // If we don't have a tab id, we have no UI surface to ask for user consent.
|
| + // For now, we treat this as an automatic allow.
|
| + if (tab_id == -1)
|
| + return PermissionsData::ACCESS_ALLOWED;
|
| +
|
| // Declarative user scripts use "page access" (from "permissions" section in
|
| // manifest) whereas non-declarative user scripts use custom
|
| // "content script access" logic.
|
|
|