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

Unified Diff: content/browser/download/download_file_manager.cc

Issue 11028131: Shift passage of FileStream in downloads system to be by scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed blank line. Created 8 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/download/download_file_manager.cc
diff --git a/content/browser/download/download_file_manager.cc b/content/browser/download/download_file_manager.cc
index 7577208cf20139e4b2942b230b6cc5bc71d5b035..3242a933fa6949a13a36b8e9687a8b7caa0790d7 100644
--- a/content/browser/download/download_file_manager.cc
+++ b/content/browser/download/download_file_manager.cc
@@ -63,14 +63,16 @@ void DownloadFileManager::CreateDownloadFile(
DCHECK(info.get());
VLOG(20) << __FUNCTION__ << "()" << " info = " << info->DebugString();
+ DownloadId id(info->download_id);
benjhayden 2012/10/11 19:41:12 Comment that we can't use |info| after we Pass() i
Randy Smith (Not in Mondays) 2012/10/15 18:56:32 Done.
+
scoped_ptr<DownloadFile> download_file(download_file_factory_->CreateFile(
- info.get(), stream.Pass(), download_manager, get_hash, bound_net_log));
+ info.Pass(), stream.Pass(), download_manager, get_hash, bound_net_log));
content::DownloadInterruptReason interrupt_reason(
download_file->Initialize());
if (interrupt_reason == content::DOWNLOAD_INTERRUPT_REASON_NONE) {
- DCHECK(GetDownloadFile(info->download_id) == NULL);
- downloads_[info->download_id] = download_file.release();
+ DCHECK(GetDownloadFile(id) == NULL);
+ downloads_[id] = download_file.release();
}
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698