| Index: chrome/browser/download/download_request_infobar_delegate.cc
|
| ===================================================================
|
| --- chrome/browser/download/download_request_infobar_delegate.cc (revision 175396)
|
| +++ chrome/browser/download/download_request_infobar_delegate.cc (working copy)
|
| @@ -10,6 +10,19 @@
|
| #include "ui/base/l10n/l10n_util.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
|
|
| +DownloadRequestInfoBarDelegate::~DownloadRequestInfoBarDelegate() {
|
| + if (host_)
|
| + host_->Cancel();
|
| +}
|
| +
|
| +// static
|
| +void DownloadRequestInfoBarDelegate::Create(
|
| + InfoBarService* infobar_service,
|
| + DownloadRequestLimiter::TabDownloadState* host) {
|
| + infobar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>(
|
| + new DownloadRequestInfoBarDelegate(infobar_service, host)));
|
| +}
|
| +
|
| DownloadRequestInfoBarDelegate::DownloadRequestInfoBarDelegate(
|
| InfoBarService* infobar_service,
|
| DownloadRequestLimiter::TabDownloadState* host)
|
| @@ -17,11 +30,6 @@
|
| host_(host) {
|
| }
|
|
|
| -DownloadRequestInfoBarDelegate::~DownloadRequestInfoBarDelegate() {
|
| - if (host_)
|
| - host_->Cancel();
|
| -}
|
| -
|
| gfx::Image* DownloadRequestInfoBarDelegate::GetIcon() const {
|
| return &ResourceBundle::GetSharedInstance().GetNativeImageNamed(
|
| IDR_INFOBAR_MULTIPLE_DOWNLOADS);
|
|
|