diff options
author | keybuk@chromium.org <keybuk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-28 03:10:13 +0000 |
---|---|---|
committer | keybuk@chromium.org <keybuk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-28 03:10:13 +0000 |
commit | aea943f58df186d0f594e9587431a0bf914a3cfe (patch) | |
tree | 3d5379f79d65266f03833706f2f2c694f01d3cf5 /device/bluetooth | |
parent | f4d1902f4bd4e93767850db6392023fc5a579b92 (diff) | |
download | chromium_src-aea943f58df186d0f594e9587431a0bf914a3cfe.zip chromium_src-aea943f58df186d0f594e9587431a0bf914a3cfe.tar.gz chromium_src-aea943f58df186d0f594e9587431a0bf914a3cfe.tar.bz2 |
Bluetooth: remove Out of Band Pairing APIs
These is no platform implementation, with no available APIs on at least
Chrome OS and OS X to implement these, and Android does not support
Out of Band Pairing.
Thus remove the APIs, they can always be put back later if we find an
implementation.
BUG=376492
Review URL: https://codereview.chromium.org/293063015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273136 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'device/bluetooth')
19 files changed, 0 insertions, 163 deletions
diff --git a/device/bluetooth/bluetooth.gyp b/device/bluetooth/bluetooth.gyp index 5aafd1d..d5498fd 100644 --- a/device/bluetooth/bluetooth.gyp +++ b/device/bluetooth/bluetooth.gyp @@ -49,7 +49,6 @@ 'bluetooth_gatt_service.h', 'bluetooth_init_win.cc', 'bluetooth_init_win.h', - 'bluetooth_out_of_band_pairing_data.h', 'bluetooth_pairing_chromeos.cc', 'bluetooth_pairing_chromeos.h', 'bluetooth_profile.cc', diff --git a/device/bluetooth/bluetooth_adapter.h b/device/bluetooth/bluetooth_adapter.h index 9323ff7..fcd67b5 100644 --- a/device/bluetooth/bluetooth_adapter.h +++ b/device/bluetooth/bluetooth_adapter.h @@ -22,8 +22,6 @@ class BluetoothDiscoverySession; class BluetoothSocket; class BluetoothUUID; -struct BluetoothOutOfBandPairingData; - // BluetoothAdapter represents a local Bluetooth adapter which may be used to // interact with remote Bluetooth devices. As well as providing support for // determining whether an adapter is present and whether the radio is powered, @@ -85,11 +83,6 @@ class BluetoothAdapter : public base::RefCounted<BluetoothAdapter> { // called, in the success case the callback is simply not called. typedef base::Closure ErrorCallback; - // The BluetoothOutOfBandPairingDataCallback is used to return - // BluetoothOutOfBandPairingData to the caller. - typedef base::Callback<void(const BluetoothOutOfBandPairingData& data)> - BluetoothOutOfBandPairingDataCallback; - // The InitCallback is used to trigger a callback after asynchronous // initialization, if initialization is asynchronous on the platform. typedef base::Callback<void()> InitCallback; @@ -193,11 +186,6 @@ class BluetoothAdapter : public base::RefCounted<BluetoothAdapter> { virtual BluetoothDevice* GetDevice(const std::string& address); virtual const BluetoothDevice* GetDevice(const std::string& address) const; - // Requests the local Out Of Band pairing data. - virtual void ReadLocalOutOfBandPairingData( - const BluetoothOutOfBandPairingDataCallback& callback, - const ErrorCallback& error_callback) = 0; - // Possible priorities for AddPairingDelegate(), low is intended for // permanent UI and high is intended for interactive UI or applications. enum PairingDelegatePriority { diff --git a/device/bluetooth/bluetooth_adapter_chromeos.cc b/device/bluetooth/bluetooth_adapter_chromeos.cc index 1519209..0f60293 100644 --- a/device/bluetooth/bluetooth_adapter_chromeos.cc +++ b/device/bluetooth/bluetooth_adapter_chromeos.cc @@ -231,12 +231,6 @@ bool BluetoothAdapterChromeOS::IsDiscovering() const { return properties->discovering.value(); } -void BluetoothAdapterChromeOS::ReadLocalOutOfBandPairingData( - const BluetoothAdapter::BluetoothOutOfBandPairingDataCallback& callback, - const ErrorCallback& error_callback) { - error_callback.Run(); -} - void BluetoothAdapterChromeOS::CreateRfcommService( const BluetoothUUID& uuid, int channel, diff --git a/device/bluetooth/bluetooth_adapter_chromeos.h b/device/bluetooth/bluetooth_adapter_chromeos.h index db7c0e8..a8ad4cd 100644 --- a/device/bluetooth/bluetooth_adapter_chromeos.h +++ b/device/bluetooth/bluetooth_adapter_chromeos.h @@ -62,10 +62,6 @@ class BluetoothAdapterChromeOS const base::Closure& callback, const ErrorCallback& error_callback) OVERRIDE; virtual bool IsDiscovering() const OVERRIDE; - virtual void ReadLocalOutOfBandPairingData( - const device::BluetoothAdapter::BluetoothOutOfBandPairingDataCallback& - callback, - const ErrorCallback& error_callback) OVERRIDE; virtual void CreateRfcommService( const device::BluetoothUUID& uuid, int channel, diff --git a/device/bluetooth/bluetooth_adapter_mac.h b/device/bluetooth/bluetooth_adapter_mac.h index 0f0414e..c841481 100644 --- a/device/bluetooth/bluetooth_adapter_mac.h +++ b/device/bluetooth/bluetooth_adapter_mac.h @@ -58,9 +58,6 @@ class BluetoothAdapterMac : public BluetoothAdapter { const base::Closure& callback, const ErrorCallback& error_callback) OVERRIDE; virtual bool IsDiscovering() const OVERRIDE; - virtual void ReadLocalOutOfBandPairingData( - const BluetoothOutOfBandPairingDataCallback& callback, - const ErrorCallback& error_callback) OVERRIDE; virtual void CreateRfcommService( const BluetoothUUID& uuid, int channel, diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm index 88ab18a..6fb2b44 100644 --- a/device/bluetooth/bluetooth_adapter_mac.mm +++ b/device/bluetooth/bluetooth_adapter_mac.mm @@ -175,11 +175,6 @@ bool BluetoothAdapterMac::IsDiscovering() const { discovery_status_ == DISCOVERY_STOPPING; } -void BluetoothAdapterMac::ReadLocalOutOfBandPairingData( - const BluetoothOutOfBandPairingDataCallback& callback, - const ErrorCallback& error_callback) { -} - void BluetoothAdapterMac::CreateRfcommService( const BluetoothUUID& uuid, int channel, diff --git a/device/bluetooth/bluetooth_adapter_unittest.cc b/device/bluetooth/bluetooth_adapter_unittest.cc index 92efc0f..5478646 100644 --- a/device/bluetooth/bluetooth_adapter_unittest.cc +++ b/device/bluetooth/bluetooth_adapter_unittest.cc @@ -74,11 +74,6 @@ class TestBluetoothAdapter : public BluetoothAdapter { const ErrorCallback& error_callback) OVERRIDE { } - virtual void ReadLocalOutOfBandPairingData( - const BluetoothAdapter::BluetoothOutOfBandPairingDataCallback& callback, - const ErrorCallback& error_callback) OVERRIDE { - } - virtual void CreateRfcommService( const BluetoothUUID& uuid, int channel, diff --git a/device/bluetooth/bluetooth_adapter_win.cc b/device/bluetooth/bluetooth_adapter_win.cc index 0b85a29..6bbdb05 100644 --- a/device/bluetooth/bluetooth_adapter_win.cc +++ b/device/bluetooth/bluetooth_adapter_win.cc @@ -161,12 +161,6 @@ void BluetoothAdapterWin::DiscoveryStopped() { MaybePostStartDiscoveryTask(); } -void BluetoothAdapterWin::ReadLocalOutOfBandPairingData( - const BluetoothOutOfBandPairingDataCallback& callback, - const ErrorCallback& error_callback) { - NOTIMPLEMENTED(); -} - void BluetoothAdapterWin::CreateRfcommService( const BluetoothUUID& uuid, int channel, diff --git a/device/bluetooth/bluetooth_adapter_win.h b/device/bluetooth/bluetooth_adapter_win.h index ba9bb52..cc9007a 100644 --- a/device/bluetooth/bluetooth_adapter_win.h +++ b/device/bluetooth/bluetooth_adapter_win.h @@ -55,9 +55,6 @@ class BluetoothAdapterWin : public BluetoothAdapter, const base::Closure& callback, const ErrorCallback& error_callback) OVERRIDE; virtual bool IsDiscovering() const OVERRIDE; - virtual void ReadLocalOutOfBandPairingData( - const BluetoothOutOfBandPairingDataCallback& callback, - const ErrorCallback& error_callback) OVERRIDE; virtual void CreateRfcommService( const BluetoothUUID& uuid, int channel, diff --git a/device/bluetooth/bluetooth_device.h b/device/bluetooth/bluetooth_device.h index 3c17231..a495b20 100644 --- a/device/bluetooth/bluetooth_device.h +++ b/device/bluetooth/bluetooth_device.h @@ -23,8 +23,6 @@ class BluetoothProfile; class BluetoothSocket; class BluetoothUUID; -struct BluetoothOutOfBandPairingData; - // BluetoothDevice represents a remote Bluetooth device, both its properties and // capabilities as discovered by a local adapter and actions that may be // performed on the remove device such as pairing, connection and disconnection. @@ -395,19 +393,6 @@ class BluetoothDevice { const ConnectToServiceCallback& callback, const ConnectToServiceErrorCallback& error_callback) = 0; - // Sets the Out Of Band pairing data for this device to |data|. Exactly one - // of |callback| or |error_callback| will be run. - virtual void SetOutOfBandPairingData( - const BluetoothOutOfBandPairingData& data, - const base::Closure& callback, - const ErrorCallback& error_callback) = 0; - - // Clears the Out Of Band pairing data for this device. Exactly one of - // |callback| or |error_callback| will be run. - virtual void ClearOutOfBandPairingData( - const base::Closure& callback, - const ErrorCallback& error_callback) = 0; - // Starts monitoring the connection properties, RSSI and TX power. These // properties will be tracked, and updated when their values change. Exactly // one of |callback| or |error_callback| will be run. diff --git a/device/bluetooth/bluetooth_device_chromeos.cc b/device/bluetooth/bluetooth_device_chromeos.cc index e56f907..1c84c41 100644 --- a/device/bluetooth/bluetooth_device_chromeos.cc +++ b/device/bluetooth/bluetooth_device_chromeos.cc @@ -458,21 +458,6 @@ void BluetoothDeviceChromeOS::ConnectToService( error_callback); } -void BluetoothDeviceChromeOS::SetOutOfBandPairingData( - const device::BluetoothOutOfBandPairingData& data, - const base::Closure& callback, - const ErrorCallback& error_callback) { - // TODO(keybuk): implement - error_callback.Run(); -} - -void BluetoothDeviceChromeOS::ClearOutOfBandPairingData( - const base::Closure& callback, - const ErrorCallback& error_callback) { - // TODO(keybuk): implement - error_callback.Run(); -} - void BluetoothDeviceChromeOS::StartConnectionMonitor( const base::Closure& callback, const ErrorCallback& error_callback) { diff --git a/device/bluetooth/bluetooth_device_chromeos.h b/device/bluetooth/bluetooth_device_chromeos.h index c60a4de..6f003b4 100644 --- a/device/bluetooth/bluetooth_device_chromeos.h +++ b/device/bluetooth/bluetooth_device_chromeos.h @@ -75,13 +75,6 @@ class BluetoothDeviceChromeOS const device::BluetoothUUID& uuid, const ConnectToServiceCallback& callback, const ConnectToServiceErrorCallback& error_callback) OVERRIDE; - virtual void SetOutOfBandPairingData( - const device::BluetoothOutOfBandPairingData& data, - const base::Closure& callback, - const ErrorCallback& error_callback) OVERRIDE; - virtual void ClearOutOfBandPairingData( - const base::Closure& callback, - const ErrorCallback& error_callback) OVERRIDE; virtual void StartConnectionMonitor( const base::Closure& callback, const ErrorCallback& error_callback) OVERRIDE; diff --git a/device/bluetooth/bluetooth_device_mac.h b/device/bluetooth/bluetooth_device_mac.h index d0668f6..bfa587e 100644 --- a/device/bluetooth/bluetooth_device_mac.h +++ b/device/bluetooth/bluetooth_device_mac.h @@ -66,13 +66,6 @@ class BluetoothDeviceMac : public BluetoothDevice { const BluetoothUUID& uuid, const ConnectToServiceCallback& callback, const ConnectToServiceErrorCallback& error_callback) OVERRIDE; - virtual void SetOutOfBandPairingData( - const BluetoothOutOfBandPairingData& data, - const base::Closure& callback, - const ErrorCallback& error_callback) OVERRIDE; - virtual void ClearOutOfBandPairingData( - const base::Closure& callback, - const ErrorCallback& error_callback) OVERRIDE; virtual void StartConnectionMonitor( const base::Closure& callback, const ErrorCallback& error_callback) OVERRIDE; diff --git a/device/bluetooth/bluetooth_device_mac.mm b/device/bluetooth/bluetooth_device_mac.mm index e8af48a..25c8134 100644 --- a/device/bluetooth/bluetooth_device_mac.mm +++ b/device/bluetooth/bluetooth_device_mac.mm @@ -13,7 +13,6 @@ #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" #include "base/strings/sys_string_conversions.h" -#include "device/bluetooth/bluetooth_out_of_band_pairing_data.h" #include "device/bluetooth/bluetooth_profile_mac.h" #include "device/bluetooth/bluetooth_service_record_mac.h" #include "device/bluetooth/bluetooth_socket_mac.h" @@ -209,19 +208,6 @@ void BluetoothDeviceMac::ConnectToService( NOTIMPLEMENTED(); } -void BluetoothDeviceMac::SetOutOfBandPairingData( - const BluetoothOutOfBandPairingData& data, - const base::Closure& callback, - const ErrorCallback& error_callback) { - NOTIMPLEMENTED(); -} - -void BluetoothDeviceMac::ClearOutOfBandPairingData( - const base::Closure& callback, - const ErrorCallback& error_callback) { - NOTIMPLEMENTED(); -} - void BluetoothDeviceMac::StartConnectionMonitor( const base::Closure& callback, const ErrorCallback& error_callback) { diff --git a/device/bluetooth/bluetooth_device_win.cc b/device/bluetooth/bluetooth_device_win.cc index d5e9e77..40a8fa8 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_out_of_band_pairing_data.h" #include "device/bluetooth/bluetooth_profile_win.h" #include "device/bluetooth/bluetooth_service_record_win.h" #include "device/bluetooth/bluetooth_socket_thread.h" @@ -221,19 +220,6 @@ void BluetoothDeviceWin::ConnectToService( NOTIMPLEMENTED(); } -void BluetoothDeviceWin::SetOutOfBandPairingData( - const BluetoothOutOfBandPairingData& data, - const base::Closure& callback, - const ErrorCallback& error_callback) { - NOTIMPLEMENTED(); -} - -void BluetoothDeviceWin::ClearOutOfBandPairingData( - const base::Closure& callback, - const ErrorCallback& error_callback) { - NOTIMPLEMENTED(); -} - void BluetoothDeviceWin::StartConnectionMonitor( const base::Closure& callback, const ErrorCallback& error_callback) { diff --git a/device/bluetooth/bluetooth_device_win.h b/device/bluetooth/bluetooth_device_win.h index 0a019c5..d558195 100644 --- a/device/bluetooth/bluetooth_device_win.h +++ b/device/bluetooth/bluetooth_device_win.h @@ -72,13 +72,6 @@ class BluetoothDeviceWin : public BluetoothDevice { const BluetoothUUID& uuid, const ConnectToServiceCallback& callback, const ConnectToServiceErrorCallback& error_callback) OVERRIDE; - virtual void SetOutOfBandPairingData( - const BluetoothOutOfBandPairingData& data, - const base::Closure& callback, - const ErrorCallback& error_callback) OVERRIDE; - virtual void ClearOutOfBandPairingData( - const base::Closure& callback, - const ErrorCallback& error_callback) OVERRIDE; virtual void StartConnectionMonitor( const base::Closure& callback, const ErrorCallback& error_callback) OVERRIDE; diff --git a/device/bluetooth/bluetooth_out_of_band_pairing_data.h b/device/bluetooth/bluetooth_out_of_band_pairing_data.h deleted file mode 100644 index 1b45bb0..0000000 --- a/device/bluetooth/bluetooth_out_of_band_pairing_data.h +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef DEVICE_BLUETOOTH_BLUETOOTH_OUT_OF_BAND_PAIRING_DATA_H_ -#define DEVICE_BLUETOOTH_BLUETOOTH_OUT_OF_BAND_PAIRING_DATA_H_ - -#include "base/basictypes.h" - -namespace device { - -const size_t kBluetoothOutOfBandPairingDataSize = 16; - -// A simple structure representing the data required to perform Out Of Band -// Pairing. See -// http://mclean-linsky.net/joel/cv/Simple%20Pairing_WP_V10r00.pdf -struct BluetoothOutOfBandPairingData { - // Simple Pairing Hash C. - uint8 hash[kBluetoothOutOfBandPairingDataSize]; - - // Simple Pairing Randomizer R. - uint8 randomizer[kBluetoothOutOfBandPairingDataSize]; -}; - -} // namespace device - -#endif // DEVICE_BLUETOOTH_BLUETOOTH_OUT_OF_BAND_PAIRING_DATA_H_ diff --git a/device/bluetooth/test/mock_bluetooth_adapter.h b/device/bluetooth/test/mock_bluetooth_adapter.h index ab0e47b..0326192 100644 --- a/device/bluetooth/test/mock_bluetooth_adapter.h +++ b/device/bluetooth/test/mock_bluetooth_adapter.h @@ -60,10 +60,6 @@ class MockBluetoothAdapter : public BluetoothAdapter { MOCK_METHOD1(GetDevice, BluetoothDevice*(const std::string& address)); MOCK_CONST_METHOD1(GetDevice, const BluetoothDevice*(const std::string& address)); - MOCK_METHOD2( - ReadLocalOutOfBandPairingData, - void(const BluetoothOutOfBandPairingDataCallback& callback, - const ErrorCallback& error_callback)); MOCK_METHOD2(AddPairingDelegate, void(BluetoothDevice::PairingDelegate* pairing_delegate, enum PairingDelegatePriority priority)); diff --git a/device/bluetooth/test/mock_bluetooth_device.h b/device/bluetooth/test/mock_bluetooth_device.h index e624f9a..cf52d51 100644 --- a/device/bluetooth/test/mock_bluetooth_device.h +++ b/device/bluetooth/test/mock_bluetooth_device.h @@ -9,7 +9,6 @@ #include "base/strings/string16.h" #include "device/bluetooth/bluetooth_device.h" -#include "device/bluetooth/bluetooth_out_of_band_pairing_data.h" #include "device/bluetooth/bluetooth_uuid.h" #include "testing/gmock/include/gmock/gmock.h" @@ -72,13 +71,6 @@ class MockBluetoothDevice : public BluetoothDevice { const ConnectToServiceCallback& callback, const ConnectToServiceErrorCallback& error_callback)); - MOCK_METHOD3(SetOutOfBandPairingData, - void(const BluetoothOutOfBandPairingData& data, - const base::Closure& callback, - const BluetoothDevice::ErrorCallback& error_callback)); - MOCK_METHOD2(ClearOutOfBandPairingData, - void(const base::Closure& callback, - const BluetoothDevice::ErrorCallback& error_callback)); MOCK_METHOD2(StartConnectionMonitor, void(const base::Closure& callback, const BluetoothDevice::ErrorCallback& error_callback)); |