| 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 COMPONENTS_AUTOFILL_BROWSER_CREDIT_CARD_H_ | 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_CREDIT_CARD_H_ |
| 6 #define COMPONENTS_AUTOFILL_BROWSER_CREDIT_CARD_H_ | 6 #define COMPONENTS_AUTOFILL_BROWSER_CREDIT_CARD_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" |
| 12 #include "base/string16.h" | 13 #include "base/string16.h" |
| 13 #include "components/autofill/browser/field_types.h" | 14 #include "components/autofill/browser/field_types.h" |
| 14 #include "components/autofill/browser/form_group.h" | 15 #include "components/autofill/browser/form_group.h" |
| 15 | 16 |
| 16 namespace autofill { | 17 namespace autofill { |
| 17 | 18 |
| 18 struct FormFieldData; | 19 struct FormFieldData; |
| 19 | 20 |
| 20 // A form group that stores credit card information. | 21 // A form group that stores credit card information. |
| 21 class CreditCard : public FormGroup { | 22 class AUTOFILL_EXPORT CreditCard : NON_EXPORTED_BASE(public FormGroup) { |
| 22 public: | 23 public: |
| 23 explicit CreditCard(const std::string& guid); | 24 explicit CreditCard(const std::string& guid); |
| 24 | 25 |
| 25 // For use in STL containers. | 26 // For use in STL containers. |
| 26 CreditCard(); | 27 CreditCard(); |
| 27 CreditCard(const CreditCard& credit_card); | 28 CreditCard(const CreditCard& credit_card); |
| 28 virtual ~CreditCard(); | 29 virtual ~CreditCard(); |
| 29 | 30 |
| 30 // Returns a version of |number| that has any separator characters removed. | 31 // Returns a version of |number| that has any separator characters removed. |
| 31 static const base::string16 StripSeparators(const base::string16& number); | 32 static const base::string16 StripSeparators(const base::string16& number); |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 141 |
| 141 // These members are zero if not present. | 142 // These members are zero if not present. |
| 142 int expiration_month_; | 143 int expiration_month_; |
| 143 int expiration_year_; | 144 int expiration_year_; |
| 144 | 145 |
| 145 // The guid of this credit card. | 146 // The guid of this credit card. |
| 146 std::string guid_; | 147 std::string guid_; |
| 147 }; | 148 }; |
| 148 | 149 |
| 149 // So we can compare CreditCards with EXPECT_EQ(). | 150 // So we can compare CreditCards with EXPECT_EQ(). |
| 150 std::ostream& operator<<(std::ostream& os, const CreditCard& credit_card); | 151 AUTOFILL_EXPORT std::ostream& operator<<(std::ostream& os, |
| 152 const CreditCard& credit_card); |
| 151 | 153 |
| 152 // The string identifiers for credit card icon resources. | 154 // The string identifiers for credit card icon resources. |
| 153 extern const char* const kAmericanExpressCard; | 155 extern const char* const kAmericanExpressCard; |
| 154 extern const char* const kDinersCard; | 156 extern const char* const kDinersCard; |
| 155 extern const char* const kDiscoverCard; | 157 extern const char* const kDiscoverCard; |
| 156 extern const char* const kGenericCard; | 158 extern const char* const kGenericCard; |
| 157 extern const char* const kJCBCard; | 159 extern const char* const kJCBCard; |
| 158 extern const char* const kMasterCard; | 160 extern const char* const kMasterCard; |
| 159 extern const char* const kSoloCard; | 161 extern const char* const kSoloCard; |
| 160 extern const char* const kVisaCard; | 162 extern const char* const kVisaCard; |
| 161 | 163 |
| 162 } // namespace autofill | 164 } // namespace autofill |
| 163 | 165 |
| 164 #endif // COMPONENTS_AUTOFILL_BROWSER_CREDIT_CARD_H_ | 166 #endif // COMPONENTS_AUTOFILL_BROWSER_CREDIT_CARD_H_ |
| OLD | NEW |