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

Unified Diff: extensions/common/csp_validator.cc

Issue 1172753003: Move LowerCaseEqualsASCII to base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util
Patch Set: 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
Index: extensions/common/csp_validator.cc
diff --git a/extensions/common/csp_validator.cc b/extensions/common/csp_validator.cc
index 371d7f8d10a5ac764c7685e405517dfa4ef70c16..2a28ebb98563698f4598c495e4933239be02a55a 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()))
« no previous file with comments | « extensions/browser/api/web_request/web_request_api_helpers.cc ('k') | google_apis/gaia/gaia_auth_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698