Index: device/bluetooth/bluetooth_device_win.cc |
diff --git a/device/bluetooth/bluetooth_device_win.cc b/device/bluetooth/bluetooth_device_win.cc |
index 40a8fa87415691f1f908482a60afd7e2e6e91b7e..8be28efccf79680f639cadec3e09d5836a272d80 100644 |
--- a/device/bluetooth/bluetooth_device_win.cc |
+++ b/device/bluetooth/bluetooth_device_win.cc |
@@ -11,7 +11,6 @@ |
#include "base/memory/scoped_vector.h" |
#include "base/sequenced_task_runner.h" |
#include "base/strings/stringprintf.h" |
-#include "device/bluetooth/bluetooth_profile_win.h" |
#include "device/bluetooth/bluetooth_service_record_win.h" |
#include "device/bluetooth/bluetooth_socket_thread.h" |
#include "device/bluetooth/bluetooth_socket_win.h" |
@@ -203,21 +202,17 @@ void BluetoothDeviceWin::ConnectToProfile( |
const base::Closure& callback, |
const ConnectToProfileErrorCallback& error_callback) { |
DCHECK(ui_task_runner_->RunsTasksOnCurrentThread()); |
- static_cast<BluetoothProfileWin*>(profile)->Connect(this, |
- ui_task_runner_, |
- socket_thread_, |
- net_log_, |
- net_log_source_, |
- callback, |
- error_callback); |
+ error_callback.Run("Removed. Use chrome.bluetoothSocket.connect() instead."); |
} |
void BluetoothDeviceWin::ConnectToService( |
const BluetoothUUID& uuid, |
const ConnectToServiceCallback& callback, |
const ConnectToServiceErrorCallback& error_callback) { |
- // TODO(keybuk): implement |
- NOTIMPLEMENTED(); |
+ scoped_refptr<BluetoothSocketWin> socket( |
+ BluetoothSocketWin::CreateBluetoothSocket( |
+ ui_task_runner_, socket_thread_, NULL, net::NetLog::Source())); |
+ socket->Connect(this, uuid, base::Bind(callback, socket), error_callback); |
} |
void BluetoothDeviceWin::StartConnectionMonitor( |