OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/autofill/core/browser/autofill_cc_infobar_delegate.h" | 5 #include "components/autofill/core/browser/autofill_cc_infobar_delegate.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "components/autofill/core/browser/autofill_client.h" | 8 #include "components/autofill/core/browser/autofill_client.h" |
9 #include "components/autofill/core/browser/credit_card.h" | 9 #include "components/autofill/core/browser/credit_card.h" |
10 #include "components/autofill/core/browser/personal_data_manager.h" | 10 #include "components/autofill/core/browser/personal_data_manager.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 } | 45 } |
46 | 46 |
47 void AutofillCCInfoBarDelegate::LogUserAction( | 47 void AutofillCCInfoBarDelegate::LogUserAction( |
48 AutofillMetrics::InfoBarMetric user_action) { | 48 AutofillMetrics::InfoBarMetric user_action) { |
49 DCHECK(!had_user_interaction_); | 49 DCHECK(!had_user_interaction_); |
50 | 50 |
51 AutofillMetrics::LogCreditCardInfoBarMetric(user_action); | 51 AutofillMetrics::LogCreditCardInfoBarMetric(user_action); |
52 had_user_interaction_ = true; | 52 had_user_interaction_ = true; |
53 } | 53 } |
54 | 54 |
| 55 std::string AutofillCCInfoBarDelegate::GetIdentifier() const { |
| 56 return "AutofillCCInfoBarDelegate"; |
| 57 } |
| 58 |
55 infobars::InfoBarDelegate::Type | 59 infobars::InfoBarDelegate::Type |
56 AutofillCCInfoBarDelegate::GetInfoBarType() const { | 60 AutofillCCInfoBarDelegate::GetInfoBarType() const { |
57 return PAGE_ACTION_TYPE; | 61 return PAGE_ACTION_TYPE; |
58 } | 62 } |
59 | 63 |
60 int AutofillCCInfoBarDelegate::GetIconId() const { | 64 int AutofillCCInfoBarDelegate::GetIconId() const { |
61 return IDR_INFOBAR_AUTOFILL_CC; | 65 return IDR_INFOBAR_AUTOFILL_CC; |
62 } | 66 } |
63 | 67 |
64 gfx::VectorIconId AutofillCCInfoBarDelegate::GetVectorIconId() const { | 68 gfx::VectorIconId AutofillCCInfoBarDelegate::GetVectorIconId() const { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 109 |
106 base::string16 AutofillCCInfoBarDelegate::GetLinkText() const { | 110 base::string16 AutofillCCInfoBarDelegate::GetLinkText() const { |
107 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); | 111 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); |
108 } | 112 } |
109 | 113 |
110 GURL AutofillCCInfoBarDelegate::GetLinkURL() const { | 114 GURL AutofillCCInfoBarDelegate::GetLinkURL() const { |
111 return GURL(kHelpURL); | 115 return GURL(kHelpURL); |
112 } | 116 } |
113 | 117 |
114 } // namespace autofill | 118 } // namespace autofill |
OLD | NEW |