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

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 Windows compile error. 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
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 00924542af695f38979e9cc883a9ed51519d9130..a2f2db2571449cbf440691b81c4e336a6eeb081a 100644
--- a/content/browser/download/download_item_impl_delegate.h
+++ b/content/browser/download/download_item_impl_delegate.h
@@ -28,13 +28,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