Index: ios/chrome/browser/payments/payment_request.mm |
diff --git a/ios/chrome/browser/payments/payment_request.mm b/ios/chrome/browser/payments/payment_request.mm |
index 3b9fe0a4642ad73a64a4cb567ee5be8d31ed042a..6d3c2fc574d05bdcffb32462ccb38868fa3cd7b5 100644 |
--- a/ios/chrome/browser/payments/payment_request.mm |
+++ b/ios/chrome/browser/payments/payment_request.mm |
@@ -98,17 +98,20 @@ void PaymentRequest::PopulateProfileCache() { |
contact_profiles_.push_back(&profile_cache_.back()); |
} |
+ payments::PaymentsProfileComparator comparator( |
+ GetApplicationContext()->GetApplicationLocale(), *this); |
+ |
// TODO(crbug.com/602666): Implement deduplication and prioritization rules |
Mathieu
2017/04/27 18:34:01
is this resolved then?
tmartino
2017/04/28 17:10:06
Nope. We'll want to write a shipping method that's
|
// for shipping profiles. |
- contact_profiles_ = payments::profile_util::FilterProfilesForContact( |
- contact_profiles_, GetApplicationContext()->GetApplicationLocale(), |
- *this); |
+ contact_profiles_ = comparator.FilterProfilesForContact(contact_profiles_); |
if (!shipping_profiles_.empty()) |
selected_shipping_profile_ = shipping_profiles_[0]; |
- if (!contact_profiles_.empty()) |
+ if (!contact_profiles_.empty() && |
+ comparator.IsContactInfoComplete(contact_profiles_[0])) { |
selected_contact_profile_ = contact_profiles_[0]; |
+ } |
} |
void PaymentRequest::PopulateCreditCardCache() { |