Index: device/bluetooth/bluetooth_adapter_chromeos.cc |
diff --git a/device/bluetooth/bluetooth_adapter_chromeos.cc b/device/bluetooth/bluetooth_adapter_chromeos.cc |
index 847299431fd04fedb82d229fd54bcd849fe43bd7..bde6152665370826962b2986906226ab63455038 100644 |
--- a/device/bluetooth/bluetooth_adapter_chromeos.cc |
+++ b/device/bluetooth/bluetooth_adapter_chromeos.cc |
@@ -7,6 +7,7 @@ |
#include <string> |
#include "base/bind.h" |
+#include "base/location.h" |
#include "base/logging.h" |
#include "base/metrics/histogram.h" |
#include "base/sequenced_task_runner.h" |
@@ -110,6 +111,11 @@ BluetoothAdapterChromeOS::~BluetoothAdapterChromeOS() { |
base::Bind(&OnUnregisterAgentError)); |
} |
+void BluetoothAdapterChromeOS::DeleteOnCorrectThread() const { |
+ if (!ui_task_runner_->DeleteSoon(FROM_HERE, this)) |
+ delete this; |
+} |
+ |
void BluetoothAdapterChromeOS::AddObserver( |
BluetoothAdapter::Observer* observer) { |
DCHECK(observer); |