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

Unified Diff: device/bluetooth/bluetooth_device.cc

Issue 1842223003: Remove outdated devices from Android device chooser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unit test for ItemChooserDialog Created 4 years, 8 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_device.cc
diff --git a/device/bluetooth/bluetooth_device.cc b/device/bluetooth/bluetooth_device.cc
index 5696632c8907e220aa20b22be970cf18b3b50103..d04dcf554c058d805a64d85c8ca6d438881728b1 100644
--- a/device/bluetooth/bluetooth_device.cc
+++ b/device/bluetooth/bluetooth_device.cc
@@ -9,6 +9,7 @@
#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/time/time.h"
#include "base/values.h"
#include "device/bluetooth/bluetooth_adapter.h"
#include "device/bluetooth/bluetooth_gatt_connection.h"
@@ -21,7 +22,8 @@ namespace device {
BluetoothDevice::BluetoothDevice(BluetoothAdapter* adapter)
: adapter_(adapter),
gatt_services_discovery_complete_(false),
- services_data_(new base::DictionaryValue()) {}
+ services_data_(new base::DictionaryValue()),
+ last_update_time_(base::Time()) {}
BluetoothDevice::~BluetoothDevice() {
DidDisconnectGatt();
@@ -385,4 +387,8 @@ void BluetoothDevice::Pair(PairingDelegate* pairing_delegate,
NOTREACHED();
}
+void BluetoothDevice::UpdateTimestamp() {
+ last_update_time_ = base::Time::NowFromSystemTime();
+}
+
} // namespace device

Powered by Google App Engine
This is Rietveld 408576698