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

Unified Diff: jingle/notifier/listener/mediator_thread_impl.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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: jingle/notifier/listener/mediator_thread_impl.cc
diff --git a/jingle/notifier/listener/mediator_thread_impl.cc b/jingle/notifier/listener/mediator_thread_impl.cc
index 6e89ed64ffabea06b77779cbfb0c1267dc0dd57c..ba85ac77988e3d123d5c411665cc5e9e41a86252 100644
--- a/jingle/notifier/listener/mediator_thread_impl.cc
+++ b/jingle/notifier/listener/mediator_thread_impl.cc
@@ -4,6 +4,7 @@
#include "jingle/notifier/listener/mediator_thread_impl.h"
+#include "base/bind.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
@@ -242,9 +243,7 @@ void MediatorThreadImpl::Login(const buzz::XmppClientSettings& settings) {
DCHECK(parent_message_loop_proxy_->BelongsToCurrentThread());
io_message_loop_proxy_->PostTask(
FROM_HERE,
- NewRunnableMethod(core_.get(),
- &MediatorThreadImpl::Core::Login,
- settings));
+ base::Bind(&MediatorThreadImpl::Core::Login, core_.get(), settings));
}
void MediatorThreadImpl::Logout() {
@@ -256,8 +255,8 @@ void MediatorThreadImpl::ListenForUpdates() {
DCHECK(parent_message_loop_proxy_->BelongsToCurrentThread());
io_message_loop_proxy_->PostTask(
FROM_HERE,
- NewRunnableMethod(core_.get(),
- &MediatorThreadImpl::Core::ListenForPushNotifications));
+ base::Bind(&MediatorThreadImpl::Core::ListenForPushNotifications,
+ core_.get()));
}
void MediatorThreadImpl::SubscribeForUpdates(
@@ -265,10 +264,8 @@ void MediatorThreadImpl::SubscribeForUpdates(
DCHECK(parent_message_loop_proxy_->BelongsToCurrentThread());
io_message_loop_proxy_->PostTask(
FROM_HERE,
- NewRunnableMethod(
- core_.get(),
- &MediatorThreadImpl::Core::SubscribeForPushNotifications,
- subscriptions));
+ base::Bind(&MediatorThreadImpl::Core::SubscribeForPushNotifications,
+ core_.get(), subscriptions));
}
void MediatorThreadImpl::SendNotification(
@@ -276,9 +273,8 @@ void MediatorThreadImpl::SendNotification(
DCHECK(parent_message_loop_proxy_->BelongsToCurrentThread());
io_message_loop_proxy_->PostTask(
FROM_HERE,
- NewRunnableMethod(core_.get(),
- &MediatorThreadImpl::Core::SendNotification,
- data));
+ base::Bind(&MediatorThreadImpl::Core::SendNotification, core_.get(),
+ data));
}
void MediatorThreadImpl::UpdateXmppSettings(
@@ -286,9 +282,8 @@ void MediatorThreadImpl::UpdateXmppSettings(
DCHECK(parent_message_loop_proxy_->BelongsToCurrentThread());
io_message_loop_proxy_->PostTask(
FROM_HERE,
- NewRunnableMethod(core_.get(),
- &MediatorThreadImpl::Core::UpdateXmppSettings,
- settings));
+ base::Bind(&MediatorThreadImpl::Core::UpdateXmppSettings, core_.get(),
+ settings));
}
void MediatorThreadImpl::TriggerOnConnectForTest(
@@ -296,16 +291,13 @@ void MediatorThreadImpl::TriggerOnConnectForTest(
DCHECK(parent_message_loop_proxy_->BelongsToCurrentThread());
io_message_loop_proxy_->PostTask(
FROM_HERE,
- NewRunnableMethod(core_.get(),
- &MediatorThreadImpl::Core::OnConnect,
- base_task));
+ base::Bind(&MediatorThreadImpl::Core::OnConnect, core_.get(), base_task));
}
void MediatorThreadImpl::LogoutImpl() {
io_message_loop_proxy_->PostTask(
FROM_HERE,
- NewRunnableMethod(core_.get(),
- &MediatorThreadImpl::Core::Disconnect));
+ base::Bind(&MediatorThreadImpl::Core::Disconnect, core_.get()));
}
} // namespace notifier
« no previous file with comments | « jingle/notifier/base/task_pump.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698