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

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..890c3de6d45503ebc295fc7a521bcd26649bb1ce 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()->CanRunContentScriptOnPage(
extension,
effective_document_url,
frame->top()->document().url(),
kNoTabId,
- script_.get(),
kNoProcessId,
NULL /* ignore error */)) {
return false;
« no previous file with comments | « extensions/common/permissions/permissions_data_unittest.cc ('k') | extensions/renderer/user_script_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698