Index: content/browser/download/download_manager.h |
diff --git a/content/browser/download/download_manager.h b/content/browser/download/download_manager.h |
index fa8dac5b5ce7fdc1ae7fd51add04f908fe724abb..4dae7394d7c8e19931707d9d94b94a1be02d763b 100644 |
--- a/content/browser/download/download_manager.h |
+++ b/content/browser/download/download_manager.h |
@@ -112,13 +112,23 @@ class DownloadManager |
// Notifications sent from the download thread to the UI thread |
void StartDownload(int32 id); |
void UpdateDownload(int32 download_id, int64 size); |
+ |
+ // |download_id| is the ID of the download. |
+ // |size| is the number of bytes that have been downloaded. |
// |hash| is sha256 hash for the downloaded file. It is empty when the hash |
// is not available. |
- void OnResponseCompleted(int32 download_id, int64 size, int os_error, |
+ void OnResponseCompleted(int32 download_id, int64 size, |
const std::string& hash); |
// Called from a view when a user clicks a UI button or link. |
void DownloadCancelled(int32 download_id); |
+ |
+ // Called when there is an error in the download. |
+ // |download_id| is the ID of the download. |
+ // |size| is the number of bytes that are currently downloaded. |
+ // |error| is a download error code. Indicates what caused the interruption. |
+ void OnDownloadError(int32 download_id, int64 size, int error); |
+ |
void RemoveDownload(int64 download_handle); |
// Determine if the download is ready for completion, i.e. has had |
@@ -282,13 +292,14 @@ class DownloadManager |
void DownloadCancelledInternal(int download_id, |
const DownloadRequestHandle& request_handle); |
- // All data has been downloaded. |
- // |hash| is sha256 hash for the downloaded file. It is empty when the hash |
- // is not available. |
- void OnAllDataSaved(int32 download_id, int64 size, const std::string& hash); |
+ // Retrieves the download from the |download_id|. |
+ // Returns NULL if the download is not active. |
+ DownloadItem* GetActiveDownload(int32 download_id); |
- // An error occurred in the download. |
- void OnDownloadError(int32 download_id, int64 size, int os_error); |
+ // Removes |download| from the active and in progress maps. |
+ // Called when the download is cancelled or has an error. |
+ // Does nothing if the download is not in the history DB. |
+ void RemoveFromActiveList(DownloadItem* download); |
// Updates the delegate about the overall download progress. |
void UpdateDownloadProgress(); |