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

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

Issue 772253003: Create an autofill Suggestion class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 6 years 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 311d7846bec6ee35524901e15ad2e62e8d10b224..63a9ba59fed7ed02e7d796ec4eb421c5bc0ff407 100644
--- a/components/autofill/core/browser/credit_card.h
+++ b/components/autofill/core/browser/credit_card.h
@@ -37,6 +37,10 @@ class CreditCard : public AutofillDataModel {
int expiration_month,
int expiration_year);
+ // Creates a wallet card. This sets the wallet-specific records. To set the
+ // rest, use SetRawInfo like a normal card.
+ CreditCard(const std::string& wallet_id, RecordType type);
+
// For use in STL containers.
CreditCard();
CreditCard(const CreditCard& credit_card);
@@ -97,6 +101,8 @@ class CreditCard : public AutofillDataModel {
int expiration_month() const { return expiration_month_; }
int expiration_year() const { return expiration_year_; }
+ const std::string& wallet_id() const { return wallet_id_; }
+
// For use in STL containers.
void operator=(const CreditCard& credit_card);
@@ -180,6 +186,10 @@ class CreditCard : public AutofillDataModel {
// These members are zero if not present.
int expiration_month_;
int expiration_year_;
+
+ // For wallet cards (both MASKED and UNMASKED) this is the ID assigned by the
+ // server to uniquely identify this card.
+ std::string wallet_id_;
};
// So we can compare CreditCards with EXPECT_EQ().
« no previous file with comments | « components/autofill/core/browser/autofill_sync_constants.cc ('k') | components/autofill/core/browser/credit_card.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698