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

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

Issue 397123002: Cleanup: Drop some unnecessary params from the BluetoothSocketNet constructor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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 | Annotate | Revision Log
« no previous file with comments | « device/bluetooth/bluetooth_adapter_win.cc ('k') | device/bluetooth/bluetooth_device_win.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_device_chromeos.h" 5 #include "device/bluetooth/bluetooth_device_chromeos.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 } 435 }
436 436
437 void BluetoothDeviceChromeOS::ConnectToService( 437 void BluetoothDeviceChromeOS::ConnectToService(
438 const BluetoothUUID& uuid, 438 const BluetoothUUID& uuid,
439 const ConnectToServiceCallback& callback, 439 const ConnectToServiceCallback& callback,
440 const ConnectToServiceErrorCallback& error_callback) { 440 const ConnectToServiceErrorCallback& error_callback) {
441 VLOG(1) << object_path_.value() << ": Connecting to service: " 441 VLOG(1) << object_path_.value() << ": Connecting to service: "
442 << uuid.canonical_value(); 442 << uuid.canonical_value();
443 scoped_refptr<BluetoothSocketChromeOS> socket = 443 scoped_refptr<BluetoothSocketChromeOS> socket =
444 BluetoothSocketChromeOS::CreateBluetoothSocket( 444 BluetoothSocketChromeOS::CreateBluetoothSocket(
445 ui_task_runner_, 445 ui_task_runner_, socket_thread_);
446 socket_thread_, 446 socket->Connect(this, uuid, base::Bind(callback, socket), error_callback);
447 NULL,
448 net::NetLog::Source());
449 socket->Connect(this, uuid,
450 base::Bind(callback, socket),
451 error_callback);
452 } 447 }
453 448
454 void BluetoothDeviceChromeOS::CreateGattConnection( 449 void BluetoothDeviceChromeOS::CreateGattConnection(
455 const GattConnectionCallback& callback, 450 const GattConnectionCallback& callback,
456 const ConnectErrorCallback& error_callback) { 451 const ConnectErrorCallback& error_callback) {
457 // TODO(armansito): Until there is a way to create a reference counted GATT 452 // TODO(armansito): Until there is a way to create a reference counted GATT
458 // connection in bluetoothd, simply do a regular connect. 453 // connection in bluetoothd, simply do a regular connect.
459 Connect(NULL, 454 Connect(NULL,
460 base::Bind(&BluetoothDeviceChromeOS::OnCreateGattConnection, 455 base::Bind(&BluetoothDeviceChromeOS::OnCreateGattConnection,
461 weak_ptr_factory_.GetWeakPtr(), 456 weak_ptr_factory_.GetWeakPtr(),
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 void BluetoothDeviceChromeOS::OnForgetError( 709 void BluetoothDeviceChromeOS::OnForgetError(
715 const ErrorCallback& error_callback, 710 const ErrorCallback& error_callback,
716 const std::string& error_name, 711 const std::string& error_name,
717 const std::string& error_message) { 712 const std::string& error_message) {
718 LOG(WARNING) << object_path_.value() << ": Failed to remove device: " 713 LOG(WARNING) << object_path_.value() << ": Failed to remove device: "
719 << error_name << ": " << error_message; 714 << error_name << ": " << error_message;
720 error_callback.Run(); 715 error_callback.Run();
721 } 716 }
722 717
723 } // namespace chromeos 718 } // namespace chromeos
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_adapter_win.cc ('k') | device/bluetooth/bluetooth_device_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698