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

Unified Diff: extensions/renderer/user_script_slave.cc

Issue 226663003: Allow content script insertion on about:-URLs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move GetEffectiveDocumentURL to ScriptContext Created 6 years, 7 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
« no previous file with comments | « extensions/renderer/user_script_scheduler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/user_script_slave.cc
diff --git a/extensions/renderer/user_script_slave.cc b/extensions/renderer/user_script_slave.cc
index f05d214799a264c3cefc665c90571b9351abf7ee..8e176effe205d75e42ad0e988e02f405dfc450f6 100644
--- a/extensions/renderer/user_script_slave.cc
+++ b/extensions/renderer/user_script_slave.cc
@@ -212,12 +212,15 @@ void UserScriptSlave::InjectScripts(WebFrame* frame,
if (!extension)
continue;
+ const GURL& document_url = ScriptContext::GetEffectiveDocumentURL(
+ frame, data_source_url, script->match_about_blank());
+
// Content scripts are not tab-specific.
const int kNoTabId = -1;
// We don't have a process id in this context.
const int kNoProcessId = -1;
if (!PermissionsData::CanExecuteScriptOnPage(extension,
- data_source_url,
+ document_url,
top_frame->document().url(),
kNoTabId,
script,
« no previous file with comments | « extensions/renderer/user_script_scheduler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698