diff options
Diffstat (limited to 'chrome/browser/download/download_request_infobar_delegate.cc')
-rw-r--r-- | chrome/browser/download/download_request_infobar_delegate.cc | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/chrome/browser/download/download_request_infobar_delegate.cc b/chrome/browser/download/download_request_infobar_delegate.cc index 1601b9f..4d39ad3 100644 --- a/chrome/browser/download/download_request_infobar_delegate.cc +++ b/chrome/browser/download/download_request_infobar_delegate.cc @@ -15,15 +15,14 @@ DownloadRequestInfoBarDelegate::DownloadRequestInfoBarDelegate( DownloadRequestLimiter::TabDownloadState* host) : ConfirmInfoBarDelegate(tab), host_(host) { - if (tab) - tab->AddInfoBar(this); } DownloadRequestInfoBarDelegate::~DownloadRequestInfoBarDelegate() { } void DownloadRequestInfoBarDelegate::InfoBarClosed() { - Cancel(); + if (host_) + host_->Cancel(); // This will delete us. ConfirmInfoBarDelegate::InfoBarClosed(); } @@ -51,11 +50,3 @@ bool DownloadRequestInfoBarDelegate::Accept() { return !host_; } - -bool DownloadRequestInfoBarDelegate::Cancel() { - if (host_) { - host_->Cancel(); - host_ = NULL; - } - return true; -} |