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

Unified Diff: trunk/src/net/http/http_util.cc

Issue 474483002: Revert 289312 "Move StringToUpperASCII and LowerCaseEqualsASCII ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 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 | « trunk/src/net/http/http_security_headers.cc ('k') | trunk/src/net/http/http_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/net/http/http_util.cc
===================================================================
--- trunk/src/net/http/http_util.cc (revision 289319)
+++ trunk/src/net/http/http_util.cc (working copy)
@@ -118,14 +118,13 @@
DCHECK(param_value_begin <= tokenizer.token_end());
TrimLWS(&param_value_begin, &param_value_end);
- if (base::LowerCaseEqualsASCII(param_name_begin, param_name_end,
- "charset")) {
+ if (LowerCaseEqualsASCII(param_name_begin, param_name_end, "charset")) {
// TODO(abarth): Refactor this function to consistently use iterators.
charset_val = param_value_begin - begin;
charset_end = param_value_end - begin;
type_has_charset = true;
- } else if (base::LowerCaseEqualsASCII(param_name_begin, param_name_end,
- "boundary")) {
+ } else if (LowerCaseEqualsASCII(param_name_begin, param_name_end,
+ "boundary")) {
if (boundary)
boundary->assign(param_value_begin, param_value_end);
}
@@ -161,9 +160,9 @@
content_type_str != "*/*" &&
content_type_str.find_first_of('/') != std::string::npos) {
// Common case here is that mime_type is empty
- bool eq = !mime_type->empty() &&
- base::LowerCaseEqualsASCII(begin + type_val, begin + type_end,
- mime_type->data());
+ bool eq = !mime_type->empty() && LowerCaseEqualsASCII(begin + type_val,
+ begin + type_end,
+ mime_type->data());
if (!eq) {
mime_type->assign(begin + type_val, begin + type_end);
base::StringToLowerASCII(mime_type);
@@ -191,7 +190,7 @@
while (it.GetNext()) {
// Look for "Range" header.
- if (!base::LowerCaseEqualsASCII(it.name(), "range"))
+ if (!LowerCaseEqualsASCII(it.name(), "range"))
continue;
ranges_specifier = it.values();
// We just care about the first "Range" header, so break here.
@@ -220,7 +219,7 @@
TrimLWS(&bytes_unit_begin, &bytes_unit_end);
// "bytes" unit identifier is not found.
- if (!base::LowerCaseEqualsASCII(bytes_unit_begin, bytes_unit_end, "bytes"))
+ if (!LowerCaseEqualsASCII(bytes_unit_begin, bytes_unit_end, "bytes"))
return false;
ValuesIterator byte_range_set_iterator(byte_range_set_begin,
@@ -350,8 +349,8 @@
while (it.GetNext()) {
bool should_remove = false;
for (size_t i = 0; i < headers_to_remove_len; ++i) {
- if (base::LowerCaseEqualsASCII(it.name_begin(), it.name_end(),
- headers_to_remove[i])) {
+ if (LowerCaseEqualsASCII(it.name_begin(), it.name_end(),
+ headers_to_remove[i])) {
should_remove = true;
break;
}
@@ -386,8 +385,7 @@
"strict-transport-security"
};
for (size_t i = 0; i < arraysize(kNonCoalescingHeaders); ++i) {
- if (base::LowerCaseEqualsASCII(name_begin, name_end,
- kNonCoalescingHeaders[i]))
+ if (LowerCaseEqualsASCII(name_begin, name_end, kNonCoalescingHeaders[i]))
return true;
}
return false;
@@ -501,7 +499,7 @@
if (buf_len >= http_len) {
int i_max = std::min(buf_len - http_len, slop);
for (int i = 0; i <= i_max; ++i) {
- if (base::LowerCaseEqualsASCII(buf + i, buf + i + http_len, "http"))
+ if (LowerCaseEqualsASCII(buf + i, buf + i + http_len, "http"))
return i;
}
}
@@ -697,7 +695,7 @@
std::string::const_iterator i = etag_header.begin();
std::string::const_iterator j = etag_header.begin() + slash;
TrimLWS(&i, &j);
- if (!base::LowerCaseEqualsASCII(i, j, "w"))
+ if (!LowerCaseEqualsASCII(i, j, "w"))
return true;
}
@@ -798,7 +796,7 @@
<< "the header name must be in all lower case";
while (GetNext()) {
- if (base::LowerCaseEqualsASCII(name_begin_, name_end_, name)) {
+ if (LowerCaseEqualsASCII(name_begin_, name_end_, name)) {
return true;
}
}
« no previous file with comments | « trunk/src/net/http/http_security_headers.cc ('k') | trunk/src/net/http/http_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698