Index: content/browser/download/download_manager.h |
diff --git a/content/browser/download/download_manager.h b/content/browser/download/download_manager.h |
index 7ea1ebe232b36b216104aa87f86922ee075e6c50..278f7a53882d469a300ef4e9bcf8fdbb991945fd 100644 |
--- a/content/browser/download/download_manager.h |
+++ b/content/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. |
cbentzel
2011/08/19 18:44:21
Is |size| at this point the final size for OnRespo
ahendrickson
2011/08/22 14:53:30
Done.
|
// |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 |
@@ -314,13 +324,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(); |