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

Unified Diff: jingle/notifier/base/task_pump.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/notifier/base/task_pump.h ('k') | jingle/notifier/listener/mediator_thread_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: jingle/notifier/base/task_pump.cc
diff --git a/jingle/notifier/base/task_pump.cc b/jingle/notifier/base/task_pump.cc
index 0395314d72bb62ca0fd5eeaf991df5face219fc9..001f1ab883e614926cef0b288536281b6c361d61 100644
--- a/jingle/notifier/base/task_pump.cc
+++ b/jingle/notifier/base/task_pump.cc
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/bind.h"
#include "base/message_loop.h"
#include "jingle/notifier/base/task_pump.h"
namespace notifier {
TaskPump::TaskPump()
- : scoped_runnable_method_factory_(
- ALLOW_THIS_IN_INITIALIZER_LIST(this)),
+ : ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)),
posted_wake_(false),
stopped_(false) {}
@@ -25,8 +25,7 @@ void TaskPump::WakeTasks() {
// Do the requested wake up.
current_message_loop->PostTask(
FROM_HERE,
- scoped_runnable_method_factory_.NewRunnableMethod(
- &TaskPump::CheckAndRunTasks));
+ base::Bind(&TaskPump::CheckAndRunTasks, weak_factory_.GetWeakPtr()));
posted_wake_ = true;
}
}
« no previous file with comments | « jingle/notifier/base/task_pump.h ('k') | jingle/notifier/listener/mediator_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698