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

Unified Diff: components/proximity_auth/ble/bluetooth_low_energy_connection.h

Issue 1144333007: Adding unit tests for BLE connection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: components/proximity_auth/ble/bluetooth_low_energy_connection.h
diff --git a/components/proximity_auth/ble/bluetooth_low_energy_connection.h b/components/proximity_auth/ble/bluetooth_low_energy_connection.h
index c2f88eb3cc6c0ddc72ca76ef426f7f9f67f2a724..e23dd288e55686be315c88596fb6f8c0444dbffb 100644
--- a/components/proximity_auth/ble/bluetooth_low_energy_connection.h
+++ b/components/proximity_auth/ble/bluetooth_low_energy_connection.h
@@ -62,8 +62,8 @@ class BluetoothLowEnergyConnection : public Connection,
// Constructs a Bluetooth low energy connection to the service with
// |remote_service_| on the |remote_device|. The |adapter| must be already
// initaalized and ready. The GATT connection may alreaady be established and
- // pass through |gatt_connection|. If |gatt_connection| is NULL, a subsequent
- // call to Connect() must be made.
+ // pass through |gatt_connection|. A subsequent call to Connect() must be
+ // made.
BluetoothLowEnergyConnection(
const RemoteDevice& remote_device,
scoped_refptr<device::BluetoothAdapter> adapter,
@@ -97,6 +97,13 @@ class BluetoothLowEnergyConnection : public Connection,
void SetSubStatus(SubStatus status);
SubStatus sub_status() { return sub_status_; }
+ // Virtual for testing.
+ virtual BluetoothLowEnergyCharacteristicsFinder* CreateCharacteristicsFinder(
+ const BluetoothLowEnergyCharacteristicsFinder::SuccessCallback&
+ success_callback,
+ const BluetoothLowEnergyCharacteristicsFinder::ErrorCallback&
+ error_callback);
+
// proximity_auth::Connection
void SendMessageImpl(scoped_ptr<WireMessage> message) override;
scoped_ptr<WireMessage> DeserializeWireMessage(

Powered by Google App Engine
This is Rietveld 408576698