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

Unified Diff: jingle/glue/fake_network_manager.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/fake_network_manager.h ('k') | jingle/glue/fake_socket_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: jingle/glue/fake_network_manager.cc
diff --git a/jingle/glue/fake_network_manager.cc b/jingle/glue/fake_network_manager.cc
index 26c2fd0cee92ce9ad97645fa6ab56788de4a0339..d30aba9385839412f0224dc15c78bf5733fc5dd8 100644
--- a/jingle/glue/fake_network_manager.cc
+++ b/jingle/glue/fake_network_manager.cc
@@ -4,6 +4,7 @@
#include "jingle/glue/fake_network_manager.h"
+#include "base/bind.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "net/base/ip_endpoint.h"
@@ -14,7 +15,7 @@ namespace jingle_glue {
FakeNetworkManager::FakeNetworkManager(const net::IPAddressNumber& address)
: started_(false),
- ALLOW_THIS_IN_INITIALIZER_LIST(task_factory_(this)) {
+ ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
net::IPEndPoint endpoint(address, 0);
talk_base::SocketAddress socket_address;
CHECK(IPEndPointToSocketAddress(endpoint, &socket_address));
@@ -28,8 +29,8 @@ FakeNetworkManager::~FakeNetworkManager() {
void FakeNetworkManager::StartUpdating() {
started_ = true;
MessageLoop::current()->PostTask(
- FROM_HERE,task_factory_.NewRunnableMethod(
- &FakeNetworkManager::SendNetworksChangedSignal));
+ FROM_HERE, base::Bind(&FakeNetworkManager::SendNetworksChangedSignal,
+ weak_factory_.GetWeakPtr()));
}
void FakeNetworkManager::StopUpdating() {
« no previous file with comments | « jingle/glue/fake_network_manager.h ('k') | jingle/glue/fake_socket_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698