diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/server/http_server.cc | 23 | ||||
-rw-r--r-- | net/server/http_server.h | 4 | ||||
-rw-r--r-- | net/server/http_server_request_info.cc | 6 | ||||
-rw-r--r-- | net/server/http_server_request_info.h | 8 |
4 files changed, 29 insertions, 12 deletions
diff --git a/net/server/http_server.cc b/net/server/http_server.cc index f4a228d..9c18490 100644 --- a/net/server/http_server.cc +++ b/net/server/http_server.cc @@ -1,14 +1,8 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include <map> - -#ifdef _WIN32 -#include <winsock2.h> -#else -#include <arpa/inet.h> -#endif +#include "net/server/http_server.h" #include "base/compiler_specific.h" #include "base/logging.h" @@ -16,10 +10,19 @@ #include "base/string_number_conversions.h" #include "base/string_util.h" #include "base/stringprintf.h" -#include "net/server/http_server.h" +#include "build/build_config.h" #include "net/server/http_server_request_info.h" +#if defined(OS_WIN) +#include <winsock2.h> +#else +#include <arpa/inet.h> +#endif + +namespace net { + int HttpServer::Connection::lastId_ = 0; + HttpServer::HttpServer(const std::string& host, int port, HttpServer::Delegate* del) @@ -433,3 +436,5 @@ HttpServer::Connection* HttpServer::FindConnection(ListenSocket* socket) { return NULL; return it->second; } + +} // namespace net diff --git a/net/server/http_server.h b/net/server/http_server.h index f94acc8..09a2f8a 100644 --- a/net/server/http_server.h +++ b/net/server/http_server.h @@ -13,6 +13,8 @@ #include "base/memory/ref_counted.h" #include "net/base/listen_socket.h" +namespace net { + class HttpServerRequestInfo; class HttpServer : public ListenSocket::ListenSocketDelegate, @@ -99,4 +101,6 @@ private: DISALLOW_COPY_AND_ASSIGN(HttpServer); }; +} // namespace net + #endif // NET_SERVER_HTTP_SERVER_H_ diff --git a/net/server/http_server_request_info.cc b/net/server/http_server_request_info.cc index 9169f4c..e53a2e2 100644 --- a/net/server/http_server_request_info.cc +++ b/net/server/http_server_request_info.cc @@ -1,9 +1,13 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "net/server/http_server_request_info.h" +namespace net { + HttpServerRequestInfo::HttpServerRequestInfo() {} HttpServerRequestInfo::~HttpServerRequestInfo() {} + +} // namespace net diff --git a/net/server/http_server_request_info.h b/net/server/http_server_request_info.h index 27ed5af..21f319a 100644 --- a/net/server/http_server_request_info.h +++ b/net/server/http_server_request_info.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -6,8 +6,10 @@ #define NET_SERVER_HTTP_SERVER_REQUEST_INFO_H_ #pragma once -#include <string> #include <map> +#include <string> + +namespace net { // Meta information about an HTTP request. // This is geared toward servers in that it keeps a map of the headers and @@ -32,4 +34,6 @@ class HttpServerRequestInfo { mutable HeadersMap headers; }; +} // namespace net + #endif // NET_SERVER_HTTP_SERVER_REQUEST_INFO_H_ |