| 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" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 void set_expiration_year(int expiration_year); | 83 void set_expiration_year(int expiration_year); |
| 84 | 84 |
| 85 // Credit card preview summary, for example: ******1234, Exp: 01/2020 | 85 // Credit card preview summary, for example: ******1234, Exp: 01/2020 |
| 86 std::wstring PreviewSummary() const; | 86 std::wstring PreviewSummary() const; |
| 87 | 87 |
| 88 // For use in STL containers. | 88 // For use in STL containers. |
| 89 void operator=(const CreditCard&); | 89 void operator=(const CreditCard&); |
| 90 | 90 |
| 91 // Used by tests. | 91 // Used by tests. |
| 92 bool operator==(const CreditCard& creditcard) const; | 92 bool operator==(const CreditCard& creditcard) const; |
| 93 bool operator!=(const CreditCard& creditcard) const; |
| 93 void set_label(const string16& label) { label_ = label; } | 94 void set_label(const string16& label) { label_ = label; } |
| 94 | 95 |
| 95 private: | 96 private: |
| 96 // A helper function for FindInfoMatches that only handles matching the info | 97 // A helper function for FindInfoMatches that only handles matching the info |
| 97 // with the requested field type. | 98 // with the requested field type. |
| 98 bool FindInfoMatchesHelper(const AutoFillFieldType& field_type, | 99 bool FindInfoMatchesHelper(const AutoFillFieldType& field_type, |
| 99 const string16& info, | 100 const string16& info, |
| 100 string16* match) const; | 101 string16* match) const; |
| 101 | 102 |
| 102 // Returns true if |text| matches the name on the card. The comparison is | 103 // Returns true if |text| matches the name on the card. The comparison is |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 string16 shipping_address_; | 154 string16 shipping_address_; |
| 154 | 155 |
| 155 // The unique ID of this profile. | 156 // The unique ID of this profile. |
| 156 int unique_id_; | 157 int unique_id_; |
| 157 }; | 158 }; |
| 158 | 159 |
| 159 // So we can compare CreditCards with EXPECT_EQ(). | 160 // So we can compare CreditCards with EXPECT_EQ(). |
| 160 std::ostream& operator<<(std::ostream& os, const CreditCard& creditcard); | 161 std::ostream& operator<<(std::ostream& os, const CreditCard& creditcard); |
| 161 | 162 |
| 162 #endif // CHROME_BROWSER_AUTOFILL_CREDIT_CARD_H_ | 163 #endif // CHROME_BROWSER_AUTOFILL_CREDIT_CARD_H_ |
| OLD | NEW |