diff options
author | rdsmith@chromium.org <rdsmith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-01 18:50:23 +0000 |
---|---|---|
committer | rdsmith@chromium.org <rdsmith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-01 18:50:23 +0000 |
commit | c291865213713e3341c0a908f3c173340fce2a72 (patch) | |
tree | 876d70c2629abff29d5fda8777b328209d3b60f9 /content/shell | |
parent | 20dfe1518961d3247b4a7ed8147dc00ddae42add (diff) | |
download | chromium_src-c291865213713e3341c0a908f3c173340fce2a72.zip chromium_src-c291865213713e3341c0a908f3c173340fce2a72.tar.gz chromium_src-c291865213713e3341c0a908f3c173340fce2a72.tar.bz2 |
Rearrange Should*Download delegate calls to be more useful and intuitive.
This involves killing the code in ShouldOpenDownload (vestigal), renaming
ShouldCompleteDownload to ShouldOpenDownload, and creating a new
ShouldCompleteDownload delegate method to allow blocking download completion
before final rename.
Review URL: http://codereview.chromium.org/8414007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108141 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell')
-rw-r--r-- | content/shell/shell_download_manager_delegate.cc | 4 | ||||
-rw-r--r-- | content/shell/shell_download_manager_delegate.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/content/shell/shell_download_manager_delegate.cc b/content/shell/shell_download_manager_delegate.cc index 1d6ec99..0118914 100644 --- a/content/shell/shell_download_manager_delegate.cc +++ b/content/shell/shell_download_manager_delegate.cc @@ -152,11 +152,11 @@ bool ShellDownloadManagerDelegate::ShouldOpenFileBasedOnExtension( return false; } -bool ShellDownloadManagerDelegate::ShouldOpenDownload(DownloadItem* item) { +bool ShellDownloadManagerDelegate::ShouldCompleteDownload(DownloadItem* item) { return true; } -bool ShellDownloadManagerDelegate::ShouldCompleteDownload(DownloadItem* item) { +bool ShellDownloadManagerDelegate::ShouldOpenDownload(DownloadItem* item) { return true; } diff --git a/content/shell/shell_download_manager_delegate.h b/content/shell/shell_download_manager_delegate.h index d49dd35..8dda1c8 100644 --- a/content/shell/shell_download_manager_delegate.h +++ b/content/shell/shell_download_manager_delegate.h @@ -32,8 +32,8 @@ class ShellDownloadManagerDelegate FilePath* intermediate_path) OVERRIDE; virtual TabContents* GetAlternativeTabContentsToNotifyForDownload() OVERRIDE; virtual bool ShouldOpenFileBasedOnExtension(const FilePath& path) OVERRIDE; - virtual bool ShouldOpenDownload(DownloadItem* item) OVERRIDE; virtual bool ShouldCompleteDownload(DownloadItem* item) OVERRIDE; + virtual bool ShouldOpenDownload(DownloadItem* item) OVERRIDE; virtual bool GenerateFileHash() OVERRIDE; virtual void OnResponseCompleted(DownloadItem* item, const std::string& hash) OVERRIDE; |