Index: content/public/browser/download_item.h |
diff --git a/content/public/browser/download_item.h b/content/public/browser/download_item.h |
index 77bf409ec82a5362aceffcdfe7d93da4ec7a9409..f7e414bd10fa4a7bd52f064ac68a8f7102886616 100644 |
--- a/content/public/browser/download_item.h |
+++ b/content/public/browser/download_item.h |
@@ -63,10 +63,6 @@ class CONTENT_EXPORT DownloadItem { |
// Download has been cancelled. |
CANCELLED, |
- // This state indicates that the download item is about to be destroyed, |
- // and observers seeing this state should release all references. |
- REMOVING, |
- |
// This state indicates that the download has been interrupted. |
INTERRUPTED, |
@@ -106,10 +102,18 @@ class CONTENT_EXPORT DownloadItem { |
// to receive updates to the download's status. |
class CONTENT_EXPORT Observer { |
public: |
- virtual void OnDownloadUpdated(DownloadItem* download) = 0; |
+ virtual void OnDownloadUpdated(DownloadItem* download) {} |
// Called when a downloaded file has been opened. |
- virtual void OnDownloadOpened(DownloadItem* download) = 0; |
+ virtual void OnDownloadOpened(DownloadItem* download) {} |
+ |
+ // Called when the user removed the download either from UI or at shutdown. |
+ virtual void OnDownloadRemoved(DownloadItem* download) {} |
+ |
+ // Called when the download is being destroyed. This happens after |
+ // every OnDownloadRemoved() as well as when the DownloadManager is going |
+ // down. |
+ virtual void OnDownloadDestructed(DownloadItem* download) {} |
protected: |
virtual ~Observer() {} |