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

Side by Side Diff: components/autofill/core/browser/credit_card.h

Issue 2711543002: Experiment to add bank name in autofill ui. (Closed)
Patch Set: add more unit test Created 3 years, 10 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 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 112
113 // Localized expiration for this credit card formatted as 'Exp: 06/17'. 113 // Localized expiration for this credit card formatted as 'Exp: 06/17'.
114 base::string16 AbbreviatedExpirationDateForDisplay() const; 114 base::string16 AbbreviatedExpirationDateForDisplay() const;
115 115
116 const std::string& type() const { return type_; } 116 const std::string& type() const { return type_; }
117 117
118 const base::string16& bank_name() const { return bank_name_; }
119 void SetBankName(const base::string16& bank_name) {
120 bank_name_ = bank_name;
121 }
122
118 int expiration_month() const { return expiration_month_; } 123 int expiration_month() const { return expiration_month_; }
119 int expiration_year() const { return expiration_year_; } 124 int expiration_year() const { return expiration_year_; }
120 125
121 // These setters verify that the month and year are within appropriate 126 // 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 127 // ranges, or 0. They take integers as an alternative to setting the inputs
123 // from strings via SetInfo(). 128 // from strings via SetInfo().
124 void SetExpirationMonth(int expiration_month); 129 void SetExpirationMonth(int expiration_month);
125 void SetExpirationYear(int expiration_year); 130 void SetExpirationYear(int expiration_year);
126 131
127 const std::string& server_id() const { return server_id_; } 132 const std::string& server_id() const { return server_id_; }
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 // See enum definition above. 238 // See enum definition above.
234 RecordType record_type_; 239 RecordType record_type_;
235 240
236 // The credit card number. For MASKED_SERVER_CARDs, this number will 241 // The credit card number. For MASKED_SERVER_CARDs, this number will
237 // just contain the last four digits of the card number. 242 // just contain the last four digits of the card number.
238 base::string16 number_; 243 base::string16 number_;
239 244
240 // The cardholder's name. May be empty. 245 // The cardholder's name. May be empty.
241 base::string16 name_on_card_; 246 base::string16 name_on_card_;
242 247
248 // The issuer bank name of the card.
249 base::string16 bank_name_;
250
243 // The type of the card. This is one of the k...Card constants below. 251 // The type of the card. This is one of the k...Card constants below.
244 std::string type_; 252 std::string type_;
245 253
246 // These members are zero if not present. 254 // These members are zero if not present.
247 int expiration_month_; 255 int expiration_month_;
248 int expiration_year_; 256 int expiration_year_;
249 257
250 // For server cards (both MASKED and UNMASKED) this is the ID assigned by the 258 // For server cards (both MASKED and UNMASKED) this is the ID assigned by the
251 // server to uniquely identify this card. 259 // server to uniquely identify this card.
252 std::string server_id_; 260 std::string server_id_;
(...skipping 16 matching lines...) Expand all
269 extern const char kGenericCard[]; 277 extern const char kGenericCard[];
270 extern const char kJCBCard[]; 278 extern const char kJCBCard[];
271 extern const char kMasterCard[]; 279 extern const char kMasterCard[];
272 extern const char kMirCard[]; 280 extern const char kMirCard[];
273 extern const char kUnionPay[]; 281 extern const char kUnionPay[];
274 extern const char kVisaCard[]; 282 extern const char kVisaCard[];
275 283
276 } // namespace autofill 284 } // namespace autofill
277 285
278 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_H_ 286 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698