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

Side by Side Diff: mojo/services/network/tcp_bound_socket_impl.cc

Issue 1725353003: Eliminate mojo::Shell client lib class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@15connector
Patch Set: . Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/services/network/tcp_bound_socket_impl.h" 5 #include "mojo/services/network/tcp_bound_socket_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "mojo/services/network/net_adapters.h" 9 #include "mojo/services/network/net_adapters.h"
10 #include "mojo/services/network/net_address_type_converters.h" 10 #include "mojo/services/network/net_address_type_converters.h"
11 #include "mojo/services/network/tcp_connected_socket_impl.h" 11 #include "mojo/services/network/tcp_connected_socket_impl.h"
12 #include "mojo/services/network/tcp_server_socket_impl.h" 12 #include "mojo/services/network/tcp_server_socket_impl.h"
13 #include "net/base/net_errors.h" 13 #include "net/base/net_errors.h"
14 14
15 namespace mojo { 15 namespace mojo {
16 16
17 TCPBoundSocketImpl::TCPBoundSocketImpl( 17 TCPBoundSocketImpl::TCPBoundSocketImpl(
18 scoped_ptr<mojo::AppRefCount> app_refcount, 18 scoped_ptr<mojo::MessageLoopRef> app_refcount,
19 InterfaceRequest<TCPBoundSocket> request) 19 InterfaceRequest<TCPBoundSocket> request)
20 : app_refcount_(std::move(app_refcount)), 20 : app_refcount_(std::move(app_refcount)),
21 binding_(this, std::move(request)) {} 21 binding_(this, std::move(request)) {}
22 22
23 TCPBoundSocketImpl::~TCPBoundSocketImpl() { 23 TCPBoundSocketImpl::~TCPBoundSocketImpl() {
24 } 24 }
25 25
26 int TCPBoundSocketImpl::Bind(NetAddressPtr local_address) { 26 int TCPBoundSocketImpl::Bind(NetAddressPtr local_address) {
27 net::IPEndPoint end_point = local_address.To<net::IPEndPoint>(); 27 net::IPEndPoint end_point = local_address.To<net::IPEndPoint>();
28 28
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } else { 117 } else {
118 pending_connect_send_stream_.reset(); 118 pending_connect_send_stream_.reset();
119 pending_connect_receive_stream_.reset(); 119 pending_connect_receive_stream_.reset();
120 pending_connect_socket_ = InterfaceRequest<TCPConnectedSocket>(); 120 pending_connect_socket_ = InterfaceRequest<TCPConnectedSocket>();
121 } 121 }
122 pending_connect_callback_.Run(MakeNetworkError(result)); 122 pending_connect_callback_.Run(MakeNetworkError(result));
123 pending_connect_callback_ = Callback<void(NetworkErrorPtr)>(); 123 pending_connect_callback_ = Callback<void(NetworkErrorPtr)>();
124 } 124 }
125 125
126 } // namespace mojo 126 } // namespace mojo
OLDNEW
« 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