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

Unified Diff: device/bluetooth/bluetooth_adapter_mac.h

Issue 1216583003: Adding Hashed Address to BluetoothLowEnergyDeviceMac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@timeinfo
Patch Set: agl comments Created 5 years, 5 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
« no previous file with comments | « device/bluetooth/bluetooth.gyp ('k') | device/bluetooth/bluetooth_adapter_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_adapter_mac.h
diff --git a/device/bluetooth/bluetooth_adapter_mac.h b/device/bluetooth/bluetooth_adapter_mac.h
index 49427210fdf0f8a199f76c8c9498fd0e0f6a6227..e9a0b5dbcde97ea97c19ec12894cbd086ee5f1e7 100644
--- a/device/bluetooth/bluetooth_adapter_mac.h
+++ b/device/bluetooth/bluetooth_adapter_mac.h
@@ -83,11 +83,6 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterMac
void ClassicDeviceFound(IOBluetoothDevice* device) override;
void ClassicDiscoveryStopped(bool unexpected) override;
- // BluetoothLowEnergyDiscoveryManagerMac::Observer override:
- void LowEnergyDeviceUpdated(CBPeripheral* peripheral,
- NSDictionary* advertisementData,
- int rssi) override;
-
// Registers that a new |device| has connected to the local host.
void DeviceConnected(IOBluetoothDevice* device);
@@ -103,6 +98,11 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterMac
device::BluetoothDevice::PairingDelegate* pairing_delegate) override;
private:
+ // The length of time that must elapse since the last Inquiry response (on
+ // Classic devices) or call to BluetoothLowEnergyDevice::Update() (on Low
+ // Energy) before a discovered device is considered to be no longer available.
+ const static NSTimeInterval kDiscoveryTimeoutSec;
+
friend class BluetoothAdapterMacTest;
BluetoothAdapterMac();
@@ -131,10 +131,18 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterMac
// connected to the local host.
void ClassicDeviceAdded(IOBluetoothDevice* device);
- // Updates |devices_| to include the currently paired devices, as well as any
- // connected, but unpaired, devices. Notifies observers if any previously
- // paired or connected devices are no longer present.
- void UpdateDevices();
+ // BluetoothLowEnergyDiscoveryManagerMac::Observer override:
+ void LowEnergyDeviceUpdated(CBPeripheral* peripheral,
+ NSDictionary* advertisement_data,
+ int rssi) override;
+
+ // Removes from |devices_| any previously paired, connected or seen devices
+ // which are no longer present. Notifies observers.
+ void RemoveTimedOutDevices();
+
+ // Updates |devices_| to include the currently paired devices and notifies
+ // observers.
+ void AddPairedDevices();
std::string address_;
std::string name_;
« no previous file with comments | « device/bluetooth/bluetooth.gyp ('k') | device/bluetooth/bluetooth_adapter_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698