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

Unified Diff: ipc/ipc_sync_channel_unittest.cc

Issue 14383024: ipc: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
« no previous file with comments | « ipc/ipc_sync_channel.cc ('k') | ipc/ipc_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_sync_channel_unittest.cc
diff --git a/ipc/ipc_sync_channel_unittest.cc b/ipc/ipc_sync_channel_unittest.cc
index 203d1088ba88bb4630803b05fd9f2663535a76a5..4fcb073e2568021e6a0a675b12d0a2124d5425ce 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());
« no previous file with comments | « ipc/ipc_sync_channel.cc ('k') | ipc/ipc_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698