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

Issue 2748093003: PaymentRequest: Introduce PaymentDetailsInit and PaymentDetailsUpdate. (Closed)

Created:
3 years, 9 months ago by zino
Modified:
3 years, 8 months ago
CC:
Aaron Boodman, abarth-chromium, blink-reviews, chromium-reviews, darin (slow to review), darin-cc_chromium.org, gogerald+paymentswatch_chromium.org, jam, mahmadi+paymentswatch_chromium.org, qsr+mojo_chromium.org, rwlbuis, rouslan+payments_chromium.org, sebsg+paymentswatch_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

PaymentRequest: Introduce PaymentDetailsInit and PaymentDetailsUpdate. The current implementation uses PaymentDetails structure when creating PaymentRequest object and calling updateWith(). But some parameters like error are only allowed in the updateWith(). If developer tries to use error parameter when creating PaymentRequest, then throws exception. So, to solve the problem in the latest spec[1][2], common parts are combined and each different parts are separated into PaymentDetailsInit and PaymentDetailsUpdate. This change only affects input dictionaries and doesn't break existing behavior. Therefore, we don't need a intent to implement and ship. [1] https://w3c.github.io/browser-payment-api/#paymentdetailsinit-dictionary [2] https://w3c.github.io/browser-payment-api/#paymentdetailsupdate-dictionary BUG=704166 Review-Url: https://codereview.chromium.org/2748093003 Cr-Commit-Position: refs/heads/master@{#460053} Committed: https://chromium.googlesource.com/chromium/src/+/aec033c55fbc09dade60bc543373deb86c517b1b

Patch Set 1 #

Patch Set 2 : PaymentDetails #

Patch Set 3 : PaymentDetails #

Patch Set 4 : PD #

Total comments: 18

Patch Set 5 : PD #

Patch Set 6 : PD #

Total comments: 4

Patch Set 7 : PaymentRequest: Introduce PaymentDetailsInit and PaymentDetailsUpdate. #

Patch Set 8 : PaymentRequest: Introduce PaymentDetailsInit and PaymentDetailsUpdate. #

Total comments: 6

Patch Set 9 : PaymentRequest: Introduce PaymentDetailsInit and PaymentDetailsUpdate. #

Patch Set 10 : PaymentRequest: Introduce PaymentDetailsInit and PaymentDetailsUpdate. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+290 lines, -223 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java View 1 2 3 4 5 6 7 8 9 2 chunks +19 lines, -7 lines 0 comments Download
M components/payments/content/payment_details_validation.cc View 1 2 3 4 5 6 2 chunks +9 lines, -12 lines 0 comments Download
M components/payments/content/payment_request.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M components/payments/content/payment_request.mojom View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/payments/payment-request-interface.html View 1 2 3 1 chunk +0 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/modules/modules_idl_files.gni View 1 2 3 4 5 6 2 chunks +9 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/payments/AbortTest.cpp View 6 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/modules/payments/CanMakePaymentTest.cpp View 6 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/modules/payments/CompleteTest.cpp View 6 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/modules/payments/OnPaymentResponseTest.cpp View 24 chunks +24 lines, -24 lines 0 comments Download
D third_party/WebKit/Source/modules/payments/PaymentDetails.idl View 1 chunk +0 lines, -13 lines 0 comments Download
A + third_party/WebKit/Source/modules/payments/PaymentDetailsBase.idl View 1 chunk +3 lines, -5 lines 1 comment Download
A third_party/WebKit/Source/modules/payments/PaymentDetailsInit.idl View 1 chunk +9 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/payments/PaymentDetailsUpdate.idl View 1 chunk +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/payments/PaymentRequest.h View 1 2 3 4 5 6 7 4 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/payments/PaymentRequest.cpp View 1 2 3 4 10 chunks +62 lines, -35 lines 0 comments Download
M third_party/WebKit/Source/modules/payments/PaymentRequest.idl View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/payments/PaymentRequestDetailsTest.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp View 1 2 3 4 5 6 7 31 chunks +36 lines, -48 lines 0 comments Download
M third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEventTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/payments/PaymentTestHelper.h View 2 chunks +10 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/payments/PaymentTestHelper.cpp View 1 2 3 4 2 chunks +65 lines, -35 lines 0 comments Download

Messages

