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

Side by Side Diff: net/server/http_server.cc

Issue 448853002: Move StringToLowerASCII to base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « net/proxy/proxy_bypass_rules.cc ('k') | net/server/http_server_request_info.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 (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/server/http_server.h" 5 #include "net/server/http_server.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 case ST_URL: 281 case ST_URL:
282 info->path = buffer; 282 info->path = buffer;
283 buffer.clear(); 283 buffer.clear();
284 break; 284 break;
285 case ST_PROTO: 285 case ST_PROTO:
286 // TODO(mbelshe): Deal better with parsing protocol. 286 // TODO(mbelshe): Deal better with parsing protocol.
287 DCHECK(buffer == "HTTP/1.1"); 287 DCHECK(buffer == "HTTP/1.1");
288 buffer.clear(); 288 buffer.clear();
289 break; 289 break;
290 case ST_NAME: 290 case ST_NAME:
291 header_name = StringToLowerASCII(buffer); 291 header_name = base::StringToLowerASCII(buffer);
292 buffer.clear(); 292 buffer.clear();
293 break; 293 break;
294 case ST_VALUE: 294 case ST_VALUE:
295 base::TrimWhitespaceASCII(buffer, base::TRIM_LEADING, &header_value); 295 base::TrimWhitespaceASCII(buffer, base::TRIM_LEADING, &header_value);
296 it = info->headers.find(header_name); 296 it = info->headers.find(header_name);
297 // See last paragraph ("Multiple message-header fields...") 297 // See last paragraph ("Multiple message-header fields...")
298 // of www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 298 // of www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
299 if (it == info->headers.end()) { 299 if (it == info->headers.end()) {
300 info->headers[header_name] = header_value; 300 info->headers[header_name] = header_value;
301 } else { 301 } else {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 } 338 }
339 339
340 HttpConnection* HttpServer::FindConnection(StreamListenSocket* socket) { 340 HttpConnection* HttpServer::FindConnection(StreamListenSocket* socket) {
341 SocketToConnectionMap::iterator it = socket_to_connection_.find(socket); 341 SocketToConnectionMap::iterator it = socket_to_connection_.find(socket);
342 if (it == socket_to_connection_.end()) 342 if (it == socket_to_connection_.end())
343 return NULL; 343 return NULL;
344 return it->second; 344 return it->second;
345 } 345 }
346 346
347 } // namespace net 347 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_bypass_rules.cc ('k') | net/server/http_server_request_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698