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

Unified Diff: content/browser/download/download_item_impl_delegate.h

Issue 10799005: Replace the DownloadFileManager with direct ownership (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed try job problems. Created 8 years, 5 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
Index: content/browser/download/download_item_impl_delegate.h
diff --git a/content/browser/download/download_item_impl_delegate.h b/content/browser/download/download_item_impl_delegate.h
index b947af76c870a568636662185d5232a2ed4db875..8958381fad079544a2ee7e5bd01ebeb80eedd473 100644
--- a/content/browser/download/download_item_impl_delegate.h
+++ b/content/browser/download/download_item_impl_delegate.h
@@ -27,13 +27,23 @@ class CONTENT_EXPORT DownloadItemImplDelegate {
void Attach();
void Detach();
- // Tests if a file type should be opened automatically.
- virtual bool ShouldOpenFileBasedOnExtension(const FilePath& path);
+ // Start the delegate's portion of the download; called when the
+ // download item is ready for the delegate to take over.
+ // Pure virtual because if the delegate doesn't do something the
+ // DownloadItemImpl is dead in the water.
+ // TODO(rdsmith): The machinery of running the download should be
+ // moved into the DownloadItem, and this should be changed into
+ // a probe as to whether to start and if not, provide a callback
+ // to call when it's time to start.
+ virtual void DelegateStart(DownloadItemImpl* download) = 0;
// Allows the delegate to override the opening of a download. If it returns
// true then it's reponsible for opening the item.
virtual bool ShouldOpenDownload(DownloadItemImpl* download);
+ // Tests if a file type should be opened automatically.
+ virtual bool ShouldOpenFileBasedOnExtension(const FilePath& path);
+
// Checks whether a downloaded file still exists and updates the
// file's state if the file is already removed.
// The check may or may not result in a later asynchronous call

Powered by Google App Engine
This is Rietveld 408576698