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

Side by Side Diff: device/bluetooth/bluetooth_socket_net.cc

Issue 507053002: Remove implicit conversions from scoped_refptr to T* in device/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Regenerate Created 6 years, 3 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 | « no previous file | device/bluetooth/bluetooth_socket_thread.cc » ('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 "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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 if (write_queue_.size() == 0) 251 if (write_queue_.size() == 0)
252 return; 252 return;
253 253
254 linked_ptr<WriteRequest> request = write_queue_.front(); 254 linked_ptr<WriteRequest> request = write_queue_.front();
255 net::CompletionCallback callback = 255 net::CompletionCallback callback =
256 base::Bind(&BluetoothSocketNet::OnSocketWriteComplete, 256 base::Bind(&BluetoothSocketNet::OnSocketWriteComplete,
257 this, 257 this,
258 request->success_callback, 258 request->success_callback,
259 request->error_callback); 259 request->error_callback);
260 int send_result = 260 int send_result =
261 tcp_socket_->Write(request->buffer, request->buffer_size, callback); 261 tcp_socket_->Write(request->buffer.get(), request->buffer_size, callback);
262 if (send_result != net::ERR_IO_PENDING) { 262 if (send_result != net::ERR_IO_PENDING) {
263 callback.Run(send_result); 263 callback.Run(send_result);
264 } 264 }
265 } 265 }
266 266
267 void BluetoothSocketNet::OnSocketWriteComplete( 267 void BluetoothSocketNet::OnSocketWriteComplete(
268 const SendCompletionCallback& success_callback, 268 const SendCompletionCallback& success_callback,
269 const ErrorCompletionCallback& error_callback, 269 const ErrorCompletionCallback& error_callback,
270 int send_result) { 270 int send_result) {
271 DCHECK(socket_thread_->task_runner()->RunsTasksOnCurrentThread()); 271 DCHECK(socket_thread_->task_runner()->RunsTasksOnCurrentThread());
(...skipping 29 matching lines...) Expand all
301 base::Bind(callback, reason, error_message)); 301 base::Bind(callback, reason, error_message));
302 } 302 }
303 303
304 void BluetoothSocketNet::PostSendCompletion( 304 void BluetoothSocketNet::PostSendCompletion(
305 const SendCompletionCallback& callback, 305 const SendCompletionCallback& callback,
306 int bytes_written) { 306 int bytes_written) {
307 ui_task_runner_->PostTask(FROM_HERE, base::Bind(callback, bytes_written)); 307 ui_task_runner_->PostTask(FROM_HERE, base::Bind(callback, bytes_written));
308 } 308 }
309 309
310 } // namespace device 310 } // namespace device
OLDNEW
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_socket_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698