diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-28 18:35:24 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-28 18:35:24 +0000 |
commit | 14ce83fb15ddb2dbd3c8a6d81a78435209359ff8 (patch) | |
tree | ba450456add7d7a46378aa8ba61438cbbbff7c3b /chrome/browser/download | |
parent | be8d1790c1e2bfbc2d21004415ea0cfe36e76eb2 (diff) | |
download | chromium_src-14ce83fb15ddb2dbd3c8a6d81a78435209359ff8.zip chromium_src-14ce83fb15ddb2dbd3c8a6d81a78435209359ff8.tar.gz chromium_src-14ce83fb15ddb2dbd3c8a6d81a78435209359ff8.tar.bz2 |
Generalize the code that checks for user actions in the render view to work on all platforms.
Also, on linux, assume the user denies every download which we would have prompted him with.
BUG=12709
TEST=windows is still carpet-bombing resilient and linux can download from the same page more than once.
Review URL: http://codereview.chromium.org/113925
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17089 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download')
-rw-r--r-- | chrome/browser/download/download_request_manager.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/download/download_request_manager.cc b/chrome/browser/download/download_request_manager.cc index 4364700..d779b66 100644 --- a/chrome/browser/download/download_request_manager.cc +++ b/chrome/browser/download/download_request_manager.cc @@ -66,10 +66,15 @@ void DownloadRequestManager::TabDownloadState::PromptUserForDownload( if (is_showing_prompt()) return; // Already showing prompt. - if (DownloadRequestManager::delegate_) + if (DownloadRequestManager::delegate_) { NotifyCallbacks(DownloadRequestManager::delegate_->ShouldAllowDownload()); - else + } else { dialog_delegate_ = DownloadRequestDialogDelegate::Create(tab, this); + // TODO(estade): the dialog delegate isn't yet implemented on linux. Just + // assume we shouldn't allow the download. + if (dialog_delegate_ == NULL) + NotifyCallbacks(false); + } } void DownloadRequestManager::TabDownloadState::Cancel() { |