Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(408)

Side by Side Diff: components/autofill/core/browser/autofill_cc_infobar_delegate.cc

Issue 1520543004: Add method for identifying different InfoBars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698