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

Unified Diff: extensions/common/csp_validator.cc

Issue 301033004: replaced the string 'chrome-extensions://' with constants (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Same patch, sent last one to wrong email 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: extensions/common/csp_validator.cc
diff --git a/extensions/common/csp_validator.cc b/extensions/common/csp_validator.cc
index 0ee01168936eb76176efd3dff7e6498cd891c8f0..5f65899d5558c6cb7e298efa959313efebe22922 100644
--- a/extensions/common/csp_validator.cc
+++ b/extensions/common/csp_validator.cc
@@ -10,6 +10,9 @@
#include "base/strings/string_tokenizer.h"
#include "base/strings/string_util.h"
Lei Zhang 2014/05/29 05:21:24 no blank line here
+#include "content/public/common/url_constants.h"
+#include "extensions/common/constants.h"
+
namespace extensions {
namespace csp_validator {
@@ -71,7 +74,8 @@ bool HasOnlySecureTokens(base::StringTokenizer& tokenizer,
StartsWithASCII(source, "http://localhost:", false) ||
StartsWithASCII(source, "https://", true) ||
StartsWithASCII(source, "chrome://", true) ||
- StartsWithASCII(source, "chrome-extension://", true) ||
+ StartsWithASCII(source, std::string(extensions::kExtensionScheme) +
+ content::kStandardSchemeSeparator, true) ||
StartsWithASCII(source, "chrome-extension-resource:", true)) {
continue;
}

Powered by Google App Engine
This is Rietveld 408576698