| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 // the invalid card "4garbage" will be Visa, which has an IIN of 4. | 82 // the invalid card "4garbage" will be Visa, which has an IIN of 4. |
| 83 static const char* GetCreditCardType(const base::string16& number); | 83 static const char* GetCreditCardType(const base::string16& number); |
| 84 | 84 |
| 85 // Type strings are defined at the bottom of this file, e.g. kVisaCard. | 85 // Type strings are defined at the bottom of this file, e.g. kVisaCard. |
| 86 void SetTypeForMaskedCard(const char* type); | 86 void SetTypeForMaskedCard(const char* type); |
| 87 | 87 |
| 88 // Sets/gets the status of a server card. | 88 // Sets/gets the status of a server card. |
| 89 void SetServerStatus(ServerStatus status); | 89 void SetServerStatus(ServerStatus status); |
| 90 ServerStatus GetServerStatus() const; | 90 ServerStatus GetServerStatus() const; |
| 91 | 91 |
| 92 // Whether the card expiration date should be updated. |
| 93 bool ShouldUpdateExpiration() const; |
| 94 |
| 92 // FormGroup: | 95 // FormGroup: |
| 93 void GetMatchingTypes(const base::string16& text, | 96 void GetMatchingTypes(const base::string16& text, |
| 94 const std::string& app_locale, | 97 const std::string& app_locale, |
| 95 ServerFieldTypeSet* matching_types) const override; | 98 ServerFieldTypeSet* matching_types) const override; |
| 96 base::string16 GetRawInfo(ServerFieldType type) const override; | 99 base::string16 GetRawInfo(ServerFieldType type) const override; |
| 97 void SetRawInfo(ServerFieldType type, const base::string16& value) override; | 100 void SetRawInfo(ServerFieldType type, const base::string16& value) override; |
| 98 base::string16 GetInfo(const AutofillType& type, | 101 base::string16 GetInfo(const AutofillType& type, |
| 99 const std::string& app_locale) const override; | 102 const std::string& app_locale) const override; |
| 100 bool SetInfo(const AutofillType& type, | 103 bool SetInfo(const AutofillType& type, |
| 101 const base::string16& value, | 104 const base::string16& value, |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 extern const char kDiscoverCard[]; | 255 extern const char kDiscoverCard[]; |
| 253 extern const char kGenericCard[]; | 256 extern const char kGenericCard[]; |
| 254 extern const char kJCBCard[]; | 257 extern const char kJCBCard[]; |
| 255 extern const char kMasterCard[]; | 258 extern const char kMasterCard[]; |
| 256 extern const char kUnionPay[]; | 259 extern const char kUnionPay[]; |
| 257 extern const char kVisaCard[]; | 260 extern const char kVisaCard[]; |
| 258 | 261 |
| 259 } // namespace autofill | 262 } // namespace autofill |
| 260 | 263 |
| 261 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_H_ | 264 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_H_ |
| OLD | NEW |