| Index: extensions/renderer/script_injection.cc
|
| diff --git a/extensions/renderer/script_injection.cc b/extensions/renderer/script_injection.cc
|
| index 5299bd401bc1005f629649bf72c662749f57892f..c7eb9a4183fea8544985ae4837cfe96b5c8f7645 100644
|
| --- a/extensions/renderer/script_injection.cc
|
| +++ b/extensions/renderer/script_injection.cc
|
| @@ -154,10 +154,8 @@ 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::ForExtension(extension)
|
| - ->RequiresActionForScriptExecution(extension,
|
| - tab_id,
|
| - frame->top()->document().url())) {
|
| + extension->permissions_data()->RequiresActionForScriptExecution(
|
| + extension, tab_id, frame->top()->document().url())) {
|
| int64 request_id = kInvalidRequestId;
|
| int page_id = top_render_view->GetPageId();
|
|
|
| @@ -256,14 +254,14 @@ bool ScriptInjection::WantsToRun(blink::WebFrame* frame,
|
| GURL effective_document_url = ScriptContext::GetEffectiveDocumentURL(
|
| frame, document_url, script_->match_about_blank());
|
|
|
| - if (!PermissionsData::ForExtension(extension)
|
| - ->CanExecuteScriptOnPage(extension,
|
| - effective_document_url,
|
| - frame->top()->document().url(),
|
| - kNoTabId,
|
| - script_.get(),
|
| - kNoProcessId,
|
| - NULL /* ignore error */)) {
|
| + if (!extension->permissions_data()->CanExecuteScriptOnPage(
|
| + extension,
|
| + effective_document_url,
|
| + frame->top()->document().url(),
|
| + kNoTabId,
|
| + script_.get(),
|
| + kNoProcessId,
|
| + NULL /* ignore error */)) {
|
| return false;
|
| }
|
|
|
|
|