Remove calls to deprecated MessageLoop methods in ipc.
This CL makes the following replacements in
ipc:
Before After
----------------------------------------------------------
x.PostTask() x.task_runner()->PostTask()
PostDelayedTask() PostDelayedTask()
ReleaseSoon() ReleaseSoon()
DeleteSoon() DeleteSoon()
x->PostTask() y->task_runner()->PostTask()
PostDelayedTask() PostDelayedTask()
ReleaseSoon() ReleaseSoon()
DeleteSoon() DeleteSoon()
x.Run() RunLoop().Run()
x.RunUntilIdle() RunLoop().RunUntilIdle()
x->Run() RunLoop().Run()
x->RunUntilIdle() RunLoop().RunUntilIdle()
If |y| isn't MessageLoopForUI::current() or
MessageLoopForIO::current()
y.message_loop()->task_runner()
y.task_runner()
y->message_loop()->task_runner()
y->task_runner()
----------------------------------------------------------
|x| is a base::MessageLoop(ForUI|ForIO) or a pointer to
a base::MessageLoop(ForUI|ForIO). |y| is a base::Thread
or a pointer to a base::Thread.
This CL was generated using the MessageLoopDeprecatedMethods
clang-tidy fix available on the associated bug. Only files
that compile on Mac are affected. Follow-up CLs will make
these replacements for other platforms.
This CL doesn't change code behavior.
BUG=616447
[email protected]
Review-Url: https://codereview.chromium.org/2087163003
Cr-Commit-Position: refs/heads/master@{#401385}
diff --git a/ipc/ipc_send_fds_test.cc b/ipc/ipc_send_fds_test.cc
index 3b0e7b3..a656015 100644
--- a/ipc/ipc_send_fds_test.cc
+++ b/ipc/ipc_send_fds_test.cc
@@ -24,6 +24,7 @@
#include "base/location.h"
#include "base/pickle.h"
#include "base/posix/eintr_wrapper.h"
+#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/synchronization/waitable_event.h"
#include "ipc/ipc_message_attachment_set.h"
@@ -133,7 +134,7 @@
}
// Run message loop.
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
// Close the channel so the client's OnChannelError() gets fired.
channel()->Close();
@@ -159,7 +160,7 @@
CHECK(channel->Connect());
// Run message loop.
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
// Verify that the message loop was exited due to getting the correct number
// of descriptors, and not because of the channel closing unexpectedly.