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

Side by Side Diff: net/test/embedded_test_server/http_request.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/test/embedded_test_server/http_request.h" 5 #include "net/test/embedded_test_server/http_request.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 if (url.is_valid()) { 112 if (url.is_valid()) {
113 http_request_->relative_url = url.path(); 113 http_request_->relative_url = url.path();
114 } else if (header_line_tokens[1][0] == '/') { 114 } else if (header_line_tokens[1][0] == '/') {
115 http_request_->relative_url = header_line_tokens[1]; 115 http_request_->relative_url = header_line_tokens[1];
116 } else { 116 } else {
117 http_request_->relative_url = "/" + header_line_tokens[1]; 117 http_request_->relative_url = "/" + header_line_tokens[1];
118 } 118 }
119 119
120 // Protocol. 120 // Protocol.
121 const std::string protocol = base::ToLowerASCII(header_line_tokens[2]); 121 const std::string protocol = base::ToLowerASCII(header_line_tokens[2]);
122 CHECK(protocol == "http/1.0" || protocol == "http/1.1") << 122 // Protocol not supported.
123 "Protocol not supported: " << protocol; 123 CHECK(protocol == "http/1.0" || protocol == "http/1.1");
124 } 124 }
125 125
126 // Parse further headers. 126 // Parse further headers.
127 { 127 {
128 std::string header_name; 128 std::string header_name;
129 while (true) { 129 while (true) {
130 std::string header_line = ShiftLine(); 130 std::string header_line = ShiftLine();
131 if (header_line.empty()) 131 if (header_line.empty())
132 break; 132 break;
133 133
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 return METHOD_CONNECT; 249 return METHOD_CONNECT;
250 } else if (token == "options") { 250 } else if (token == "options") {
251 return METHOD_OPTIONS; 251 return METHOD_OPTIONS;
252 } 252 }
253 LOG(WARNING) << "Method not implemented: " << token; 253 LOG(WARNING) << "Method not implemented: " << token;
254 return METHOD_GET; 254 return METHOD_GET;
255 } 255 }
256 256
257 } // namespace test_server 257 } // namespace test_server
258 } // namespace net 258 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698