ipc: Convert MessageLoop::RunUntilIdle() usage to base::RunLoop variant.
The former method is deprecated and actually it is just using RunLoop internally.
The later is the cannonical method and should be used instead.
BUG=131220
TEST=ipc_tests
R=darin@chromium.org
Review URL: https://chromiumcodereview.appspot.com/12225081
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181539 0039d316-1c4b-4281-b951-d872f2087c98
CrOS-Libchrome-Original-Commit: 2d6e6a7d03b6ee0e2dc4204a3a31360e8ecc2da4
diff --git a/ipc/ipc_sync_channel_unittest.cc b/ipc/ipc_sync_channel_unittest.cc
index 66f369e..203d108 100644
--- a/ipc/ipc_sync_channel_unittest.cc
+++ b/ipc/ipc_sync_channel_unittest.cc
@@ -1,8 +1,6 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-//
-// Unit test for SyncChannel.
#include "ipc/ipc_sync_channel.h"
@@ -15,6 +13,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
#include "base/process_util.h"
+#include "base/run_loop.h"
#include "base/string_util.h"
#include "base/threading/platform_thread.h"
#include "base/threading/thread.h"
@@ -27,8 +26,8 @@
#include "testing/gtest/include/gtest/gtest.h"
using base::WaitableEvent;
-using namespace IPC;
+namespace IPC {
namespace {
// Base class for a "process" with listener and IPC threads.
@@ -181,7 +180,7 @@
// SyncChannel needs to be destructed on the thread that it was created on.
channel_.reset();
- MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
ipc_thread_.message_loop()->PostTask(
FROM_HERE, base::Bind(&Worker::OnIPCThreadShutdown, this,
@@ -190,7 +189,7 @@
void OnIPCThreadShutdown(WaitableEvent* listener_event,
WaitableEvent* ipc_event) {
- MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
ipc_event->Signal();
listener_thread_.message_loop()->PostTask(
@@ -199,7 +198,7 @@
}
void OnListenerThreadShutdown2(WaitableEvent* listener_event) {
- MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
listener_event->Signal();
}
@@ -1887,3 +1886,4 @@
}
} // namespace
+} // namespace IPC