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

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

Issue 2473053003: Convert payer name to JSON (Closed)
Patch Set: Add test Created 4 years, 1 month 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 | « no previous file | third_party/WebKit/Source/modules/payments/PaymentResponseTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/payments/PaymentResponse.cpp
diff --git a/third_party/WebKit/Source/modules/payments/PaymentResponse.cpp b/third_party/WebKit/Source/modules/payments/PaymentResponse.cpp
index 53762afa52fc495ed135d09503ac199486d20a0a..988cef45b3146fc1a9fcf1d32f1b327dd2d918e9 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentResponse.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentResponse.cpp
@@ -46,6 +46,11 @@ ScriptValue PaymentResponse::toJSONForBinding(ScriptState* scriptState) const {
else
result.addString("shippingOption", shippingOption());
+ if (payerName().isNull())
+ result.addNull("payerName");
+ else
+ result.addString("payerName", payerName());
+
if (payerEmail().isNull())
result.addNull("payerEmail");
else
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/payments/PaymentResponseTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698