| Index: extensions/renderer/script_injection.cc
|
| diff --git a/extensions/renderer/script_injection.cc b/extensions/renderer/script_injection.cc
|
| index d3113cdabe8f3f951cd1d663e1127a7a72e3d399..007c985c3c35f016515fc7b5bc435d2a598ae384 100644
|
| --- a/extensions/renderer/script_injection.cc
|
| +++ b/extensions/renderer/script_injection.cc
|
| @@ -154,10 +154,10 @@ void ScriptInjection::InjectIfAllowed(blink::WebFrame* frame,
|
| // valid tab id (if we don't have a tab id, we have no UI surface to ask for
|
| // user consent).
|
| if (tab_id != -1 &&
|
| - PermissionsData::RequiresActionForScriptExecution(
|
| - extension,
|
| - tab_id,
|
| - frame->top()->document().url())) {
|
| + PermissionsData::ForExtension(extension)
|
| + ->RequiresActionForScriptExecution(extension,
|
| + tab_id,
|
| + frame->top()->document().url())) {
|
| int64 request_id = kInvalidRequestId;
|
| int page_id = top_render_view->GetPageId();
|
|
|
| @@ -256,13 +256,14 @@ bool ScriptInjection::WantsToRun(blink::WebFrame* frame,
|
| GURL effective_document_url = ScriptContext::GetEffectiveDocumentURL(
|
| frame, document_url, script_->match_about_blank());
|
|
|
| - if (!PermissionsData::CanExecuteScriptOnPage(extension,
|
| - effective_document_url,
|
| - frame->top()->document().url(),
|
| - kNoTabId,
|
| - script_.get(),
|
| - kNoProcessId,
|
| - NULL /* ignore error */)) {
|
| + if (!PermissionsData::ForExtension(extension)
|
| + ->CanExecuteScriptOnPage(extension,
|
| + effective_document_url,
|
| + frame->top()->document().url(),
|
| + kNoTabId,
|
| + script_.get(),
|
| + kNoProcessId,
|
| + NULL /* ignore error */)) {
|
| return false;
|
| }
|
|
|
|
|