| 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 <vector> | 11 #include <vector> |
| 11 | 12 |
| 12 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 13 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
| 14 #include "components/autofill/core/browser/autofill_data_model.h" | 15 #include "components/autofill/core/browser/autofill_data_model.h" |
| 15 | 16 |
| 16 namespace autofill { | 17 namespace autofill { |
| 17 | 18 |
| 18 // A form group that stores credit card information. | 19 // A form group that stores credit card information. |
| 19 class CreditCard : public AutofillDataModel { | 20 class CreditCard : public AutofillDataModel { |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 const std::string& app_locale, | 88 const std::string& app_locale, |
| 88 ServerFieldTypeSet* matching_types) const override; | 89 ServerFieldTypeSet* matching_types) const override; |
| 89 base::string16 GetRawInfo(ServerFieldType type) const override; | 90 base::string16 GetRawInfo(ServerFieldType type) const override; |
| 90 void SetRawInfo(ServerFieldType type, const base::string16& value) override; | 91 void SetRawInfo(ServerFieldType type, const base::string16& value) override; |
| 91 base::string16 GetInfo(const AutofillType& type, | 92 base::string16 GetInfo(const AutofillType& type, |
| 92 const std::string& app_locale) const override; | 93 const std::string& app_locale) const override; |
| 93 bool SetInfo(const AutofillType& type, | 94 bool SetInfo(const AutofillType& type, |
| 94 const base::string16& value, | 95 const base::string16& value, |
| 95 const std::string& app_locale) override; | 96 const std::string& app_locale) override; |
| 96 | 97 |
| 97 // Credit card preview summary, for example: Visa - 1234, Exp: 01/2020 | 98 // Credit card preview summary, for example: "Visa - 1234", ", 01/2020". |
| 98 // Used for settings and the requestAutocomplete dialog, but not | 99 const std::pair<base::string16, base::string16> LabelPieces() const; |
| 99 // the autofill dropdown. | 100 |
| 101 // Like LabelPieces, but appends the two pieces together. |
| 100 const base::string16 Label() const; | 102 const base::string16 Label() const; |
| 101 | 103 |
| 102 // Special method to set value for HTML5 month input type. | 104 // Special method to set value for HTML5 month input type. |
| 103 void SetInfoForMonthInputType(const base::string16& value); | 105 void SetInfoForMonthInputType(const base::string16& value); |
| 104 | 106 |
| 105 // The last four digits of the credit card number (or possibly less if there | 107 // The last four digits of the credit card number (or possibly less if there |
| 106 // aren't enough characters). | 108 // aren't enough characters). |
| 107 base::string16 LastFourDigits() const; | 109 base::string16 LastFourDigits() const; |
| 108 // The user-visible type of the card, e.g. 'Mastercard'. | 110 // The user-visible type of the card, e.g. 'Mastercard'. |
| 109 base::string16 TypeForDisplay() const; | 111 base::string16 TypeForDisplay() const; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 extern const char* const kDiscoverCard; | 228 extern const char* const kDiscoverCard; |
| 227 extern const char* const kGenericCard; | 229 extern const char* const kGenericCard; |
| 228 extern const char* const kJCBCard; | 230 extern const char* const kJCBCard; |
| 229 extern const char* const kMasterCard; | 231 extern const char* const kMasterCard; |
| 230 extern const char* const kUnionPay; | 232 extern const char* const kUnionPay; |
| 231 extern const char* const kVisaCard; | 233 extern const char* const kVisaCard; |
| 232 | 234 |
| 233 } // namespace autofill | 235 } // namespace autofill |
| 234 | 236 |
| 235 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_H_ | 237 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_H_ |
| OLD | NEW |