OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_save_card_infobar_delegate_m
obile.h" | 5 #include "components/autofill/core/browser/autofill_save_card_infobar_delegate_m
obile.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 const base::Closure& save_card_callback) | 28 const base::Closure& save_card_callback) |
29 : ConfirmInfoBarDelegate(), | 29 : ConfirmInfoBarDelegate(), |
30 upload_(upload), | 30 upload_(upload), |
31 save_card_callback_(save_card_callback), | 31 save_card_callback_(save_card_callback), |
32 had_user_interaction_(false), | 32 had_user_interaction_(false), |
33 #if defined(OS_IOS) | 33 #if defined(OS_IOS) |
34 // TODO(jdonnelly): Use credit card issuer images on iOS. | 34 // TODO(jdonnelly): Use credit card issuer images on iOS. |
35 // http://crbug.com/535784 | 35 // http://crbug.com/535784 |
36 issuer_icon_id_(kNoIconID), | 36 issuer_icon_id_(kNoIconID), |
37 #else | 37 #else |
38 issuer_icon_id_(CreditCard::IconResourceId(card.type())), | 38 issuer_icon_id_(CreditCard::IconResourceId(card.network())), |
39 #endif | 39 #endif |
40 card_label_(base::string16(kMidlineEllipsis) + card.LastFourDigits()), | 40 card_label_(base::string16(kMidlineEllipsis) + card.LastFourDigits()), |
41 card_sub_label_(card.AbbreviatedExpirationDateForDisplay()) { | 41 card_sub_label_(card.AbbreviatedExpirationDateForDisplay()) { |
42 if (legal_message) | 42 if (legal_message) |
43 LegalMessageLine::Parse(*legal_message, &legal_messages_); | 43 LegalMessageLine::Parse(*legal_message, &legal_messages_); |
44 | 44 |
45 AutofillMetrics::LogCreditCardInfoBarMetric(AutofillMetrics::INFOBAR_SHOWN, | 45 AutofillMetrics::LogCreditCardInfoBarMetric(AutofillMetrics::INFOBAR_SHOWN, |
46 upload_); | 46 upload_); |
47 } | 47 } |
48 | 48 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 void AutofillSaveCardInfoBarDelegateMobile::LogUserAction( | 119 void AutofillSaveCardInfoBarDelegateMobile::LogUserAction( |
120 AutofillMetrics::InfoBarMetric user_action) { | 120 AutofillMetrics::InfoBarMetric user_action) { |
121 DCHECK(!had_user_interaction_); | 121 DCHECK(!had_user_interaction_); |
122 | 122 |
123 AutofillMetrics::LogCreditCardInfoBarMetric(user_action, upload_); | 123 AutofillMetrics::LogCreditCardInfoBarMetric(user_action, upload_); |
124 had_user_interaction_ = true; | 124 had_user_interaction_ = true; |
125 } | 125 } |
126 | 126 |
127 } // namespace autofill | 127 } // namespace autofill |
OLD | NEW |