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

Unified Diff: device/bluetooth/bluetooth_adapter_mac.mm

Issue 1211013005: Added class BluetoothDeviceMac, returns mac device timing data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pre-hash
Patch Set: adding a retain 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: device/bluetooth/bluetooth_adapter_mac.mm
diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm
index 107133e4b179a3e672bf493844ce749fa8b22db9..e9586ad42068d7a2bb0fb495fe32b6ce0738aaf3 100644
--- a/device/bluetooth/bluetooth_adapter_mac.mm
+++ b/device/bluetooth/bluetooth_adapter_mac.mm
@@ -391,9 +391,6 @@ void BluetoothAdapterMac::LowEnergyDeviceUpdated(
int rssi) {
}
-// TODO(krstnmnlsn): This method assumes all BluetoothDevices in devices_ are
-// instances of BluetoothDeviceMac. Add support for low energy devices.
-// crbug.com/498009
void BluetoothAdapterMac::UpdateDevices() {
// Notify observers if any previously seen devices are no longer available,
// i.e. if they are no longer paired, connected, nor recently discovered via
@@ -404,10 +401,10 @@ void BluetoothAdapterMac::UpdateDevices() {
if (device->IsPaired() || device->IsConnected())
continue;
- NSDate* last_inquiry_update =
- static_cast<BluetoothClassicDeviceMac*>(device)->GetLastInquiryUpdate();
- if (last_inquiry_update &&
- -[last_inquiry_update timeIntervalSinceNow] < kDiscoveryTimeoutSec)
+ NSDate* last_update_time =
+ static_cast<BluetoothDeviceMac*>(device)->GetLastUpdateTime();
+ if (last_update_time &&
+ -[last_update_time timeIntervalSinceNow] < kDiscoveryTimeoutSec)
continue;
FOR_EACH_OBSERVER(

Powered by Google App Engine
This is Rietveld 408576698