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

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

Issue 791053009: Make IsLocalDuplicateOfServerCard separator-insensitive (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | components/autofill/core/browser/credit_card_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8cfc8b2505d29f4552dc5eae22d2ee57cfaefb7c..4dced274efd3780071beb3e29dd1dc2c60553e13 100644
--- a/components/autofill/core/browser/credit_card.cc
+++ b/components/autofill/core/browser/credit_card.cc
@@ -599,7 +599,7 @@ bool CreditCard::IsLocalDuplicateOfServerCard(const CreditCard& other) const {
return true;
if (other.record_type() == FULL_SERVER_CARD)
- return number_ == other.number_;
+ return StripSeparators(number_) == StripSeparators(other.number_);
// For masked cards, this is the best we can do to compare card numbers.
return TypeAndLastFourDigits() == other.TypeAndLastFourDigits();
« no previous file with comments | « no previous file | components/autofill/core/browser/credit_card_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698