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

Unified Diff: device/bluetooth/bluetooth_classic_device_mac.mm

Issue 2282763004: bluetooth: mac: Improve classic device discovery and update (Closed)
Patch Set: Address moar comments Created 4 years, 3 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_classic_device_mac.h ('k') | device/bluetooth/bluetooth_device.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_classic_device_mac.mm
diff --git a/device/bluetooth/bluetooth_classic_device_mac.mm b/device/bluetooth/bluetooth_classic_device_mac.mm
index cc2fafb6e2632aa9bb6e1fdce078457a7a287035..da2866715b52fe55b41ae34780f775e0354a6daa 100644
--- a/device/bluetooth/bluetooth_classic_device_mac.mm
+++ b/device/bluetooth/bluetooth_classic_device_mac.mm
@@ -62,7 +62,9 @@ BluetoothUUID ExtractUuid(IOBluetoothSDPDataElement* service_class_data) {
BluetoothClassicDeviceMac::BluetoothClassicDeviceMac(
BluetoothAdapterMac* adapter,
IOBluetoothDevice* device)
- : BluetoothDeviceMac(adapter), device_([device retain]) {}
+ : BluetoothDeviceMac(adapter), device_([device retain]) {
+ UpdateTimestamp();
+}
BluetoothClassicDeviceMac::~BluetoothClassicDeviceMac() {
}
@@ -255,8 +257,9 @@ void BluetoothClassicDeviceMac::CreateGattConnection(
}
base::Time BluetoothClassicDeviceMac::GetLastUpdateTime() const {
- return base::Time::FromDoubleT(
- [[device_ getLastInquiryUpdate] timeIntervalSince1970]);
+ // getLastInquiryUpdate returns nil unpredictably so just use the
+ // cross platform implementation of last update time.
+ return last_update_time_;
}
int BluetoothClassicDeviceMac::GetHostTransmitPower(
« no previous file with comments | « device/bluetooth/bluetooth_classic_device_mac.h ('k') | device/bluetooth/bluetooth_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698