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

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

Issue 10392111: Use ByteStream in downloads system to decouple source and sink. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Results of self code review. Created 8 years, 7 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.h
diff --git a/content/browser/download/download_file_manager.h b/content/browser/download/download_file_manager.h
index 255dc3d8f462102e0fbbe2a6112ee54e311147e5..6a37384f0df4344f8e5356f17fe49d3a178bcc73 100644
--- a/content/browser/download/download_file_manager.h
+++ b/content/browser/download/download_file_manager.h
@@ -60,7 +60,7 @@ class DownloadRequestHandle;
class FilePath;
namespace content {
-class DownloadBuffer;
+class ByteStreamOutput;
class DownloadFile;
class DownloadManager;
}
@@ -79,6 +79,7 @@ class CONTENT_EXPORT DownloadFileManager
virtual content::DownloadFile* CreateFile(
DownloadCreateInfo* info,
+ scoped_ptr<content::ByteStreamOutput> pipe,
const DownloadRequestHandle& request_handle,
content::DownloadManager* download_manager,
bool calculate_hash,
@@ -94,23 +95,10 @@ class CONTENT_EXPORT DownloadFileManager
void Shutdown();
// Called on UI thread to make DownloadFileManager start the download.
- void StartDownload(DownloadCreateInfo* info,
+ void StartDownload(scoped_ptr<DownloadCreateInfo> info,
+ scoped_ptr<content::ByteStreamOutput> pipe,
const DownloadRequestHandle& request_handle);
- // Handlers for notifications sent from the IO thread and run on the
- // FILE thread.
- void UpdateDownload(content::DownloadId global_id,
- content::DownloadBuffer* buffer);
-
- // |reason| is the reason for interruption, if one occurs.
- // |security_info| contains SSL information (cert_id, cert_status,
- // security_bits, ssl_connection_status), which can be used to
- // fine-tune the error message. It is empty if the transaction
- // was not performed securely.
- void OnResponseCompleted(content::DownloadId global_id,
- content::DownloadInterruptReason reason,
- const std::string& security_info);
-
// Handlers for notifications sent from the UI thread and run on the
// FILE thread. These are both terminal actions with respect to the
// download file, as far as the DownloadFileManager is concerned -- if
@@ -168,7 +156,8 @@ class CONTENT_EXPORT DownloadFileManager
// Creates DownloadFile on FILE thread and continues starting the download
// process.
- void CreateDownloadFile(DownloadCreateInfo* info,
+ void CreateDownloadFile(scoped_ptr<DownloadCreateInfo> info,
+ scoped_ptr<content::ByteStreamOutput> pipe,
const DownloadRequestHandle& request_handle,
content::DownloadManager* download_manager,
bool hash_needed,

Powered by Google App Engine
This is Rietveld 408576698