summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/download_manager.h
diff options
context:
space:
mode:
authorahendrickson@chromium.org <ahendrickson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-24 20:34:16 +0000
committerahendrickson@chromium.org <ahendrickson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-24 20:34:16 +0000
commitf592032de5bc7cedc3fe009bd92646941399347a (patch)
tree204c054287fb1a43682c3a5b6bd299b7be80076b /chrome/browser/download/download_manager.h
parent2f1779f75be4a5286a1020f7e8972d271d20c2b2 (diff)
downloadchromium_src-f592032de5bc7cedc3fe009bd92646941399347a.zip
chromium_src-f592032de5bc7cedc3fe009bd92646941399347a.tar.gz
chromium_src-f592032de5bc7cedc3fe009bd92646941399347a.tar.bz2
Merging the safe and dangerous download paths.
Manual testing matrix: +--------------------------------------+------+-------+-------------+-------------+ | |Accept/Decline| Cancelled | | | Test |Before| After |Before|After | Completed | | |Full download |Full download| | +--------------------------------------+------+-------+-------------+-------------+ |Drag & Drop | N/A | N/A | Y | +--------------------------------------+------+-------+-------------+-------------+ |Safe | N/A | | | Y | +--------------------------------------+------+-------+-------------+-------------+ |Safe | N/A | Y | N/A | | +--------------------------------------+------+-------+-------------+-------------+ |Safe with uniquification | N/A | | N/A | Y | +--------------------------------------+------+-------+-------------+-------------+ |Safe with uniquification | N/A | Y | N/A | | +--------------------------------------+------+-------+-------------+-------------+ |Dangerous Accepted | Y | | N/A | Y | +--------------------------------------+------+-------+-------------+-------------+ |Dangerous Accepted | | Y | N/A | Y | +--------------------------------------+------+-------+-------------+-------------+ |Dangerous Accepted with uniquification| Y | | N/A | Y | +--------------------------------------+------+-------+-------------+-------------+ |Dangerous Accepted with uniquification| | Y | N/A | Y | +--------------------------------------+------+-------+-------------+-------------+ |Dangerous Declined | Y | | N/A | N/A | +--------------------------------------+------+-------+-------------+-------------+ |Dangerous Declined | | Y | N/A | N/A | +--------------------------------------+------+-------+-------------+-------------+ I couldn't figure out how to get Drag & Drop to work in Windows. All I got was a URL shortcut when I tried. BUG=49394, 49568, 75277 TEST=Passes all download tests. Passes all tests in the above matrix. Review URL: http://codereview.chromium.org/6588020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79313 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/download_manager.h')
-rw-r--r--chrome/browser/download/download_manager.h26
1 files changed, 7 insertions, 19 deletions
diff --git a/chrome/browser/download/download_manager.h b/chrome/browser/download/download_manager.h
index 070693cd..42d4ed9 100644
--- a/chrome/browser/download/download_manager.h
+++ b/chrome/browser/download/download_manager.h
@@ -83,7 +83,8 @@ class DownloadManager
// Called immediately after the DownloadManager puts up a select file
// dialog.
- virtual void SelectFileDialogDisplayed() {}
+ // |id| indicates which download opened the dialog.
+ virtual void SelectFileDialogDisplayed(int32 id) {}
protected:
virtual ~Observer() {}
@@ -135,7 +136,11 @@ class DownloadManager
void MaybeCompleteDownload(DownloadItem* download);
// Called when the download is renamed to its final name.
- void DownloadRenamedToFinalName(int download_id, const FilePath& full_path);
+ // |uniquifier| is a number used to make unique names for the file. It is
+ // only valid for the DANGEROUS_BUT_VALIDATED state of the download item.
+ void OnDownloadRenamedToFinalName(int download_id,
+ const FilePath& full_path,
+ int uniquifier);
// Remove downloads after remove_begin (inclusive) and before remove_end
// (exclusive). You may pass in null Time values to do an unbounded delete
@@ -282,26 +287,9 @@ class DownloadManager
int render_process_id,
int request_id);
- // Renames a finished dangerous download from its temporary file name to its
- // real file name.
- // Invoked on the file thread.
- void ProceedWithFinishedDangerousDownload(int64 download_handle,
- const FilePath& path,
- const FilePath& original_name);
-
- // Invoked on the UI thread when a dangerous downloaded file has been renamed.
- void DangerousDownloadRenamed(int64 download_handle,
- bool success,
- const FilePath& new_path,
- int new_path_uniquifier);
-
// Updates the app icon about the overall download progress.
void UpdateAppIcon();
- // Changes the paths and file name of the specified |download|, propagating
- // the change to the history system.
- void RenameDownload(DownloadItem* download, const FilePath& new_path);
-
// Makes the ResourceDispatcherHost pause/un-pause a download request.
// Called on the IO thread.
void PauseDownloadRequest(ResourceDispatcherHost* rdh,