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

Unified Diff: net/server/http_connection.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_connection.h ('k') | net/server/http_server.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/server/http_connection.cc
diff --git a/net/server/http_connection.cc b/net/server/http_connection.cc
index d964cb0738b3ad3db912ec79bb0dcdbecf3ee1b4..d433012cd651c7b7462972c3835cb818a9a78d8d 100644
--- a/net/server/http_connection.cc
+++ b/net/server/http_connection.cc
@@ -29,21 +29,17 @@ void HttpConnection::Send(const HttpServerResponseInfo& response) {
Send(response.Serialize());
}
-HttpConnection::HttpConnection(HttpServer* server, StreamListenSocket* sock)
+HttpConnection::HttpConnection(HttpServer* server,
+ scoped_ptr<StreamListenSocket> sock)
: server_(server),
- socket_(sock) {
+ socket_(sock.Pass()) {
id_ = last_id_++;
}
HttpConnection::~HttpConnection() {
- DetachSocket();
server_->delegate_->OnClose(id_);
}
-void HttpConnection::DetachSocket() {
- socket_ = NULL;
-}
-
void HttpConnection::Shift(int num_bytes) {
recv_data_ = recv_data_.substr(num_bytes);
}
« no previous file with comments | « net/server/http_connection.h ('k') | net/server/http_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698