summaryrefslogtreecommitdiffstats
path: root/extensions/common/csp_validator.cc
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-06-11 18:57:57 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-12 01:59:01 +0000
commit44ce0ec5b05184c4e33d597d4e5a32d9f38b15c2 (patch)
tree30eccdbbe72fb47810535fe56e0a8313be2db4b2 /extensions/common/csp_validator.cc
parent57ca2cd795596162f06a6aa67367d8ce0d9ded52 (diff)
downloadchromium_src-44ce0ec5b05184c4e33d597d4e5a32d9f38b15c2.zip
chromium_src-44ce0ec5b05184c4e33d597d4e5a32d9f38b15c2.tar.gz
chromium_src-44ce0ec5b05184c4e33d597d4e5a32d9f38b15c2.tar.bz2
Move StartsWith[ASCII] to base namespace.
NOPRESUBMIT=true (no presubmit due to removing base:: from a ScopedAllowIO) Review URL: https://codereview.chromium.org/1172183002 Cr-Commit-Position: refs/heads/master@{#334108}
Diffstat (limited to 'extensions/common/csp_validator.cc')
-rw-r--r--extensions/common/csp_validator.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/extensions/common/csp_validator.cc b/extensions/common/csp_validator.cc
index 2a28ebb..ced436e 100644
--- a/extensions/common/csp_validator.cc
+++ b/extensions/common/csp_validator.cc
@@ -57,7 +57,7 @@ struct DirectiveStatus {
bool isNonWildcardTLD(const std::string& url,
const std::string& scheme_and_separator,
bool should_check_rcd) {
- if (!StartsWithASCII(url, scheme_and_separator, true))
+ if (!base::StartsWithASCII(url, scheme_and_separator, true))
return false;
size_t start_of_host = scheme_and_separator.length();
@@ -133,14 +133,14 @@ void GetSecureDirectiveValues(const std::string& directive_name,
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) ||
+ base::StartsWithASCII(source, "http://127.0.0.1:", true) ||
+ base::StartsWithASCII(source, "http://localhost:", true) ||
isNonWildcardTLD(source, "https://", true) ||
isNonWildcardTLD(source, "chrome://", false) ||
isNonWildcardTLD(source, std::string(extensions::kExtensionScheme) +
url::kStandardSchemeSeparator,
false) ||
- StartsWithASCII(source, "chrome-extension-resource:", true)) {
+ base::StartsWithASCII(source, "chrome-extension-resource:", true)) {
is_secure_csp_token = true;
} else if ((options & OPTIONS_ALLOW_UNSAFE_EVAL) &&
source == "'unsafe-eval'") {