Index: chrome/browser/download/download_manager.h |
diff --git a/chrome/browser/download/download_manager.h b/chrome/browser/download/download_manager.h |
index 61b17be93c70045615ec40e3858d56d5bd76cba0..30e9e5142361c3d1283d698160f5fcee9164857e 100644 |
--- a/chrome/browser/download/download_manager.h |
+++ b/chrome/browser/download/download_manager.h |
@@ -125,6 +125,17 @@ class DownloadManager |
void PauseDownload(int32 download_id, bool pause); |
void RemoveDownload(int64 download_handle); |
+ // Determine if the download is ready for completion, i.e. has had |
+ // all data received, and completed the filename determination and |
+ // history insertion. |
+ bool IsDownloadReadyForCompletion(int32 download_id); |
+ |
+ // If all pre-requisites have been met, complete download processing, i.e. |
+ // do internal cleanup, file rename, and potentially auto-open. |
+ // (Dangerous downloads still may block on user acceptance after this |
+ // point.) |
+ void MaybeCompleteDownload(int32 download_id); |
+ |
// Called when the download is renamed to its final name. |
void DownloadRenamedToFinalName(int download_id, const FilePath& full_path); |
@@ -373,7 +384,7 @@ class DownloadManager |
// destination, so that observers are appropriately notified of completion |
// after this determination is made. |
// The map is of download_id->remaining size (bytes), both of which are |
- // required when calling OnAllDataSaved. |
+ // required when executing the body of MaybeCompleteDownload. |
typedef std::map<int32, int64> PendingFinishedMap; |
PendingFinishedMap pending_finished_downloads_; |