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

Unified Diff: net/http/http_response_headers.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
« no previous file with comments | « net/http/http_content_disposition.cc ('k') | net/http/http_security_headers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_response_headers.cc
diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc
index d56f8f0328eafb0b34837bbe7f51cffe7e42909c..257a88c9b20cf282460f16752f26bda39a68880d 100644
--- a/net/http/http_response_headers.cc
+++ b/net/http/http_response_headers.cc
@@ -98,7 +98,7 @@ const char* const kNonUpdatedHeaderPrefixes[] = {
bool ShouldUpdateHeader(const std::string::const_iterator& name_begin,
const std::string::const_iterator& name_end) {
for (size_t i = 0; i < arraysize(kNonUpdatedHeaders); ++i) {
- if (LowerCaseEqualsASCII(name_begin, name_end, kNonUpdatedHeaders[i]))
+ if (base::LowerCaseEqualsASCII(name_begin, name_end, kNonUpdatedHeaders[i]))
return false;
}
for (size_t i = 0; i < arraysize(kNonUpdatedHeaderPrefixes); ++i) {
@@ -632,7 +632,7 @@ HttpVersion HttpResponseHeaders::ParseVersion(
// TODO: (1*DIGIT apparently means one or more digits, but we only handle 1).
// TODO: handle leading zeros, which is allowed by the rfc1616 sec 3.1.
- if ((line_end - p < 4) || !LowerCaseEqualsASCII(p, p + 4, "http")) {
+ if ((line_end - p < 4) || !base::LowerCaseEqualsASCII(p, p + 4, "http")) {
DVLOG(1) << "missing status line";
return HttpVersion();
}
@@ -763,9 +763,8 @@ bool HttpResponseHeaders::GetCacheControlDirective(const StringPiece& directive,
void* iter = NULL;
while (EnumerateHeader(&iter, name, &value)) {
if (value.size() > directive_size + 1 &&
- LowerCaseEqualsASCII(value.begin(),
- value.begin() + directive_size,
- directive.begin()) &&
+ base::LowerCaseEqualsASCII(
+ value.begin(), value.begin() + directive_size, directive.begin()) &&
value[directive_size] == '=') {
int64 seconds;
base::StringToInt64(
@@ -1232,7 +1231,7 @@ bool HttpResponseHeaders::IsKeepAlive() const {
std::string token;
while (EnumerateHeader(&iterator, header, &token)) {
for (const KeepAliveToken& keep_alive_token : kKeepAliveTokens) {
- if (LowerCaseEqualsASCII(token, keep_alive_token.token))
+ if (base::LowerCaseEqualsASCII(token, keep_alive_token.token))
return keep_alive_token.keep_alive;
}
}
@@ -1309,9 +1308,8 @@ bool HttpResponseHeaders::GetContentRange(int64* first_byte_position,
std::string::const_iterator content_range_spec_end =
content_range_spec.begin() + space_position;
HttpUtil::TrimLWS(&content_range_spec_begin, &content_range_spec_end);
- if (!LowerCaseEqualsASCII(content_range_spec_begin,
- content_range_spec_end,
- "bytes")) {
+ if (!base::LowerCaseEqualsASCII(content_range_spec_begin,
+ content_range_spec_end, "bytes")) {
return false;
}
@@ -1330,7 +1328,7 @@ bool HttpResponseHeaders::GetContentRange(int64* first_byte_position,
std::string byte_range_resp_spec(byte_range_resp_spec_begin,
byte_range_resp_spec_end);
// If byte-range-resp-spec != "*".
- if (!LowerCaseEqualsASCII(byte_range_resp_spec, "*")) {
+ if (!base::LowerCaseEqualsASCII(byte_range_resp_spec, "*")) {
size_t minus_position = byte_range_resp_spec.find('-');
if (minus_position != std::string::npos) {
// Obtain first-byte-pos.
@@ -1374,7 +1372,8 @@ bool HttpResponseHeaders::GetContentRange(int64* first_byte_position,
content_range_spec.end();
HttpUtil::TrimLWS(&instance_length_begin, &instance_length_end);
- if (LowerCaseEqualsASCII(instance_length_begin, instance_length_end, "*")) {
+ if (base::LowerCaseEqualsASCII(instance_length_begin, instance_length_end,
+ "*")) {
return false;
} else if (!base::StringToInt64(StringPiece(instance_length_begin,
instance_length_end),
« no previous file with comments | « net/http/http_content_disposition.cc ('k') | net/http/http_security_headers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698