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

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

Issue 2085133003: Add billing address to credit cards. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 6 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.cc
diff --git a/components/autofill/core/browser/credit_card.cc b/components/autofill/core/browser/credit_card.cc
index 1503a437d38f38996a4dd88a084f9ee46c89851b..77800cac4a0d312f5945dc8b0550968090e8a3d1 100644
--- a/components/autofill/core/browser/credit_card.cc
+++ b/components/autofill/core/browser/credit_card.cc
@@ -522,6 +522,7 @@ void CreditCard::operator=(const CreditCard& credit_card) {
expiration_year_ = credit_card.expiration_year_;
server_id_ = credit_card.server_id_;
server_status_ = credit_card.server_status_;
+ billing_address_id_ = credit_card.billing_address_id_;
set_guid(credit_card.guid());
set_origin(credit_card.origin());
@@ -585,6 +586,10 @@ int CreditCard::Compare(const CreditCard& credit_card) const {
if (comparison != 0)
return comparison;
+ comparison = billing_address_id_.compare(credit_card.billing_address_id_);
+ if (comparison != 0)
+ return comparison;
+
if (static_cast<int>(server_status_) <
static_cast<int>(credit_card.server_status_))
return -1;

Powered by Google App Engine
This is Rietveld 408576698