Index: ipc/attachment_broker_privileged_win_unittest.cc |
diff --git a/ipc/attachment_broker_privileged_win_unittest.cc b/ipc/attachment_broker_privileged_win_unittest.cc |
index 3c8df8e806468a4ec53c1a5095ab728ad6901bc3..775b9216296bf7c7f21196838a2f9bc82083bf60 100644 |
--- a/ipc/attachment_broker_privileged_win_unittest.cc |
+++ b/ipc/attachment_broker_privileged_win_unittest.cc |
@@ -14,6 +14,7 @@ |
#include "base/files/scoped_temp_dir.h" |
#include "base/memory/shared_memory.h" |
#include "base/memory/shared_memory_handle.h" |
+#include "base/run_loop.h" |
#include "base/win/scoped_handle.h" |
#include "ipc/attachment_broker_privileged_win.h" |
#include "ipc/attachment_broker_unprivileged_win.h" |
@@ -355,7 +356,7 @@ TEST_F(IPCAttachmentBrokerPrivilegedWinTest, SendHandle) { |
HANDLE h = CreateTempFile(); |
SendMessageWithAttachment(h); |
- base::MessageLoop::current()->Run(); |
+ base::RunLoop().Run(); |
// Check the result. |
ASSERT_EQ(ProxyListener::MESSAGE_RECEIVED, |
@@ -383,7 +384,7 @@ TEST_F(IPCAttachmentBrokerPrivilegedWinTest, |
IPC::HandleWin handle_win(h2, IPC::HandleWin::DUPLICATE); |
IPC::Message* message = new TestHandleWinMsg(100, handle_win, 200); |
sender()->Send(message); |
- base::MessageLoop::current()->Run(); |
+ base::RunLoop().Run(); |
// Check the result. |
ASSERT_EQ(ProxyListener::MESSAGE_RECEIVED, |
@@ -410,7 +411,7 @@ TEST_F(IPCAttachmentBrokerPrivilegedWinTest, SendHandleToSelf) { |
HANDLE h = CreateTempFile(); |
SendMessageWithAttachment(h); |
- base::MessageLoop::current()->Run(); |
+ base::RunLoop().Run(); |
// Get the received attachment. |
IPC::BrokerableAttachment::AttachmentId* id = get_observer()->get_id(); |
@@ -447,7 +448,7 @@ TEST_F(IPCAttachmentBrokerPrivilegedWinTest, SendTwoHandles) { |
IPC::HandleWin handle_win2(h2, IPC::HandleWin::FILE_READ_WRITE); |
IPC::Message* message = new TestTwoHandleWinMsg(handle_win1, handle_win2); |
sender()->Send(message); |
- base::MessageLoop::current()->Run(); |
+ base::RunLoop().Run(); |
// Check the result. |
ASSERT_EQ(ProxyListener::MESSAGE_RECEIVED, |
@@ -472,7 +473,7 @@ TEST_F(IPCAttachmentBrokerPrivilegedWinTest, SendHandleTwice) { |
ASSERT_TRUE(result); |
SendMessageWithAttachment(h); |
SendMessageWithAttachment(h2); |
- base::MessageLoop::current()->Run(); |
+ base::RunLoop().Run(); |
// Check the result. |
ASSERT_EQ(ProxyListener::MESSAGE_RECEIVED, |
@@ -495,7 +496,7 @@ TEST_F(IPCAttachmentBrokerPrivilegedWinTest, SendSharedMemoryHandle) { |
shared_memory->CreateAndMapAnonymous(kSharedMemorySize); |
memcpy(shared_memory->memory(), kDataBuffer, strlen(kDataBuffer)); |
sender()->Send(new TestSharedMemoryHandleMsg1(shared_memory->handle())); |
- base::MessageLoop::current()->Run(); |
+ base::RunLoop().Run(); |
// Check the result. |
ASSERT_EQ(ProxyListener::MESSAGE_RECEIVED, |
@@ -523,7 +524,7 @@ int CommonPrivilegedProcessMain(OnMessageReceivedCallback callback, |
while (true) { |
LOG(INFO) << "Privileged process spinning run loop."; |
- base::MessageLoop::current()->Run(); |
+ base::RunLoop().Run(); |
ProxyListener::Reason reason = listener.get_reason(); |
if (reason == ProxyListener::CHANNEL_ERROR) |
break; |