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

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

Issue 2578323006: Parsing new Android Pay Payment Request API member: minGooglePlayServicesVersion (Closed)
Patch Set: making minGooglePlayServicesVersion an int32 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
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..dc7a802aa404e9f49917eb1495418640ff673c2f 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
@@ -35,6 +35,7 @@
#include "public/platform/Platform.h"
#include "public/platform/WebTraceLocation.h"
#include "wtf/HashSet.h"
+#include "wtf/text/WTFString.h"
please use gerrit instead 2016/12/19 21:47:38 Already included in PaymnentRequest.h, so no need
Walter Cacau 2016/12/19 22:16:54 Done.
#include <stddef.h>
#include <utility>
@@ -253,6 +254,15 @@ void maybeSetAndroidPayMethodData(const ScriptValue& input,
output->merchant_name = androidPay.merchantName();
output->merchant_id = androidPay.merchantId();
please use gerrit instead 2016/12/19 21:47:38 You should initialize output->min_google_play_serv
Walter Cacau 2016/12/19 22:16:54 Done.
+ 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) {

Powered by Google App Engine
This is Rietveld 408576698