Skip to content

Commit

Permalink
ipc: Convert MessageLoop::RunUntilIdle() usage to base::RunLoop variant.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tfarina@chromium.org committed Feb 8, 2013
1 parent a2f7b97 commit 2d6e6a7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ipc/ipc_sync_channel_unittest.cc
Original file line number Diff line number Diff line change
@@ -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"

Expand All @@ -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"
Expand All @@ -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.
Expand Down Expand Up @@ -181,7 +180,7 @@ class Worker : public Listener, public Sender {
// 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,
Expand All @@ -190,7 +189,7 @@ class Worker : public Listener, public Sender {

void OnIPCThreadShutdown(WaitableEvent* listener_event,
WaitableEvent* ipc_event) {
MessageLoop::current()->RunUntilIdle();
base::RunLoop().RunUntilIdle();
ipc_event->Signal();

listener_thread_.message_loop()->PostTask(
Expand All @@ -199,7 +198,7 @@ class Worker : public Listener, public Sender {
}

void OnListenerThreadShutdown2(WaitableEvent* listener_event) {
MessageLoop::current()->RunUntilIdle();
base::RunLoop().RunUntilIdle();
listener_event->Signal();
}

Expand Down Expand Up @@ -1887,3 +1886,4 @@ TEST_F(IPCSyncChannelTest, Verified) {
}

} // namespace
} // namespace IPC

0 comments on commit 2d6e6a7

Please sign in to comment.