Total messages: 75 (51 generated)
zino
PTAL. Tom Sepez@ for mojom haraken@ for modules_idl_files.gni rouslan@ for payments
3 years, 9 months ago (2017-03-19 08:22:12 UTC) #33
Tom Sepez
mojom LGTM
3 years, 9 months ago (2017-03-20 17:19:42 UTC) #34
zino
Owners, PTAL
3 years, 9 months ago (2017-03-21 13:05:53 UTC) #35
please use gerrit instead
Thank you for helping out! :-D https://codereview.chromium.org/2748093003/diff/60001/components/payments/content/payment_request.mojom File components/payments/content/payment_request.mojom (right): https://codereview.chromium.org/2748093003/diff/60001/components/payments/content/payment_request.mojom#newcode186 components/payments/content/payment_request.mojom:186: PaymentItem total; Should ...
3 years, 9 months ago (2017-03-21 13:42:21 UTC) #36
please use gerrit instead
Please file tracking bug for this.
3 years, 9 months ago (2017-03-22 01:58:24 UTC) #37
zino
Thank you for review. :) I filed a bug and updated commit description. PTAL https://codereview.chromium.org/2748093003/diff/60001/components/payments/content/payment_request.mojom ...
3 years, 9 months ago (2017-03-22 16:43:45 UTC) #39
please use gerrit instead
https://codereview.chromium.org/2748093003/diff/100001/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp File third_party/WebKit/Source/modules/payments/PaymentRequest.cpp (right): https://codereview.chromium.org/2748093003/diff/100001/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp#newcode543 third_party/WebKit/Source/modules/payments/PaymentRequest.cpp:543: } Since "total" is optional in updateWith(), but cannot ...
3 years, 9 months ago (2017-03-22 17:14:01 UTC) #40
zino
rouslan@, You're right. I addressed comments. PTAL :) https://codereview.chromium.org/2748093003/diff/100001/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp File third_party/WebKit/Source/modules/payments/PaymentRequest.cpp (right): https://codereview.chromium.org/2748093003/diff/100001/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp#newcode543 third_party/WebKit/Source/modules/payments/PaymentRequest.cpp:543: } ...
3 years, 9 months ago (2017-03-27 13:15:13 UTC) #47
please use gerrit instead
Thank you! https://codereview.chromium.org/2748093003/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java File chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java (right): https://codereview.chromium.org/2748093003/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java#newcode421 chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java:421: if (!parseAndValidateDetailsOrDisconnectFromClient(details)) return; Please add this block ...
3 years, 9 months ago (2017-03-27 14:00:06 UTC) #48
zino
Thank you for review! PTAL a new patch set. I've just modified according to your ...
3 years, 9 months ago (2017-03-27 14:47:47 UTC) #49
please use gerrit instead
LGTM % comment. https://codereview.chromium.org/2748093003/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java File chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java (right): https://codereview.chromium.org/2748093003/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java#newcode742 chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java:742: if (mRawTotal != null) { On ...
3 years, 9 months ago (2017-03-27 14:59:39 UTC) #52
zino
haraken@, PTAL (for modules_idl_files.gni) Thanks. https://codereview.chromium.org/2748093003/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java File chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java (right): https://codereview.chromium.org/2748093003/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java#newcode742 chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java:742: if (mRawTotal != null) ...
3 years, 9 months ago (2017-03-27 15:05:55 UTC) #55
haraken
LGTM (But I think you'll need an approval from an API owner since PaymentRequest is ...
3 years, 9 months ago (2017-03-27 16:04:08 UTC) #56
zino
On 2017/03/27 16:04:08, haraken wrote: > LGTM > > (But I think you'll need an ...
3 years, 9 months ago (2017-03-27 16:17:13 UTC) #58
zino
foolip@, I think this is a trivial change but the web platform change guide[1] says ...
3 years, 9 months ago (2017-03-27 16:20:51 UTC) #59
zino
tkent@, PTAL (foolip@ is OOO) I think this is a trivial platform change but the ...
3 years, 9 months ago (2017-03-28 02:29:11 UTC) #63
tkent
https://codereview.chromium.org/2748093003/diff/180001/third_party/WebKit/Source/modules/payments/PaymentDetailsBase.idl File third_party/WebKit/Source/modules/payments/PaymentDetailsBase.idl (left): https://codereview.chromium.org/2748093003/diff/180001/third_party/WebKit/Source/modules/payments/PaymentDetailsBase.idl#oldcode12 third_party/WebKit/Source/modules/payments/PaymentDetailsBase.idl:12: [RuntimeEnabled=PaymentDetailsError] DOMString error; This removes |error| IDL attribute. Is ...
3 years, 9 months ago (2017-03-28 03:17:39 UTC) #64
zino
On 2017/03/28 03:17:39, tkent wrote: > https://codereview.chromium.org/2748093003/diff/180001/third_party/WebKit/Source/modules/payments/PaymentDetailsBase.idl > File third_party/WebKit/Source/modules/payments/PaymentDetailsBase.idl (left): > > https://codereview.chromium.org/2748093003/diff/180001/third_party/WebKit/Source/modules/payments/PaymentDetailsBase.idl#oldcode12 > ...
3 years, 9 months ago (2017-03-28 05:35:48 UTC) #65
zino
On 2017/03/28 05:35:48, zino wrote: > On 2017/03/28 03:17:39, tkent wrote: > > > https://codereview.chromium.org/2748093003/diff/180001/third_party/WebKit/Source/modules/payments/PaymentDetailsBase.idl ...
3 years, 9 months ago (2017-03-28 05:52:23 UTC) #66
tkent
Thank you for the explanation. The web-exposed change LGTM.
3 years, 9 months ago (2017-03-28 06:19:03 UTC) #67
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2748093003/180001
3 years, 8 months ago (2017-03-28 09:31:20 UTC) #70
commit-bot: I haz the power
Committed patchset #10 (id:180001) as https://chromium.googlesource.com/chromium/src/+/aec033c55fbc09dade60bc543373deb86c517b1b
3 years, 8 months ago (2017-03-28 09:37:01 UTC) #73
Eric Seckler
On 2017/03/28 09:37:01, commit-bot: I haz the power wrote: > Committed patchset #10 (id:180001) as ...
3 years, 8 months ago (2017-03-28 10:18:16 UTC) #74
kolos1
3 years, 8 months ago (2017-03-28 10:33:30 UTC) #75
Message was sent while issue was closed.
A revert of this CL (patchset #10 id:180001) has been created in
https://codereview.chromium.org/2779013002/ by kolos@chromium.org.

The reason for reverting is: This CL broke compilation on Android and Mac..

Powered by Google App Engine
This is Rietveld 408576698