Index: device/bluetooth/bluetooth_adapter.cc |
diff --git a/device/bluetooth/bluetooth_adapter.cc b/device/bluetooth/bluetooth_adapter.cc |
index aba8f137c520b6e60c6130d00723c7c94a844470..f3d15bff020c00101c7b46c644482bfc37db494d 100644 |
--- a/device/bluetooth/bluetooth_adapter.cc |
+++ b/device/bluetooth/bluetooth_adapter.cc |
@@ -200,6 +200,14 @@ void BluetoothAdapter::DiscoverySessionBecameInactive( |
discovery_sessions_.erase(discovery_session); |
} |
+void BluetoothAdapter::DeleteDeviceForTesting(const std::string& address) { |
+ std::map<const std::string, BluetoothDevice*>::iterator device_iterator = |
+ devices_.find(address); |
+ BluetoothDevice* device = device_iterator->second; |
+ devices_.erase(device_iterator); |
+ delete device; |
+} |
+ |
scoped_ptr<BluetoothDiscoveryFilter> |
BluetoothAdapter::GetMergedDiscoveryFilterHelper( |
const BluetoothDiscoveryFilter* masked_filter, |