Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Unified Diff: extensions/renderer/script_injection.cc

Issue 321533003: Separate PermissionsData::CanExecuteScriptOnPage into two functions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/renderer/script_injection.cc
diff --git a/extensions/renderer/script_injection.cc b/extensions/renderer/script_injection.cc
index c7eb9a4183fea8544985ae4837cfe96b5c8f7645..dc46ae23d06fd4bb4ce0f40bdf075b24e43d76d5 100644
--- a/extensions/renderer/script_injection.cc
+++ b/extensions/renderer/script_injection.cc
@@ -254,12 +254,14 @@ bool ScriptInjection::WantsToRun(blink::WebFrame* frame,
GURL effective_document_url = ScriptContext::GetEffectiveDocumentURL(
frame, document_url, script_->match_about_blank());
- if (!extension->permissions_data()->CanExecuteScriptOnPage(
+ if (!script_->MatchesURL(effective_document_url))
+ return false;
+
+ if (!extension->permissions_data()->CanContentScriptPage(
extension,
effective_document_url,
frame->top()->document().url(),
kNoTabId,
- script_.get(),
kNoProcessId,
NULL /* ignore error */)) {
return false;

Powered by Google App Engine
This is Rietveld 408576698