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

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

Issue 2578323006: Parsing new Android Pay Payment Request API member: minGooglePlayServicesVersion (Closed)
Patch Set: review comments Created 4 years 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 | « third_party/WebKit/Source/modules/payments/AndroidPayMethodData.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
index d92af7b33783dddc8ff6789844c0deba7c88adf3..6dbc0322d7c7c0a68144ea89d0c6865f4070cfb5 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
@@ -253,6 +253,17 @@ void maybeSetAndroidPayMethodData(const ScriptValue& input,
output->merchant_name = androidPay.merchantName();
output->merchant_id = androidPay.merchantId();
+ // 0 means the merchant did not specify or it was an invalid value
+ output->min_google_play_services_version = 0;
+ if (androidPay.hasMinGooglePlayServicesVersion()) {
+ bool ok = false;
+ int minGooglePlayServicesVersion =
+ androidPay.minGooglePlayServicesVersion().toIntStrict(&ok);
+ if (ok) {
+ output->min_google_play_services_version = minGooglePlayServicesVersion;
+ }
+ }
+
if (androidPay.hasAllowedCardNetworks()) {
for (const String& allowedCardNetwork : androidPay.allowedCardNetworks()) {
for (size_t i = 0; i < arraysize(kAndroidPayNetwork); ++i) {
« no previous file with comments | « third_party/WebKit/Source/modules/payments/AndroidPayMethodData.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698