Chromium Code Reviews| Index: content/public/browser/download_item.h |
| diff --git a/content/public/browser/download_item.h b/content/public/browser/download_item.h |
| index 84ca1602d356436a1dab627bc51ea2f7aafae785..d0c6cee8e4d0d3d3eb2d94acbfd493bb61fe5bba 100644 |
| --- a/content/public/browser/download_item.h |
| +++ b/content/public/browser/download_item.h |
| @@ -62,10 +62,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, |
| @@ -103,10 +99,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. |
|
Randy Smith (Not in Mondays)
2012/07/11 17:55:37
This implies it's user action that removes the dow
benjhayden
2012/07/13 20:03:17
Done.
|
| + 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. |
|
Randy Smith (Not in Mondays)
2012/07/11 17:55:37
These comments have slightly contradictory implica
benjhayden
2012/07/13 20:03:17
Done.
|
| + virtual void OnDownloadDestroyed(DownloadItem* download) {} |
| protected: |
| virtual ~Observer() {} |