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

Side by Side Diff: net/tools/quic/test_tools/http_message.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 unified diff | Download patch
« no previous file with comments | « net/tools/balsa/string_piece_utils.h ('k') | net/url_request/url_request_http_job_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/tools/quic/test_tools/http_message.h" 5 #include "net/tools/quic/test_tools/http_message.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 if (skip_message_validation_) { 151 if (skip_message_validation_) {
152 return; 152 return;
153 } 153 }
154 154
155 vector<StringPiece> transfer_encodings; 155 vector<StringPiece> transfer_encodings;
156 headers()->GetAllOfHeader(kTransferCoding, &transfer_encodings); 156 headers()->GetAllOfHeader(kTransferCoding, &transfer_encodings);
157 CHECK_GE(1ul, transfer_encodings.size()); 157 CHECK_GE(1ul, transfer_encodings.size());
158 for (vector<StringPiece>::iterator it = transfer_encodings.begin(); 158 for (vector<StringPiece>::iterator it = transfer_encodings.begin();
159 it != transfer_encodings.end(); 159 it != transfer_encodings.end();
160 ++it) { 160 ++it) {
161 CHECK(StringPieceUtils::EqualIgnoreCase("identity", *it) || 161 CHECK(base::EqualsCaseInsensitiveASCII("identity", *it) ||
162 StringPieceUtils::EqualIgnoreCase("chunked", *it)) << *it; 162 base::EqualsCaseInsensitiveASCII("chunked", *it)) << *it;
163 } 163 }
164 164
165 vector<StringPiece> content_lengths; 165 vector<StringPiece> content_lengths;
166 headers()->GetAllOfHeader(kContentLength, &content_lengths); 166 headers()->GetAllOfHeader(kContentLength, &content_lengths);
167 CHECK_GE(1ul, content_lengths.size()); 167 CHECK_GE(1ul, content_lengths.size());
168 168
169 CHECK_EQ(has_complete_message_, IsCompleteMessage(*this)); 169 CHECK_EQ(has_complete_message_, IsCompleteMessage(*this));
170 } 170 }
171 171
172 } // namespace test 172 } // namespace test
173 } // namespace tools 173 } // namespace tools
174 } // namespace net 174 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/balsa/string_piece_utils.h ('k') | net/url_request/url_request_http_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698