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

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: 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..6a3b11e09dc84dd9b33c0d48aacfb65518e56dc2 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,11 @@ class BluetoothLowEnergyConnectionFinder
void DeviceRemoved(device::BluetoothAdapter* adapter,
device::BluetoothDevice* device) override;
+ protected:
+ // Creates a connection with |remote_device|. Exposed for testing.
Tim Song 2015/05/20 07:47:00 nit: this comment isn't up to date anymore.
sacomoto 2015/05/20 22:34:21 Done.
+ 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 +104,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