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

Unified Diff: net/server/http_server.h

Issue 10161005: Add DefaultListenSocket. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Matt's comments Created 8 years, 8 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
Index: net/server/http_server.h
diff --git a/net/server/http_server.h b/net/server/http_server.h
index 589d8875b5b4529bd27dd60e5f89fb126709e988..6c5a89d5245ceb21852c1703e35580b8ad0730e8 100644
--- a/net/server/http_server.h
+++ b/net/server/http_server.h
@@ -11,7 +11,7 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
-#include "net/base/listen_socket.h"
+#include "net/base/stream_listen_socket.h"
namespace net {
@@ -19,7 +19,7 @@ class HttpConnection;
class HttpServerRequestInfo;
class WebSocket;
-class HttpServer : public ListenSocket::ListenSocketDelegate,
+class HttpServer : public StreamListenSocket::Delegate,
public base::RefCountedThreadSafe<HttpServer> {
public:
class Delegate {
@@ -57,12 +57,13 @@ private:
friend class base::RefCountedThreadSafe<HttpServer>;
friend class HttpConnection;
- // ListenSocketDelegate
- virtual void DidAccept(ListenSocket* server, ListenSocket* socket) OVERRIDE;
- virtual void DidRead(ListenSocket* socket,
+ // StreamListenSocket::Delegate
+ virtual void DidAccept(StreamListenSocket* server,
+ StreamListenSocket* socket) OVERRIDE;
+ virtual void DidRead(StreamListenSocket* socket,
const char* data,
int len) OVERRIDE;
- virtual void DidClose(ListenSocket* socket) OVERRIDE;
+ virtual void DidClose(StreamListenSocket* socket) OVERRIDE;
// Expects the raw data to be stored in recv_data_. If parsing is successful,
// will remove the data parsed from recv_data_, leaving only the unused
@@ -72,13 +73,13 @@ private:
size_t* pos);
HttpConnection* FindConnection(int connection_id);
- HttpConnection* FindConnection(ListenSocket* socket);
+ HttpConnection* FindConnection(StreamListenSocket* socket);
HttpServer::Delegate* delegate_;
- scoped_refptr<ListenSocket> server_;
+ scoped_refptr<StreamListenSocket> server_;
typedef std::map<int, HttpConnection*> IdToConnectionMap;
IdToConnectionMap id_to_connection_;
- typedef std::map<ListenSocket*, HttpConnection*> SocketToConnectionMap;
+ typedef std::map<StreamListenSocket*, HttpConnection*> SocketToConnectionMap;
SocketToConnectionMap socket_to_connection_;
DISALLOW_COPY_AND_ASSIGN(HttpServer);

Powered by Google App Engine
This is Rietveld 408576698