Index: device/bluetooth/test/test_bluetooth_adapter_observer.cc |
diff --git a/device/bluetooth/test/test_bluetooth_adapter_observer.cc b/device/bluetooth/test/test_bluetooth_adapter_observer.cc |
index 1ab083060d2bc1f54493d8542a476a13c38d5af4..ed01c5093a9bccf7873bce559ce333f2135e3259 100644 |
--- a/device/bluetooth/test/test_bluetooth_adapter_observer.cc |
+++ b/device/bluetooth/test/test_bluetooth_adapter_observer.cc |
@@ -8,6 +8,7 @@ |
#include <vector> |
#include "base/message_loop/message_loop.h" |
+#include "base/run_loop.h" |
#include "device/bluetooth/bluetooth_remote_gatt_characteristic.h" |
#include "device/bluetooth/bluetooth_remote_gatt_descriptor.h" |
#include "device/bluetooth/bluetooth_remote_gatt_service.h" |
@@ -333,8 +334,7 @@ void TestBluetoothAdapterObserver::GattDescriptorValueChanged( |
} |
void TestBluetoothAdapterObserver::QuitMessageLoop() { |
- if (base::MessageLoop::current() && |
- base::MessageLoop::current()->is_running()) |
+ if (base::RunLoop::IsRunningOnCurrentThread()) |
base::MessageLoop::current()->QuitWhenIdle(); |
} |