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

Unified Diff: device/bluetooth/bluetooth_low_energy_discovery_manager_mac.h

Issue 2253223002: bluetooth: Implement hardware filtering on macOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Created 4 years, 4 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: device/bluetooth/bluetooth_low_energy_discovery_manager_mac.h
diff --git a/device/bluetooth/bluetooth_low_energy_discovery_manager_mac.h b/device/bluetooth/bluetooth_low_energy_discovery_manager_mac.h
index 20d63a123f92515ebb4a622f85e3e762ba81cf44..7c12cd2e4e4b698b9bd72216b01e10b12e81d3ad 100644
--- a/device/bluetooth/bluetooth_low_energy_discovery_manager_mac.h
+++ b/device/bluetooth/bluetooth_low_energy_discovery_manager_mac.h
@@ -42,7 +42,11 @@ class BluetoothLowEnergyDiscoveryManagerMac {
// Initiates a discovery session.
// BluetoothLowEnergyDeviceMac objects discovered within a previous
// discovery session will be invalid.
- virtual void StartDiscovery(BluetoothDevice::UUIDList services_uuids);
+ virtual void StartDiscovery(std::set<BluetoothUUID> services_uuids);
+
+ // Updates the scan request to stop scanning for |uuids_to_remove| if
+ // no other filter is scanning for those uuids.
Jeffrey Yasskin 2016/08/23 21:37:04 We don't have the concept of a filter in this clas
+ virtual void RemoveDiscoveryUUIDs(std::set<BluetoothUUID> uuids_to_remove);
// Stops a discovery session.
virtual void StopDiscovery();
@@ -84,8 +88,10 @@ class BluetoothLowEnergyDiscoveryManagerMac {
// waiting for Bluetooth to turn on.
bool pending_;
- // List of service UUIDs to scan.
- BluetoothDevice::UUIDList services_uuids_;
+ // List of service UUIDs to scan for to the number of filters that have that
Jeffrey Yasskin 2016/08/23 21:37:04 s/list/map/?
+ // UUID.
+ std::unordered_map<device::BluetoothUUID, size_t, device::BluetoothUUIDHash>
+ scan_uuids_to_filter_count_;
DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyDiscoveryManagerMac);
};

Powered by Google App Engine
This is Rietveld 408576698