| 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 "device/bluetooth/bluetooth_socket_net.h" | 5 #include "device/bluetooth/bluetooth_socket_net.h" |
| 6 | 6 |
| 7 #include <queue> | 7 #include <queue> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 success_callback), | 110 success_callback), |
| 111 base::Bind(&BluetoothSocketNet::PostErrorCompletion, | 111 base::Bind(&BluetoothSocketNet::PostErrorCompletion, |
| 112 this, | 112 this, |
| 113 error_callback))); | 113 error_callback))); |
| 114 } | 114 } |
| 115 | 115 |
| 116 void BluetoothSocketNet::ResetData() { | 116 void BluetoothSocketNet::ResetData() { |
| 117 } | 117 } |
| 118 | 118 |
| 119 void BluetoothSocketNet::ResetTCPSocket() { | 119 void BluetoothSocketNet::ResetTCPSocket() { |
| 120 tcp_socket_.reset(new net::TCPSocket(NULL, net::NetLog::Source())); | 120 tcp_socket_.reset(new net::TCPSocket(NULL, NULL, net::NetLog::Source())); |
| 121 } | 121 } |
| 122 | 122 |
| 123 void BluetoothSocketNet::SetTCPSocket(scoped_ptr<net::TCPSocket> tcp_socket) { | 123 void BluetoothSocketNet::SetTCPSocket(scoped_ptr<net::TCPSocket> tcp_socket) { |
| 124 tcp_socket_ = std::move(tcp_socket); | 124 tcp_socket_ = std::move(tcp_socket); |
| 125 } | 125 } |
| 126 | 126 |
| 127 void BluetoothSocketNet::PostSuccess(const base::Closure& callback) { | 127 void BluetoothSocketNet::PostSuccess(const base::Closure& callback) { |
| 128 ui_task_runner_->PostTask(FROM_HERE, callback); | 128 ui_task_runner_->PostTask(FROM_HERE, callback); |
| 129 } | 129 } |
| 130 | 130 |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 base::Bind(callback, reason, error_message)); | 302 base::Bind(callback, reason, error_message)); |
| 303 } | 303 } |
| 304 | 304 |
| 305 void BluetoothSocketNet::PostSendCompletion( | 305 void BluetoothSocketNet::PostSendCompletion( |
| 306 const SendCompletionCallback& callback, | 306 const SendCompletionCallback& callback, |
| 307 int bytes_written) { | 307 int bytes_written) { |
| 308 ui_task_runner_->PostTask(FROM_HERE, base::Bind(callback, bytes_written)); | 308 ui_task_runner_->PostTask(FROM_HERE, base::Bind(callback, bytes_written)); |
| 309 } | 309 } |
| 310 | 310 |
| 311 } // namespace device | 311 } // namespace device |
| OLD | NEW |