Index: device/bluetooth/bluetooth_adapter_win.cc |
diff --git a/device/bluetooth/bluetooth_adapter_win.cc b/device/bluetooth/bluetooth_adapter_win.cc |
index db4e644533093d43c952a5d7df8ee581cf319fe3..9ad3af718c627dbdcdab9bb458762cb393eac6a6 100644 |
--- a/device/bluetooth/bluetooth_adapter_win.cc |
+++ b/device/bluetooth/bluetooth_adapter_win.cc |
@@ -8,6 +8,7 @@ |
#include <string> |
#include <utility> |
+#include "base/location.h" |
#include "base/logging.h" |
#include "base/sequenced_task_runner.h" |
#include "base/single_thread_task_runner.h" |
@@ -282,6 +283,11 @@ void BluetoothAdapterWin::DevicesPolled( |
} |
} |
+void BluetoothAdapterWin::DeleteOnCorrectThread() const { |
+ if (!ui_task_runner_->DeleteSoon(FROM_HERE, this)) |
+ delete this; |
+} |
+ |
// If the method is called when |discovery_status_| is DISCOVERY_STOPPING, |
// starting again is handled by BluetoothAdapterWin::DiscoveryStopped(). |
void BluetoothAdapterWin::AddDiscoverySession( |