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

Unified Diff: net/http/http_util.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 | « net/http/http_response_headers.cc ('k') | net/http/transport_security_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_util.cc
diff --git a/net/http/http_util.cc b/net/http/http_util.cc
index 9abcfc8b798afa28b41e5011603de9dd757e202d..f1e5143e701a5334499dccc9a814ae4c96d2023b 100644
--- a/net/http/http_util.cc
+++ b/net/http/http_util.cc
@@ -133,13 +133,13 @@ void HttpUtil::ParseContentType(const std::string& content_type_str,
base::StringPiece(begin + type_val, begin + type_end),
mime_type->data());
if (!eq) {
- mime_type->assign(begin + type_val, begin + type_end);
- base::StringToLowerASCII(mime_type);
+ *mime_type = base::ToLowerASCII(
+ base::StringPiece(begin + type_val, begin + type_end));
}
if ((!eq && *had_charset) || type_has_charset) {
*had_charset = true;
- charset->assign(begin + charset_val, begin + charset_end);
- base::StringToLowerASCII(charset);
+ *charset = base::ToLowerASCII(
+ base::StringPiece(begin + charset_val, begin + charset_end));
}
}
}
@@ -321,7 +321,7 @@ const char* const kForbiddenHeaderFields[] = {
// static
bool HttpUtil::IsSafeHeader(const std::string& name) {
- std::string lower_name(base::StringToLowerASCII(name));
+ std::string lower_name(base::ToLowerASCII(name));
if (base::StartsWith(lower_name, "proxy-", base::CompareCase::SENSITIVE) ||
base::StartsWith(lower_name, "sec-", base::CompareCase::SENSITIVE))
return false;
@@ -821,7 +821,7 @@ bool HttpUtil::HeadersIterator::GetNext() {
bool HttpUtil::HeadersIterator::AdvanceTo(const char* name) {
DCHECK(name != NULL);
- DCHECK_EQ(0, base::StringToLowerASCII<std::string>(name).compare(name))
+ DCHECK_EQ(0, base::ToLowerASCII(name).compare(name))
<< "the header name must be in all lower case";
while (GetNext()) {
« no previous file with comments | « net/http/http_response_headers.cc ('k') | net/http/transport_security_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698