OLD | NEW |
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_connected_socket_impl.h" | 5 #include "mojo/services/network/tcp_connected_socket_impl.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include <utility> | 9 #include <utility> |
8 | 10 |
9 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
10 #include "mojo/services/network/net_adapters.h" | 12 #include "mojo/services/network/net_adapters.h" |
11 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
12 | 14 |
13 namespace mojo { | 15 namespace mojo { |
14 | 16 |
15 TCPConnectedSocketImpl::TCPConnectedSocketImpl( | 17 TCPConnectedSocketImpl::TCPConnectedSocketImpl( |
16 scoped_ptr<net::TCPSocket> socket, | 18 scoped_ptr<net::TCPSocket> socket, |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 } | 251 } |
250 | 252 |
251 void TCPConnectedSocketImpl::DeleteIfNeeded() { | 253 void TCPConnectedSocketImpl::DeleteIfNeeded() { |
252 bool has_send = pending_send_ || send_stream_.is_valid(); | 254 bool has_send = pending_send_ || send_stream_.is_valid(); |
253 bool has_receive = pending_receive_ || receive_stream_.is_valid(); | 255 bool has_receive = pending_receive_ || receive_stream_.is_valid(); |
254 if (!binding_.is_bound() && !has_send && !has_receive) | 256 if (!binding_.is_bound() && !has_send && !has_receive) |
255 delete this; | 257 delete this; |
256 } | 258 } |
257 | 259 |
258 } // namespace mojo | 260 } // namespace mojo |
OLD | NEW |