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

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

Issue 10912173: Replace the DownloadFileManager with direct ownership of DownloadFileImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporated comments and sync'd to r158560 Created 8 years, 3 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_factory.cc
diff --git a/content/browser/download/download_file_factory.cc b/content/browser/download/download_file_factory.cc
index 819137f44f7a54c3a070b73049e4d89d6a64ddb7..9896fc3abb862d9d3cf4e713400e8826e4091312 100644
--- a/content/browser/download/download_file_factory.cc
+++ b/content/browser/download/download_file_factory.cc
@@ -11,20 +11,24 @@ namespace content {
DownloadFileFactory::~DownloadFileFactory() {}
-DownloadFile* DownloadFileFactory::CreateFile(
- DownloadCreateInfo* info,
- scoped_ptr<content::ByteStreamReader> stream,
- DownloadManager* download_manager,
+content::DownloadFile* DownloadFileFactory::CreateFile(
+ const content::DownloadSaveInfo& save_info,
+ const FilePath& default_downloads_directory,
+ GURL url,
+ GURL referrer_url,
+ int64 received_bytes,
bool calculate_hash,
- const net::BoundNetLog& bound_net_log) {
+ scoped_ptr<content::ByteStreamReader> stream,
+ const net::BoundNetLog& bound_net_log,
+ base::WeakPtr<content::DownloadDestinationObserver> observer) {
+ scoped_ptr<content::PowerSaveBlocker> psb(
+ new content::PowerSaveBlocker(
+ content::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension,
+ "Download in progress"));
return new DownloadFileImpl(
- info, stream.Pass(), new DownloadRequestHandle(info->request_handle),
- download_manager, calculate_hash,
- scoped_ptr<content::PowerSaveBlocker>(
- new content::PowerSaveBlocker(
- content::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension,
- "Download in progress")).Pass(),
- bound_net_log);
+ save_info, default_downloads_directory, url, referrer_url,
+ received_bytes, calculate_hash, stream.Pass(), bound_net_log,
+ psb.Pass(), observer);
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698