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

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

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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/loader/redirect_to_file_resource_handler.cc
diff --git a/content/browser/loader/redirect_to_file_resource_handler.cc b/content/browser/loader/redirect_to_file_resource_handler.cc
index 02be739d9de85e5c36de313515c0330873d27974..9d996dc3d52c77f5ed59180c5a4dc3bd0681be40 100644
--- a/content/browser/loader/redirect_to_file_resource_handler.cc
+++ b/content/browser/loader/redirect_to_file_resource_handler.cc
@@ -95,7 +95,7 @@ bool RedirectToFileResourceHandler::OnWillStart(int request_id,
// network request like this.
did_defer_ = *defer = true;
base::FileUtilProxy::CreateTemporary(
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get(),
base::PLATFORM_FILE_ASYNC,
base::Bind(&RedirectToFileResourceHandler::DidCreateTemporaryFile,
weak_factory_.GetWeakPtr()));
@@ -165,12 +165,13 @@ void RedirectToFileResourceHandler::DidCreateTemporaryFile(
base::PassPlatformFile file_handle,
const base::FilePath& file_path) {
deletable_file_ = ShareableFileReference::GetOrCreate(
- file_path, ShareableFileReference::DELETE_ON_FINAL_RELEASE,
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
- file_stream_.reset(new net::FileStream(file_handle.ReleaseValue(),
- base::PLATFORM_FILE_WRITE |
- base::PLATFORM_FILE_ASYNC,
- NULL));
+ file_path,
+ ShareableFileReference::DELETE_ON_FINAL_RELEASE,
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get());
+ file_stream_.reset(
+ new net::FileStream(file_handle.ReleaseValue(),
+ base::PLATFORM_FILE_WRITE | base::PLATFORM_FILE_ASYNC,
+ NULL));
host_->RegisterDownloadedTempFile(
process_id_, request_id_, deletable_file_.get());
ResumeIfDeferred();
« no previous file with comments | « content/browser/indexed_db/webidbdatabase_impl.cc ('k') | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698