summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/download_request_infobar_delegate.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/download/download_request_infobar_delegate.cc')
-rw-r--r--chrome/browser/download/download_request_infobar_delegate.cc21
1 files changed, 10 insertions, 11 deletions
diff --git a/chrome/browser/download/download_request_infobar_delegate.cc b/chrome/browser/download/download_request_infobar_delegate.cc
index 417dfa4..5d4b618 100644
--- a/chrome/browser/download/download_request_infobar_delegate.cc
+++ b/chrome/browser/download/download_request_infobar_delegate.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -10,7 +10,8 @@
#include "grit/theme_resources.h"
#include "ui/base/resource/resource_bundle.h"
-DownloadRequestInfoBarDelegate::DownloadRequestInfoBarDelegate(TabContents* tab,
+DownloadRequestInfoBarDelegate::DownloadRequestInfoBarDelegate(
+ TabContents* tab,
DownloadRequestLimiter::TabDownloadState* host)
: ConfirmInfoBarDelegate(tab),
host_(host) {
@@ -27,25 +28,23 @@ void DownloadRequestInfoBarDelegate::InfoBarClosed() {
ConfirmInfoBarDelegate::InfoBarClosed();
}
-string16 DownloadRequestInfoBarDelegate::GetMessageText() const {
- return l10n_util::GetStringUTF16(IDS_MULTI_DOWNLOAD_WARNING);
-}
-
SkBitmap* DownloadRequestInfoBarDelegate::GetIcon() const {
return ResourceBundle::GetSharedInstance().GetBitmapNamed(
IDR_INFOBAR_MULTIPLE_DOWNLOADS);
}
+string16 DownloadRequestInfoBarDelegate::GetMessageText() const {
+ return l10n_util::GetStringUTF16(IDS_MULTI_DOWNLOAD_WARNING);
+}
+
int DownloadRequestInfoBarDelegate::GetButtons() const {
return BUTTON_OK | BUTTON_CANCEL;
}
string16 DownloadRequestInfoBarDelegate::GetButtonLabel(
- ConfirmInfoBarDelegate::InfoBarButton button) const {
- if (button == BUTTON_OK)
- return l10n_util::GetStringUTF16(IDS_MULTI_DOWNLOAD_WARNING_ALLOW);
- else
- return l10n_util::GetStringUTF16(IDS_MULTI_DOWNLOAD_WARNING_DENY);
+ InfoBarButton button) const {
+ return l10n_util::GetStringUTF16((button == BUTTON_OK) ?
+ IDS_MULTI_DOWNLOAD_WARNING_ALLOW : IDS_MULTI_DOWNLOAD_WARNING_DENY);
}
bool DownloadRequestInfoBarDelegate::Accept() {