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

Unified Diff: ipc/ipc_sync_channel.cc

Issue 8539036: base:Bind: Convert ipc/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fix. Created 9 years, 1 month 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_logging.cc ('k') | ipc/ipc_sync_channel_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_sync_channel.cc
diff --git a/ipc/ipc_sync_channel.cc b/ipc/ipc_sync_channel.cc
index 8fe5c3781272b95db90d26ef19f24be64914980d..e3b74ba411b5f848350a46151558191d85127a19 100644
--- a/ipc/ipc_sync_channel.cc
+++ b/ipc/ipc_sync_channel.cc
@@ -4,6 +4,7 @@
#include "ipc/ipc_sync_channel.h"
+#include "base/bind.h"
#include "base/lazy_instance.h"
#include "base/location.h"
#include "base/logging.h"
@@ -67,10 +68,9 @@ class SyncChannel::ReceivedSyncMsgQueue :
dispatch_event_.Signal();
if (!was_task_pending) {
- listener_message_loop_->PostTask(FROM_HERE, NewRunnableMethod(
- this,
- &ReceivedSyncMsgQueue::DispatchMessagesTask,
- scoped_refptr<SyncContext>(context)));
+ listener_message_loop_->PostTask(
+ FROM_HERE, base::Bind(&ReceivedSyncMsgQueue::DispatchMessagesTask,
+ this, scoped_refptr<SyncContext>(context)));
}
}
@@ -259,8 +259,9 @@ bool SyncChannel::SyncContext::Pop() {
// blocking Send() call, whose reply we received after we made this last
// Send() call. So check if we have any queued replies available that
// can now unblock the listener thread.
- ipc_message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
- received_sync_msgs_.get(), &ReceivedSyncMsgQueue::DispatchReplies));
+ ipc_message_loop()->PostTask(
+ FROM_HERE, base::Bind(&ReceivedSyncMsgQueue::DispatchReplies,
+ received_sync_msgs_.get()));
return result;
}
@@ -427,9 +428,10 @@ bool SyncChannel::SendWithTimeout(Message* message, int timeout_ms) {
// We use the sync message id so that when a message times out, we don't
// confuse it with another send that is either above/below this Send in
// the call stack.
- context->ipc_message_loop()->PostDelayedTask(FROM_HERE,
- NewRunnableMethod(context.get(),
- &SyncContext::OnSendTimeout, message_id), timeout_ms);
+ context->ipc_message_loop()->PostDelayedTask(
+ FROM_HERE,
+ base::Bind(&SyncContext::OnSendTimeout, context.get(), message_id),
+ timeout_ms);
}
// Wait for reply, or for any other incoming synchronous messages.
« no previous file with comments | « ipc/ipc_logging.cc ('k') | ipc/ipc_sync_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698