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

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

Issue 1937783002: Provide shipping in PaymentRequest response (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 8 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.h
diff --git a/third_party/WebKit/Source/modules/payments/PaymentsValidators.h b/third_party/WebKit/Source/modules/payments/PaymentsValidators.h
index 9aba401570bf121f8c3d8d9a1b06480ed6a410ee..672f3bed58bb9599cedd10c4a9d275bbba7a281d 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentsValidators.h
+++ b/third_party/WebKit/Source/modules/payments/PaymentsValidators.h
@@ -6,6 +6,7 @@
#define PaymentsValidators_h
#include "modules/ModulesExport.h"
+#include "public/platform/modules/payments/payment_request.mojom-blink.h"
#include "wtf/Allocator.h"
#include "wtf/text/WTFString.h"
@@ -29,6 +30,13 @@ public:
// Returns true if |code| is a valid ISO 15924 script code.
static bool isValidScriptCodeFormat(const String& code, String* optionalErrorMessage);
+
+ // Returns true if the shipping address is valid:
+ // - Has a valid region code
+ // - Has a valid language code, if any.
+ // - Has a valid script code, if any.
+ // A script code should be present only if language code is present.
+ static bool isValidShippingAddress(const mojom::blink::ShippingAddressPtr&, String* optionalErrorMessage);
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698