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

Unified Diff: chrome/common/extensions/manifest_handlers/content_scripts_handler.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/common/extensions/manifest_handlers/content_scripts_handler.cc
diff --git a/chrome/common/extensions/manifest_handlers/content_scripts_handler.cc b/chrome/common/extensions/manifest_handlers/content_scripts_handler.cc
index 9a699b2013259706083215fc04001ae426754493..59944a830951b7c60f0362b734ad110f3f255438 100644
--- a/chrome/common/extensions/manifest_handlers/content_scripts_handler.cc
+++ b/chrome/common/extensions/manifest_handlers/content_scripts_handler.cc
@@ -110,6 +110,18 @@ bool LoadUserScriptFromDictionary(const base::DictionaryValue* content_script,
result->set_match_all_frames(all_frames);
}
+ // match about blank
+ if (content_script->HasKey(keys::kMatchAboutBlank)) {
+ bool match_about_blank = false;
+ if (!content_script->GetBoolean(keys::kMatchAboutBlank,
+ &match_about_blank)) {
+ *error = ErrorUtils::FormatErrorMessageUTF16(
+ errors::kInvalidMatchAboutBlank, base::IntToString(definition_index));
+ return false;
+ }
+ result->set_match_about_blank(match_about_blank);
+ }
+
// matches (required)
const base::ListValue* matches = NULL;
if (!content_script->GetList(keys::kMatches, &matches)) {

Powered by Google App Engine
This is Rietveld 408576698