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

Unified Diff: device/bluetooth/bluetooth_low_energy_device_mac.mm

Issue 1842223003: Remove outdated devices from Android device chooser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't purge devices continuously. Added more tests. Created 4 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_low_energy_device_mac.mm
diff --git a/device/bluetooth/bluetooth_low_energy_device_mac.mm b/device/bluetooth/bluetooth_low_energy_device_mac.mm
index b8c47f4552fecb6d30312d02bb47c422c36274ea..54249747a52c225fa87595ab5d75eb09e4f8211f 100644
--- a/device/bluetooth/bluetooth_low_energy_device_mac.mm
+++ b/device/bluetooth/bluetooth_low_energy_device_mac.mm
@@ -46,7 +46,7 @@ BluetoothLowEnergyDeviceMac::~BluetoothLowEnergyDeviceMac() {
void BluetoothLowEnergyDeviceMac::Update(NSDictionary* advertisement_data,
int rssi) {
- last_update_time_.reset([[NSDate date] retain]);
+ UpdateTimestamp();
rssi_ = rssi;
NSNumber* connectable =
[advertisement_data objectForKey:CBAdvertisementDataIsConnectable];
@@ -218,10 +218,6 @@ void BluetoothLowEnergyDeviceMac::ConnectToServiceInsecurely(
NOTIMPLEMENTED();
}
-NSDate* BluetoothLowEnergyDeviceMac::GetLastUpdateTime() const {
- return last_update_time_.get();
-}
-
std::string BluetoothLowEnergyDeviceMac::GetDeviceName() const {
return base::SysNSStringToUTF8([peripheral_ name]);
}

Powered by Google App Engine
This is Rietveld 408576698