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

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

Issue 1129983004: Adding BLE connection finder unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments Created 5 years, 7 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_finder.h
diff --git a/components/proximity_auth/ble/bluetooth_low_energy_connection_finder.h b/components/proximity_auth/ble/bluetooth_low_energy_connection_finder.h
index 4c421e25b8690525e01ea13e8061ae71a0d2ceee..047531b1faa82aec957532a7d09595cab4155341 100644
--- a/components/proximity_auth/ble/bluetooth_low_energy_connection_finder.h
+++ b/components/proximity_auth/ble/bluetooth_low_energy_connection_finder.h
@@ -48,7 +48,6 @@ class BluetoothLowEnergyConnectionFinder
Connection::Status old_status,
Connection::Status new_status) override;
- protected:
// device::BluetoothAdapter::Observer:
void DeviceAdded(device::BluetoothAdapter* adapter,
device::BluetoothDevice* device) override;
@@ -57,6 +56,12 @@ class BluetoothLowEnergyConnectionFinder
void DeviceRemoved(device::BluetoothAdapter* adapter,
device::BluetoothDevice* device) override;
+ protected:
+ // Creates a proximity_auth::Connection based on |gatt_connection|. Exposed
+ // for testing.
+ virtual scoped_ptr<Connection> CreateConnection(
+ scoped_ptr<device::BluetoothGattConnection> gatt_connection);
+
private:
// Callback to be called when the Bluetooth adapter is initialized.
void OnAdapterInitialized(scoped_refptr<device::BluetoothAdapter> adapter);
@@ -100,10 +105,6 @@ class BluetoothLowEnergyConnectionFinder
// be called once the connection is established.
void CreateGattConnection(device::BluetoothDevice* remote_device);
- // Creates a connection with |remote_device|.
- scoped_ptr<Connection> CreateConnection(
- scoped_ptr<device::BluetoothGattConnection> gatt_connection);
-
// The uuid of the service it looks for to establish a GattConnection.
device::BluetoothUUID remote_service_uuid_;

Powered by Google App Engine
This is Rietveld 408576698