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

Unified Diff: content/renderer/p2p/ipc_network_manager.cc

Issue 8554001: base::Bind: Convert content/renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test fix. 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 | « content/renderer/p2p/ipc_network_manager.h ('k') | content/renderer/p2p/p2p_transport_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/p2p/ipc_network_manager.cc
diff --git a/content/renderer/p2p/ipc_network_manager.cc b/content/renderer/p2p/ipc_network_manager.cc
index 0c145171447def58506abacd6427d8840ecccd2a..bed04bc977e18f3b6d4e3bcd6fab29bb69b69f09 100644
--- a/content/renderer/p2p/ipc_network_manager.cc
+++ b/content/renderer/p2p/ipc_network_manager.cc
@@ -4,6 +4,7 @@
#include "content/renderer/p2p/ipc_network_manager.h"
+#include "base/bind.h"
#include "net/base/net_util.h"
#include "net/base/sys_byteorder.h"
@@ -13,7 +14,7 @@ IpcNetworkManager::IpcNetworkManager(P2PSocketDispatcher* socket_dispatcher)
: socket_dispatcher_(socket_dispatcher),
started_(false),
first_update_sent_(false),
- ALLOW_THIS_IN_INITIALIZER_LIST(task_factory_(this)) {
+ ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
}
IpcNetworkManager::~IpcNetworkManager() {
@@ -28,8 +29,8 @@ void IpcNetworkManager::StartUpdating() {
} else {
// Post a task to avoid reentrancy.
MessageLoop::current()->PostTask(
- FROM_HERE,task_factory_.NewRunnableMethod(
- &IpcNetworkManager::SendNetworksChangedSignal));
+ FROM_HERE, base::Bind(&IpcNetworkManager::SendNetworksChangedSignal,
+ weak_factory_.GetWeakPtr()));
}
}
« no previous file with comments | « content/renderer/p2p/ipc_network_manager.h ('k') | content/renderer/p2p/p2p_transport_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698