summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_sync_channel.cc
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-12 21:16:41 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-12 21:16:41 +0000
commit72b6f8e29c17e3752847dd318821f18968b23dc8 (patch)
tree6c42c429354a669b48522219a8d386026365bc43 /ipc/ipc_sync_channel.cc
parent4af95959968ce9b309f91fc504bca97762b9e8f5 (diff)
downloadchromium_src-72b6f8e29c17e3752847dd318821f18968b23dc8.zip
chromium_src-72b6f8e29c17e3752847dd318821f18968b23dc8.tar.gz
chromium_src-72b6f8e29c17e3752847dd318821f18968b23dc8.tar.bz2
base:Bind: Convert ipc/.
BUG=none TEST=none R=csilv@chromium.org Review URL: http://codereview.chromium.org/8539036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109810 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_sync_channel.cc')
-rw-r--r--ipc/ipc_sync_channel.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/ipc/ipc_sync_channel.cc b/ipc/ipc_sync_channel.cc
index 8fe5c37..e3b74ba 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.