Index: device/bluetooth/bluetooth_adapter.cc |
diff --git a/device/bluetooth/bluetooth_adapter.cc b/device/bluetooth/bluetooth_adapter.cc |
index aba8f137c520b6e60c6130d00723c7c94a844470..1ba7065784a2ec8621359a82e2a9289529809b8f 100644 |
--- a/device/bluetooth/bluetooth_adapter.cc |
+++ b/device/bluetooth/bluetooth_adapter.cc |
@@ -200,6 +200,13 @@ void BluetoothAdapter::DiscoverySessionBecameInactive( |
discovery_sessions_.erase(discovery_session); |
} |
+void BluetoothAdapter::DeleteDeviceForTesting(const std::string& address) { |
+ std::map<const std::string, BluetoothDevice*>::iterator device = |
+ devices_.find(address); |
+ devices_.erase(device); |
+ delete device->second; |
Jeffrey Yasskin
2015/09/16 01:40:49
Erasing device invalidates it, so you need to copy
scheib
2015/09/16 21:55:17
Done.
|
+} |
+ |
scoped_ptr<BluetoothDiscoveryFilter> |
BluetoothAdapter::GetMergedDiscoveryFilterHelper( |
const BluetoothDiscoveryFilter* masked_filter, |