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

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

Issue 1227373002: Roll mojo SDK to 734c6e1652ff2f3b696e441722838f453f4f9b42 (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Follow review Created 5 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 unified diff | Download patch
« no previous file with comments | « mojo/services/network/tcp_server_socket_impl.h ('k') | mojo/services/network/udp_socket_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_server_socket_impl.h" 5 #include "mojo/services/network/tcp_server_socket_impl.h"
6 6
7 #include "mojo/services/network/net_adapters.h" 7 #include "mojo/services/network/net_adapters.h"
8 #include "mojo/services/network/net_address_type_converters.h" 8 #include "mojo/services/network/net_address_type_converters.h"
9 #include "mojo/services/network/tcp_connected_socket_impl.h" 9 #include "mojo/services/network/tcp_connected_socket_impl.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
11 11
12 namespace mojo { 12 namespace mojo {
13 13
14 TCPServerSocketImpl::TCPServerSocketImpl(scoped_ptr<net::TCPSocket> socket) 14 TCPServerSocketImpl::TCPServerSocketImpl(
15 : socket_(socket.Pass()) { 15 InterfaceRequest<TCPServerSocket> request,
16 scoped_ptr<net::TCPSocket> socket)
17 : binding_(this, request.Pass()), socket_(socket.Pass()) {
16 } 18 }
17 19
18 TCPServerSocketImpl::~TCPServerSocketImpl() { 20 TCPServerSocketImpl::~TCPServerSocketImpl() {
19 } 21 }
20 22
21 void TCPServerSocketImpl::Accept( 23 void TCPServerSocketImpl::Accept(
22 ScopedDataPipeConsumerHandle send_stream, 24 ScopedDataPipeConsumerHandle send_stream,
23 ScopedDataPipeProducerHandle receive_stream, 25 ScopedDataPipeProducerHandle receive_stream,
24 InterfaceRequest<TCPConnectedSocket> client_socket, 26 InterfaceRequest<TCPConnectedSocket> client_socket,
25 const AcceptCallback& callback) { 27 const AcceptCallback& callback) {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 accepted_socket_.Pass(), pending_send_stream_.Pass(), 61 accepted_socket_.Pass(), pending_send_stream_.Pass(),
60 pending_receive_stream_.Pass(), pending_client_socket_.Pass()); 62 pending_receive_stream_.Pass(), pending_client_socket_.Pass());
61 pending_callback_.Run(MakeNetworkError(net::OK), 63 pending_callback_.Run(MakeNetworkError(net::OK),
62 NetAddress::From(accepted_address_)); 64 NetAddress::From(accepted_address_));
63 } 65 }
64 66
65 pending_callback_ = AcceptCallback(); 67 pending_callback_ = AcceptCallback();
66 } 68 }
67 69
68 } // namespace mojo 70 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/network/tcp_server_socket_impl.h ('k') | mojo/services/network/udp_socket_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698