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

Unified Diff: ipc/attachment_broker_privileged_win_unittest.cc

Issue 2211473003: Remove calls to deprecated MessageLoop methods on Windows and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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 | « extensions/shell/test/shell_test.cc ('k') | ipc/ipc_channel_mojo_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « extensions/shell/test/shell_test.cc ('k') | ipc/ipc_channel_mojo_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698