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

Unified Diff: net/server/http_server.cc

Issue 20142003: Remove ref-counting from StreamListenSocket (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixup Created 7 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.cc
diff --git a/net/server/http_server.cc b/net/server/http_server.cc
index 3d54c4071e7880f95fdc01271a3b775cdea4234a..e94c432a51810cbcc166fc4e95e70761c48527b5 100644
--- a/net/server/http_server.cc
+++ b/net/server/http_server.cc
@@ -92,10 +92,11 @@ int HttpServer::GetLocalAddress(IPEndPoint* address) {
}
void HttpServer::DidAccept(StreamListenSocket* server,
- StreamListenSocket* socket) {
- HttpConnection* connection = new HttpConnection(this, socket);
+ scoped_ptr<StreamListenSocket> socket) {
+ HttpConnection* connection = new HttpConnection(this, socket.Pass());
id_to_connection_[connection->id()] = connection;
- socket_to_connection_[socket] = connection;
+ // TODO(szym): Fix socket access. Make HttpConnection the Delegate.
+ socket_to_connection_[connection->socket_.get()] = connection;
}
void HttpServer::DidRead(StreamListenSocket* socket,
@@ -157,7 +158,6 @@ void HttpServer::DidClose(StreamListenSocket* socket) {
HttpServer::~HttpServer() {
STLDeleteContainerPairSecondPointers(
id_to_connection_.begin(), id_to_connection_.end());
- server_ = NULL;
}
//

Powered by Google App Engine
This is Rietveld 408576698