Chromium Code Reviews| 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 | 9 |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 109 success_callback), | 109 success_callback), |
| 110 base::Bind(&BluetoothSocketNet::PostErrorCompletion, | 110 base::Bind(&BluetoothSocketNet::PostErrorCompletion, |
| 111 this, | 111 this, |
| 112 error_callback))); | 112 error_callback))); |
| 113 } | 113 } |
| 114 | 114 |
| 115 void BluetoothSocketNet::ResetData() { | 115 void BluetoothSocketNet::ResetData() { |
| 116 } | 116 } |
| 117 | 117 |
| 118 void BluetoothSocketNet::ResetTCPSocket() { | 118 void BluetoothSocketNet::ResetTCPSocket() { |
| 119 tcp_socket_.reset(new net::TCPSocket(NULL, net::NetLog::Source())); | 119 tcp_socket_.reset( |
| 120 new net::TCPSocket(/*socket_performance_watcher_factory=*/nullptr, | |
|
Ryan Sleevi
2015/10/20 00:10:36
Don't do this. We don't generally do it in Chrome.
tbansal1
2016/02/05 19:44:15
Done.
| |
| 121 nullptr, net::NetLog::Source())); | |
| 120 } | 122 } |
| 121 | 123 |
| 122 void BluetoothSocketNet::SetTCPSocket(scoped_ptr<net::TCPSocket> tcp_socket) { | 124 void BluetoothSocketNet::SetTCPSocket(scoped_ptr<net::TCPSocket> tcp_socket) { |
| 123 tcp_socket_ = tcp_socket.Pass(); | 125 tcp_socket_ = tcp_socket.Pass(); |
| 124 } | 126 } |
| 125 | 127 |
| 126 void BluetoothSocketNet::PostSuccess(const base::Closure& callback) { | 128 void BluetoothSocketNet::PostSuccess(const base::Closure& callback) { |
| 127 ui_task_runner_->PostTask(FROM_HERE, callback); | 129 ui_task_runner_->PostTask(FROM_HERE, callback); |
| 128 } | 130 } |
| 129 | 131 |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 301 base::Bind(callback, reason, error_message)); | 303 base::Bind(callback, reason, error_message)); |
| 302 } | 304 } |
| 303 | 305 |
| 304 void BluetoothSocketNet::PostSendCompletion( | 306 void BluetoothSocketNet::PostSendCompletion( |
| 305 const SendCompletionCallback& callback, | 307 const SendCompletionCallback& callback, |
| 306 int bytes_written) { | 308 int bytes_written) { |
| 307 ui_task_runner_->PostTask(FROM_HERE, base::Bind(callback, bytes_written)); | 309 ui_task_runner_->PostTask(FROM_HERE, base::Bind(callback, bytes_written)); |
| 308 } | 310 } |
| 309 | 311 |
| 310 } // namespace device | 312 } // namespace device |
| OLD | NEW |