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

Unified Diff: device/bluetooth/test/test_bluetooth_adapter_observer.cc

Issue 1341103004: Handle change of BLE address after pairing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased onto latest master Created 5 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
Index: device/bluetooth/test/test_bluetooth_adapter_observer.cc
diff --git a/device/bluetooth/test/test_bluetooth_adapter_observer.cc b/device/bluetooth/test/test_bluetooth_adapter_observer.cc
index e03ae6ca1ae5c66676516fdbabe2cdbb087e0f37..74903a0cb9b698fd5a47ddc922e60bc4ff2d47e1 100644
--- a/device/bluetooth/test/test_bluetooth_adapter_observer.cc
+++ b/device/bluetooth/test/test_bluetooth_adapter_observer.cc
@@ -33,6 +33,7 @@ void TestBluetoothAdapterObserver::Reset() {
last_discovering_ = false;
device_added_count_ = 0;
device_changed_count_ = 0;
+ device_address_changed_count_ = 0;
device_removed_count_ = 0;
last_device_ = NULL;
last_device_address_.clear();
@@ -113,6 +114,17 @@ void TestBluetoothAdapterObserver::DeviceChanged(BluetoothAdapter* adapter,
QuitMessageLoop();
}
+void TestBluetoothAdapterObserver::DeviceAddressChanged(
+ device::BluetoothAdapter* adapter,
+ device::BluetoothDevice* device,
+ const std::string& old_address) {
+ ++device_address_changed_count_;
+ last_device_ = device;
+ last_device_address_ = device->GetAddress();
+
+ QuitMessageLoop();
+}
+
void TestBluetoothAdapterObserver::DeviceRemoved(BluetoothAdapter* adapter,
BluetoothDevice* device) {
EXPECT_EQ(adapter_.get(), adapter);

Powered by Google App Engine
This is Rietveld 408576698