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

Unified Diff: extensions/common/csp_validator.cc

Issue 1282363003: Convert remaining StringToLowerASCII to ToLowerASCII (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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/verified_contents.cc ('k') | extensions/common/message_bundle.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 842fc80fa58431e7f2e3a37a4ddd4962c26a340d..8f9406fe196d97f42ca8fcb8615cf1de8f485849 100644
--- a/extensions/common/csp_validator.cc
+++ b/extensions/common/csp_validator.cc
@@ -292,9 +292,7 @@ std::string SanitizeContentSecurityPolicy(
if (!tokenizer.GetNext())
continue;
- std::string directive_name = tokenizer.token();
- base::StringToLowerASCII(&directive_name);
-
+ std::string directive_name = base::ToLowerASCII(tokenizer.token_piece());
if (UpdateStatus(directive_name, &tokenizer, &default_src_status, options,
&sane_csp_parts, &default_src_csp_warnings))
continue;
@@ -348,17 +346,14 @@ bool ContentSecurityPolicyIsSandboxed(
if (!tokenizer.GetNext())
continue;
- std::string directive_name = tokenizer.token();
- base::StringToLowerASCII(&directive_name);
-
+ std::string directive_name = base::ToLowerASCII(tokenizer.token_piece());
if (directive_name != kSandboxDirectiveName)
continue;
seen_sandbox = true;
while (tokenizer.GetNext()) {
- std::string token = tokenizer.token();
- base::StringToLowerASCII(&token);
+ std::string token = base::ToLowerASCII(tokenizer.token_piece());
// The same origin token negates the sandboxing.
if (token == kAllowSameOriginToken)
« no previous file with comments | « extensions/browser/verified_contents.cc ('k') | extensions/common/message_bundle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698