OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_H_ |
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
102 // Special method to set value for HTML5 month input type. | 102 // Special method to set value for HTML5 month input type. |
103 void SetInfoForMonthInputType(const base::string16& value); | 103 void SetInfoForMonthInputType(const base::string16& value); |
104 | 104 |
105 // The last four digits of the credit card number (or possibly less if there | 105 // The last four digits of the credit card number (or possibly less if there |
106 // aren't enough characters). | 106 // aren't enough characters). |
107 base::string16 LastFourDigits() const; | 107 base::string16 LastFourDigits() const; |
108 // The user-visible type of the card, e.g. 'Mastercard'. | 108 // The user-visible type of the card, e.g. 'Mastercard'. |
109 base::string16 TypeForDisplay() const; | 109 base::string16 TypeForDisplay() const; |
110 // A label for this credit card formatted as 'Cardname - 2345'. | 110 // A label for this credit card formatted as 'Cardname - 2345'. |
111 base::string16 TypeAndLastFourDigits() const; | 111 base::string16 TypeAndLastFourDigits() const; |
112 // A lable for this credit card formatted as 'Chase - 2345'. | |
Jared Saul
2017/02/23 19:23:33
s/lable/label
Shanfeng
2017/02/28 19:22:21
Done.
| |
113 base::string16 BankNameAndLastFourDigits() const; | |
112 | 114 |
113 // Localized expiration for this credit card formatted as 'Exp: 06/17'. | 115 // Localized expiration for this credit card formatted as 'Exp: 06/17'. |
114 base::string16 AbbreviatedExpirationDateForDisplay() const; | 116 base::string16 AbbreviatedExpirationDateForDisplay() const; |
115 | 117 |
116 const std::string& type() const { return type_; } | 118 const std::string& type() const { return type_; } |
117 | 119 |
120 const base::string16& bank_name() const { return bank_name_; } | |
121 void SetBankName(const base::string16& bank_name) { | |
122 bank_name_ = bank_name; | |
123 } | |
124 | |
118 int expiration_month() const { return expiration_month_; } | 125 int expiration_month() const { return expiration_month_; } |
119 int expiration_year() const { return expiration_year_; } | 126 int expiration_year() const { return expiration_year_; } |
120 | 127 |
121 // These setters verify that the month and year are within appropriate | 128 // These setters verify that the month and year are within appropriate |
122 // ranges, or 0. They take integers as an alternative to setting the inputs | 129 // ranges, or 0. They take integers as an alternative to setting the inputs |
123 // from strings via SetInfo(). | 130 // from strings via SetInfo(). |
124 void SetExpirationMonth(int expiration_month); | 131 void SetExpirationMonth(int expiration_month); |
125 void SetExpirationYear(int expiration_year); | 132 void SetExpirationYear(int expiration_year); |
126 | 133 |
127 const std::string& server_id() const { return server_id_; } | 134 const std::string& server_id() const { return server_id_; } |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
233 // See enum definition above. | 240 // See enum definition above. |
234 RecordType record_type_; | 241 RecordType record_type_; |
235 | 242 |
236 // The credit card number. For MASKED_SERVER_CARDs, this number will | 243 // The credit card number. For MASKED_SERVER_CARDs, this number will |
237 // just contain the last four digits of the card number. | 244 // just contain the last four digits of the card number. |
238 base::string16 number_; | 245 base::string16 number_; |
239 | 246 |
240 // The cardholder's name. May be empty. | 247 // The cardholder's name. May be empty. |
241 base::string16 name_on_card_; | 248 base::string16 name_on_card_; |
242 | 249 |
250 // The issuer bank name of the card. | |
251 base::string16 bank_name_; | |
252 | |
243 // The type of the card. This is one of the k...Card constants below. | 253 // The type of the card. This is one of the k...Card constants below. |
244 std::string type_; | 254 std::string type_; |
245 | 255 |
246 // These members are zero if not present. | 256 // These members are zero if not present. |
247 int expiration_month_; | 257 int expiration_month_; |
248 int expiration_year_; | 258 int expiration_year_; |
249 | 259 |
250 // For server cards (both MASKED and UNMASKED) this is the ID assigned by the | 260 // For server cards (both MASKED and UNMASKED) this is the ID assigned by the |
251 // server to uniquely identify this card. | 261 // server to uniquely identify this card. |
252 std::string server_id_; | 262 std::string server_id_; |
(...skipping 16 matching lines...) Expand all Loading... | |
269 extern const char kGenericCard[]; | 279 extern const char kGenericCard[]; |
270 extern const char kJCBCard[]; | 280 extern const char kJCBCard[]; |
271 extern const char kMasterCard[]; | 281 extern const char kMasterCard[]; |
272 extern const char kMirCard[]; | 282 extern const char kMirCard[]; |
273 extern const char kUnionPay[]; | 283 extern const char kUnionPay[]; |
274 extern const char kVisaCard[]; | 284 extern const char kVisaCard[]; |
275 | 285 |
276 } // namespace autofill | 286 } // namespace autofill |
277 | 287 |
278 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_H_ | 288 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_H_ |
OLD | NEW |