| Index: chrome/browser/autofill/autofill_cc_infobar_delegate.cc
|
| ===================================================================
|
| --- chrome/browser/autofill/autofill_cc_infobar_delegate.cc (revision 71863)
|
| +++ chrome/browser/autofill/autofill_cc_infobar_delegate.cc (working copy)
|
| @@ -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.
|
|
|
| @@ -10,12 +10,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"
|
|
|
| AutoFillCCInfoBarDelegate::AutoFillCCInfoBarDelegate(TabContents* tab_contents,
|
| AutoFillManager* host)
|
| @@ -42,29 +38,26 @@
|
| 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 @@
|
| return CreateAutofillCcInfoBar(this);
|
| }
|
| #endif // defined(OS_WIN)
|
| -
|
| -InfoBarDelegate::Type AutoFillCCInfoBarDelegate::GetInfoBarType() {
|
| - return PAGE_ACTION_TYPE;
|
| -}
|
|
|