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

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

Issue 10704052: Download filename determination refactor (3/3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with r148594 to and resolve conflicts with r148576 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_manager_impl.h
diff --git a/content/browser/download/download_manager_impl.h b/content/browser/download/download_manager_impl.h
index 3efb1beb823e25159cdf7a9baa0631769da93f1d..dda4be882cfda4d7cf36b12510de2ade510db650 100644
--- a/content/browser/download/download_manager_impl.h
+++ b/content/browser/download/download_manager_impl.h
@@ -86,11 +86,6 @@ class CONTENT_EXPORT DownloadManagerImpl
int64 db_handle) OVERRIDE;
virtual int InProgressCount() const OVERRIDE;
virtual content::BrowserContext* GetBrowserContext() const OVERRIDE;
- virtual FilePath LastDownloadPath() OVERRIDE;
- virtual void ClearLastDownloadPath() OVERRIDE;
- virtual void FileSelected(const FilePath& path, int32 download_id) OVERRIDE;
- virtual void FileSelectionCanceled(int32 download_id) OVERRIDE;
- virtual void RestartDownload(int32 download_id) OVERRIDE;
virtual void CheckForHistoryFilesRemoval() OVERRIDE;
virtual content::DownloadItem* GetDownloadItem(int id) OVERRIDE;
virtual content::DownloadItem* GetDownload(int id) OVERRIDE;
@@ -138,11 +133,6 @@ class CONTENT_EXPORT DownloadManagerImpl
// and then notifies this update to the file's observer.
void OnFileRemovalDetected(int32 download_id);
- // Called back after a target path for the file to be downloaded to has been
- // determined, either automatically based on the suggested file name, or by
- // the user in a Save As dialog box.
- void OnTargetPathAvailable(DownloadItemImpl* download);
-
// Removes |download| from the active and in progress maps.
// Called when the download is cancelled or has an error.
// Does nothing if the download is not in the history DB.
@@ -167,6 +157,16 @@ class CONTENT_EXPORT DownloadManagerImpl
void OnDownloadFileCreated(
int32 download_id, content::DownloadInterruptReason reason);
+ // Called when the delegate has completed determining the download target.
+ // Arguments following |download_id| are as per
+ // content::DownloadTargetCallback.
+ void OnDownloadTargetDetermined(
+ int32 download_id,
+ const FilePath& target_path,
+ content::DownloadItem::TargetDisposition disposition,
+ content::DownloadDangerType danger_type,
+ const FilePath& intermediate_path);
+
// Called when a download entry is committed to the persistent store.
void OnDownloadItemAddedToPersistentStore(DownloadItemImpl* item);
@@ -175,6 +175,7 @@ class CONTENT_EXPORT DownloadManagerImpl
// Overridden from DownloadItemImplDelegate
// (Note that |GetBrowserContext| are present in both interfaces.)
+ virtual DownloadFileManager* GetDownloadFileManager() OVERRIDE;
virtual bool ShouldOpenDownload(DownloadItemImpl* item) OVERRIDE;
virtual bool ShouldOpenFileBasedOnExtension(const FilePath& path) OVERRIDE;
virtual void CheckForFileRemoval(DownloadItemImpl* download_item) OVERRIDE;
@@ -230,10 +231,6 @@ class CONTENT_EXPORT DownloadManagerImpl
// Non-owning pointer for handling file writing on the download_thread_.
DownloadFileManager* file_manager_;
- // The user's last choice for download directory. This is only used when the
- // user wants us to prompt for a save location for each download.
- FilePath last_download_path_;
-
// Allows an embedder to control behavior. Guaranteed to outlive this object.
content::DownloadManagerDelegate* delegate_;
« no previous file with comments | « content/browser/download/download_item_impl_unittest.cc ('k') | content/browser/download/download_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698