diff options
author | keybuk@chromium.org <keybuk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-11 23:29:08 +0000 |
---|---|---|
committer | keybuk@chromium.org <keybuk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-11 23:29:08 +0000 |
commit | a3a9bf6e731cd093bf900a2b4161cd0cdadf0df3 (patch) | |
tree | 4b8616a98dd9f9ecc2c1794b0c61e0a30927daed /device/bluetooth | |
parent | 8e056a265140abebc398e8c12a3b203c61b201fe (diff) | |
download | chromium_src-a3a9bf6e731cd093bf900a2b4161cd0cdadf0df3.zip chromium_src-a3a9bf6e731cd093bf900a2b4161cd0cdadf0df3.tar.gz chromium_src-a3a9bf6e731cd093bf900a2b4161cd0cdadf0df3.tar.bz2 |
Remove BluetoothDevice::ConnectToService
BUG=
R=armansito@chromium.org, rpaquay@chromium.org
Review URL: https://codereview.chromium.org/234583002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263403 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'device/bluetooth')
-rw-r--r-- | device/bluetooth/bluetooth_device.h | 9 | ||||
-rw-r--r-- | device/bluetooth/bluetooth_device_chromeos.cc | 7 | ||||
-rw-r--r-- | device/bluetooth/bluetooth_device_chromeos.h | 3 | ||||
-rw-r--r-- | device/bluetooth/bluetooth_device_mac.h | 3 | ||||
-rw-r--r-- | device/bluetooth/bluetooth_device_mac.mm | 40 | ||||
-rw-r--r-- | device/bluetooth/bluetooth_device_win.cc | 6 | ||||
-rw-r--r-- | device/bluetooth/bluetooth_device_win.h | 3 | ||||
-rw-r--r-- | device/bluetooth/test/mock_bluetooth_device.h | 3 |
8 files changed, 0 insertions, 74 deletions
diff --git a/device/bluetooth/bluetooth_device.h b/device/bluetooth/bluetooth_device.h index 0fda335..7a29cac 100644 --- a/device/bluetooth/bluetooth_device.h +++ b/device/bluetooth/bluetooth_device.h @@ -344,15 +344,6 @@ class BluetoothDevice { // before that callback would be called. virtual void Forget(const ErrorCallback& error_callback) = 0; - // Attempts to open a socket to a service matching |uuid| on this device. If - // the connection is successful, |callback| is called with a BluetoothSocket. - // Otherwise |callback| is called with NULL. The socket is closed as soon as - // all references to the BluetoothSocket are released. Note that the - // BluetoothSocket object can outlive both this BluetoothDevice and the - // BluetoothAdapter for this device. - virtual void ConnectToService(const BluetoothUUID& service_uuid, - const SocketCallback& callback) = 0; - // Attempts to initiate an outgoing connection to this device for the profile // identified by |profile|, on success the profile's connection callback // will be called as well as |callback|; on failure |error_callback| will be diff --git a/device/bluetooth/bluetooth_device_chromeos.cc b/device/bluetooth/bluetooth_device_chromeos.cc index 47a38d8..b5f7386 100644 --- a/device/bluetooth/bluetooth_device_chromeos.cc +++ b/device/bluetooth/bluetooth_device_chromeos.cc @@ -387,13 +387,6 @@ void BluetoothDeviceChromeOS::Forget(const ErrorCallback& error_callback) { error_callback)); } -void BluetoothDeviceChromeOS::ConnectToService( - const device::BluetoothUUID& service_uuid, - const SocketCallback& callback) { - // TODO(keybuk): implement - callback.Run(scoped_refptr<device::BluetoothSocket>()); -} - void BluetoothDeviceChromeOS::ConnectToProfile( device::BluetoothProfile* profile, const base::Closure& callback, diff --git a/device/bluetooth/bluetooth_device_chromeos.h b/device/bluetooth/bluetooth_device_chromeos.h index 3c447b9..156d9ea 100644 --- a/device/bluetooth/bluetooth_device_chromeos.h +++ b/device/bluetooth/bluetooth_device_chromeos.h @@ -58,9 +58,6 @@ class BluetoothDeviceChromeOS const base::Closure& callback, const ErrorCallback& error_callback) OVERRIDE; virtual void Forget(const ErrorCallback& error_callback) OVERRIDE; - virtual void ConnectToService( - const device::BluetoothUUID& service_uuid, - const SocketCallback& callback) OVERRIDE; virtual void ConnectToProfile( device::BluetoothProfile* profile, const base::Closure& callback, diff --git a/device/bluetooth/bluetooth_device_mac.h b/device/bluetooth/bluetooth_device_mac.h index e7bec55..842a41a 100644 --- a/device/bluetooth/bluetooth_device_mac.h +++ b/device/bluetooth/bluetooth_device_mac.h @@ -62,9 +62,6 @@ class BluetoothDeviceMac : public BluetoothDevice { const base::Closure& callback, const ErrorCallback& error_callback) OVERRIDE; virtual void Forget(const ErrorCallback& error_callback) OVERRIDE; - virtual void ConnectToService( - const device::BluetoothUUID& service_uuid, - const SocketCallback& callback) OVERRIDE; virtual void ConnectToProfile( BluetoothProfile* profile, const base::Closure& callback, diff --git a/device/bluetooth/bluetooth_device_mac.mm b/device/bluetooth/bluetooth_device_mac.mm index bd54495..89f154e 100644 --- a/device/bluetooth/bluetooth_device_mac.mm +++ b/device/bluetooth/bluetooth_device_mac.mm @@ -35,32 +35,6 @@ #endif // MAC_OS_X_VERSION_10_7 -namespace { - -// Converts |uuid| to a IOBluetoothSDPUUID instance. -// -// |uuid| must be in the format of XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX. -IOBluetoothSDPUUID* GetIOBluetoothSDPUUID(const std::string& uuid) { - DCHECK(uuid.size() == 36); - DCHECK(uuid[8] == '-'); - DCHECK(uuid[13] == '-'); - DCHECK(uuid[18] == '-'); - DCHECK(uuid[23] == '-'); - std::string numbers_only = uuid; - numbers_only.erase(23, 1); - numbers_only.erase(18, 1); - numbers_only.erase(13, 1); - numbers_only.erase(8, 1); - std::vector<uint8> uuid_bytes_vector; - base::HexStringToBytes(numbers_only, &uuid_bytes_vector); - DCHECK(uuid_bytes_vector.size() == 16); - - return [IOBluetoothSDPUUID uuidWithBytes:&uuid_bytes_vector[0] - length:uuid_bytes_vector.size()]; -} - -} // namespace - namespace device { BluetoothDeviceMac::BluetoothDeviceMac( @@ -194,20 +168,6 @@ void BluetoothDeviceMac::Forget(const ErrorCallback& error_callback) { NOTIMPLEMENTED(); } -void BluetoothDeviceMac::ConnectToService( - const device::BluetoothUUID& service_uuid, - const SocketCallback& callback) { - IOBluetoothSDPServiceRecord* record = - [device_ getServiceRecordForUUID:GetIOBluetoothSDPUUID( - service_uuid.canonical_value())]; - if (record != nil) { - scoped_refptr<BluetoothSocket> socket( - BluetoothSocketMac::CreateBluetoothSocket(ui_task_runner_, record)); - if (socket.get() != NULL) - callback.Run(socket); - } -} - void BluetoothDeviceMac::ConnectToProfile( BluetoothProfile* profile, const base::Closure& callback, diff --git a/device/bluetooth/bluetooth_device_win.cc b/device/bluetooth/bluetooth_device_win.cc index 42d7fdd..81a9386 100644 --- a/device/bluetooth/bluetooth_device_win.cc +++ b/device/bluetooth/bluetooth_device_win.cc @@ -183,12 +183,6 @@ void BluetoothDeviceWin::Forget(const ErrorCallback& error_callback) { NOTIMPLEMENTED(); } -void BluetoothDeviceWin::ConnectToService( - const device::BluetoothUUID& service_uuid, - const SocketCallback& callback) { - NOTIMPLEMENTED(); -} - void BluetoothDeviceWin::ConnectToProfile( device::BluetoothProfile* profile, const base::Closure& callback, diff --git a/device/bluetooth/bluetooth_device_win.h b/device/bluetooth/bluetooth_device_win.h index 367ab23..232da0f 100644 --- a/device/bluetooth/bluetooth_device_win.h +++ b/device/bluetooth/bluetooth_device_win.h @@ -61,9 +61,6 @@ class BluetoothDeviceWin : public BluetoothDevice { const base::Closure& callback, const ErrorCallback& error_callback) OVERRIDE; virtual void Forget(const ErrorCallback& error_callback) OVERRIDE; - virtual void ConnectToService( - const device::BluetoothUUID& service_uuid, - const SocketCallback& callback) OVERRIDE; virtual void ConnectToProfile( device::BluetoothProfile* profile, const base::Closure& callback, diff --git a/device/bluetooth/test/mock_bluetooth_device.h b/device/bluetooth/test/mock_bluetooth_device.h index 56e426f..4b8f986 100644 --- a/device/bluetooth/test/mock_bluetooth_device.h +++ b/device/bluetooth/test/mock_bluetooth_device.h @@ -60,9 +60,6 @@ class MockBluetoothDevice : public BluetoothDevice { void(const base::Closure& callback, const BluetoothDevice::ErrorCallback& error_callback)); MOCK_METHOD1(Forget, void(const BluetoothDevice::ErrorCallback&)); - MOCK_METHOD2(ConnectToService, - void(const BluetoothUUID&, - const BluetoothDevice::SocketCallback&)); MOCK_METHOD3(ConnectToProfile, void(BluetoothProfile* profile, const base::Closure& callback, |