summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/autofill_cc_infobar_delegate.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/autofill/autofill_cc_infobar_delegate.cc')
-rw-r--r--chrome/browser/autofill/autofill_cc_infobar_delegate.cc35
1 files changed, 12 insertions, 23 deletions
diff --git a/chrome/browser/autofill/autofill_cc_infobar_delegate.cc b/chrome/browser/autofill/autofill_cc_infobar_delegate.cc
index 6588c46..e3d29ac 100644
--- a/chrome/browser/autofill/autofill_cc_infobar_delegate.cc
+++ b/chrome/browser/autofill/autofill_cc_infobar_delegate.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 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.
@@ -9,12 +9,8 @@
#include "chrome/browser/autofill/autofill_cc_infobar.h"
#include "chrome/browser/autofill/autofill_manager.h"
#include "chrome/browser/browser_list.h"
-#include "chrome/browser/tab_contents/tab_contents.h"
-#include "chrome/browser/tab_contents/tab_contents_delegate.h"
-#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/resource/resource_bundle.h"
AutoFillCCInfoBarDelegate::AutoFillCCInfoBarDelegate(TabContents* tab_contents,
@@ -42,29 +38,26 @@ void AutoFillCCInfoBarDelegate::InfoBarClosed() {
delete this;
}
-string16 AutoFillCCInfoBarDelegate::GetMessageText() const {
- return l10n_util::GetStringUTF16(IDS_AUTOFILL_CC_INFOBAR_TEXT);
-}
-
SkBitmap* AutoFillCCInfoBarDelegate::GetIcon() const {
return ResourceBundle::GetSharedInstance().GetBitmapNamed(
IDR_INFOBAR_AUTOFILL);
}
+InfoBarDelegate::Type AutoFillCCInfoBarDelegate::GetInfoBarType() const {
+ return PAGE_ACTION_TYPE;
+}
+
+string16 AutoFillCCInfoBarDelegate::GetMessageText() const {
+ return l10n_util::GetStringUTF16(IDS_AUTOFILL_CC_INFOBAR_TEXT);
+}
+
int AutoFillCCInfoBarDelegate::GetButtons() const {
return BUTTON_OK | BUTTON_CANCEL;
}
-string16 AutoFillCCInfoBarDelegate::GetButtonLabel(
- ConfirmInfoBarDelegate::InfoBarButton button) const {
- if (button == BUTTON_OK)
- return l10n_util::GetStringUTF16(IDS_AUTOFILL_CC_INFOBAR_ACCEPT);
- else if (button == BUTTON_CANCEL)
- return l10n_util::GetStringUTF16(IDS_AUTOFILL_CC_INFOBAR_DENY);
- else
- NOTREACHED();
-
- return string16();
+string16 AutoFillCCInfoBarDelegate::GetButtonLabel(InfoBarButton button) const {
+ return l10n_util::GetStringUTF16((button == BUTTON_OK) ?
+ IDS_AUTOFILL_CC_INFOBAR_ACCEPT : IDS_AUTOFILL_CC_INFOBAR_DENY);
}
bool AutoFillCCInfoBarDelegate::Accept() {
@@ -101,7 +94,3 @@ InfoBar* AutoFillCCInfoBarDelegate::CreateInfoBar() {
return CreateAutofillCcInfoBar(this);
}
#endif // defined(OS_WIN)
-
-InfoBarDelegate::Type AutoFillCCInfoBarDelegate::GetInfoBarType() {
- return PAGE_ACTION_TYPE;
-}