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

Unified Diff: third_party/WebKit/Source/modules/payments/PaymentsValidators.cpp

Issue 2039863002: PaymentRequest: Sync up PaymentAddress with the payment request spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: third_party/WebKit/Source/modules/payments/PaymentsValidators.cpp
diff --git a/third_party/WebKit/Source/modules/payments/PaymentsValidators.cpp b/third_party/WebKit/Source/modules/payments/PaymentsValidators.cpp
index 0d5e65704cdff627b33b3e88f4a658fde9470012..ca7e0d04fe099047d5b8f7abd15bdf855172977a 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentsValidators.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentsValidators.cpp
@@ -31,7 +31,7 @@ bool PaymentsValidators::isValidAmountFormat(const String& amount, String* optio
return false;
}
-bool PaymentsValidators::isValidRegionCodeFormat(const String& code, String* optionalErrorMessage)
+bool PaymentsValidators::isValidCountryCodeFormat(const String& code, String* optionalErrorMessage)
{
if (ScriptRegexp("^[A-Z]{2}$", TextCaseSensitive).match(code) == 0)
return true;
@@ -66,7 +66,7 @@ bool PaymentsValidators::isValidScriptCodeFormat(const String& code, String* opt
bool PaymentsValidators::isValidShippingAddress(const mojom::blink::PaymentAddressPtr& address, String* optionalErrorMessage)
{
- if (!isValidRegionCodeFormat(address->region_code, optionalErrorMessage))
+ if (!isValidCountryCodeFormat(address->country, optionalErrorMessage))
return false;
if (!isValidLanguageCodeFormat(address->language_code, optionalErrorMessage))

Powered by Google App Engine
This is Rietveld 408576698