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

Unified Diff: components/payments/core/payments_profile_comparator.cc

Issue 2916313002: Merge-60 [Payments] Don't show error for intl phone from other country. (Closed)
Patch Set: Created 3 years, 7 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 | « components/payments/core/payment_request_data_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/payments/core/payments_profile_comparator.cc
diff --git a/components/payments/core/payments_profile_comparator.cc b/components/payments/core/payments_profile_comparator.cc
index e29576236aa5f4b7a986e4e464174059018ea043..3190bacf2a936b0e1087de751638464ddb732791 100644
--- a/components/payments/core/payments_profile_comparator.cc
+++ b/components/payments/core/payments_profile_comparator.cc
@@ -207,7 +207,9 @@ PaymentsProfileComparator::ComputeMissingFields(
base::string16 phone = profile.GetInfo(
autofill::AutofillType(autofill::PHONE_HOME_WHOLE_NUMBER), app_locale());
- if (!autofill::IsValidPhoneNumber(phone, country))
+ base::string16 intl_phone = base::UTF8ToUTF16("+" + base::UTF16ToUTF8(phone));
+ if (!(autofill::IsValidPhoneNumber(phone, country) ||
+ autofill::IsValidPhoneNumber(intl_phone, country)))
missing |= kPhone;
base::string16 email = profile.GetInfo(
« no previous file with comments | « components/payments/core/payment_request_data_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698