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

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: Nit again Created 4 years, 11 months 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 "build/build_config.h" 8 #include "build/build_config.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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 54
55 void AutofillCCInfoBarDelegate::LogUserAction( 55 void AutofillCCInfoBarDelegate::LogUserAction(
56 AutofillMetrics::InfoBarMetric user_action) { 56 AutofillMetrics::InfoBarMetric user_action) {
57 DCHECK(!had_user_interaction_); 57 DCHECK(!had_user_interaction_);
58 58
59 AutofillMetrics::LogCreditCardInfoBarMetric(user_action); 59 AutofillMetrics::LogCreditCardInfoBarMetric(user_action);
60 had_user_interaction_ = true; 60 had_user_interaction_ = true;
61 } 61 }
62 62
63 infobars::InfoBarDelegate::InfoBarIdentifier
64 AutofillCCInfoBarDelegate::GetIdentifier() const {
65 return AUTOFILL_CC_INFOBAR_DELEGATE;
66 }
67
63 infobars::InfoBarDelegate::Type 68 infobars::InfoBarDelegate::Type
64 AutofillCCInfoBarDelegate::GetInfoBarType() const { 69 AutofillCCInfoBarDelegate::GetInfoBarType() const {
65 return PAGE_ACTION_TYPE; 70 return PAGE_ACTION_TYPE;
66 } 71 }
67 72
68 int AutofillCCInfoBarDelegate::GetIconId() const { 73 int AutofillCCInfoBarDelegate::GetIconId() const {
69 return IDR_INFOBAR_AUTOFILL_CC; 74 return IDR_INFOBAR_AUTOFILL_CC;
70 } 75 }
71 76
72 gfx::VectorIconId AutofillCCInfoBarDelegate::GetVectorIconId() const { 77 gfx::VectorIconId AutofillCCInfoBarDelegate::GetVectorIconId() const {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 121
117 base::string16 AutofillCCInfoBarDelegate::GetLinkText() const { 122 base::string16 AutofillCCInfoBarDelegate::GetLinkText() const {
118 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); 123 return l10n_util::GetStringUTF16(IDS_LEARN_MORE);
119 } 124 }
120 125
121 GURL AutofillCCInfoBarDelegate::GetLinkURL() const { 126 GURL AutofillCCInfoBarDelegate::GetLinkURL() const {
122 return GURL(kHelpURL); 127 return GURL(kHelpURL);
123 } 128 }
124 129
125 } // namespace autofill 130 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_cc_infobar_delegate.h ('k') | components/infobars/core/infobar_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698