Index: device/bluetooth/bluetooth_adapter.cc |
diff --git a/device/bluetooth/bluetooth_adapter.cc b/device/bluetooth/bluetooth_adapter.cc |
index 286815970dc7ec753539de13b45a8e3472a33369..fa66b5d5e30d4a8f6767905a3d651988456f8b47 100644 |
--- a/device/bluetooth/bluetooth_adapter.cc |
+++ b/device/bluetooth/bluetooth_adapter.cc |
@@ -29,16 +29,6 @@ void BluetoothAdapter::StartDiscoverySession( |
error_callback); |
} |
-void BluetoothAdapter::StartDiscovering(const base::Closure& callback, |
- const ErrorCallback& error_callback) { |
- AddDiscoverySession(callback, error_callback); |
-} |
- |
-void BluetoothAdapter::StopDiscovering(const base::Closure& callback, |
- const ErrorCallback& error_callback) { |
- RemoveDiscoverySession(callback, error_callback); |
-} |
- |
BluetoothAdapter::DeviceList BluetoothAdapter::GetDevices() { |
ConstDeviceList const_devices = |
const_cast<const BluetoothAdapter *>(this)->GetDevices(); |
@@ -124,6 +114,9 @@ void BluetoothAdapter::MarkDiscoverySessionsAsInactive() { |
iter != discovery_sessions_.end(); ++iter) { |
(*iter)->MarkAsInactive(); |
} |
+ // At this point, all sessions have been marked as inactive. Just remove them |
+ // from our list as they are no longer relevant. |
+ discovery_sessions_.clear(); |
keybuk
2014/03/06 18:42:36
This seems to contradict the comment in the header
armansito
2014/03/06 23:55:48
Well, it doesn't really contradict it, as discover
keybuk
2014/03/06 23:57:39
because we're dealing with object lifetime, I thin
armansito
2014/03/07 19:22:16
Actually they weren't removed when an individual o
|
} |
void BluetoothAdapter::DiscoverySessionDestroyed( |