summaryrefslogtreecommitdiffstats
path: root/extensions/common/csp_validator.cc
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-06-09 15:39:08 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-09 22:39:37 +0000
commitbc17d2c8d864a118f48a84de0709f5a6c463cffd (patch)
tree1b22817d8ab1d8797b14d734f0f2924c4db1736b /extensions/common/csp_validator.cc
parent952985e3821fea40f284004cae13795f8a3db489 (diff)
downloadchromium_src-bc17d2c8d864a118f48a84de0709f5a6c463cffd.zip
chromium_src-bc17d2c8d864a118f48a84de0709f5a6c463cffd.tar.gz
chromium_src-bc17d2c8d864a118f48a84de0709f5a6c463cffd.tar.bz2
Move LowerCaseEqualsASCII to base namespace
Remove url:: variants. Add the 4-element version from url:: to base:: Review URL: https://codereview.chromium.org/1172753003 Cr-Commit-Position: refs/heads/master@{#333597}
Diffstat (limited to 'extensions/common/csp_validator.cc')
-rw-r--r--extensions/common/csp_validator.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/extensions/common/csp_validator.cc b/extensions/common/csp_validator.cc
index 371d7f8..2a28ebb 100644
--- a/extensions/common/csp_validator.cc
+++ b/extensions/common/csp_validator.cc
@@ -128,19 +128,17 @@ void GetSecureDirectiveValues(const std::string& directive_name,
bool is_secure_csp_token = false;
// We might need to relax this whitelist over time.
- if (source == "'self'" ||
- source == "'none'" ||
+ if (source == "'self'" || source == "'none'" ||
source == "http://127.0.0.1" ||
- LowerCaseEqualsASCII(source, "blob:") ||
- LowerCaseEqualsASCII(source, "filesystem:") ||
- LowerCaseEqualsASCII(source, "http://localhost") ||
+ base::LowerCaseEqualsASCII(source, "blob:") ||
+ base::LowerCaseEqualsASCII(source, "filesystem:") ||
+ base::LowerCaseEqualsASCII(source, "http://localhost") ||
StartsWithASCII(source, "http://127.0.0.1:", true) ||
StartsWithASCII(source, "http://localhost:", true) ||
isNonWildcardTLD(source, "https://", true) ||
isNonWildcardTLD(source, "chrome://", false) ||
- isNonWildcardTLD(source,
- std::string(extensions::kExtensionScheme) +
- url::kStandardSchemeSeparator,
+ isNonWildcardTLD(source, std::string(extensions::kExtensionScheme) +
+ url::kStandardSchemeSeparator,
false) ||
StartsWithASCII(source, "chrome-extension-resource:", true)) {
is_secure_csp_token = true;
@@ -209,7 +207,7 @@ bool AllowedToHaveInsecureObjectSrc(
base::StringTokenizer tokenizer(input, " \t\r\n");
if (!tokenizer.GetNext())
continue;
- if (!LowerCaseEqualsASCII(tokenizer.token(), kPluginTypes))
+ if (!base::LowerCaseEqualsASCII(tokenizer.token(), kPluginTypes))
continue;
while (tokenizer.GetNext()) {
if (!PluginTypeAllowed(tokenizer.token()))