Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1296)

Unified Diff: components/autofill/core/browser/credit_card.h

Issue 870203002: Add status to server credit cards. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add TODO Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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().
« no previous file with comments | « chrome/browser/ui/autofill/card_unmask_prompt_controller_impl.cc ('k') | components/autofill/core/browser/credit_card.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698