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

Unified Diff: content/browser/renderer_host/redirect_to_file_resource_handler.cc

Issue 8315011: base::Bind: Convert FileUtilProxy::CreateTemporaryCallback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Newfangled pipelining. Created 9 years, 2 months 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
Index: content/browser/renderer_host/redirect_to_file_resource_handler.cc
diff --git a/content/browser/renderer_host/redirect_to_file_resource_handler.cc b/content/browser/renderer_host/redirect_to_file_resource_handler.cc
index 19079a316c8a0571b4f2909a8d50defba5c1b3bb..25e4914c026103df7658b6e4d053bc433a22110a 100644
--- a/content/browser/renderer_host/redirect_to_file_resource_handler.cc
+++ b/content/browser/renderer_host/redirect_to_file_resource_handler.cc
@@ -27,7 +27,7 @@ RedirectToFileResourceHandler::RedirectToFileResourceHandler(
ResourceHandler* next_handler,
int process_id,
ResourceDispatcherHost* host)
- : callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
+ : ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)),
host_(host),
next_handler_(next_handler),
process_id_(process_id),
@@ -77,8 +77,8 @@ bool RedirectToFileResourceHandler::OnWillStart(int request_id,
base::FileUtilProxy::CreateTemporary(
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
base::PLATFORM_FILE_ASYNC,
- callback_factory_.NewCallback(
- &RedirectToFileResourceHandler::DidCreateTemporaryFile));
+ base::Bind(&RedirectToFileResourceHandler::DidCreateTemporaryFile,
+ weak_factory_.GetWeakPtr()));
return true;
}
return next_handler_->OnWillStart(request_id, url, defer);
« no previous file with comments | « content/browser/renderer_host/redirect_to_file_resource_handler.h ('k') | content/common/net/url_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698