Index: components/autofill/core/browser/credit_card.h |
diff --git a/components/autofill/core/browser/credit_card.h b/components/autofill/core/browser/credit_card.h |
index 181001c48d839b8f0d5bf92146b263007e3d4989..d8eda0a9b9414e052d24384fede29421fefacb3d 100644 |
--- a/components/autofill/core/browser/credit_card.h |
+++ b/components/autofill/core/browser/credit_card.h |
@@ -33,6 +33,12 @@ class CreditCard : public AutofillDataModel { |
FULL_SERVER_CARD, |
}; |
+ // The status of this credit card. Only used for server cards. |
+ enum ServerStatus { |
+ EXPIRED, |
+ OK, |
+ }; |
+ |
CreditCard(const std::string& guid, const std::string& origin); |
CreditCard(const base::string16& card_number, |
int expiration_month, |
@@ -72,6 +78,10 @@ class CreditCard : public AutofillDataModel { |
// Type strings are defined at the bottom of this file, e.g. kVisaCard. |
void SetTypeForMaskedCard(const char* type); |
+ // Sets/gets the status of a server card. |
+ void SetServerStatus(ServerStatus status); |
+ ServerStatus GetServerStatus() const; |
+ |
// FormGroup: |
void GetMatchingTypes(const base::string16& text, |
const std::string& app_locale, |
@@ -199,6 +209,10 @@ class CreditCard : public AutofillDataModel { |
// For server cards (both MASKED and UNMASKED) this is the ID assigned by the |
// server to uniquely identify this card. |
std::string server_id_; |
+ |
+ // The status of the card, as reported by the server. Not valid for local |
+ // cards. |
+ ServerStatus server_status_; |
}; |
// So we can compare CreditCards with EXPECT_EQ(). |