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

Unified Diff: ipc/ipc_channel_win.cc

Issue 2375663002: Replace MessageLoop::current()->task_runner() with ThreadTaskRunnerHandle::Get(). (Closed)
Patch Set: rebase Created 4 years, 3 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_channel_reader.cc ('k') | services/shell/standalone/context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_win.cc
diff --git a/ipc/ipc_channel_win.cc b/ipc/ipc_channel_win.cc
index 66c14c84eef49975bc7f6f03a5be844bad54efcd..f59b22ae4b8c81dd41d99db1aca851e3ab79839e 100644
--- a/ipc/ipc_channel_win.cc
+++ b/ipc/ipc_channel_win.cc
@@ -20,6 +20,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_checker.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "base/win/scoped_handle.h"
#include "ipc/attachment_broker.h"
#include "ipc/ipc_listener.h"
@@ -393,6 +394,8 @@ bool ChannelWin::CreatePipe(const IPC::ChannelHandle &channel_handle,
}
bool ChannelWin::Connect() {
+ DCHECK(base::MessageLoopForIO::IsCurrent());
+
WillConnect();
DLOG_IF(WARNING, thread_check_.get()) << "Connect called more than once";
@@ -413,7 +416,7 @@ bool ChannelWin::Connect() {
// Complete setup asynchronously. By not setting input_state_.is_pending
// to true, we indicate to OnIOCompleted that this is the special
// initialization signal.
- base::MessageLoopForIO::current()->task_runner()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(&ChannelWin::OnIOCompleted, weak_factory_.GetWeakPtr(),
&input_state_.context, 0, 0));
« no previous file with comments | « ipc/ipc_channel_reader.cc ('k') | services/shell/standalone/context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698