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

Unified Diff: mojo/services/network/http_connection_impl.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 | « media/video/capture/fake_video_capture_device_factory.cc ('k') | net/base/mime_sniffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/network/http_connection_impl.cc
diff --git a/mojo/services/network/http_connection_impl.cc b/mojo/services/network/http_connection_impl.cc
index 2df12aa7b50d7b63d392f4bf2514a911ff8c954c..ad3347d9d43ca72ec98a0e0860a33f8f1fb81b95 100644
--- a/mojo/services/network/http_connection_impl.cc
+++ b/mojo/services/network/http_connection_impl.cc
@@ -375,11 +375,12 @@ void HttpConnectionImpl::OnFinishedReadingResponseBody(
//
// TODO(yzshen): Consider adding to net::HttpServerResponseInfo a simple
// setter for body which doesn't fiddle with headers.
- if (base::strcasecmp(header.name.data(),
- net::HttpRequestHeaders::kContentLength) == 0) {
+ base::StringPiece name_piece(header.name.data(), header.name.size());
+ if (base::EqualsCaseInsensitiveASCII(
+ name_piece, net::HttpRequestHeaders::kContentLength)) {
continue;
- } else if (base::strcasecmp(header.name.data(),
- net::HttpRequestHeaders::kContentType) == 0) {
+ } else if (base::EqualsCaseInsensitiveASCII(
+ name_piece, net::HttpRequestHeaders::kContentType)) {
content_type = header.value;
continue;
}
« no previous file with comments | « media/video/capture/fake_video_capture_device_factory.cc ('k') | net/base/mime_sniffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698