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> |
11 | 11 |
12 #include "base/string16.h" | 12 #include "base/string16.h" |
13 #include "chrome/browser/autofill/field_types.h" | 13 #include "chrome/browser/autofill/field_types.h" |
14 #include "chrome/browser/autofill/form_group.h" | 14 #include "chrome/browser/autofill/form_group.h" |
15 | 15 |
16 // A form group that stores credit card information. | 16 // A form group that stores credit card information. |
17 class CreditCard : public FormGroup { | 17 class CreditCard : public FormGroup { |
18 public: | 18 public: |
19 explicit CreditCard(const std::string& guid); | 19 explicit CreditCard(const std::string& guid); |
20 | 20 |
21 // For use in STL containers. | 21 // For use in STL containers. |
22 CreditCard(); | 22 CreditCard(); |
23 CreditCard(const CreditCard& credit_card); | 23 CreditCard(const CreditCard& credit_card); |
24 virtual ~CreditCard(); | 24 virtual ~CreditCard(); |
25 | 25 |
26 // FormGroup implementation: | 26 // FormGroup implementation: |
27 virtual string16 GetInfo(AutofillFieldType type) const OVERRIDE; | 27 virtual string16 GetRawInfo(AutofillFieldType type) const OVERRIDE; |
28 virtual void SetInfo(AutofillFieldType type, const string16& value) OVERRIDE; | 28 virtual void SetRawInfo(AutofillFieldType type, |
| 29 const string16& value) OVERRIDE; |
29 virtual string16 GetCanonicalizedInfo(AutofillFieldType type) const OVERRIDE; | 30 virtual string16 GetCanonicalizedInfo(AutofillFieldType type) const OVERRIDE; |
30 virtual bool SetCanonicalizedInfo(AutofillFieldType type, | 31 virtual bool SetCanonicalizedInfo(AutofillFieldType type, |
31 const string16& value) OVERRIDE; | 32 const string16& value) OVERRIDE; |
32 virtual void GetMatchingTypes(const string16& text, | 33 virtual void GetMatchingTypes(const string16& text, |
33 FieldTypeSet* matching_types) const OVERRIDE; | 34 FieldTypeSet* matching_types) const OVERRIDE; |
34 | 35 |
35 // Credit card preview summary, for example: ******1234, Exp: 01/2020 | 36 // Credit card preview summary, for example: ******1234, Exp: 01/2020 |
36 const string16 Label() const; | 37 const string16 Label() const; |
37 | 38 |
38 // Special method to set value for HTML5 month input type. | 39 // Special method to set value for HTML5 month input type. |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 extern const char* const kAmericanExpressCard; | 128 extern const char* const kAmericanExpressCard; |
128 extern const char* const kDinersCard; | 129 extern const char* const kDinersCard; |
129 extern const char* const kDiscoverCard; | 130 extern const char* const kDiscoverCard; |
130 extern const char* const kGenericCard; | 131 extern const char* const kGenericCard; |
131 extern const char* const kJCBCard; | 132 extern const char* const kJCBCard; |
132 extern const char* const kMasterCard; | 133 extern const char* const kMasterCard; |
133 extern const char* const kSoloCard; | 134 extern const char* const kSoloCard; |
134 extern const char* const kVisaCard; | 135 extern const char* const kVisaCard; |
135 | 136 |
136 #endif // CHROME_BROWSER_AUTOFILL_CREDIT_CARD_H_ | 137 #endif // CHROME_BROWSER_AUTOFILL_CREDIT_CARD_H_ |
OLD | NEW |