OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
11 #include "chrome/browser/autofill/form_group.h" | 11 #include "chrome/browser/autofill/form_group.h" |
12 | 12 |
13 // A form group that stores credit card information. | 13 // A form group that stores credit card information. |
14 class CreditCard : public FormGroup { | 14 class CreditCard : public FormGroup { |
15 public: | 15 public: |
16 CreditCard(const string16& label, int unique_id); | 16 CreditCard(const string16& label, int unique_id); |
17 // For use in STL containers. | 17 // For use in STL containers. |
18 CreditCard(const CreditCard& card); | 18 CreditCard(const CreditCard& card); |
| 19 CreditCard(); |
19 | 20 |
20 // FormGroup implementation: | 21 // FormGroup implementation: |
21 FormGroup* Clone() const; | 22 FormGroup* Clone() const; |
22 virtual void GetPossibleFieldTypes(const string16& text, | 23 virtual void GetPossibleFieldTypes(const string16& text, |
23 FieldTypeSet* possible_types) const; | 24 FieldTypeSet* possible_types) const; |
24 virtual void FindInfoMatches(const AutoFillType& type, | 25 virtual void FindInfoMatches(const AutoFillType& type, |
25 const string16& info, | 26 const string16& info, |
26 std::vector<string16>* matched_text) const; | 27 std::vector<string16>* matched_text) const; |
27 virtual string16 GetFieldText(const AutoFillType& type) const; | 28 virtual string16 GetFieldText(const AutoFillType& type) const; |
28 virtual string16 GetPreviewText(const AutoFillType& type) const; | 29 virtual string16 GetPreviewText(const AutoFillType& type) const; |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 string16 shipping_address_; | 150 string16 shipping_address_; |
150 | 151 |
151 // The unique ID of this profile. | 152 // The unique ID of this profile. |
152 int unique_id_; | 153 int unique_id_; |
153 }; | 154 }; |
154 | 155 |
155 // So we can compare CreditCards with EXPECT_EQ(). | 156 // So we can compare CreditCards with EXPECT_EQ(). |
156 std::ostream& operator<<(std::ostream& os, const CreditCard& creditcard); | 157 std::ostream& operator<<(std::ostream& os, const CreditCard& creditcard); |
157 | 158 |
158 #endif // CHROME_BROWSER_AUTOFILL_CREDIT_CARD_H_ | 159 #endif // CHROME_BROWSER_AUTOFILL_CREDIT_CARD_H_ |
OLD | NEW |