| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_AUTOFILL_CREDIT_CARD_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_CREDIT_CARD_H_ |
| 6 #define CHROME_BROWSER_AUTOFILL_CREDIT_CARD_H_ | 6 #define CHROME_BROWSER_AUTOFILL_CREDIT_CARD_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // Credit card preview summary, for example: ******1234, Exp: 01/2020 | 48 // Credit card preview summary, for example: ******1234, Exp: 01/2020 |
| 49 const string16 Label() const; | 49 const string16 Label() const; |
| 50 | 50 |
| 51 // Special method to set value for HTML5 month input type. | 51 // Special method to set value for HTML5 month input type. |
| 52 void SetInfoForMonthInputType(const string16& value); | 52 void SetInfoForMonthInputType(const string16& value); |
| 53 | 53 |
| 54 // The number altered for display, for example: ******1234 | 54 // The number altered for display, for example: ******1234 |
| 55 string16 ObfuscatedNumber() const; | 55 string16 ObfuscatedNumber() const; |
| 56 // The last four digits of the credit card number. | 56 // The last four digits of the credit card number. |
| 57 string16 LastFourDigits() const; | 57 string16 LastFourDigits() const; |
| 58 // The user-visible type of the card, e.g. 'Mastercard'. |
| 59 string16 TypeForDisplay() const; |
| 60 // A label for this credit card formatted as 'Cardname - 2345'. |
| 61 string16 TypeAndLastFourDigits() const; |
| 62 // The ResourceBundle ID for the appropriate credit card image. |
| 63 int IconResourceId() const; |
| 58 | 64 |
| 59 const std::string& type() const { return type_; } | 65 const std::string& type() const { return type_; } |
| 60 | 66 |
| 61 // The guid is the primary identifier for |CreditCard| objects. | 67 // The guid is the primary identifier for |CreditCard| objects. |
| 62 // TODO(estade): remove this and just use GetGUID(). | 68 // TODO(estade): remove this and just use GetGUID(). |
| 63 const std::string guid() const { return guid_; } | 69 const std::string guid() const { return guid_; } |
| 64 void set_guid(const std::string& guid) { guid_ = guid; } | 70 void set_guid(const std::string& guid) { guid_ = guid; } |
| 65 | 71 |
| 66 // For use in STL containers. | 72 // For use in STL containers. |
| 67 void operator=(const CreditCard& credit_card); | 73 void operator=(const CreditCard& credit_card); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 extern const char* const kAmericanExpressCard; | 144 extern const char* const kAmericanExpressCard; |
| 139 extern const char* const kDinersCard; | 145 extern const char* const kDinersCard; |
| 140 extern const char* const kDiscoverCard; | 146 extern const char* const kDiscoverCard; |
| 141 extern const char* const kGenericCard; | 147 extern const char* const kGenericCard; |
| 142 extern const char* const kJCBCard; | 148 extern const char* const kJCBCard; |
| 143 extern const char* const kMasterCard; | 149 extern const char* const kMasterCard; |
| 144 extern const char* const kSoloCard; | 150 extern const char* const kSoloCard; |
| 145 extern const char* const kVisaCard; | 151 extern const char* const kVisaCard; |
| 146 | 152 |
| 147 #endif // CHROME_BROWSER_AUTOFILL_CREDIT_CARD_H_ | 153 #endif // CHROME_BROWSER_AUTOFILL_CREDIT_CARD_H_ |
| OLD | NEW |