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

Unified Diff: extensions/common/csp_validator.cc

Issue 1172183002: Move StartsWith[ASCII] to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util3
Patch Set: merger Created 5 years, 6 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
« no previous file with comments | « extensions/browser/warning_set.cc ('k') | extensions/common/extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/csp_validator.cc
diff --git a/extensions/common/csp_validator.cc b/extensions/common/csp_validator.cc
index 2a28ebb98563698f4598c495e4933239be02a55a..ced436e95d6e4896e7b92e6e6c939f208b6830ce 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'") {
« no previous file with comments | « extensions/browser/warning_set.cc ('k') | extensions/common/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698