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

Unified Diff: net/server/http_server.h

Issue 7540023: DevTools: no way to remote debug using ToT build as a client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments addressed. Created 9 years, 5 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 78f6e42d8edaaee577143abd4e6c5946ed2b377a..1bc24a420128a9cef8ca1d3f49e709e36e201917 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);

Powered by Google App Engine
This is Rietveld 408576698