diff options
Diffstat (limited to 'chrome/browser/extensions/extension_tabs_module.cc')
-rw-r--r-- | chrome/browser/extensions/extension_tabs_module.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc index 016c3ec..60160c2 100644 --- a/chrome/browser/extensions/extension_tabs_module.cc +++ b/chrome/browser/extensions/extension_tabs_module.cc @@ -661,9 +661,17 @@ bool UpdateTabFunction::RunImpl() { // JavaScript URLs can do the same kinds of things as cross-origin XHR, so // we need to check host permissions before allowing them. if (url.SchemeIs(chrome::kJavaScriptScheme)) { - if (!profile()->GetExtensionsService()->CanExecuteScriptOnHost( - GetExtension(), contents->GetURL(), &error_)) + Extension* extension = GetExtension(); + const std::vector<URLPattern> host_permissions = + extension->host_permissions(); + if (!Extension::CanExecuteScriptOnPage( + contents->GetURL(), + extension->CanExecuteScriptEverywhere(), + &host_permissions, + NULL, + &error_)) { return false; + } // TODO(aa): How does controller queue URLs? Is there any chance that this // JavaScript URL will end up applying to something other than |