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 <utility> |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 int expiration_month() const { return expiration_month_; } | 127 int expiration_month() const { return expiration_month_; } |
128 int expiration_year() const { return expiration_year_; } | 128 int expiration_year() const { return expiration_year_; } |
129 | 129 |
130 // These setters verify that the month and year are within appropriate | 130 // These setters verify that the month and year are within appropriate |
131 // ranges, or 0. They take integers as an alternative to setting the inputs | 131 // ranges, or 0. They take integers as an alternative to setting the inputs |
132 // from strings via SetInfo(). | 132 // from strings via SetInfo(). |
133 void SetExpirationMonth(int expiration_month); | 133 void SetExpirationMonth(int expiration_month); |
134 void SetExpirationYear(int expiration_year); | 134 void SetExpirationYear(int expiration_year); |
135 | 135 |
136 const std::string& server_id() const { return server_id_; } | 136 const std::string& server_id() const { return server_id_; } |
| 137 void set_server_id(const std::string& server_id) { server_id_ = server_id; } |
137 | 138 |
138 // For use in STL containers. | 139 // For use in STL containers. |
139 void operator=(const CreditCard& credit_card); | 140 void operator=(const CreditCard& credit_card); |
140 | 141 |
141 // If the card numbers for |this| and |imported_card| match, and merging the | 142 // If the card numbers for |this| and |imported_card| match, and merging the |
142 // two wouldn't result in unverified data overwriting verified data, | 143 // two wouldn't result in unverified data overwriting verified data, |
143 // overwrites |this| card's data with the data in |credit_card|. | 144 // overwrites |this| card's data with the data in |credit_card|. |
144 // Returns true if the card numbers match, false otherwise. | 145 // Returns true if the card numbers match, false otherwise. |
145 bool UpdateFromImportedCard(const CreditCard& imported_card, | 146 bool UpdateFromImportedCard(const CreditCard& imported_card, |
146 const std::string& app_locale) WARN_UNUSED_RESULT; | 147 const std::string& app_locale) WARN_UNUSED_RESULT; |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 extern const char kDiscoverCard[]; | 274 extern const char kDiscoverCard[]; |
274 extern const char kGenericCard[]; | 275 extern const char kGenericCard[]; |
275 extern const char kJCBCard[]; | 276 extern const char kJCBCard[]; |
276 extern const char kMasterCard[]; | 277 extern const char kMasterCard[]; |
277 extern const char kUnionPay[]; | 278 extern const char kUnionPay[]; |
278 extern const char kVisaCard[]; | 279 extern const char kVisaCard[]; |
279 | 280 |
280 } // namespace autofill | 281 } // namespace autofill |
281 | 282 |
282 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_H_ | 283 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_H_ |
OLD | NEW |