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

Unified Diff: content/common/resource_dispatcher.cc

Issue 8556001: Convert NewRunnableFunction/NewRunnableMethod calls to use base::Bind(). (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 | « content/common/resource_dispatcher.h ('k') | content/common/socket_stream_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/resource_dispatcher.cc
diff --git a/content/common/resource_dispatcher.cc b/content/common/resource_dispatcher.cc
index f7b0b3d5b33b5328508a3c986929a682acd75ca1..4afa078b6e7cf80c3774441ace9d7ec493c88cf5 100644
--- a/content/common/resource_dispatcher.cc
+++ b/content/common/resource_dispatcher.cc
@@ -7,6 +7,7 @@
#include "content/common/resource_dispatcher.h"
#include "base/basictypes.h"
+#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/file_path.h"
#include "base/message_loop.h"
@@ -257,7 +258,7 @@ void IPCResourceLoaderBridge::UpdateRoutingId(int new_routing_id) {
ResourceDispatcher::ResourceDispatcher(IPC::Message::Sender* sender)
: message_sender_(sender),
- ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)),
+ ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)),
delegate_(NULL) {
}
@@ -512,8 +513,8 @@ void ResourceDispatcher::SetDefersLoading(int request_id, bool value) {
FollowPendingRedirect(request_id, request_info);
MessageLoop::current()->PostTask(FROM_HERE,
- method_factory_.NewRunnableMethod(
- &ResourceDispatcher::FlushDeferredMessages, request_id));
+ base::Bind(&ResourceDispatcher::FlushDeferredMessages,
+ weak_factory_.GetWeakPtr(), request_id));
}
}
« no previous file with comments | « content/common/resource_dispatcher.h ('k') | content/common/socket_stream_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698