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

Unified Diff: jingle/glue/thread_wrapper.cc

Issue 8551004: base::Bind: Convert jingle/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « jingle/glue/pseudotcp_adapter_unittest.cc ('k') | jingle/notifier/base/chrome_async_socket.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: jingle/glue/thread_wrapper.cc
diff --git a/jingle/glue/thread_wrapper.cc b/jingle/glue/thread_wrapper.cc
index 4a47e5d9dcd1a5cc745342b4b03de2ce162e8a20..24ad9221ee7016e65398825ee564284011534008 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);
}
}
« no previous file with comments | « jingle/glue/pseudotcp_adapter_unittest.cc ('k') | jingle/notifier/base/chrome_async_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698