Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Unified Diff: device/bluetooth/bluez/bluetooth_bluez_unittest.cc

Issue 2818533003: Make nesting/running states a RunLoop rather than a MessageLoop concept. (Closed)
Patch Set: still need to check MessageLoop::current() in Mojo's RunLoopNestingObserver::GetForThread() Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/bluez/bluetooth_bluez_unittest.cc
diff --git a/device/bluetooth/bluez/bluetooth_bluez_unittest.cc b/device/bluetooth/bluez/bluetooth_bluez_unittest.cc
index 74d88017fc7f35c0de15086fa905cecdcedd8c8b..6632d545665ff191c6a3183eef6a23a3f1d8eba4 100644
--- a/device/bluetooth/bluez/bluetooth_bluez_unittest.cc
+++ b/device/bluetooth/bluez/bluetooth_bluez_unittest.cc
@@ -164,10 +164,8 @@ class TestPairingDelegate : public BluetoothDevice::PairingDelegate {
// Some tests use a message loop since background processing is simulated;
// break out of those loops.
void QuitMessageLoop() {
- if (base::MessageLoop::current() &&
- base::MessageLoop::current()->is_running()) {
+ if (base::RunLoop::IsRunningOnCurrentThread())
base::MessageLoop::current()->QuitWhenIdle();
- }
}
};
@@ -362,10 +360,8 @@ class BluetoothBlueZTest : public testing::Test {
// Some tests use a message loop since background processing is simulated;
// break out of those loops.
void QuitMessageLoop() {
- if (base::MessageLoop::current() &&
- base::MessageLoop::current()->is_running()) {
+ if (base::RunLoop::IsRunningOnCurrentThread())
base::MessageLoop::current()->QuitWhenIdle();
- }
}
};
const char BluetoothBlueZTest::kGapUuid[] =

Powered by Google App Engine
This is Rietveld 408576698