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

Unified Diff: chrome/browser/extensions/api/execute_code_function.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
Index: chrome/browser/extensions/api/execute_code_function.cc
diff --git a/chrome/browser/extensions/api/execute_code_function.cc b/chrome/browser/extensions/api/execute_code_function.cc
index f06c91c66fd853c6980127335a228732980a619f..ae380827053f815c67bd4ef971ae994bbcaec9ce 100644
--- a/chrome/browser/extensions/api/execute_code_function.cc
+++ b/chrome/browser/extensions/api/execute_code_function.cc
@@ -124,6 +124,11 @@ bool ExecuteCodeFunction::Execute(const std::string& code_string) {
ScriptExecutor::ALL_FRAMES :
ScriptExecutor::TOP_FRAME;
+ ScriptExecutor::MatchAboutBlank match_about_blank =
+ details_->match_about_blank.get() && *details_->match_about_blank ?
+ ScriptExecutor::MATCH_ABOUT_BLANK :
+ ScriptExecutor::DONT_MATCH_ABOUT_BLANK;
+
UserScript::RunLocation run_at =
UserScript::UNDEFINED;
switch (details_->run_at) {
@@ -145,6 +150,7 @@ bool ExecuteCodeFunction::Execute(const std::string& code_string) {
script_type,
code_string,
frame_scope,
+ match_about_blank,
run_at,
ScriptExecutor::ISOLATED_WORLD,
IsWebView() ? ScriptExecutor::WEB_VIEW_PROCESS
« no previous file with comments | « chrome/browser/chromeos/accessibility/accessibility_manager.cc ('k') | chrome/browser/extensions/api/tabs/tabs_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698