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

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: address reviewer's comments (matches->match) Created 6 years, 8 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 9a7ec7d75cb8a83b66a414b1fc801352fd0c3b0d..edacc541243ccae3c9cf65ea886a2049d5660c28 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

Powered by Google App Engine
This is Rietveld 408576698