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

Unified Diff: mojo/services/network/tcp_bound_socket_impl.cc

Issue 1139673003: Make Mandoline shut down cleanly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 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 | « mojo/services/network/tcp_bound_socket_impl.h ('k') | mojo/services/network/tcp_connected_socket_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/network/tcp_bound_socket_impl.cc
diff --git a/mojo/services/network/tcp_bound_socket_impl.cc b/mojo/services/network/tcp_bound_socket_impl.cc
index b7763045677124d6bd520b45467a5a47e23d51a1..5cf6828ac3ffea9916508eee5e7c64b627d9a71a 100644
--- a/mojo/services/network/tcp_bound_socket_impl.cc
+++ b/mojo/services/network/tcp_bound_socket_impl.cc
@@ -12,7 +12,9 @@
namespace mojo {
-TCPBoundSocketImpl::TCPBoundSocketImpl() {
+TCPBoundSocketImpl::TCPBoundSocketImpl(
+ scoped_ptr<mojo::AppRefCount> app_refcount)
+ : app_refcount_(app_refcount.Pass()) {
}
TCPBoundSocketImpl::~TCPBoundSocketImpl() {
@@ -63,7 +65,9 @@ void TCPBoundSocketImpl::StartListening(
}
// The server socket object takes ownership of the socket.
- BindToRequest(new TCPServerSocketImpl(socket_.Pass()), &server);
+ BindToRequest(
+ new TCPServerSocketImpl(socket_.Pass(), app_refcount_->Clone()),
+ &server);
callback.Run(MakeNetworkError(net::OK));
}
@@ -106,7 +110,8 @@ void TCPBoundSocketImpl::OnConnected(int result) {
if (result == net::OK) {
new TCPConnectedSocketImpl(
socket_.Pass(), pending_connect_send_stream_.Pass(),
- pending_connect_receive_stream_.Pass(), pending_connect_socket_.Pass());
+ pending_connect_receive_stream_.Pass(), pending_connect_socket_.Pass(),
+ app_refcount_->Clone());
} else {
pending_connect_send_stream_.reset();
pending_connect_receive_stream_.reset();
« no previous file with comments | « mojo/services/network/tcp_bound_socket_impl.h ('k') | mojo/services/network/tcp_connected_socket_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698