summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/download_request_infobar_delegate.cc
diff options
context:
space:
mode:
authorinferno@chromium.org <inferno@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-29 18:41:48 +0000
committerinferno@chromium.org <inferno@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-29 18:41:48 +0000
commita4760beef9fef6c7610402b193e97a60583bc2f4 (patch)
tree2b891272788b45912653aa55210cc5bc55b526b1 /chrome/browser/download/download_request_infobar_delegate.cc
parentd796895126b31aeb7b29136feccf36d967abf02e (diff)
downloadchromium_src-a4760beef9fef6c7610402b193e97a60583bc2f4.zip
chromium_src-a4760beef9fef6c7610402b193e97a60583bc2f4.tar.gz
chromium_src-a4760beef9fef6c7610402b193e97a60583bc2f4.tar.bz2
Patch the Browser GDI crash with excessive downloads by restricting maximum number of downloads allowed at one time. When this limit is reached, we re-prompt the user.
BUG=39277 TEST=None Review URL: http://codereview.chromium.org/1417001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42971 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/download_request_infobar_delegate.cc')
-rw-r--r--chrome/browser/download/download_request_infobar_delegate.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/download/download_request_infobar_delegate.cc b/chrome/browser/download/download_request_infobar_delegate.cc
index 3a6aa5d..88c83fc 100644
--- a/chrome/browser/download/download_request_infobar_delegate.cc
+++ b/chrome/browser/download/download_request_infobar_delegate.cc
@@ -51,9 +51,9 @@ std::wstring DownloadRequestInfoBarDelegate::GetButtonLabel(
bool DownloadRequestInfoBarDelegate::Accept() {
if (host_) {
host_->Accept();
- host_ = NULL;
}
- return true;
+ // Accept() call will nullify host_ if no furthur prompts are required.
+ return !host_;
}
bool DownloadRequestInfoBarDelegate::Cancel() {