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

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: Sync'd to LKGR. Created 8 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
« no previous file with comments | « content/browser/download/download_file_impl.cc ('k') | content/browser/download/download_file_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 965a93c5dab5e9511f34b3943db07168a7062ea9..f7737e9d384c5e9f771b0065775e98feeea8ea4d 100644
--- a/content/browser/download/download_file_manager.h
+++ b/content/browser/download/download_file_manager.h
@@ -61,7 +61,7 @@ class DownloadRequestHandle;
class FilePath;
namespace content {
-class DownloadBuffer;
+class ByteStreamReader;
class DownloadFile;
class DownloadManager;
}
@@ -86,6 +86,7 @@ class CONTENT_EXPORT DownloadFileManager
virtual content::DownloadFile* CreateFile(
DownloadCreateInfo* info,
+ scoped_ptr<content::ByteStreamReader> stream,
const DownloadRequestHandle& request_handle,
content::DownloadManager* download_manager,
bool calculate_hash,
@@ -101,23 +102,10 @@ class CONTENT_EXPORT DownloadFileManager
virtual void Shutdown();
// Called on UI thread to make DownloadFileManager start the download.
- virtual void StartDownload(DownloadCreateInfo* info,
+ virtual void StartDownload(scoped_ptr<DownloadCreateInfo> info,
+ scoped_ptr<content::ByteStreamReader> stream,
const DownloadRequestHandle& request_handle);
- // Handlers for notifications sent from the IO thread and run on the
- // FILE thread.
- virtual 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.
- virtual 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
@@ -186,7 +174,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::ByteStreamReader> stream,
const DownloadRequestHandle& request_handle,
content::DownloadManager* download_manager,
bool hash_needed,
« no previous file with comments | « content/browser/download/download_file_impl.cc ('k') | content/browser/download/download_file_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698