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

Unified Diff: net/http/http_request_headers.cc

Issue 1224553010: Replace base::str[n]casecmp with helper functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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_log_util.cc ('k') | net/tools/balsa/balsa_headers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_request_headers.cc
diff --git a/net/http/http_request_headers.cc b/net/http/http_request_headers.cc
index 004d0659512c62ec3d35b40d1abd6926171cfe8b..c2eee59af95f8408a9d11ad774986e302270175b 100644
--- a/net/http/http_request_headers.cc
+++ b/net/http/http_request_headers.cc
@@ -241,8 +241,7 @@ HttpRequestHeaders::HeaderVector::iterator
HttpRequestHeaders::FindHeader(const base::StringPiece& key) {
for (HeaderVector::iterator it = headers_.begin();
it != headers_.end(); ++it) {
- if (key.length() == it->key.length() &&
- !base::strncasecmp(key.data(), it->key.data(), key.length()))
+ if (base::EqualsCaseInsensitiveASCII(key, it->key))
return it;
}
@@ -253,8 +252,7 @@ HttpRequestHeaders::HeaderVector::const_iterator
HttpRequestHeaders::FindHeader(const base::StringPiece& key) const {
for (HeaderVector::const_iterator it = headers_.begin();
it != headers_.end(); ++it) {
- if (key.length() == it->key.length() &&
- !base::strncasecmp(key.data(), it->key.data(), key.length()))
+ if (base::EqualsCaseInsensitiveASCII(key, it->key))
return it;
}
« no previous file with comments | « net/http/http_log_util.cc ('k') | net/tools/balsa/balsa_headers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698