Index: chrome/browser/download/download_manager.h |
diff --git a/chrome/browser/download/download_manager.h b/chrome/browser/download/download_manager.h |
index fe4e602c479933382dcec440de37772a24a674bd..6fd3479cadf04bf3b441cd13e1ab5374443a4cee 100644 |
--- a/chrome/browser/download/download_manager.h |
+++ b/chrome/browser/download/download_manager.h |
@@ -116,13 +116,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 are currently 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. |
cbentzel
2011/08/16 15:50:36
that were downloaded at the time of the interrupti
ahendrickson
2011/08/18 21:52:01
Yes. Changed.
|
+ // |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 |
@@ -341,13 +351,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 app icon about the overall download progress. |
void UpdateAppIcon(); |