summaryrefslogtreecommitdiffstats
path: root/jingle/glue/thread_wrapper.cc
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-12 21:18:16 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-12 21:18:16 +0000
commit31a7eef76caaaa50d57166c26ebe2f9625000642 (patch)
tree53320dce2e28eef75c0b72fd0c31c2565b5e7b98 /jingle/glue/thread_wrapper.cc
parent72b6f8e29c17e3752847dd318821f18968b23dc8 (diff)
downloadchromium_src-31a7eef76caaaa50d57166c26ebe2f9625000642.zip
chromium_src-31a7eef76caaaa50d57166c26ebe2f9625000642.tar.gz
chromium_src-31a7eef76caaaa50d57166c26ebe2f9625000642.tar.bz2
base::Bind: Convert jingle/.
BUG=none TEST=none R=csilv@chromium.org Review URL: http://codereview.chromium.org/8551004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109811 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'jingle/glue/thread_wrapper.cc')
-rw-r--r--jingle/glue/thread_wrapper.cc20
1 files changed, 12 insertions, 8 deletions
diff --git a/jingle/glue/thread_wrapper.cc b/jingle/glue/thread_wrapper.cc
index 4a47e5d..24ad922 100644
--- a/jingle/glue/thread_wrapper.cc
+++ b/jingle/glue/thread_wrapper.cc
@@ -4,6 +4,8 @@
#include "jingle/glue/thread_wrapper.h"
+#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/lazy_instance.h"
#include "base/threading/thread_local.h"
@@ -153,8 +155,9 @@ void JingleThreadWrapper::Send(talk_base::MessageHandler *handler, uint32 id,
// Need to signal |pending_send_event_| here in case the thread is
// sending message to another thread.
pending_send_event_.Signal();
- message_loop_->PostTask(FROM_HERE, NewRunnableMethod(
- this, &JingleThreadWrapper::ProcessPendingSends));
+ message_loop_->PostTask(FROM_HERE,
+ base::Bind(&JingleThreadWrapper::ProcessPendingSends,
+ base::Unretained(this)));
while (!pending_send.done_event.IsSignaled()) {
@@ -204,13 +207,14 @@ void JingleThreadWrapper::PostTaskInternal(
}
if (delay_ms <= 0) {
- message_loop_->PostTask(FROM_HERE, NewRunnableMethod(
- this, &JingleThreadWrapper::RunTask, task_id));
+ message_loop_->PostTask(FROM_HERE,
+ base::Bind(&JingleThreadWrapper::RunTask,
+ base::Unretained(this), task_id));
} else {
- message_loop_->PostDelayedTask(
- FROM_HERE,
- NewRunnableMethod(this, &JingleThreadWrapper::RunTask, task_id),
- delay_ms);
+ message_loop_->PostDelayedTask(FROM_HERE,
+ base::Bind(&JingleThreadWrapper::RunTask,
+ base::Unretained(this), task_id),
+ delay_ms);
}
}