summaryrefslogtreecommitdiffstats
path: root/net/server/http_server.h
diff options
context:
space:
mode:
authorpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-02 19:49:25 +0000
committerpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-02 19:49:25 +0000
commit86c6a0b5a5c08aa5ed1244e4a4fc2796393ad5a5 (patch)
tree14d8273e6669c54599466a7708b437cd51facb03 /net/server/http_server.h
parent33a4aca7c65ed0bb2636615ef5e5c83cf50ff6a0 (diff)
downloadchromium_src-86c6a0b5a5c08aa5ed1244e4a4fc2796393ad5a5.zip
chromium_src-86c6a0b5a5c08aa5ed1244e4a4fc2796393ad5a5.tar.gz
chromium_src-86c6a0b5a5c08aa5ed1244e4a4fc2796393ad5a5.tar.bz2
DevTools: no way to remote debug using ToT build as a client.
(rebaselined and brushed up loislo's http://codereview.chromium.org/7482041) BUG=90743 TEST= Review URL: http://codereview.chromium.org/7540023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95138 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/server/http_server.h')
-rw-r--r--net/server/http_server.h37
1 files changed, 9 insertions, 28 deletions
diff --git a/net/server/http_server.h b/net/server/http_server.h
index 78f6e42..1bc24a4 100644
--- a/net/server/http_server.h
+++ b/net/server/http_server.h
@@ -15,7 +15,9 @@
namespace net {
+class HttpConnection;
class HttpServerRequestInfo;
+class WebSocket;
class HttpServer : public ListenSocket::ListenSocketDelegate,
public base::RefCountedThreadSafe<HttpServer> {
@@ -53,28 +55,7 @@ class HttpServer : public ListenSocket::ListenSocketDelegate,
private:
friend class base::RefCountedThreadSafe<HttpServer>;
- class Connection {
- private:
- static int lastId_;
- friend class HttpServer;
-
- Connection(HttpServer* server, ListenSocket* sock);
- ~Connection();
-
- void DetachSocket();
-
- void Shift(int num_bytes);
-
- HttpServer* server_;
- scoped_refptr<ListenSocket> socket_;
- bool is_web_socket_;
- std::string recv_data_;
- int id_;
-
- DISALLOW_COPY_AND_ASSIGN(Connection);
- };
- friend class Connection;
-
+ friend class HttpConnection;
// ListenSocketDelegate
virtual void DidAccept(ListenSocket* server, ListenSocket* socket);
@@ -84,18 +65,18 @@ private:
// 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
// recv data.
- bool ParseHeaders(Connection* connection,
+ bool ParseHeaders(HttpConnection* connection,
HttpServerRequestInfo* info,
- int* ppos);
+ size_t* pos);
- Connection* FindConnection(int connection_id);
- Connection* FindConnection(ListenSocket* socket);
+ HttpConnection* FindConnection(int connection_id);
+ HttpConnection* FindConnection(ListenSocket* socket);
HttpServer::Delegate* delegate_;
scoped_refptr<ListenSocket> server_;
- typedef std::map<int, Connection*> IdToConnectionMap;
+ typedef std::map<int, HttpConnection*> IdToConnectionMap;
IdToConnectionMap id_to_connection_;
- typedef std::map<ListenSocket*, Connection*> SocketToConnectionMap;
+ typedef std::map<ListenSocket*, HttpConnection*> SocketToConnectionMap;
SocketToConnectionMap socket_to_connection_;
DISALLOW_COPY_AND_ASSIGN(HttpServer);