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

Unified Diff: chrome/common/extensions/csp_validator.cc

Issue 9909019: Add schema chrome-extension-resource:// for extension resources (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add tests Created 8 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/common/extensions/csp_validator.cc
diff --git a/chrome/common/extensions/csp_validator.cc b/chrome/common/extensions/csp_validator.cc
index e80468b8e5b878410d023b5537d36e1d2a291ed8..40ce5301ac1fe2ae9e965a7c143d1df76718bf1f 100644
--- a/chrome/common/extensions/csp_validator.cc
+++ b/chrome/common/extensions/csp_validator.cc
@@ -43,7 +43,8 @@ bool HasOnlySecureTokens(StringTokenizer& tokenizer) {
source == "'none'" ||
StartsWithASCII(source, "https://", true) ||
StartsWithASCII(source, "chrome://", true) ||
- StartsWithASCII(source, "chrome-extension://", true)) {
+ StartsWithASCII(source, "chrome-extension://", true) ||
+ StartsWithASCII(source, "chrome-extension-resource://", true)) {
continue;
}

Powered by Google App Engine
This is Rietveld 408576698