diff options
author | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-30 20:55:03 +0000 |
---|---|---|
committer | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-30 20:55:03 +0000 |
commit | fd0a773a19c92b94a59b9207f4cc9b154f54a144 (patch) | |
tree | d10fc47c74d613100cbd4408137194a55573dd6d /ipc/ipc_sync_channel_unittest.cc | |
parent | fb4d0a34d327edf6f7abc03eec53e87243396cf0 (diff) | |
download | chromium_src-fd0a773a19c92b94a59b9207f4cc9b154f54a144.zip chromium_src-fd0a773a19c92b94a59b9207f4cc9b154f54a144.tar.gz chromium_src-fd0a773a19c92b94a59b9207f4cc9b154f54a144.tar.bz2 |
ipc: Use base::MessageLoop.
BUG=236029
R=agl@chromium.org
Review URL: https://chromiumcodereview.appspot.com/14383024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197465 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_sync_channel_unittest.cc')
-rw-r--r-- | ipc/ipc_sync_channel_unittest.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ipc/ipc_sync_channel_unittest.cc b/ipc/ipc_sync_channel_unittest.cc index 203d108..4fcb073 100644 --- a/ipc/ipc_sync_channel_unittest.cc +++ b/ipc/ipc_sync_channel_unittest.cc @@ -70,11 +70,11 @@ class Worker : public Listener, public Sender { } void WaitForChannelCreation() { channel_created_->Wait(); } void CloseChannel() { - DCHECK(MessageLoop::current() == ListenerThread()->message_loop()); + DCHECK(base::MessageLoop::current() == ListenerThread()->message_loop()); channel_->Close(); } void Start() { - StartThread(&listener_thread_, MessageLoop::TYPE_DEFAULT); + StartThread(&listener_thread_, base::MessageLoop::TYPE_DEFAULT); ListenerThread()->message_loop()->PostTask( FROM_HERE, base::Bind(&Worker::OnStart, this)); } @@ -169,7 +169,7 @@ class Worker : public Listener, public Sender { // Called on the listener thread to create the sync channel. void OnStart() { // Link ipc_thread_, listener_thread_ and channel_ altogether. - StartThread(&ipc_thread_, MessageLoop::TYPE_IO); + StartThread(&ipc_thread_, base::MessageLoop::TYPE_IO); channel_.reset(CreateChannel()); channel_created_->Signal(); Run(); @@ -213,7 +213,7 @@ class Worker : public Listener, public Sender { return true; } - void StartThread(base::Thread* thread, MessageLoop::Type type) { + void StartThread(base::Thread* thread, base::MessageLoop::Type type) { base::Thread::Options options; options.message_loop_type = type; thread->StartWithOptions(options); @@ -266,7 +266,7 @@ void RunTest(std::vector<Worker*> workers) { class IPCSyncChannelTest : public testing::Test { private: - MessageLoop message_loop_; + base::MessageLoop message_loop_; }; //------------------------------------------------------------------------------ @@ -1001,9 +1001,9 @@ class DoneEventRaceServer : public Worker { : Worker(Channel::MODE_SERVER, "done_event_race_server") { } virtual void Run() OVERRIDE { - MessageLoop::current()->PostTask(FROM_HERE, - base::Bind(&NestedCallback, this)); - MessageLoop::current()->PostDelayedTask( + base::MessageLoop::current()->PostTask(FROM_HERE, + base::Bind(&NestedCallback, this)); + base::MessageLoop::current()->PostDelayedTask( FROM_HERE, base::Bind(&TimeoutCallback), base::TimeDelta::FromSeconds(9)); @@ -1068,7 +1068,7 @@ class SyncMessageFilterServer : public Worker { : Worker(Channel::MODE_SERVER, "sync_message_filter_server"), thread_("helper_thread") { base::Thread::Options options; - options.message_loop_type = MessageLoop::TYPE_DEFAULT; + options.message_loop_type = base::MessageLoop::TYPE_DEFAULT; thread_.StartWithOptions(options); filter_ = new TestSyncMessageFilter(shutdown_event(), this, thread_.message_loop_proxy()); |