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

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

Issue 8231004: Remaining cleanup (base::Bind): Replacing FileUtilProxy calls with new callback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: got it building 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 64d4fcf35860dad0a77536000cc53b5d47df98cb..b7a5d321125c677d12b8297fe29b09bae85729e7 100644
--- a/content/browser/renderer_host/redirect_to_file_resource_handler.cc
+++ b/content/browser/renderer_host/redirect_to_file_resource_handler.cc
@@ -4,6 +4,7 @@
#include "content/browser/renderer_host/redirect_to_file_resource_handler.h"
+#include "base/bind.h"
#include "base/file_util.h"
#include "base/file_util_proxy.h"
#include "base/logging.h"
@@ -26,7 +27,7 @@ RedirectToFileResourceHandler::RedirectToFileResourceHandler(
ResourceHandler* next_handler,
int process_id,
ResourceDispatcherHost* host)
- : callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
+ : weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
host_(host),
next_handler_(next_handler),
process_id_(process_id),
@@ -78,8 +79,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);

Powered by Google App Engine
This is Rietveld 408576698