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

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: addressed comments Created 7 years, 4 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
« no previous file with comments | « net/server/http_server.h ('k') | net/server/http_server_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/server/http_server.cc
diff --git a/net/server/http_server.cc b/net/server/http_server.cc
index 373025c4aa63204ea9d820967c3b71207650a90b..a51feb84401e4ebf7c3ce370e423ee04ab34be89 100644
--- a/net/server/http_server.cc
+++ b/net/server/http_server.cc
@@ -95,10 +95,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,
@@ -180,7 +181,6 @@ void HttpServer::DidClose(StreamListenSocket* socket) {
HttpServer::~HttpServer() {
STLDeleteContainerPairSecondPointers(
id_to_connection_.begin(), id_to_connection_.end());
- server_ = NULL;
}
//
« no previous file with comments | « net/server/http_server.h ('k') | net/server/http_server_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698