Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1738)

Unified Diff: content/public/browser/download_item.h

Issue 10837125: Revert 149794 - DownloadItem::Observer::OnDownloadDestroyed() replaces DownloadItem::REMOVING (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1228/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/download/save_package.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/download_item.h
===================================================================
--- content/public/browser/download_item.h (revision 150095)
+++ content/public/browser/download_item.h (working copy)
@@ -61,6 +61,10 @@
// 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,
@@ -98,19 +102,11 @@
// to receive updates to the download's status.
class CONTENT_EXPORT Observer {
public:
- virtual void OnDownloadUpdated(DownloadItem* download) {}
+ virtual void OnDownloadUpdated(DownloadItem* download) = 0;
// Called when a downloaded file has been opened.
- virtual void OnDownloadOpened(DownloadItem* download) {}
+ virtual void OnDownloadOpened(DownloadItem* download) = 0;
- // Called when the user removes a download.
- 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 OnDownloadDestroyed(DownloadItem* download) {}
-
protected:
virtual ~Observer() {}
};
« no previous file with comments | « content/browser/download/save_package.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698