New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 661608 link

Starred by 10 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature


Sign in to add a comment

Implement Payment Handler API (serviceworker based approach)

Project Member Reported by jinho.b...@samsung.com, Nov 2 2016

Issue description

The API helps to develop new payment apps in web standard ways (e.g. service worker).
If using them, payment app providers can provide simplified payment methods and user experiences.

Related spec:
 - https://w3c.github.io/webpayments-payment-apps-api/
 
Status: Started (was: Assigned)
Project Member

Comment 2 by bugdroid1@chromium.org, Nov 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/60a84ca8de6308a26f8500600ad8ba7c1ce2a41c

commit 60a84ca8de6308a26f8500600ad8ba7c1ce2a41c
Author: jinho.bang <jinho.bang@samsung.com>
Date: Mon Nov 07 04:23:07 2016

PaymentApp: Add interfaces for PaymentAppManager.

Just adding interfaces in blink side and implementing them in follow-up CL.
The interfaces are behind a new runtime flag.

Intent to implement:
  https://groups.google.com/a/chromium.org/forum/m/#!topic/blink-dev/2ojnMk_T9_c

BUG= 661608 

Review-Url: https://codereview.chromium.org/2472723003
Cr-Commit-Position: refs/heads/master@{#430217}

[modify] https://crrev.com/60a84ca8de6308a26f8500600ad8ba7c1ce2a41c/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/60a84ca8de6308a26f8500600ad8ba7c1ce2a41c/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/60a84ca8de6308a26f8500600ad8ba7c1ce2a41c/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/60a84ca8de6308a26f8500600ad8ba7c1ce2a41c/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/60a84ca8de6308a26f8500600ad8ba7c1ce2a41c/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/60a84ca8de6308a26f8500600ad8ba7c1ce2a41c/third_party/WebKit/Source/modules/modules_idl_files.gni
[modify] https://crrev.com/60a84ca8de6308a26f8500600ad8ba7c1ce2a41c/third_party/WebKit/Source/modules/payments/BUILD.gn
[add] https://crrev.com/60a84ca8de6308a26f8500600ad8ba7c1ce2a41c/third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp
[add] https://crrev.com/60a84ca8de6308a26f8500600ad8ba7c1ce2a41c/third_party/WebKit/Source/modules/payments/PaymentAppManager.h
[add] https://crrev.com/60a84ca8de6308a26f8500600ad8ba7c1ce2a41c/third_party/WebKit/Source/modules/payments/PaymentAppManager.idl
[add] https://crrev.com/60a84ca8de6308a26f8500600ad8ba7c1ce2a41c/third_party/WebKit/Source/modules/payments/PaymentAppManifest.idl
[add] https://crrev.com/60a84ca8de6308a26f8500600ad8ba7c1ce2a41c/third_party/WebKit/Source/modules/payments/PaymentAppOption.idl
[add] https://crrev.com/60a84ca8de6308a26f8500600ad8ba7c1ce2a41c/third_party/WebKit/Source/modules/payments/PaymentAppServiceWorkerRegistration.cpp
[add] https://crrev.com/60a84ca8de6308a26f8500600ad8ba7c1ce2a41c/third_party/WebKit/Source/modules/payments/PaymentAppServiceWorkerRegistration.h
[add] https://crrev.com/60a84ca8de6308a26f8500600ad8ba7c1ce2a41c/third_party/WebKit/Source/modules/payments/PaymentAppServiceWorkerRegistration.idl
[modify] https://crrev.com/60a84ca8de6308a26f8500600ad8ba7c1ce2a41c/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in

Project Member

Comment 3 by bugdroid1@chromium.org, Nov 8 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ef456add5796bfdae498c3de4f4e8e2607d5173a

commit ef456add5796bfdae498c3de4f4e8e2607d5173a
Author: jinho.bang <jinho.bang@samsung.com>
Date: Tue Nov 08 23:36:14 2016

PaymentApp: Initial implementation for PaymentAppManager.setManifest().

This CL includes an initial implementation in blink side and browser side.
by using mojo IPC. Currently, when setManifest() is called, just sends
NOT_IMPLEMENTED in browser side and then rejects NotSupportedError in blink.

BUG= 661608 
TEST=payment-app-interfaces.html
TEST=payment-app-manager.html

Review-Url: https://codereview.chromium.org/2476343002
Cr-Commit-Position: refs/heads/master@{#430760}

[modify] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/components/payments/BUILD.gn
[add] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/components/payments/payment_app.mojom
[modify] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/content/browser/BUILD.gn
[modify] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/content/browser/DEPS
[modify] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/content/browser/background_sync/background_sync_manager_unittest.cc
[modify] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/content/browser/background_sync/background_sync_service_impl_unittest.cc
[add] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/content/browser/payments/OWNERS
[add] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/content/browser/payments/payment_app_context.cc
[add] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/content/browser/payments/payment_app_context.h
[add] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/content/browser/payments/payment_app_manager.cc
[add] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/content/browser/payments/payment_app_manager.h
[modify] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/content/browser/storage_partition_impl.cc
[modify] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/content/browser/storage_partition_impl.h
[modify] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/content/public/app/mojo/content_browser_manifest.json
[add] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/third_party/WebKit/LayoutTests/http/tests/payments/payment-app-interfaces.html
[add] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/third_party/WebKit/LayoutTests/http/tests/payments/payment-app-manager.html
[add] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/third_party/WebKit/LayoutTests/http/tests/payments/resources/empty-worker.js
[add] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/third_party/WebKit/LayoutTests/http/tests/payments/resources/payment-app.js
[modify] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/third_party/WebKit/Source/modules/payments/BUILD.gn
[modify] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp
[modify] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/third_party/WebKit/Source/modules/payments/PaymentAppManager.h
[modify] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/third_party/WebKit/Source/modules/payments/PaymentAppManager.idl
[modify] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/third_party/WebKit/Source/modules/payments/PaymentAppServiceWorkerRegistration.cpp
[modify] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/third_party/WebKit/Source/modules/payments/PaymentAppServiceWorkerRegistration.h
[modify] https://crrev.com/ef456add5796bfdae498c3de4f4e8e2607d5173a/third_party/WebKit/Source/modules/payments/PaymentAppServiceWorkerRegistration.idl

Project Member

Comment 4 by bugdroid1@chromium.org, Nov 18 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5c1f7a29337a6636a4329a9d16c4061bb51980c8

commit 5c1f7a29337a6636a4329a9d16c4061bb51980c8
Author: jinho.bang <jinho.bang@samsung.com>
Date: Fri Nov 18 05:29:14 2016

PaymentApp: Implement PaymentAppManager.setManifest().

The method is to register payment app with the user agent for future use
associating manifest’s attributes(e.g. label and icon) set with the payment
app for user reference. The manifest data is stored into service worker
storage by associated service worker.

This is a series of patches to implement setManifest() in PaymentAppManager:
  https://codereview.chromium.org/2476343002/

This CL includes browser side implementation and unit/layout tests.

Related spec link:
  https://w3c.github.io/webpayments-payment-apps-api/#set-manifest

BUG= 661608 
TEST=payment_app_manager_unittest.cc
TEST=payment-app-manager.html

Review-Url: https://codereview.chromium.org/2497983002
Cr-Commit-Position: refs/heads/master@{#433119}

[modify] https://crrev.com/5c1f7a29337a6636a4329a9d16c4061bb51980c8/components/payments/payment_app.mojom
[modify] https://crrev.com/5c1f7a29337a6636a4329a9d16c4061bb51980c8/content/browser/BUILD.gn
[add] https://crrev.com/5c1f7a29337a6636a4329a9d16c4061bb51980c8/content/browser/payments/BUILD.gn
[add] https://crrev.com/5c1f7a29337a6636a4329a9d16c4061bb51980c8/content/browser/payments/payment_app.proto
[modify] https://crrev.com/5c1f7a29337a6636a4329a9d16c4061bb51980c8/content/browser/payments/payment_app_context.cc
[modify] https://crrev.com/5c1f7a29337a6636a4329a9d16c4061bb51980c8/content/browser/payments/payment_app_context.h
[modify] https://crrev.com/5c1f7a29337a6636a4329a9d16c4061bb51980c8/content/browser/payments/payment_app_manager.cc
[modify] https://crrev.com/5c1f7a29337a6636a4329a9d16c4061bb51980c8/content/browser/payments/payment_app_manager.h
[add] https://crrev.com/5c1f7a29337a6636a4329a9d16c4061bb51980c8/content/browser/payments/payment_app_manager_unittest.cc
[modify] https://crrev.com/5c1f7a29337a6636a4329a9d16c4061bb51980c8/content/browser/service_worker/service_worker_context_wrapper.cc
[modify] https://crrev.com/5c1f7a29337a6636a4329a9d16c4061bb51980c8/content/browser/service_worker/service_worker_context_wrapper.h
[modify] https://crrev.com/5c1f7a29337a6636a4329a9d16c4061bb51980c8/content/browser/storage_partition_impl.cc
[modify] https://crrev.com/5c1f7a29337a6636a4329a9d16c4061bb51980c8/content/browser/storage_partition_impl.h
[modify] https://crrev.com/5c1f7a29337a6636a4329a9d16c4061bb51980c8/content/test/BUILD.gn
[modify] https://crrev.com/5c1f7a29337a6636a4329a9d16c4061bb51980c8/third_party/WebKit/LayoutTests/http/tests/payments/payment-app-manager.html
[modify] https://crrev.com/5c1f7a29337a6636a4329a9d16c4061bb51980c8/third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp

Summary: Implement Payment App API (serviceworker based approach) (was: Implement Payment App API (serviceworker based approach)
Project Member

Comment 6 by bugdroid1@chromium.org, Nov 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c37cee81d6fd96e5ac04933ec06c163ca9d7686f

commit c37cee81d6fd96e5ac04933ec06c163ca9d7686f
Author: jinho.bang <jinho.bang@samsung.com>
Date: Tue Nov 22 15:22:37 2016

PaymentApp: Add interfaces for PaymentRequestEvent.

The event is initiated by payment request in order to process payment in
payment app. This CL is just adding interfaces in blink side and implementing
them in follow-up CL. Also, the interfaces are behind a new runtime flag.

Intent to implement:
  https://groups.google.com/a/chromium.org/forum/m/#!topic/blink-dev/2ojnMk_T9_c

BUG= 661608 

Review-Url: https://codereview.chromium.org/2510833002
Cr-Commit-Position: refs/heads/master@{#433863}

[modify] https://crrev.com/c37cee81d6fd96e5ac04933ec06c163ca9d7686f/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/c37cee81d6fd96e5ac04933ec06c163ca9d7686f/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/c37cee81d6fd96e5ac04933ec06c163ca9d7686f/third_party/WebKit/Source/bindings/modules/BUILD.gn
[modify] https://crrev.com/c37cee81d6fd96e5ac04933ec06c163ca9d7686f/third_party/WebKit/Source/core/events/EventTypeNames.in
[modify] https://crrev.com/c37cee81d6fd96e5ac04933ec06c163ca9d7686f/third_party/WebKit/Source/modules/modules_idl_files.gni
[modify] https://crrev.com/c37cee81d6fd96e5ac04933ec06c163ca9d7686f/third_party/WebKit/Source/modules/payments/BUILD.gn
[add] https://crrev.com/c37cee81d6fd96e5ac04933ec06c163ca9d7686f/third_party/WebKit/Source/modules/payments/PaymentAppRequestData.idl
[add] https://crrev.com/c37cee81d6fd96e5ac04933ec06c163ca9d7686f/third_party/WebKit/Source/modules/payments/PaymentAppServiceWorkerGlobalScope.h
[add] https://crrev.com/c37cee81d6fd96e5ac04933ec06c163ca9d7686f/third_party/WebKit/Source/modules/payments/PaymentAppServiceWorkerGlobalScope.idl
[add] https://crrev.com/c37cee81d6fd96e5ac04933ec06c163ca9d7686f/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp
[add] https://crrev.com/c37cee81d6fd96e5ac04933ec06c163ca9d7686f/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.h
[add] https://crrev.com/c37cee81d6fd96e5ac04933ec06c163ca9d7686f/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.idl

Project Member

Comment 7 by bugdroid1@chromium.org, Nov 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f0db7dfbe418edc8158fc583419c945275527270

commit f0db7dfbe418edc8158fc583419c945275527270
Author: jinho.bang <jinho.bang@samsung.com>
Date: Tue Nov 22 20:11:39 2016

PaymentApp: Implement PaymentAppManager.getManifest().

The getManifest() method is used to retrieve the properties associated with
a registered payment app. (from service worker storage)

Related spec link:
  https://w3c.github.io/webpayments-payment-apps-api/#get-manifest

BUG= 661608 
TEST=payment_app_manager_unittest.cc
TEST=payment-app-manager.html

Review-Url: https://codereview.chromium.org/2506093002
Cr-Commit-Position: refs/heads/master@{#433956}

[modify] https://crrev.com/f0db7dfbe418edc8158fc583419c945275527270/components/payments/payment_app.mojom
[modify] https://crrev.com/f0db7dfbe418edc8158fc583419c945275527270/content/browser/payments/payment_app_manager.cc
[modify] https://crrev.com/f0db7dfbe418edc8158fc583419c945275527270/content/browser/payments/payment_app_manager.h
[modify] https://crrev.com/f0db7dfbe418edc8158fc583419c945275527270/content/browser/payments/payment_app_manager_unittest.cc
[modify] https://crrev.com/f0db7dfbe418edc8158fc583419c945275527270/third_party/WebKit/LayoutTests/http/tests/payments/payment-app-manager.html
[modify] https://crrev.com/f0db7dfbe418edc8158fc583419c945275527270/third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp
[modify] https://crrev.com/f0db7dfbe418edc8158fc583419c945275527270/third_party/WebKit/Source/modules/payments/PaymentAppManager.h

Comment 8 Deleted

Comment 9 by tom...@opera.com, Nov 30 2016

Blocking: 669876
Project Member

Comment 10 by bugdroid1@chromium.org, Dec 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d

commit dbfe96630903e024d0b9fae92a8cd4859dbbbe5d
Author: jinho.bang <jinho.bang@samsung.com>
Date: Fri Dec 02 16:20:16 2016

PaymentApp: Blink side of payment request event dispatching in service worker.

The payment request event is initiated from browser side when the user selects
a payment app in payment request UI. The event is dispached from browser to
renderer and then from service worker context client in renderer to blink again.
As part of implementation for it, this CL implements interfaces to dispatch the
event from renderer to blink.

This CL provides the following things.
 - Add dispatchPaymentRequestEvent() & didHandlePaymentReuqestEvent() to SW.
 - Expose WebPaymentAppRequestData and related Web types.
 - Conversion util to convert web type to blink type.

According to Onion Soup, we should connect browser and Blink directly but
there is no way right now because ServiceWorkerContextClient and others are
still in content/renderer side. For this reason, we have no choice but to add
many of WebTypes. However, once the SW related codes in content/renderer are
moved to Blink, we will able to remove them.

BUG= 661608 
TEST=PaymentAppRequestDataConversionTest.cpp
TEST=payment-request-event.html

Review-Url: https://codereview.chromium.org/2528683002
Cr-Commit-Position: refs/heads/master@{#435947}

[add] https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d/third_party/WebKit/LayoutTests/http/tests/payments/payment-request-event.html
[add] https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d/third_party/WebKit/LayoutTests/http/tests/payments/resources/payment-request-event.js
[modify] https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d/third_party/WebKit/Source/modules/BUILD.gn
[modify] https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d/third_party/WebKit/Source/modules/payments/BUILD.gn
[add] https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d/third_party/WebKit/Source/modules/payments/PaymentAppRequestDataConversion.cpp
[add] https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d/third_party/WebKit/Source/modules/payments/PaymentAppRequestDataConversion.h
[add] https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d/third_party/WebKit/Source/modules/payments/PaymentAppRequestDataConversionTest.cpp
[modify] https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp
[modify] https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.h
[modify] https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.h
[modify] https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.cpp
[modify] https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.h
[modify] https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeClientImpl.cpp
[modify] https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeClientImpl.h
[modify] https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
[modify] https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.h
[modify] https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d/third_party/WebKit/public/BUILD.gn
[add] https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d/third_party/WebKit/public/platform/modules/payments/OWNERS
[add] https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d/third_party/WebKit/public/platform/modules/payments/WebPaymentAppRequestData.h
[add] https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d/third_party/WebKit/public/platform/modules/payments/WebPaymentCurrencyAmount.h
[add] https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d/third_party/WebKit/public/platform/modules/payments/WebPaymentDetailsModifier.h
[add] https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d/third_party/WebKit/public/platform/modules/payments/WebPaymentItem.h
[add] https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d/third_party/WebKit/public/platform/modules/payments/WebPaymentMethodData.h
[modify] https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h
[modify] https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h

Project Member

Comment 11 by bugdroid1@chromium.org, Dec 12 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b1a60e9fbe21734a3567c7cf10f9eea6570f9655

commit b1a60e9fbe21734a3567c7cf10f9eea6570f9655
Author: tommyt <tommyt@opera.com>
Date: Mon Dec 12 10:40:14 2016

PaymentApp: Make the PaymentAppFactory asynchronous

The code for fetching and filtering payment instruments in
PaymentRequestImpl is asynchronous anyway, so this change is not too
intrusive. The main thing is to insert an extra asynchronous step to
populate the mApps list before payment instrument filtering starts.

If we want to take this further, a good next step would be to start
showing apps as they are discovered, instead of waiting until we have
received all the payment apps. It would also be a good thing to
refactor some of this functionality out of the PaymentRequestImpl, as
it is growing quite complex.

Other changes that went into this commit:

* Change the PaymentAppFactory into a singleton, rather than being a
  holder class for static functions.

* Extend the AdditionalPaymentFactory functionality, so that the
  PaymentAppFactory can have many additional factories. This lets us
  make the ServiceWorkerPaymentAppBridge an additional factory, and
  normalize the relationship between the two classes.

* Add two unit tests for testing delayed payment app creation.

BUG= 661608 

Review-Url: https://codereview.chromium.org/2559153002
Cr-Commit-Position: refs/heads/master@{#437843}

[modify] https://crrev.com/b1a60e9fbe21734a3567c7cf10f9eea6570f9655/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentAppFactory.java
[modify] https://crrev.com/b1a60e9fbe21734a3567c7cf10f9eea6570f9655/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
[modify] https://crrev.com/b1a60e9fbe21734a3567c7cf10f9eea6570f9655/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentAppBridge.java
[modify] https://crrev.com/b1a60e9fbe21734a3567c7cf10f9eea6570f9655/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppTest.java
[modify] https://crrev.com/b1a60e9fbe21734a3567c7cf10f9eea6570f9655/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestServiceWorkerPaymentAppTest.java
[modify] https://crrev.com/b1a60e9fbe21734a3567c7cf10f9eea6570f9655/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestBase.java

Project Member

Comment 12 by bugdroid1@chromium.org, Dec 12 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3b0d3c1f7b4ab17b5abb62b6767615e5ca5a4eb1

commit 3b0d3c1f7b4ab17b5abb62b6767615e5ca5a4eb1
Author: jinho.bang <jinho.bang@samsung.com>
Date: Mon Dec 12 12:45:38 2016

PaymentApp: Introduce PaymentAppDatabase class.

The class is providing APIs to read/write payment app related data(e.g. manifest
and associated service worker). It can be shared between payment_app_manager.cc
and payment_app_context.cc.

The payment_app_manager.cc contains a actual implementation of the
PaymentAppManager interface[1] used on the page or worker.
Also, the payment_app_context.cc can be used to query all manifests data[2]
in order to update payment request UI in Chrome layer.

We can summarize this CL as follows.
  1. Rename PaymentAppContext in content/browser/payments to
     PaymentAppContextImpl and then add PaymentAppContext interface in
     content/public to expose some APIs to Chrome layer.
  2. Write PaymentAppDatabase class and then move most of logics to access
     database from PaymentAppManager to the new class.
  3. Add a interface to query all manifests data in Chrome layer but it's not
     implemented yet in this CL. It will be implemented in follow-up CL[2].

[1] https://w3c.github.io/webpayments-payment-apps-api/#payment-app-manager
[2] https://codereview.chromium.org/2556433002

BUG= 661608 
TEST=existing unittests

Review-Url: https://codereview.chromium.org/2560293002
Cr-Commit-Position: refs/heads/master@{#437855}

[modify] https://crrev.com/3b0d3c1f7b4ab17b5abb62b6767615e5ca5a4eb1/content/browser/BUILD.gn
[delete] https://crrev.com/2418e1b631787f3a9fed9a6aad0d53e11e467e5b/content/browser/payments/payment_app_context.cc
[delete] https://crrev.com/2418e1b631787f3a9fed9a6aad0d53e11e467e5b/content/browser/payments/payment_app_context.h
[add] https://crrev.com/3b0d3c1f7b4ab17b5abb62b6767615e5ca5a4eb1/content/browser/payments/payment_app_context_impl.cc
[add] https://crrev.com/3b0d3c1f7b4ab17b5abb62b6767615e5ca5a4eb1/content/browser/payments/payment_app_context_impl.h
[add] https://crrev.com/3b0d3c1f7b4ab17b5abb62b6767615e5ca5a4eb1/content/browser/payments/payment_app_database.cc
[add] https://crrev.com/3b0d3c1f7b4ab17b5abb62b6767615e5ca5a4eb1/content/browser/payments/payment_app_database.h
[modify] https://crrev.com/3b0d3c1f7b4ab17b5abb62b6767615e5ca5a4eb1/content/browser/payments/payment_app_manager.cc
[modify] https://crrev.com/3b0d3c1f7b4ab17b5abb62b6767615e5ca5a4eb1/content/browser/payments/payment_app_manager.h
[modify] https://crrev.com/3b0d3c1f7b4ab17b5abb62b6767615e5ca5a4eb1/content/browser/payments/payment_app_manager_unittest.cc
[modify] https://crrev.com/3b0d3c1f7b4ab17b5abb62b6767615e5ca5a4eb1/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/3b0d3c1f7b4ab17b5abb62b6767615e5ca5a4eb1/content/browser/storage_partition_impl.cc
[modify] https://crrev.com/3b0d3c1f7b4ab17b5abb62b6767615e5ca5a4eb1/content/browser/storage_partition_impl.h
[add] https://crrev.com/3b0d3c1f7b4ab17b5abb62b6767615e5ca5a4eb1/content/public/browser/payment_app_context.h

Project Member

Comment 13 by bugdroid1@chromium.org, Dec 12 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e4e2b2b1b5841b99d4745651345f0fd2994885b2

commit e4e2b2b1b5841b99d4745651345f0fd2994885b2
Author: vasilii <vasilii@chromium.org>
Date: Mon Dec 12 13:47:27 2016

Revert of PaymentApp: Introduce PaymentAppDatabase class. (patchset #3 id:100001 of https://codereview.chromium.org/2560293002/ )

Reason for revert:
Broke content_unittests:
[ RUN      ] PaymentAppManagerTest.SetAndGetManifest

[libprotobuf ERROR c:\b\c\b\win\src\third_party\protobuf\src\google\protobuf\message_lite.cc:120] Can't parse message of type "content.PaymentAppManifestProto" because it is missing required fields: (cannot determine missing fields for lite message)

c:\b\c\b\win\src\content\browser\payments\payment_app_manager_unittest.cc(145): error: Value of: payments::mojom::PaymentAppManifestError::NONE

  Actual: PaymentAppManifestError::NONE

Expected: read_error

Which is: PaymentAppManifestError::MANIFEST_STORAGE_OPERATION_FAILED

[  FAILED  ] PaymentAppManagerTest.SetAndGetManifest (3 ms)

Original issue's description:
> PaymentApp: Introduce PaymentAppDatabase class.
>
> The class is providing APIs to read/write payment app related data(e.g. manifest
> and associated service worker). It can be shared between payment_app_manager.cc
> and payment_app_context.cc.
>
> The payment_app_manager.cc contains a actual implementation of the
> PaymentAppManager interface[1] used on the page or worker.
> Also, the payment_app_context.cc can be used to query all manifests data[2]
> in order to update payment request UI in Chrome layer.
>
> We can summarize this CL as follows.
>   1. Rename PaymentAppContext in content/browser/payments to
>      PaymentAppContextImpl and then add PaymentAppContext interface in
>      content/public to expose some APIs to Chrome layer.
>   2. Write PaymentAppDatabase class and then move most of logics to access
>      database from PaymentAppManager to the new class.
>   3. Add a interface to query all manifests data in Chrome layer but it's not
>      implemented yet in this CL. It will be implemented in follow-up CL[2].
>
> [1] https://w3c.github.io/webpayments-payment-apps-api/#payment-app-manager
> [2] https://codereview.chromium.org/2556433002
>
> BUG= 661608 
> TEST=existing unittests
>
> Review-Url: https://codereview.chromium.org/2560293002

TBR=rouslan@chromium.org,avi@chromium.org,tommyt@opera.com,jinho.bang@samsung.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 661608 

Review-Url: https://codereview.chromium.org/2565423002
Cr-Commit-Position: refs/heads/master@{#437861}

[modify] https://crrev.com/e4e2b2b1b5841b99d4745651345f0fd2994885b2/content/browser/BUILD.gn
[add] https://crrev.com/e4e2b2b1b5841b99d4745651345f0fd2994885b2/content/browser/payments/payment_app_context.cc
[add] https://crrev.com/e4e2b2b1b5841b99d4745651345f0fd2994885b2/content/browser/payments/payment_app_context.h
[delete] https://crrev.com/ad0ce2577cc44cf768defe2b5c6f582de811d863/content/browser/payments/payment_app_context_impl.cc
[delete] https://crrev.com/ad0ce2577cc44cf768defe2b5c6f582de811d863/content/browser/payments/payment_app_context_impl.h
[delete] https://crrev.com/ad0ce2577cc44cf768defe2b5c6f582de811d863/content/browser/payments/payment_app_database.cc
[delete] https://crrev.com/ad0ce2577cc44cf768defe2b5c6f582de811d863/content/browser/payments/payment_app_database.h
[modify] https://crrev.com/e4e2b2b1b5841b99d4745651345f0fd2994885b2/content/browser/payments/payment_app_manager.cc
[modify] https://crrev.com/e4e2b2b1b5841b99d4745651345f0fd2994885b2/content/browser/payments/payment_app_manager.h
[modify] https://crrev.com/e4e2b2b1b5841b99d4745651345f0fd2994885b2/content/browser/payments/payment_app_manager_unittest.cc
[modify] https://crrev.com/e4e2b2b1b5841b99d4745651345f0fd2994885b2/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/e4e2b2b1b5841b99d4745651345f0fd2994885b2/content/browser/storage_partition_impl.cc
[modify] https://crrev.com/e4e2b2b1b5841b99d4745651345f0fd2994885b2/content/browser/storage_partition_impl.h
[delete] https://crrev.com/ad0ce2577cc44cf768defe2b5c6f582de811d863/content/public/browser/payment_app_context.h

Project Member

Comment 14 by bugdroid1@chromium.org, Dec 12 2016

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/clank/internal/apps/+/8b99287a0da6c033a7ad86f5967ef71371cb4044

commit 8b99287a0da6c033a7ad86f5967ef71371cb4044
Author: Rouslan Solomakhin <rouslan@google.com>
Date: Fri Dec 09 14:26:31 2016

Project Member

Comment 15 by bugdroid1@chromium.org, Dec 12 2016

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/clank/internal/apps/+/158b745a29533fad09928333e4dfce4ce2ed417e

commit 158b745a29533fad09928333e4dfce4ce2ed417e
Author: Juan A. Navarro Perez <perezju@google.com>
Date: Mon Dec 12 15:17:46 2016

Project Member

Comment 16 by bugdroid1@chromium.org, Dec 13 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/48c76126b7ee062e0bcd470d9b47e0359f1f8db3

commit 48c76126b7ee062e0bcd470d9b47e0359f1f8db3
Author: tommyt <tommyt@opera.com>
Date: Tue Dec 13 20:06:48 2016

PaymentApp: Implement the JNI bridge

Add two native methods to ServiceWorkerPaymentAppBridge, and implement
them in service_worker_payment_app_bridge.cc. The two methods are
GetAllAppManifests and InvokePaymentApp. At the moment, they are just
stubs, although GetAllAppManifest contains a bit of code, mainly
for illustration and to avoid compile errors for unused @CalledFromNative
methods in ServiceWorkerPaymentAppBridge.

BUG= 661608 

Review-Url: https://codereview.chromium.org/2556753002
Cr-Commit-Position: refs/heads/master@{#438269}

[modify] https://crrev.com/48c76126b7ee062e0bcd470d9b47e0359f1f8db3/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentAppBridge.java
[modify] https://crrev.com/48c76126b7ee062e0bcd470d9b47e0359f1f8db3/chrome/browser/BUILD.gn
[modify] https://crrev.com/48c76126b7ee062e0bcd470d9b47e0359f1f8db3/chrome/browser/android/chrome_jni_registrar.cc
[add] https://crrev.com/48c76126b7ee062e0bcd470d9b47e0359f1f8db3/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
[add] https://crrev.com/48c76126b7ee062e0bcd470d9b47e0359f1f8db3/chrome/browser/android/payments/service_worker_payment_app_bridge.h

Project Member

Comment 17 by bugdroid1@chromium.org, Dec 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/745d987b499655bcbc62fa96207abe085bb503f6

commit 745d987b499655bcbc62fa96207abe085bb503f6
Author: jinho.bang <jinho.bang@samsung.com>
Date: Wed Dec 14 19:06:54 2016

PaymentApp: Add a interface to query all payment app manifests.

This CL is adding GetAllManifests() to query all payment app manifests
in Chrome layer. So, just rename existing PaymentAppContext in
content/browser/payments to PaymentAppContextImpl and then add a new
PaymentAppContext interface in content/public to expose some APIs to
Chrome layer.

This CL doesn't include actual impelementation now and it will be
completed in follow-up CL.

BUG= 661608 

Review-Url: https://codereview.chromium.org/2575583003
Cr-Commit-Position: refs/heads/master@{#438569}

[modify] https://crrev.com/745d987b499655bcbc62fa96207abe085bb503f6/content/browser/BUILD.gn
[rename] https://crrev.com/745d987b499655bcbc62fa96207abe085bb503f6/content/browser/payments/payment_app_context_impl.cc
[rename] https://crrev.com/745d987b499655bcbc62fa96207abe085bb503f6/content/browser/payments/payment_app_context_impl.h
[modify] https://crrev.com/745d987b499655bcbc62fa96207abe085bb503f6/content/browser/payments/payment_app_manager.cc
[modify] https://crrev.com/745d987b499655bcbc62fa96207abe085bb503f6/content/browser/payments/payment_app_manager.h
[modify] https://crrev.com/745d987b499655bcbc62fa96207abe085bb503f6/content/browser/payments/payment_app_manager_unittest.cc
[modify] https://crrev.com/745d987b499655bcbc62fa96207abe085bb503f6/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/745d987b499655bcbc62fa96207abe085bb503f6/content/browser/storage_partition_impl.cc
[modify] https://crrev.com/745d987b499655bcbc62fa96207abe085bb503f6/content/browser/storage_partition_impl.h
[add] https://crrev.com/745d987b499655bcbc62fa96207abe085bb503f6/content/public/browser/payment_app_context.h

Project Member

Comment 18 by bugdroid1@chromium.org, Dec 16 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ab43057199ce68c2e9264fa98c9bd24cc1be4fd8

commit ab43057199ce68c2e9264fa98c9bd24cc1be4fd8
Author: jinho.bang <jinho.bang@samsung.com>
Date: Fri Dec 16 14:33:58 2016

PaymentApp: Introduce PaymentAppDatabase class.

Write PaymentAppDatabase class and then just move most of logics to access
database from PaymentAppManager to the new class.

The class is providing APIs to read/write payment app related data(e.g. manifest
and associated service worker). It can be shared between payment_app_manager.cc
and payment_app_context.cc.

The payment_app_manager.cc contains a actual implementation of the
PaymentAppManager interface[1] used on the page or worker.
Also, the payment_app_context.cc can be used to query all manifests data.
in order to update payment request UI in Chrome layer.

[1] https://w3c.github.io/webpayments-payment-apps-api/#payment-app-manager

BUG= 661608 

Review-Url: https://codereview.chromium.org/2572183002
Cr-Commit-Position: refs/heads/master@{#439100}

[modify] https://crrev.com/ab43057199ce68c2e9264fa98c9bd24cc1be4fd8/content/browser/BUILD.gn
[modify] https://crrev.com/ab43057199ce68c2e9264fa98c9bd24cc1be4fd8/content/browser/payments/payment_app_context_impl.cc
[modify] https://crrev.com/ab43057199ce68c2e9264fa98c9bd24cc1be4fd8/content/browser/payments/payment_app_context_impl.h
[add] https://crrev.com/ab43057199ce68c2e9264fa98c9bd24cc1be4fd8/content/browser/payments/payment_app_database.cc
[add] https://crrev.com/ab43057199ce68c2e9264fa98c9bd24cc1be4fd8/content/browser/payments/payment_app_database.h
[modify] https://crrev.com/ab43057199ce68c2e9264fa98c9bd24cc1be4fd8/content/browser/payments/payment_app_manager.cc
[modify] https://crrev.com/ab43057199ce68c2e9264fa98c9bd24cc1be4fd8/content/browser/payments/payment_app_manager.h
[modify] https://crrev.com/ab43057199ce68c2e9264fa98c9bd24cc1be4fd8/content/browser/payments/payment_app_manager_unittest.cc
[modify] https://crrev.com/ab43057199ce68c2e9264fa98c9bd24cc1be4fd8/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/ab43057199ce68c2e9264fa98c9bd24cc1be4fd8/content/browser/storage_partition_impl.cc

Project Member

Comment 19 by bugdroid1@chromium.org, Dec 16 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e86e8cd3274d2a531f8b77fe89e25aae4e7bf10b

commit e86e8cd3274d2a531f8b77fe89e25aae4e7bf10b
Author: hs1217.lee <hs1217.lee@samsung.com>
Date: Fri Dec 16 21:28:25 2016

[PaymentApp] label field was changed to name field in PaymentAppOption.

label field was changed to name field in PaymentAppOption.idl and PaymentAppManifest.idl
and also required keyword was added.

spec list:
https://w3c.github.io/webpayments-payment-apps-api/#payment-app-options
https://w3c.github.io/webpayments-payment-apps-api/#payment-app-manifest
https://github.com/w3c/webpayments-payment-apps-api/pull/70

BUG= 661608 

Review-Url: https://codereview.chromium.org/2562873002
Cr-Commit-Position: refs/heads/master@{#439192}

[modify] https://crrev.com/e86e8cd3274d2a531f8b77fe89e25aae4e7bf10b/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
[modify] https://crrev.com/e86e8cd3274d2a531f8b77fe89e25aae4e7bf10b/components/payments/payment_app.mojom
[modify] https://crrev.com/e86e8cd3274d2a531f8b77fe89e25aae4e7bf10b/content/browser/payments/payment_app.proto
[modify] https://crrev.com/e86e8cd3274d2a531f8b77fe89e25aae4e7bf10b/content/browser/payments/payment_app_database.cc
[modify] https://crrev.com/e86e8cd3274d2a531f8b77fe89e25aae4e7bf10b/content/browser/payments/payment_app_manager_unittest.cc
[modify] https://crrev.com/e86e8cd3274d2a531f8b77fe89e25aae4e7bf10b/third_party/WebKit/LayoutTests/http/tests/payments/payment-app-manager.html
[modify] https://crrev.com/e86e8cd3274d2a531f8b77fe89e25aae4e7bf10b/third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp
[modify] https://crrev.com/e86e8cd3274d2a531f8b77fe89e25aae4e7bf10b/third_party/WebKit/Source/modules/payments/PaymentAppManifest.idl
[modify] https://crrev.com/e86e8cd3274d2a531f8b77fe89e25aae4e7bf10b/third_party/WebKit/Source/modules/payments/PaymentAppOption.idl

Project Member

Comment 20 by bugdroid1@chromium.org, Dec 19 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e7f7d131d832a62ea5e480c7781736acfba90f62

commit e7f7d131d832a62ea5e480c7781736acfba90f62
Author: jinho.bang <jinho.bang@samsung.com>
Date: Mon Dec 19 20:45:00 2016

PaymentApp: Implement GetAllManifests() in PaymentAppContext.

This CL is implementing GetAllManifests() method in PaymentAppContext. It is
used to query all manifests data in Chrome layer to display all registered
payment apps in the payment request UI.

Wrote a test for this CL in payment_app_context_impl_unittest.cc and moved
a lot of existing codes in payment_app_manager_unittest.cc to
payment_app_content_unittest_base.cc to share many codes between the new test
and the existing test.

BUG= 661608 
TEST=payment_app_context_impl_unittest.cc

Review-Url: https://codereview.chromium.org/2556433002
Cr-Commit-Position: refs/heads/master@{#439546}

[add] https://crrev.com/e7f7d131d832a62ea5e480c7781736acfba90f62/content/browser/payments/payment_app_content_unittest_base.cc
[add] https://crrev.com/e7f7d131d832a62ea5e480c7781736acfba90f62/content/browser/payments/payment_app_content_unittest_base.h
[modify] https://crrev.com/e7f7d131d832a62ea5e480c7781736acfba90f62/content/browser/payments/payment_app_context_impl.cc
[modify] https://crrev.com/e7f7d131d832a62ea5e480c7781736acfba90f62/content/browser/payments/payment_app_context_impl.h
[add] https://crrev.com/e7f7d131d832a62ea5e480c7781736acfba90f62/content/browser/payments/payment_app_context_impl_unittest.cc
[modify] https://crrev.com/e7f7d131d832a62ea5e480c7781736acfba90f62/content/browser/payments/payment_app_database.cc
[modify] https://crrev.com/e7f7d131d832a62ea5e480c7781736acfba90f62/content/browser/payments/payment_app_database.h
[modify] https://crrev.com/e7f7d131d832a62ea5e480c7781736acfba90f62/content/browser/payments/payment_app_manager.h
[modify] https://crrev.com/e7f7d131d832a62ea5e480c7781736acfba90f62/content/browser/payments/payment_app_manager_unittest.cc
[modify] https://crrev.com/e7f7d131d832a62ea5e480c7781736acfba90f62/content/browser/storage_partition_impl.h
[modify] https://crrev.com/e7f7d131d832a62ea5e480c7781736acfba90f62/content/test/BUILD.gn

Project Member

Comment 22 by bugdroid1@chromium.org, Dec 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f87f3d68d3a82070b599948cf6fbed3b224e0bf0

commit f87f3d68d3a82070b599948cf6fbed3b224e0bf0
Author: jinho.bang <jinho.bang@samsung.com>
Date: Wed Dec 21 00:06:23 2016

PaymentApp: Remove scope_url parameter from Get/SetManifest methods.

When calling setManifest()/getManifest() from Blink side, we currently pass
scope_url to find associated service worker in Content layer. However, it is
not a good way to pass scope_url each time. Of course, since the implementations
are all private methods, there is no risk of calling it wrong from the outside.
But some test classes are declared as friend class and it can be misused in the
classes.

Therefore, this CL is adding Init() in payment_app.mojom and then using it in
Blink side PaymentAppManager when creating the object. Then, we don't need to
pass scope_url each time when calling setManifest()/getManifest().

BUG= 661608 
TEST=existing tests

Review-Url: https://codereview.chromium.org/2586203003
Cr-Commit-Position: refs/heads/master@{#439942}

[modify] https://crrev.com/f87f3d68d3a82070b599948cf6fbed3b224e0bf0/components/payments/payment_app.mojom
[modify] https://crrev.com/f87f3d68d3a82070b599948cf6fbed3b224e0bf0/content/browser/payments/payment_app_content_unittest_base.cc
[modify] https://crrev.com/f87f3d68d3a82070b599948cf6fbed3b224e0bf0/content/browser/payments/payment_app_content_unittest_base.h
[modify] https://crrev.com/f87f3d68d3a82070b599948cf6fbed3b224e0bf0/content/browser/payments/payment_app_context_impl_unittest.cc
[modify] https://crrev.com/f87f3d68d3a82070b599948cf6fbed3b224e0bf0/content/browser/payments/payment_app_manager.cc
[modify] https://crrev.com/f87f3d68d3a82070b599948cf6fbed3b224e0bf0/content/browser/payments/payment_app_manager.h
[modify] https://crrev.com/f87f3d68d3a82070b599948cf6fbed3b224e0bf0/content/browser/payments/payment_app_manager_unittest.cc
[modify] https://crrev.com/f87f3d68d3a82070b599948cf6fbed3b224e0bf0/third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp

Project Member

Comment 23 by bugdroid1@chromium.org, Dec 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7bff1efb9ab1ee6e7e451e697d79fb49ee5fd811

commit 7bff1efb9ab1ee6e7e451e697d79fb49ee5fd811
Author: tommyt <tommyt@opera.com>
Date: Tue Dec 27 09:33:28 2016

PaymentApp: Implement nativeGetAllAppManifests

This change connects the ServiceWorkerPaymentAppBridge to the service
worker payment app code in content/browser/payments. This allows
installed service worker payment apps to show up in the Payment Request
dialog.

I also replace "String scopeUrl" with "long registrationId" as the
identifier for service worker payment apps.

This code is protected by the kServiceWorkerPaymentApps feature flag.

BUG= 661608 

Review-Url: https://codereview.chromium.org/2586213002
Cr-Commit-Position: refs/heads/master@{#440746}

[modify] https://crrev.com/7bff1efb9ab1ee6e7e451e697d79fb49ee5fd811/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentApp.java
[modify] https://crrev.com/7bff1efb9ab1ee6e7e451e697d79fb49ee5fd811/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentAppBridge.java
[modify] https://crrev.com/7bff1efb9ab1ee6e7e451e697d79fb49ee5fd811/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentInstrument.java
[modify] https://crrev.com/7bff1efb9ab1ee6e7e451e697d79fb49ee5fd811/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestServiceWorkerPaymentAppTest.java
[modify] https://crrev.com/7bff1efb9ab1ee6e7e451e697d79fb49ee5fd811/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
[modify] https://crrev.com/7bff1efb9ab1ee6e7e451e697d79fb49ee5fd811/chrome/browser/browsing_data/browsing_data_remover_unittest.cc
[modify] https://crrev.com/7bff1efb9ab1ee6e7e451e697d79fb49ee5fd811/content/browser/storage_partition_impl.h
[modify] https://crrev.com/7bff1efb9ab1ee6e7e451e697d79fb49ee5fd811/content/public/browser/storage_partition.h

Project Member

Comment 24 by bugdroid1@chromium.org, Jan 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/42a9f508444a30bde35c51a4d3854cde070febb3

commit 42a9f508444a30bde35c51a4d3854cde070febb3
Author: hs1217.lee <hs1217.lee@samsung.com>
Date: Thu Jan 05 02:03:31 2017

[PaymentApp] Fix a crash when enabledMethods called.

The spec says enabled_methods in PaymentOptions is not required,
but if we skip the field, a crash occurs in the current implementation.
So, add a check logic whether the field is omitted or not.

Spec:
https://w3c.github.io/webpayments-payment-apps-api/#idl-def-paymentappoption

BUG= 661608 

Review-Url: https://codereview.chromium.org/2602213002
Cr-Commit-Position: refs/heads/master@{#441556}

[modify] https://crrev.com/42a9f508444a30bde35c51a4d3854cde070febb3/third_party/WebKit/LayoutTests/http/tests/payments/payment-app-manager.html
[modify] https://crrev.com/42a9f508444a30bde35c51a4d3854cde070febb3/third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp

Project Member

Comment 25 by bugdroid1@chromium.org, Jan 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ac34b3a3ff3cbe7b56d7e5b840eccf1efcb7ff2e

commit ac34b3a3ff3cbe7b56d7e5b840eccf1efcb7ff2e
Author: jinho.bang <jinho.bang@samsung.com>
Date: Thu Jan 05 12:51:21 2017

PaymentApp: Add PaymentAppProvider class.

The purpose of this class is to expose the following APIs to the chrome layer:
 - GetAllManifests(): query all stored payment app manifests.
 - InvokePaymentApp(): activate service worker and dispatch a payment event.

This has several advantages. First, the role of each class will be clearer.
After this patch, each role is as follows:
 - PaymentAppProvider: Expose the APIs for use in chrome layer.
 - PaymentAppContext: Manage requests coming from Blink and Chrome
   (PaymentAppManager and PaymentAppProvider) to store/query manifest data.
 - PaymentAppDatabase: It's owned by PaymentAppContext. Write or read the
   manifest data of payment app to associated service worker DB.
Second, no longer consider to query each storage partition iteratively in the
chrome layer. So, we can share the logic in all implementation.
(e.g. android and desktop in chrome layer)

This patch modified many files, but it can be summarized as follows:
 - Write a PaymentAppProvider class as singleton.
 - Move GetAllManifests() method from PaymentAppContext to PaymentAppProvider.
 - Move the logic that queries the manifest data from the payment app context
   per storage partition, from the chrome layer to content layer.
 - Rename payment_app_context_impl_unittest.cc with
   payment_app_provider_impl_unittest.cc

BUG= 661608 
TEST=payment_app_provider_impl_unittest.cc

Review-Url: https://codereview.chromium.org/2609103002
Cr-Commit-Position: refs/heads/master@{#441639}

[modify] https://crrev.com/ac34b3a3ff3cbe7b56d7e5b840eccf1efcb7ff2e/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
[modify] https://crrev.com/ac34b3a3ff3cbe7b56d7e5b840eccf1efcb7ff2e/chrome/browser/browsing_data/browsing_data_remover_unittest.cc
[modify] https://crrev.com/ac34b3a3ff3cbe7b56d7e5b840eccf1efcb7ff2e/content/browser/BUILD.gn
[modify] https://crrev.com/ac34b3a3ff3cbe7b56d7e5b840eccf1efcb7ff2e/content/browser/payments/payment_app_content_unittest_base.cc
[modify] https://crrev.com/ac34b3a3ff3cbe7b56d7e5b840eccf1efcb7ff2e/content/browser/payments/payment_app_content_unittest_base.h
[modify] https://crrev.com/ac34b3a3ff3cbe7b56d7e5b840eccf1efcb7ff2e/content/browser/payments/payment_app_context_impl.cc
[modify] https://crrev.com/ac34b3a3ff3cbe7b56d7e5b840eccf1efcb7ff2e/content/browser/payments/payment_app_context_impl.h
[add] https://crrev.com/ac34b3a3ff3cbe7b56d7e5b840eccf1efcb7ff2e/content/browser/payments/payment_app_provider_impl.cc
[add] https://crrev.com/ac34b3a3ff3cbe7b56d7e5b840eccf1efcb7ff2e/content/browser/payments/payment_app_provider_impl.h
[rename] https://crrev.com/ac34b3a3ff3cbe7b56d7e5b840eccf1efcb7ff2e/content/browser/payments/payment_app_provider_impl_unittest.cc
[modify] https://crrev.com/ac34b3a3ff3cbe7b56d7e5b840eccf1efcb7ff2e/content/browser/storage_partition_impl.h
[modify] https://crrev.com/ac34b3a3ff3cbe7b56d7e5b840eccf1efcb7ff2e/content/public/browser/BUILD.gn
[delete] https://crrev.com/e7c05695fbc1407a034269b83871159ca662cceb/content/public/browser/payment_app_context.h
[add] https://crrev.com/ac34b3a3ff3cbe7b56d7e5b840eccf1efcb7ff2e/content/public/browser/payment_app_provider.h
[modify] https://crrev.com/ac34b3a3ff3cbe7b56d7e5b840eccf1efcb7ff2e/content/public/browser/storage_partition.h
[modify] https://crrev.com/ac34b3a3ff3cbe7b56d7e5b840eccf1efcb7ff2e/content/test/BUILD.gn

Project Member

Comment 26 by bugdroid1@chromium.org, Jan 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1cc5c53cff510fe6ba8b256603a01012bd68ba9d

commit 1cc5c53cff510fe6ba8b256603a01012bd68ba9d
Author: jinho.bang <jinho.bang@samsung.com>
Date: Tue Jan 10 06:16:28 2017

PaymentApp: Add interfaces for implementing InvokePaymentApp().

This CL adds basic interfaces(including mojom) in renderer and browser in order
to implement InvokePaymentApp(). The interfaces will actually be implemented in
https://crrev.com/2610163002.

BUG= 661608 

Review-Url: https://codereview.chromium.org/2615063002
Cr-Commit-Position: refs/heads/master@{#442515}

[modify] https://crrev.com/1cc5c53cff510fe6ba8b256603a01012bd68ba9d/components/payments/BUILD.gn
[modify] https://crrev.com/1cc5c53cff510fe6ba8b256603a01012bd68ba9d/components/payments/payment_app.mojom
[modify] https://crrev.com/1cc5c53cff510fe6ba8b256603a01012bd68ba9d/content/browser/payments/payment_app_provider_impl.cc
[modify] https://crrev.com/1cc5c53cff510fe6ba8b256603a01012bd68ba9d/content/browser/payments/payment_app_provider_impl.h
[modify] https://crrev.com/1cc5c53cff510fe6ba8b256603a01012bd68ba9d/content/browser/service_worker/embedded_worker_test_helper.cc
[modify] https://crrev.com/1cc5c53cff510fe6ba8b256603a01012bd68ba9d/content/common/BUILD.gn
[modify] https://crrev.com/1cc5c53cff510fe6ba8b256603a01012bd68ba9d/content/common/service_worker/service_worker_event_dispatcher.mojom
[modify] https://crrev.com/1cc5c53cff510fe6ba8b256603a01012bd68ba9d/content/public/browser/payment_app_provider.h
[modify] https://crrev.com/1cc5c53cff510fe6ba8b256603a01012bd68ba9d/content/renderer/BUILD.gn
[modify] https://crrev.com/1cc5c53cff510fe6ba8b256603a01012bd68ba9d/content/renderer/DEPS
[modify] https://crrev.com/1cc5c53cff510fe6ba8b256603a01012bd68ba9d/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/1cc5c53cff510fe6ba8b256603a01012bd68ba9d/content/renderer/service_worker/service_worker_context_client.h
[modify] https://crrev.com/1cc5c53cff510fe6ba8b256603a01012bd68ba9d/content/test/BUILD.gn

Project Member

Comment 27 by bugdroid1@chromium.org, Jan 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2c684a8bef012e3f85338b72d154b3c68867c021

commit 2c684a8bef012e3f85338b72d154b3c68867c021
Author: jinho.bang <jinho.bang@samsung.com>
Date: Wed Jan 18 17:54:37 2017

PaymentApp: Implement InvokePaymentApp() in content/browser side.

This CL is implementing invokePaymentApp() in browser side. During this work,
added FindRegistrationForIdOnly() method to service worker context wrapper and
some codes to embedded worker test helper for testing event dispatching.

BUG= 661608 
TEST=payment_app_provider_impl_unittest.cc

Review-Url: https://codereview.chromium.org/2610163002
Cr-Commit-Position: refs/heads/master@{#444415}

[modify] https://crrev.com/2c684a8bef012e3f85338b72d154b3c68867c021/content/browser/payments/payment_app_content_unittest_base.cc
[modify] https://crrev.com/2c684a8bef012e3f85338b72d154b3c68867c021/content/browser/payments/payment_app_content_unittest_base.h
[modify] https://crrev.com/2c684a8bef012e3f85338b72d154b3c68867c021/content/browser/payments/payment_app_provider_impl.cc
[modify] https://crrev.com/2c684a8bef012e3f85338b72d154b3c68867c021/content/browser/payments/payment_app_provider_impl_unittest.cc
[modify] https://crrev.com/2c684a8bef012e3f85338b72d154b3c68867c021/content/browser/service_worker/embedded_worker_test_helper.cc
[modify] https://crrev.com/2c684a8bef012e3f85338b72d154b3c68867c021/content/browser/service_worker/embedded_worker_test_helper.h
[modify] https://crrev.com/2c684a8bef012e3f85338b72d154b3c68867c021/content/browser/service_worker/service_worker_context_wrapper.cc
[modify] https://crrev.com/2c684a8bef012e3f85338b72d154b3c68867c021/content/browser/service_worker/service_worker_context_wrapper.h
[modify] https://crrev.com/2c684a8bef012e3f85338b72d154b3c68867c021/content/browser/service_worker/service_worker_metrics.cc
[modify] https://crrev.com/2c684a8bef012e3f85338b72d154b3c68867c021/content/browser/service_worker/service_worker_metrics.h
[modify] https://crrev.com/2c684a8bef012e3f85338b72d154b3c68867c021/content/test/BUILD.gn
[modify] https://crrev.com/2c684a8bef012e3f85338b72d154b3c68867c021/tools/metrics/histograms/histograms.xml

Project Member

Comment 28 by bugdroid1@chromium.org, Jan 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/43a4fa9fea854962de09320188f93f169fc117ae

commit 43a4fa9fea854962de09320188f93f169fc117ae
Author: jinho.bang <jinho.bang@samsung.com>
Date: Tue Jan 31 15:45:09 2017

PaymentApp: Rename PaymentAppRequestData to PaymentAppRequest.

Recently, the name was changed in the spec[1][2][3].

[1] https://github.com/w3c/webpayments-payment-apps-api/pull/84
[2] https://w3c.github.io/webpayments-payment-apps-api/#idl-def-paymentapprequest
[3] https://w3c.github.io/webpayments-payment-apps-api/#idl-def-paymentrequestevent

BUG= 661608 

Review-Url: https://codereview.chromium.org/2665583002
Cr-Commit-Position: refs/heads/master@{#447236}

[modify] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
[modify] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/components/payments/payment_app.mojom
[modify] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/content/browser/payments/payment_app_content_unittest_base.cc
[modify] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/content/browser/payments/payment_app_provider_impl.cc
[modify] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/content/browser/payments/payment_app_provider_impl.h
[modify] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/content/browser/payments/payment_app_provider_impl_unittest.cc
[modify] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/content/browser/service_worker/embedded_worker_test_helper.cc
[modify] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/content/browser/service_worker/embedded_worker_test_helper.h
[modify] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/content/common/service_worker/service_worker_event_dispatcher.mojom
[modify] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/content/public/browser/payment_app_provider.h
[modify] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/content/renderer/service_worker/service_worker_context_client.h
[modify] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/third_party/WebKit/LayoutTests/http/tests/payments/resources/payment-request-event.js
[modify] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/third_party/WebKit/Source/modules/BUILD.gn
[modify] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/third_party/WebKit/Source/modules/modules_idl_files.gni
[modify] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/third_party/WebKit/Source/modules/payments/BUILD.gn
[rename] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/third_party/WebKit/Source/modules/payments/PaymentAppRequest.idl
[rename] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/third_party/WebKit/Source/modules/payments/PaymentAppRequestConversion.cpp
[add] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/third_party/WebKit/Source/modules/payments/PaymentAppRequestConversion.h
[rename] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/third_party/WebKit/Source/modules/payments/PaymentAppRequestConversionTest.cpp
[delete] https://crrev.com/c5cdb47188549b4d5c9ce8905dc8d1edd797cd07/third_party/WebKit/Source/modules/payments/PaymentAppRequestDataConversion.h
[modify] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp
[modify] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.h
[modify] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.idl
[modify] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
[modify] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.h
[modify] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/third_party/WebKit/public/BUILD.gn
[rename] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/third_party/WebKit/public/platform/modules/payments/WebPaymentAppRequest.h
[modify] https://crrev.com/43a4fa9fea854962de09320188f93f169fc117ae/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h

Project Member

Comment 29 by bugdroid1@chromium.org, Feb 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c4545cd9e65fd3a2276e1676ed57c85d1bb7631a

commit c4545cd9e65fd3a2276e1676ed57c85d1bb7631a
Author: jinho.bang <jinho.bang@samsung.com>
Date: Wed Feb 08 04:39:08 2017

PaymentApp: Implement invokePaymentApp() in renderer side.

This is the final patch of a series of three that implements invokePaymentApp().
  - 1/2: https://codereview.chromium.org/2610163002/ (browser side)
  - 2/2: This patch (renderer side)

After this patch, it is possible to invoke a selected payment app if calling
the invokePaymentApp() method in PaymentRequest UI implementation. This CL also
includes a test to verify such behavior.

BUG= 661608 
TEST=payment_app_browsertest.cc

Review-Url: https://codereview.chromium.org/2646313002
Cr-Commit-Position: refs/heads/master@{#448906}

[add] https://crrev.com/c4545cd9e65fd3a2276e1676ed57c85d1bb7631a/content/browser/payments/payment_app_browsertest.cc
[modify] https://crrev.com/c4545cd9e65fd3a2276e1676ed57c85d1bb7631a/content/common/DEPS
[modify] https://crrev.com/c4545cd9e65fd3a2276e1676ed57c85d1bb7631a/content/common/service_worker/OWNERS
[modify] https://crrev.com/c4545cd9e65fd3a2276e1676ed57c85d1bb7631a/content/common/service_worker/service_worker_type_converters.cc
[modify] https://crrev.com/c4545cd9e65fd3a2276e1676ed57c85d1bb7631a/content/common/service_worker/service_worker_type_converters.h
[modify] https://crrev.com/c4545cd9e65fd3a2276e1676ed57c85d1bb7631a/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/c4545cd9e65fd3a2276e1676ed57c85d1bb7631a/content/renderer/service_worker/service_worker_context_client.h
[modify] https://crrev.com/c4545cd9e65fd3a2276e1676ed57c85d1bb7631a/content/test/BUILD.gn
[add] https://crrev.com/c4545cd9e65fd3a2276e1676ed57c85d1bb7631a/content/test/data/payments/payment_app.js
[add] https://crrev.com/c4545cd9e65fd3a2276e1676ed57c85d1bb7631a/content/test/data/payments/payment_app_invocation.html
[add] https://crrev.com/c4545cd9e65fd3a2276e1676ed57c85d1bb7631a/content/test/data/payments/payment_app_window.html
[add] https://crrev.com/c4545cd9e65fd3a2276e1676ed57c85d1bb7631a/content/test/data/payments/result_queue.js
[modify] https://crrev.com/c4545cd9e65fd3a2276e1676ed57c85d1bb7631a/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.cpp

Project Member

Comment 30 by bugdroid1@chromium.org, Mar 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/87bcdeadc1c7bdeb590472d36fc1458e9641274d

commit 87bcdeadc1c7bdeb590472d36fc1458e9641274d
Author: jinho.bang <jinho.bang@samsung.com>
Date: Tue Mar 14 18:01:49 2017

ServiceWorker: Factor out FetchEvent related logics from RespondWithObserver.

To implement respondWith() in PaymentRequestEvent, it's better to factor out
the FetchEvent related logics from RespondWithObserver and then make it as
common class to share common logic between FetchEvent and PaymentRequestEvent.

This CL doesn't change any existing behavior.

See the other CLs in this series:
  [1/3] This patch
  [2/3] https://codereview.chromium.org/2705293010/ (blink side)
  [3/3] https://codereview.chromium.org/2718013004/ (content side and test)

BUG= 661608 

Review-Url: https://codereview.chromium.org/2715663002
Cr-Commit-Position: refs/heads/master@{#456760}

[modify] https://crrev.com/87bcdeadc1c7bdeb590472d36fc1458e9641274d/third_party/WebKit/Source/modules/serviceworkers/BUILD.gn
[modify] https://crrev.com/87bcdeadc1c7bdeb590472d36fc1458e9641274d/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.cpp
[modify] https://crrev.com/87bcdeadc1c7bdeb590472d36fc1458e9641274d/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.h
[add] https://crrev.com/87bcdeadc1c7bdeb590472d36fc1458e9641274d/third_party/WebKit/Source/modules/serviceworkers/FetchRespondWithObserver.cpp
[add] https://crrev.com/87bcdeadc1c7bdeb590472d36fc1458e9641274d/third_party/WebKit/Source/modules/serviceworkers/FetchRespondWithObserver.h
[modify] https://crrev.com/87bcdeadc1c7bdeb590472d36fc1458e9641274d/third_party/WebKit/Source/modules/serviceworkers/ForeignFetchRespondWithObserver.cpp
[modify] https://crrev.com/87bcdeadc1c7bdeb590472d36fc1458e9641274d/third_party/WebKit/Source/modules/serviceworkers/ForeignFetchRespondWithObserver.h
[modify] https://crrev.com/87bcdeadc1c7bdeb590472d36fc1458e9641274d/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.cpp
[modify] https://crrev.com/87bcdeadc1c7bdeb590472d36fc1458e9641274d/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.h
[modify] https://crrev.com/87bcdeadc1c7bdeb590472d36fc1458e9641274d/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp

Project Member

Comment 31 by bugdroid1@chromium.org, Mar 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/af737fca2a12ce091d13c99cfec05d159af0748c

commit af737fca2a12ce091d13c99cfec05d159af0748c
Author: jinho.bang <jinho.bang@samsung.com>
Date: Fri Mar 17 19:11:09 2017

PaymentApp: Implement respondWith() in PaymentRequestEvent. (blink side)

The respondWith() method is used by the payment app to provide a
PaymentAppResponse when the payment successfully completes.

Related Spec Link:
  https://w3c.github.io/webpayments-payment-apps-api/#idl-def-paymentrequestevent

See the other CLs in this series:
  [1/3] https://codereview.chromium.org/2715663002/ (RespondWithObserver)
  [2/3] This patch
  [3/3] https://codereview.chromium.org/2718013004/ (content side and test)

BUG= 661608 
TEST=payment_app_browsertest.cc

Review-Url: https://codereview.chromium.org/2705293010
Cr-Commit-Position: refs/heads/master@{#457841}

[modify] https://crrev.com/af737fca2a12ce091d13c99cfec05d159af0748c/third_party/WebKit/Source/modules/modules_idl_files.gni
[modify] https://crrev.com/af737fca2a12ce091d13c99cfec05d159af0748c/third_party/WebKit/Source/modules/payments/BUILD.gn
[modify] https://crrev.com/af737fca2a12ce091d13c99cfec05d159af0748c/third_party/WebKit/Source/modules/payments/PaymentAppRequestConversion.cpp
[add] https://crrev.com/af737fca2a12ce091d13c99cfec05d159af0748c/third_party/WebKit/Source/modules/payments/PaymentAppResponse.idl
[modify] https://crrev.com/af737fca2a12ce091d13c99cfec05d159af0748c/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp
[modify] https://crrev.com/af737fca2a12ce091d13c99cfec05d159af0748c/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.h
[modify] https://crrev.com/af737fca2a12ce091d13c99cfec05d159af0748c/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.idl
[add] https://crrev.com/af737fca2a12ce091d13c99cfec05d159af0748c/third_party/WebKit/Source/modules/payments/PaymentRequestRespondWithObserver.cpp
[add] https://crrev.com/af737fca2a12ce091d13c99cfec05d159af0748c/third_party/WebKit/Source/modules/payments/PaymentRequestRespondWithObserver.h
[modify] https://crrev.com/af737fca2a12ce091d13c99cfec05d159af0748c/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.h
[modify] https://crrev.com/af737fca2a12ce091d13c99cfec05d159af0748c/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeClientImpl.cpp
[modify] https://crrev.com/af737fca2a12ce091d13c99cfec05d159af0748c/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeClientImpl.h
[modify] https://crrev.com/af737fca2a12ce091d13c99cfec05d159af0748c/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
[modify] https://crrev.com/af737fca2a12ce091d13c99cfec05d159af0748c/third_party/WebKit/public/BUILD.gn
[add] https://crrev.com/af737fca2a12ce091d13c99cfec05d159af0748c/third_party/WebKit/public/platform/modules/payments/WebPaymentAppResponse.h
[modify] https://crrev.com/af737fca2a12ce091d13c99cfec05d159af0748c/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h

Project Member

Comment 32 by bugdroid1@chromium.org, Mar 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/865ce0550e0ba864c2a830bde1f7d74004edca9b

commit 865ce0550e0ba864c2a830bde1f7d74004edca9b
Author: jinho.bang <jinho.bang@samsung.com>
Date: Thu Mar 30 03:04:34 2017

PaymentApp: Implement respondWith() in PaymentRequestEvent. (content side)

The respondWith() method is used by the payment app to provide a
PaymentAppResponse when the payment successfully completes.

This CL includes a content-side implementation and browser test. Especially, add
a callback to InvokePaymentApp() in PaymentAppProvider. The callback is used to
pass a response data from payment app using respondWith().

Related Spec Link:
  https://w3c.github.io/webpayments-payment-apps-api/#idl-def-paymentrequestevent

See the other CLs in this series:
  [1/3] https://codereview.chromium.org/2715663002/ (RespondWithObserver)
  [2/3] https://codereview.chromium.org/2705293010/ (blink side)
  [3/3] This patch

BUG= 661608 
TEST=payment_app_browsertest.cc

Review-Url: https://codereview.chromium.org/2718013004
Cr-Commit-Position: refs/heads/master@{#460634}

[modify] https://crrev.com/865ce0550e0ba864c2a830bde1f7d74004edca9b/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
[modify] https://crrev.com/865ce0550e0ba864c2a830bde1f7d74004edca9b/components/payments/content/BUILD.gn
[modify] https://crrev.com/865ce0550e0ba864c2a830bde1f7d74004edca9b/components/payments/content/payment_app.mojom
[modify] https://crrev.com/865ce0550e0ba864c2a830bde1f7d74004edca9b/content/browser/payments/payment_app_browsertest.cc
[modify] https://crrev.com/865ce0550e0ba864c2a830bde1f7d74004edca9b/content/browser/payments/payment_app_content_unittest_base.cc
[modify] https://crrev.com/865ce0550e0ba864c2a830bde1f7d74004edca9b/content/browser/payments/payment_app_content_unittest_base.h
[modify] https://crrev.com/865ce0550e0ba864c2a830bde1f7d74004edca9b/content/browser/payments/payment_app_provider_impl.cc
[modify] https://crrev.com/865ce0550e0ba864c2a830bde1f7d74004edca9b/content/browser/payments/payment_app_provider_impl.h
[modify] https://crrev.com/865ce0550e0ba864c2a830bde1f7d74004edca9b/content/browser/payments/payment_app_provider_impl_unittest.cc
[modify] https://crrev.com/865ce0550e0ba864c2a830bde1f7d74004edca9b/content/browser/service_worker/embedded_worker_test_helper.cc
[modify] https://crrev.com/865ce0550e0ba864c2a830bde1f7d74004edca9b/content/browser/service_worker/embedded_worker_test_helper.h
[modify] https://crrev.com/865ce0550e0ba864c2a830bde1f7d74004edca9b/content/common/service_worker/service_worker_event_dispatcher.mojom
[modify] https://crrev.com/865ce0550e0ba864c2a830bde1f7d74004edca9b/content/public/browser/DEPS
[modify] https://crrev.com/865ce0550e0ba864c2a830bde1f7d74004edca9b/content/public/browser/payment_app_provider.h
[modify] https://crrev.com/865ce0550e0ba864c2a830bde1f7d74004edca9b/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/865ce0550e0ba864c2a830bde1f7d74004edca9b/content/renderer/service_worker/service_worker_context_client.h
[modify] https://crrev.com/865ce0550e0ba864c2a830bde1f7d74004edca9b/content/test/data/payments/payment_app.js
[modify] https://crrev.com/865ce0550e0ba864c2a830bde1f7d74004edca9b/content/test/data/payments/payment_app_window.html

Project Member

Comment 33 by bugdroid1@chromium.org, Mar 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c8e4d733fe61ac65f4c834d7fbe73a63dda1b2ed

commit c8e4d733fe61ac65f4c834d7fbe73a63dda1b2ed
Author: jinho.bang <jinho.bang@samsung.com>
Date: Thu Mar 30 19:09:19 2017

PaymentHandler: Initial implementation for PaymentInstruments.

This CL only adds IDLs and empty implementations. This feature is behind runtime
flag.

Related spec:
  https://w3c.github.io/webpayments-payment-apps-api/#payment-instruments

BUG= 661608 

Review-Url: https://codereview.chromium.org/2775343002
Cr-Commit-Position: refs/heads/master@{#460844}

[modify] https://crrev.com/c8e4d733fe61ac65f4c834d7fbe73a63dda1b2ed/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/c8e4d733fe61ac65f4c834d7fbe73a63dda1b2ed/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/c8e4d733fe61ac65f4c834d7fbe73a63dda1b2ed/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/c8e4d733fe61ac65f4c834d7fbe73a63dda1b2ed/third_party/WebKit/Source/modules/modules_idl_files.gni
[modify] https://crrev.com/c8e4d733fe61ac65f4c834d7fbe73a63dda1b2ed/third_party/WebKit/Source/modules/payments/BUILD.gn
[add] https://crrev.com/c8e4d733fe61ac65f4c834d7fbe73a63dda1b2ed/third_party/WebKit/Source/modules/payments/PaymentInstrument.idl
[add] https://crrev.com/c8e4d733fe61ac65f4c834d7fbe73a63dda1b2ed/third_party/WebKit/Source/modules/payments/PaymentInstruments.cpp
[add] https://crrev.com/c8e4d733fe61ac65f4c834d7fbe73a63dda1b2ed/third_party/WebKit/Source/modules/payments/PaymentInstruments.h
[add] https://crrev.com/c8e4d733fe61ac65f4c834d7fbe73a63dda1b2ed/third_party/WebKit/Source/modules/payments/PaymentInstruments.idl
[modify] https://crrev.com/c8e4d733fe61ac65f4c834d7fbe73a63dda1b2ed/third_party/WebKit/Source/modules/payments/PaymentManager.cpp
[modify] https://crrev.com/c8e4d733fe61ac65f4c834d7fbe73a63dda1b2ed/third_party/WebKit/Source/modules/payments/PaymentManager.h
[modify] https://crrev.com/c8e4d733fe61ac65f4c834d7fbe73a63dda1b2ed/third_party/WebKit/Source/modules/payments/PaymentManager.idl

Project Member

Comment 34 by bugdroid1@chromium.org, Apr 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fe1c747c077c99272ebbc2eafe7983b9b9e2d927

commit fe1c747c077c99272ebbc2eafe7983b9b9e2d927
Author: jinho.bang <jinho.bang@samsung.com>
Date: Mon Apr 17 15:58:16 2017

PaymentHandler: Implement set/get methods in PaymentInstruments (blink)

The methods are simply writing and reading PaymentInstrument data to storage.

Related Spec Link:
  https://w3c.github.io/webpayments-payment-apps-api/#payment-instruments

See the other CLs in this series:
  [1/3] http://crrev.com/2790013002 (this patch)
  [2/3] http://crrev.com/2806133002 (content side and unittests)
  [3/3] http://crrev.com/2811163002 (js test)

BUG= 661608 

Review-Url: https://codereview.chromium.org/2790013002
Cr-Commit-Position: refs/heads/master@{#464925}

[modify] https://crrev.com/fe1c747c077c99272ebbc2eafe7983b9b9e2d927/components/payments/mojom/payment_app.mojom
[modify] https://crrev.com/fe1c747c077c99272ebbc2eafe7983b9b9e2d927/content/browser/payments/payment_manager.cc
[modify] https://crrev.com/fe1c747c077c99272ebbc2eafe7983b9b9e2d927/content/browser/payments/payment_manager.h
[modify] https://crrev.com/fe1c747c077c99272ebbc2eafe7983b9b9e2d927/third_party/WebKit/Source/modules/payments/PaymentInstruments.cpp
[modify] https://crrev.com/fe1c747c077c99272ebbc2eafe7983b9b9e2d927/third_party/WebKit/Source/modules/payments/PaymentInstruments.h
[modify] https://crrev.com/fe1c747c077c99272ebbc2eafe7983b9b9e2d927/third_party/WebKit/Source/modules/payments/PaymentInstruments.idl
[modify] https://crrev.com/fe1c747c077c99272ebbc2eafe7983b9b9e2d927/third_party/WebKit/Source/modules/payments/PaymentManager.cpp
[modify] https://crrev.com/fe1c747c077c99272ebbc2eafe7983b9b9e2d927/third_party/WebKit/Source/modules/payments/PaymentManager.h

Project Member

Comment 35 by bugdroid1@chromium.org, Apr 17 2017

Project Member

Comment 36 by bugdroid1@chromium.org, Apr 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bf32bc709c97515485b41f48c783dab5c5d0d30f

commit bf32bc709c97515485b41f48c783dab5c5d0d30f
Author: jinho.bang <jinho.bang@samsung.com>
Date: Mon Apr 17 18:24:07 2017

PaymentHandler: Add a js test for PaymentInstruments get/set methods

Related Spec Link:
  https://w3c.github.io/webpayments-payment-apps-api/#payment-instruments

See the other CLs in this series:
  [1/3] http://crrev.com/2790013002 (blink side)
  [2/3] http://crrev.com/2806133002 (content side and unittests)
  [3/3] http://crrev.com/2811163002 (this patch)

BUG= 661608 

Review-Url: https://codereview.chromium.org/2811163002
Cr-Commit-Position: refs/heads/master@{#464953}

[add] https://crrev.com/bf32bc709c97515485b41f48c783dab5c5d0d30f/third_party/WebKit/LayoutTests/http/tests/payments/payment-instruments.html

Project Member

Comment 37 by bugdroid1@chromium.org, Apr 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bd27d5fb3a918c21d8231b32fa0ec929ec66afae

commit bd27d5fb3a918c21d8231b32fa0ec929ec66afae
Author: jinho.bang <jinho.bang@samsung.com>
Date: Wed Apr 26 12:09:34 2017

PaymentHandler: Implement PaymentInstruments.delete().

Remove the stored payment instrument in associated service worker registration.

Related Spec Link:
  https://w3c.github.io/webpayments-payment-handler/#paymentinstruments-interface

BUG= 661608 
TEST=payment_manager_unittest.cc, payment-instruments.html

Review-Url: https://codereview.chromium.org/2844463002
Cr-Commit-Position: refs/heads/master@{#467304}

[modify] https://crrev.com/bd27d5fb3a918c21d8231b32fa0ec929ec66afae/components/payments/mojom/payment_app.mojom
[modify] https://crrev.com/bd27d5fb3a918c21d8231b32fa0ec929ec66afae/content/browser/payments/payment_app_database.cc
[modify] https://crrev.com/bd27d5fb3a918c21d8231b32fa0ec929ec66afae/content/browser/payments/payment_app_database.h
[modify] https://crrev.com/bd27d5fb3a918c21d8231b32fa0ec929ec66afae/content/browser/payments/payment_manager.cc
[modify] https://crrev.com/bd27d5fb3a918c21d8231b32fa0ec929ec66afae/content/browser/payments/payment_manager.h
[modify] https://crrev.com/bd27d5fb3a918c21d8231b32fa0ec929ec66afae/content/browser/payments/payment_manager_unittest.cc
[modify] https://crrev.com/bd27d5fb3a918c21d8231b32fa0ec929ec66afae/third_party/WebKit/LayoutTests/http/tests/payments/payment-instruments.html
[modify] https://crrev.com/bd27d5fb3a918c21d8231b32fa0ec929ec66afae/third_party/WebKit/Source/modules/payments/PaymentInstruments.cpp
[modify] https://crrev.com/bd27d5fb3a918c21d8231b32fa0ec929ec66afae/third_party/WebKit/Source/modules/payments/PaymentInstruments.h
[modify] https://crrev.com/bd27d5fb3a918c21d8231b32fa0ec929ec66afae/third_party/WebKit/Source/modules/payments/PaymentInstruments.idl

Project Member

Comment 39 by bugdroid1@chromium.org, Apr 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8f5656549a8eb15b9566d42b3d9abc6e4d422f77

commit 8f5656549a8eb15b9566d42b3d9abc6e4d422f77
Author: jinho.bang <jinho.bang@samsung.com>
Date: Thu Apr 27 16:15:20 2017

PaymentHandler: Implement PaymentInstruments.has().

The method to check whether the payment instrument for the specified key is
stored.

Related Spec Link:
  https://w3c.github.io/webpayments-payment-handler/#paymentinstruments-interface

BUG= 661608 
TEST=payment_manager_unittest.cc, payment-instruments.html

Review-Url: https://codereview.chromium.org/2844673002
Cr-Commit-Position: refs/heads/master@{#467701}

[modify] https://crrev.com/8f5656549a8eb15b9566d42b3d9abc6e4d422f77/components/payments/mojom/payment_app.mojom
[modify] https://crrev.com/8f5656549a8eb15b9566d42b3d9abc6e4d422f77/content/browser/payments/payment_app_database.cc
[modify] https://crrev.com/8f5656549a8eb15b9566d42b3d9abc6e4d422f77/content/browser/payments/payment_app_database.h
[modify] https://crrev.com/8f5656549a8eb15b9566d42b3d9abc6e4d422f77/content/browser/payments/payment_manager.cc
[modify] https://crrev.com/8f5656549a8eb15b9566d42b3d9abc6e4d422f77/content/browser/payments/payment_manager.h
[modify] https://crrev.com/8f5656549a8eb15b9566d42b3d9abc6e4d422f77/content/browser/payments/payment_manager_unittest.cc
[modify] https://crrev.com/8f5656549a8eb15b9566d42b3d9abc6e4d422f77/third_party/WebKit/LayoutTests/http/tests/payments/payment-instruments.html
[modify] https://crrev.com/8f5656549a8eb15b9566d42b3d9abc6e4d422f77/third_party/WebKit/Source/modules/payments/PaymentInstruments.cpp
[modify] https://crrev.com/8f5656549a8eb15b9566d42b3d9abc6e4d422f77/third_party/WebKit/Source/modules/payments/PaymentInstruments.h
[modify] https://crrev.com/8f5656549a8eb15b9566d42b3d9abc6e4d422f77/third_party/WebKit/Source/modules/payments/PaymentInstruments.idl

Project Member

Comment 40 by bugdroid1@chromium.org, Apr 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e052a49fd7fad23a559f05c54e6dce8671c13883

commit e052a49fd7fad23a559f05c54e6dce8671c13883
Author: jinho.bang <jinho.bang@samsung.com>
Date: Thu Apr 27 17:56:58 2017

PaymentHandler: Add a key prefix to avoid key conflicts with others.

The current implementation is using the service worker database (is based on
level DB) to store payment instrument data. The other SW features also use
the same way.
The instrument key is mapping with database key directly, So, the database key
might be conflict with other SW related features such as push notification.
To avoid this problem, this CL adds a prefix to instrument key.

BUG= 661608 
TEST=existing tests

Review-Url: https://codereview.chromium.org/2847533003
Cr-Commit-Position: refs/heads/master@{#467736}

[modify] https://crrev.com/e052a49fd7fad23a559f05c54e6dce8671c13883/content/browser/payments/payment_app_database.cc

Project Member

Comment 41 by bugdroid1@chromium.org, May 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/09c61ecc5adf140aa7a59aef0ecacc510e0be1d8

commit 09c61ecc5adf140aa7a59aef0ecacc510e0be1d8
Author: jinho.bang <jinho.bang@samsung.com>
Date: Tue May 02 19:44:55 2017

PaymentHandler: Implement PaymentInstruments.keys().

The method to return keys of the stored payment instruments in insertion order.

Related Spec Link:
  https://w3c.github.io/webpayments-payment-handler/#paymentinstruments-interface

BUG= 661608 
TEST=payment_manager_unittest.cc, payment-instruments.html

Review-Url: https://codereview.chromium.org/2850203002
Cr-Commit-Position: refs/heads/master@{#468747}

[modify] https://crrev.com/09c61ecc5adf140aa7a59aef0ecacc510e0be1d8/components/payments/mojom/payment_app.mojom
[modify] https://crrev.com/09c61ecc5adf140aa7a59aef0ecacc510e0be1d8/content/browser/payments/payment_app.proto
[modify] https://crrev.com/09c61ecc5adf140aa7a59aef0ecacc510e0be1d8/content/browser/payments/payment_app_database.cc
[modify] https://crrev.com/09c61ecc5adf140aa7a59aef0ecacc510e0be1d8/content/browser/payments/payment_app_database.h
[modify] https://crrev.com/09c61ecc5adf140aa7a59aef0ecacc510e0be1d8/content/browser/payments/payment_manager.cc
[modify] https://crrev.com/09c61ecc5adf140aa7a59aef0ecacc510e0be1d8/content/browser/payments/payment_manager.h
[modify] https://crrev.com/09c61ecc5adf140aa7a59aef0ecacc510e0be1d8/content/browser/payments/payment_manager_unittest.cc
[modify] https://crrev.com/09c61ecc5adf140aa7a59aef0ecacc510e0be1d8/content/browser/service_worker/service_worker_context_wrapper.cc
[modify] https://crrev.com/09c61ecc5adf140aa7a59aef0ecacc510e0be1d8/content/browser/service_worker/service_worker_context_wrapper.h
[modify] https://crrev.com/09c61ecc5adf140aa7a59aef0ecacc510e0be1d8/content/browser/service_worker/service_worker_database.cc
[modify] https://crrev.com/09c61ecc5adf140aa7a59aef0ecacc510e0be1d8/content/browser/service_worker/service_worker_database.h
[modify] https://crrev.com/09c61ecc5adf140aa7a59aef0ecacc510e0be1d8/content/browser/service_worker/service_worker_storage.cc
[modify] https://crrev.com/09c61ecc5adf140aa7a59aef0ecacc510e0be1d8/content/browser/service_worker/service_worker_storage.h
[modify] https://crrev.com/09c61ecc5adf140aa7a59aef0ecacc510e0be1d8/third_party/WebKit/LayoutTests/http/tests/payments/payment-instruments.html
[modify] https://crrev.com/09c61ecc5adf140aa7a59aef0ecacc510e0be1d8/third_party/WebKit/Source/modules/payments/PaymentInstruments.cpp
[modify] https://crrev.com/09c61ecc5adf140aa7a59aef0ecacc510e0be1d8/third_party/WebKit/Source/modules/payments/PaymentInstruments.h
[modify] https://crrev.com/09c61ecc5adf140aa7a59aef0ecacc510e0be1d8/third_party/WebKit/Source/modules/payments/PaymentInstruments.idl

Project Member

Comment 42 by bugdroid1@chromium.org, May 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9d3c221bdef03b02ef3ed0fe150433592d960f19

commit 9d3c221bdef03b02ef3ed0fe150433592d960f19
Author: adithyas <adithyas@chromium.org>
Date: Tue May 02 21:20:40 2017

Revert of PaymentHandler: Implement PaymentInstruments.keys(). (patchset #3 id:40001 of https://codereview.chromium.org/2850203002/ )

Reason for revert:
This patch is causing some PaymentManager tests to fail.

Original issue's description:
> PaymentHandler: Implement PaymentInstruments.keys().
>
> The method to return keys of the stored payment instruments in insertion order.
>
> Related Spec Link:
>   https://w3c.github.io/webpayments-payment-handler/#paymentinstruments-interface
>
> BUG= 661608 
> TEST=payment_manager_unittest.cc, payment-instruments.html
>
> Review-Url: https://codereview.chromium.org/2850203002
> Cr-Commit-Position: refs/heads/master@{#468747}
> Committed: https://chromium.googlesource.com/chromium/src/+/09c61ecc5adf140aa7a59aef0ecacc510e0be1d8

TBR=rouslan@chromium.org,tsepez@chromium.org,nhiroki@chromium.org,jinho.bang@samsung.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 661608 

Review-Url: https://codereview.chromium.org/2858773002
Cr-Commit-Position: refs/heads/master@{#468773}

[modify] https://crrev.com/9d3c221bdef03b02ef3ed0fe150433592d960f19/components/payments/mojom/payment_app.mojom
[modify] https://crrev.com/9d3c221bdef03b02ef3ed0fe150433592d960f19/content/browser/payments/payment_app.proto
[modify] https://crrev.com/9d3c221bdef03b02ef3ed0fe150433592d960f19/content/browser/payments/payment_app_database.cc
[modify] https://crrev.com/9d3c221bdef03b02ef3ed0fe150433592d960f19/content/browser/payments/payment_app_database.h
[modify] https://crrev.com/9d3c221bdef03b02ef3ed0fe150433592d960f19/content/browser/payments/payment_manager.cc
[modify] https://crrev.com/9d3c221bdef03b02ef3ed0fe150433592d960f19/content/browser/payments/payment_manager.h
[modify] https://crrev.com/9d3c221bdef03b02ef3ed0fe150433592d960f19/content/browser/payments/payment_manager_unittest.cc
[modify] https://crrev.com/9d3c221bdef03b02ef3ed0fe150433592d960f19/content/browser/service_worker/service_worker_context_wrapper.cc
[modify] https://crrev.com/9d3c221bdef03b02ef3ed0fe150433592d960f19/content/browser/service_worker/service_worker_context_wrapper.h
[modify] https://crrev.com/9d3c221bdef03b02ef3ed0fe150433592d960f19/content/browser/service_worker/service_worker_database.cc
[modify] https://crrev.com/9d3c221bdef03b02ef3ed0fe150433592d960f19/content/browser/service_worker/service_worker_database.h
[modify] https://crrev.com/9d3c221bdef03b02ef3ed0fe150433592d960f19/content/browser/service_worker/service_worker_storage.cc
[modify] https://crrev.com/9d3c221bdef03b02ef3ed0fe150433592d960f19/content/browser/service_worker/service_worker_storage.h
[modify] https://crrev.com/9d3c221bdef03b02ef3ed0fe150433592d960f19/third_party/WebKit/LayoutTests/http/tests/payments/payment-instruments.html
[modify] https://crrev.com/9d3c221bdef03b02ef3ed0fe150433592d960f19/third_party/WebKit/Source/modules/payments/PaymentInstruments.cpp
[modify] https://crrev.com/9d3c221bdef03b02ef3ed0fe150433592d960f19/third_party/WebKit/Source/modules/payments/PaymentInstruments.h
[modify] https://crrev.com/9d3c221bdef03b02ef3ed0fe150433592d960f19/third_party/WebKit/Source/modules/payments/PaymentInstruments.idl

Project Member

Comment 43 by bugdroid1@chromium.org, May 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f7742a29c7b6832dbdf2336280d9fdf9fed6da4a

commit f7742a29c7b6832dbdf2336280d9fdf9fed6da4a
Author: jinho.bang <jinho.bang@samsung.com>
Date: Thu May 04 01:31:59 2017

Reland "PaymentHandler: Implement PaymentInstruments.keys()."

Reason for revert:
This patch is causing some PaymentManager tests to fail.
(https://crrev.com/2858773002)

Original issue's description:
> PaymentHandler: Implement PaymentInstruments.keys().
>
> The method to return keys of the stored payment instruments in insertion order.
>
> Related Spec Link:
>   https://w3c.github.io/webpayments-payment-handler/#paymentinstruments-interface
>
> BUG= 661608 
> TEST=payment_manager_unittest.cc, payment-instruments.html
>
> Review-Url: https://codereview.chromium.org/2850203002
> Cr-Commit-Position: refs/heads/master@{#468747}
> Committed: https://chromium.googlesource.com/chromium/src/+/09c61ecc5adf140aa7a59aef0ecacc510e0be1d8

BUG= 661608 

Review-Url: https://codereview.chromium.org/2859803002
Cr-Commit-Position: refs/heads/master@{#469238}

[modify] https://crrev.com/f7742a29c7b6832dbdf2336280d9fdf9fed6da4a/components/payments/mojom/payment_app.mojom
[modify] https://crrev.com/f7742a29c7b6832dbdf2336280d9fdf9fed6da4a/content/browser/payments/payment_app.proto
[modify] https://crrev.com/f7742a29c7b6832dbdf2336280d9fdf9fed6da4a/content/browser/payments/payment_app_database.cc
[modify] https://crrev.com/f7742a29c7b6832dbdf2336280d9fdf9fed6da4a/content/browser/payments/payment_app_database.h
[modify] https://crrev.com/f7742a29c7b6832dbdf2336280d9fdf9fed6da4a/content/browser/payments/payment_manager.cc
[modify] https://crrev.com/f7742a29c7b6832dbdf2336280d9fdf9fed6da4a/content/browser/payments/payment_manager.h
[modify] https://crrev.com/f7742a29c7b6832dbdf2336280d9fdf9fed6da4a/content/browser/payments/payment_manager_unittest.cc
[modify] https://crrev.com/f7742a29c7b6832dbdf2336280d9fdf9fed6da4a/content/browser/service_worker/service_worker_context_wrapper.cc
[modify] https://crrev.com/f7742a29c7b6832dbdf2336280d9fdf9fed6da4a/content/browser/service_worker/service_worker_context_wrapper.h
[modify] https://crrev.com/f7742a29c7b6832dbdf2336280d9fdf9fed6da4a/content/browser/service_worker/service_worker_database.cc
[modify] https://crrev.com/f7742a29c7b6832dbdf2336280d9fdf9fed6da4a/content/browser/service_worker/service_worker_database.h
[modify] https://crrev.com/f7742a29c7b6832dbdf2336280d9fdf9fed6da4a/content/browser/service_worker/service_worker_storage.cc
[modify] https://crrev.com/f7742a29c7b6832dbdf2336280d9fdf9fed6da4a/content/browser/service_worker/service_worker_storage.h
[modify] https://crrev.com/f7742a29c7b6832dbdf2336280d9fdf9fed6da4a/third_party/WebKit/LayoutTests/http/tests/payments/payment-instruments.html
[modify] https://crrev.com/f7742a29c7b6832dbdf2336280d9fdf9fed6da4a/third_party/WebKit/Source/modules/payments/PaymentInstruments.cpp
[modify] https://crrev.com/f7742a29c7b6832dbdf2336280d9fdf9fed6da4a/third_party/WebKit/Source/modules/payments/PaymentInstruments.h
[modify] https://crrev.com/f7742a29c7b6832dbdf2336280d9fdf9fed6da4a/third_party/WebKit/Source/modules/payments/PaymentInstruments.idl

Project Member

Comment 44 by bugdroid1@chromium.org, May 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/af28f77a0befc157c0f229fc1b72d3601e5d1ba1

commit af28f77a0befc157c0f229fc1b72d3601e5d1ba1
Author: jinho.bang <jinho.bang@samsung.com>
Date: Fri May 05 12:22:11 2017

PaymentHandler: Implement PaymentInstruments.clear().

The method to remove all stored payment instruments.

Related Spec Link:
  https://w3c.github.io/webpayments-payment-handler/#paymentinstruments-interface

BUG= 661608 

Review-Url: https://codereview.chromium.org/2856973002
Cr-Commit-Position: refs/heads/master@{#469628}

[modify] https://crrev.com/af28f77a0befc157c0f229fc1b72d3601e5d1ba1/components/payments/mojom/payment_app.mojom
[modify] https://crrev.com/af28f77a0befc157c0f229fc1b72d3601e5d1ba1/content/browser/payments/payment_app_database.cc
[modify] https://crrev.com/af28f77a0befc157c0f229fc1b72d3601e5d1ba1/content/browser/payments/payment_app_database.h
[modify] https://crrev.com/af28f77a0befc157c0f229fc1b72d3601e5d1ba1/content/browser/payments/payment_manager.cc
[modify] https://crrev.com/af28f77a0befc157c0f229fc1b72d3601e5d1ba1/content/browser/payments/payment_manager.h
[modify] https://crrev.com/af28f77a0befc157c0f229fc1b72d3601e5d1ba1/content/browser/payments/payment_manager_unittest.cc
[modify] https://crrev.com/af28f77a0befc157c0f229fc1b72d3601e5d1ba1/third_party/WebKit/LayoutTests/http/tests/payments/payment-instruments.html
[modify] https://crrev.com/af28f77a0befc157c0f229fc1b72d3601e5d1ba1/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/af28f77a0befc157c0f229fc1b72d3601e5d1ba1/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/af28f77a0befc157c0f229fc1b72d3601e5d1ba1/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/af28f77a0befc157c0f229fc1b72d3601e5d1ba1/third_party/WebKit/Source/modules/payments/PaymentInstruments.cpp
[modify] https://crrev.com/af28f77a0befc157c0f229fc1b72d3601e5d1ba1/third_party/WebKit/Source/modules/payments/PaymentInstruments.h
[modify] https://crrev.com/af28f77a0befc157c0f229fc1b72d3601e5d1ba1/third_party/WebKit/Source/modules/payments/PaymentInstruments.idl

Cc: gogerald@chromium.org
Project Member

Comment 47 by bugdroid1@chromium.org, May 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5f5a9b49ed920d6c4ca3760531a9f8fa842db2dc

commit 5f5a9b49ed920d6c4ca3760531a9f8fa842db2dc
Author: jinho.bang <jinho.bang@samsung.com>
Date: Sat May 13 07:55:13 2017

PaymentHandler: Implement GetAllPaymentApps().

The method is used to query all stored payment app data in Chrome layer. In the
PaymentRequest UI, we can display all possible payment instruments associated
service worker.

This change will replace the legacy GetAllManifests() with new thing.

Also, this change exposes a new contnt public struct(StorePaymentInstrument)
to pass the stored payment instrument data to Chrome layer. The second CL of
the following links contains this usage of the public API.

See the other CLs in this series:
  [1/2] http://crrev.com/2873683002 (This patch)
  [2/2] http://crrev.com/2867273003 (Use GetAllPaymentApps() in android)

Design Doc:
  https://docs.google.com/document/d/1rWsvKQAwIboN2ZDuYYAkfce8GF27twi4UHTt0hcbyxQ/edit?usp=sharing

BUG= 661608 

Review-Url: https://codereview.chromium.org/2873683002
Cr-Commit-Position: refs/heads/master@{#471579}

[modify] https://crrev.com/5f5a9b49ed920d6c4ca3760531a9f8fa842db2dc/content/browser/payments/payment_app.proto
[modify] https://crrev.com/5f5a9b49ed920d6c4ca3760531a9f8fa842db2dc/content/browser/payments/payment_app_database.cc
[modify] https://crrev.com/5f5a9b49ed920d6c4ca3760531a9f8fa842db2dc/content/browser/payments/payment_app_database.h
[modify] https://crrev.com/5f5a9b49ed920d6c4ca3760531a9f8fa842db2dc/content/browser/payments/payment_app_provider_impl.cc
[modify] https://crrev.com/5f5a9b49ed920d6c4ca3760531a9f8fa842db2dc/content/browser/payments/payment_app_provider_impl.h
[modify] https://crrev.com/5f5a9b49ed920d6c4ca3760531a9f8fa842db2dc/content/browser/payments/payment_app_provider_impl_unittest.cc
[modify] https://crrev.com/5f5a9b49ed920d6c4ca3760531a9f8fa842db2dc/content/browser/payments/payment_manager.h
[modify] https://crrev.com/5f5a9b49ed920d6c4ca3760531a9f8fa842db2dc/content/browser/service_worker/service_worker_context_wrapper.cc
[modify] https://crrev.com/5f5a9b49ed920d6c4ca3760531a9f8fa842db2dc/content/browser/service_worker/service_worker_context_wrapper.h
[modify] https://crrev.com/5f5a9b49ed920d6c4ca3760531a9f8fa842db2dc/content/browser/service_worker/service_worker_database.cc
[modify] https://crrev.com/5f5a9b49ed920d6c4ca3760531a9f8fa842db2dc/content/browser/service_worker/service_worker_database.h
[modify] https://crrev.com/5f5a9b49ed920d6c4ca3760531a9f8fa842db2dc/content/browser/service_worker/service_worker_database_unittest.cc
[modify] https://crrev.com/5f5a9b49ed920d6c4ca3760531a9f8fa842db2dc/content/browser/service_worker/service_worker_storage.cc
[modify] https://crrev.com/5f5a9b49ed920d6c4ca3760531a9f8fa842db2dc/content/browser/service_worker/service_worker_storage.h
[modify] https://crrev.com/5f5a9b49ed920d6c4ca3760531a9f8fa842db2dc/content/public/browser/BUILD.gn
[modify] https://crrev.com/5f5a9b49ed920d6c4ca3760531a9f8fa842db2dc/content/public/browser/payment_app_provider.h
[add] https://crrev.com/5f5a9b49ed920d6c4ca3760531a9f8fa842db2dc/content/public/browser/stored_payment_instrument.cc
[add] https://crrev.com/5f5a9b49ed920d6c4ca3760531a9f8fa842db2dc/content/public/browser/stored_payment_instrument.h

Project Member

Comment 48 by bugdroid1@chromium.org, May 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/93b356ad256b7bff7db894592f1e49fd7aa9aeb3

commit 93b356ad256b7bff7db894592f1e49fd7aa9aeb3
Author: jinho.bang <jinho.bang@samsung.com>
Date: Sat May 13 16:51:14 2017

PaymentHandler: Replace GetAllManifests() with GetAllPaymentApps().

Use the new GetAllPaymentApps() instead of legacy GetAllManifests() in android.
Also, this CL removes unnecessary Manifest and Option classes in Bridge.

See the other CLs in this series:
  [1/2] http://crrev.com/2873683002 (Add GetAllPaymentApps())
  [2/2] http://crrev.com/2867273003 (This patch)

BUG= 661608 

Review-Url: https://codereview.chromium.org/2867273003
Cr-Commit-Position: refs/heads/master@{#471590}

[modify] https://crrev.com/93b356ad256b7bff7db894592f1e49fd7aa9aeb3/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentApp.java
[modify] https://crrev.com/93b356ad256b7bff7db894592f1e49fd7aa9aeb3/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentAppBridge.java
[modify] https://crrev.com/93b356ad256b7bff7db894592f1e49fd7aa9aeb3/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentInstrument.java
[modify] https://crrev.com/93b356ad256b7bff7db894592f1e49fd7aa9aeb3/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestServiceWorkerPaymentAppTest.java
[modify] https://crrev.com/93b356ad256b7bff7db894592f1e49fd7aa9aeb3/chrome/browser/android/payments/service_worker_payment_app_bridge.cc

Project Member

Comment 49 by bugdroid1@chromium.org, May 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9ade04245b96eb7ca8be76b2224711f4a832e82d

commit 9ade04245b96eb7ca8be76b2224711f4a832e82d
Author: jinho.bang <jinho.bang@samsung.com>
Date: Mon May 15 19:41:31 2017

PaymentHandler: Stop using GetAllManifests() in content side tests.

The GetAllManifests() was already deprecated. Instead we should use new
GetAllPaymentApps().

BUG= 661608 , 720040 

Review-Url: https://codereview.chromium.org/2873903003
Cr-Commit-Position: refs/heads/master@{#471870}

[modify] https://crrev.com/9ade04245b96eb7ca8be76b2224711f4a832e82d/content/browser/payments/payment_app_browsertest.cc
[modify] https://crrev.com/9ade04245b96eb7ca8be76b2224711f4a832e82d/content/browser/payments/payment_app_provider_impl_unittest.cc
[modify] https://crrev.com/9ade04245b96eb7ca8be76b2224711f4a832e82d/content/test/data/payments/payment_app_invocation.html

Project Member

Comment 50 by bugdroid1@chromium.org, May 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6403f30a37f9ac07a05c4591ad8aabe202c96f05

commit 6403f30a37f9ac07a05c4591ad8aabe202c96f05
Author: jinho.bang <jinho.bang@samsung.com>
Date: Wed May 17 11:36:43 2017

PaymentHandler: Remove PaymentAppManifest and PaymentAppOption.

They were already removed from the spec. Therefore, we should remove the related
implementation. (including get/setManifest() methods in payment manager.)

Spec:
  https://w3c.github.io/payment-handler/#paymentmanager-interface

BUG= 661608 ,  720040 

Review-Url: https://codereview.chromium.org/2875493003
Cr-Commit-Position: refs/heads/master@{#472423}

[modify] https://crrev.com/6403f30a37f9ac07a05c4591ad8aabe202c96f05/components/payments/mojom/payment_app.mojom
[modify] https://crrev.com/6403f30a37f9ac07a05c4591ad8aabe202c96f05/content/browser/payments/payment_app.proto
[modify] https://crrev.com/6403f30a37f9ac07a05c4591ad8aabe202c96f05/content/browser/payments/payment_app_content_unittest_base.cc
[modify] https://crrev.com/6403f30a37f9ac07a05c4591ad8aabe202c96f05/content/browser/payments/payment_app_content_unittest_base.h
[modify] https://crrev.com/6403f30a37f9ac07a05c4591ad8aabe202c96f05/content/browser/payments/payment_app_context_impl.h
[modify] https://crrev.com/6403f30a37f9ac07a05c4591ad8aabe202c96f05/content/browser/payments/payment_app_database.cc
[modify] https://crrev.com/6403f30a37f9ac07a05c4591ad8aabe202c96f05/content/browser/payments/payment_app_database.h
[modify] https://crrev.com/6403f30a37f9ac07a05c4591ad8aabe202c96f05/content/browser/payments/payment_app_provider_impl.cc
[modify] https://crrev.com/6403f30a37f9ac07a05c4591ad8aabe202c96f05/content/browser/payments/payment_app_provider_impl.h
[modify] https://crrev.com/6403f30a37f9ac07a05c4591ad8aabe202c96f05/content/browser/payments/payment_app_provider_impl_unittest.cc
[modify] https://crrev.com/6403f30a37f9ac07a05c4591ad8aabe202c96f05/content/browser/payments/payment_manager.cc
[modify] https://crrev.com/6403f30a37f9ac07a05c4591ad8aabe202c96f05/content/browser/payments/payment_manager.h
[modify] https://crrev.com/6403f30a37f9ac07a05c4591ad8aabe202c96f05/content/browser/payments/payment_manager_unittest.cc
[modify] https://crrev.com/6403f30a37f9ac07a05c4591ad8aabe202c96f05/content/public/browser/payment_app_provider.h
[modify] https://crrev.com/6403f30a37f9ac07a05c4591ad8aabe202c96f05/third_party/WebKit/LayoutTests/http/tests/payments/payment-app-interfaces.html
[delete] https://crrev.com/ec987e5daec026525a096c0c4a6fbb32e87eddd6/third_party/WebKit/LayoutTests/http/tests/payments/payment-manager.html
[modify] https://crrev.com/6403f30a37f9ac07a05c4591ad8aabe202c96f05/third_party/WebKit/LayoutTests/http/tests/payments/resources/payment-app.js
[modify] https://crrev.com/6403f30a37f9ac07a05c4591ad8aabe202c96f05/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/6403f30a37f9ac07a05c4591ad8aabe202c96f05/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/6403f30a37f9ac07a05c4591ad8aabe202c96f05/third_party/WebKit/Source/modules/modules_idl_files.gni
[delete] https://crrev.com/ec987e5daec026525a096c0c4a6fbb32e87eddd6/third_party/WebKit/Source/modules/payments/PaymentAppManifest.idl
[delete] https://crrev.com/ec987e5daec026525a096c0c4a6fbb32e87eddd6/third_party/WebKit/Source/modules/payments/PaymentAppOption.idl
[modify] https://crrev.com/6403f30a37f9ac07a05c4591ad8aabe202c96f05/third_party/WebKit/Source/modules/payments/PaymentManager.cpp
[modify] https://crrev.com/6403f30a37f9ac07a05c4591ad8aabe202c96f05/third_party/WebKit/Source/modules/payments/PaymentManager.h
[modify] https://crrev.com/6403f30a37f9ac07a05c4591ad8aabe202c96f05/third_party/WebKit/Source/modules/payments/PaymentManager.idl

Project Member

Comment 51 by bugdroid1@chromium.org, May 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/af124f87be0846b2541f69d306c0bb705b5e9e9f

commit af124f87be0846b2541f69d306c0bb705b5e9e9f
Author: jinho.bang <jinho.bang@samsung.com>
Date: Mon May 22 17:56:39 2017

PaymentHandler: Clear storage partition data during content_browsertests.

When PaymentAppInvocation test runs in single-process mode, the following
problem occurs in local environment:
  content_browsertests --gtest_filter=PaymentAppBrowserTest.* --single-process

  ../../content/browser/payments/payment_app_browsertest.cc:127: Failure
      Expected: 1U
      Which is: 1
  To be equal to: ids.size()
      Which is: 2

We can resolve this issue by clearing storage partition similar to what we do
in the background sync or the push messaging.
Please see: https://bugs.chromium.org/p/chromium/issues/detail?id=482083

BUG= 661608 

Review-Url: https://codereview.chromium.org/2895583002
Cr-Commit-Position: refs/heads/master@{#473619}

[modify] https://crrev.com/af124f87be0846b2541f69d306c0bb705b5e9e9f/content/browser/payments/payment_app_browsertest.cc

Project Member

Comment 52 by bugdroid1@chromium.org, May 23 2017

Project Member

Comment 53 by bugdroid1@chromium.org, May 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b

commit 35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b
Author: jinho.bang <jinho.bang@samsung.com>
Date: Thu May 25 20:43:46 2017

PaymentHandler: Merge PaymentAppRequest and PaymentRequestEvent.

It was changed in spec side[1][2]. There is no reason to have both of those.
Also, this CL is adding new attributes. (e.g. topLevelOrigin, instrumentKey)

[1] https://github.com/w3c/payment-handler/issues/142
[2] https://w3c.github.io/payment-handler/#the-paymentrequestevent

BUG= 661608 , 720027 

Review-Url: https://codereview.chromium.org/2887713002
Cr-Commit-Position: refs/heads/master@{#474791}

[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentAppBridge.java
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentInstrument.java
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/components/payments/mojom/payment_app.mojom
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/content/browser/payments/payment_app_browsertest.cc
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/content/renderer/service_worker/service_worker_type_converters.cc
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/content/test/data/payments/payment_app.js
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/content/test/data/payments/payment_app_invocation.html
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/third_party/WebKit/LayoutTests/http/tests/payments/resources/payment-request-event.js
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/third_party/WebKit/Source/modules/payments/PaymentAppRequest.idl
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/third_party/WebKit/Source/modules/payments/PaymentAppRequestConversion.cpp
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/third_party/WebKit/Source/modules/payments/PaymentAppRequestConversionTest.cpp
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.h
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.idl
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/third_party/WebKit/public/platform/modules/payments/WebPaymentAppRequest.h

Blockedon: 720027
Blockedon: 721897
Blockedon: 720039
Blockedon: 665949
Blockedon: 720029
Blockedon: 720037
Blockedon: 720018
Blockedon: 720040
Summary: Implement Payment Handler API (serviceworker based approach) (was: Implement Payment App API (serviceworker based approach))
The spec link was changed: https://w3c.github.io/payment-handler/
Project Member

Comment 63 by bugdroid1@chromium.org, Jun 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1a4b4420868253582467b228f5df4bf167b3ecff

commit 1a4b4420868253582467b228f5df4bf167b3ecff
Author: gogerald <gogerald@chromium.org>
Date: Tue Jun 06 03:37:43 2017

Implement openWindow for web based payment handler

1, This CL implements openWindow in PaymentRequestEvent.idl for service
worker based payment handler.
The spec: https://github.com/w3c/payment-handler.
The intent to implement: https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/2ojnMk_T9_c/h7QfIhTeCAAJ

2, This feature is behind the chrome://flags/#enable-experimental-web-platform-features and
chrome://flags/#service_worker_payment_apps flags

3, openWindow opens the url in custom tab with sliding up and down animation.

4, The custom tab is opened within the foreground ChromeActivity so as to not list in recent apps
(Intent.FLAG_ACTIVITY_NEW_TASK is not set).

5, Do not open the url if the foreground activity is not ChromeActivity.

6, Test video record
https://drive.google.com/a/google.com/file/d/0B3ISiXgGE1MNVUtXbmx5cE1XWndyLWhjRjY1LWpTeEdwZ1c0/view?usp=sharing

BUG= 720027 , 661608 

Review-Url: https://codereview.chromium.org/2893823004
Cr-Commit-Position: refs/heads/master@{#477180}

[add] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/chrome/android/java/res/anim/slide_in_up.xml
[add] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/chrome/android/java/res/anim/slide_out_down.xml
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/chrome/android/java/src/org/chromium/chrome/browser/ServiceTabLauncher.java
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/content/browser/payments/payment_app_browsertest.cc
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/content/browser/service_worker/service_worker_client_utils.cc
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/content/browser/service_worker/service_worker_client_utils.h
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/content/browser/service_worker/service_worker_version.cc
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/content/browser/service_worker/service_worker_version.h
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/content/common/service_worker/service_worker_messages.h
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/content/renderer/service_worker/service_worker_context_client.h
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/content/test/data/payments/payment_app.js
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/content/test/data/payments/payment_app_invocation.html
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.h
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.idl
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.cpp
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.h
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeClientImpl.cpp
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeClientImpl.h
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/third_party/WebKit/Source/web/WebEmbeddedWorkerImplTest.cpp
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h

Project Member

Comment 64 by bugdroid1@chromium.org, Jun 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/745f3dff09793d3a5afe793a2599eadb341d2ee0

commit 745f3dff09793d3a5afe793a2599eadb341d2ee0
Author: jinho.bang <jinho.bang@samsung.com>
Date: Tue Jun 06 17:23:55 2017

PaymentHandler: Rename PaymentAppRequest with PaymentRequestEventData.

In previous CL[1], the PaymentAppRequest was merged with PaymentRequestEvent
due to spec change. So, we need to change the name appropriately to fit the
current implementation.

Also, this feature is still behind runtime flag (PaymentApp).

The related spec link:
  https://w3c.github.io/payment-handler/

[1] https://codereview.chromium.org/2887713002/

BUG= 661608 , 720027 

Review-Url: https://codereview.chromium.org/2898223002
Cr-Commit-Position: refs/heads/master@{#477316}

[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/components/payments/mojom/payment_app.mojom
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/browser/payments/payment_app_browsertest.cc
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/browser/payments/payment_app_content_unittest_base.cc
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/browser/payments/payment_app_provider_impl.cc
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/browser/payments/payment_app_provider_impl.h
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/browser/payments/payment_app_provider_impl_unittest.cc
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/browser/service_worker/embedded_worker_test_helper.cc
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/browser/service_worker/embedded_worker_test_helper.h
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/common/service_worker/service_worker_event_dispatcher.mojom
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/public/browser/payment_app_provider.h
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/renderer/service_worker/service_worker_context_client.h
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/renderer/service_worker/service_worker_type_converters.cc
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/renderer/service_worker/service_worker_type_converters.h
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/Source/modules/BUILD.gn
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/Source/modules/modules_idl_files.gni
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/Source/modules/payments/BUILD.gn
[delete] https://crrev.com/838072e44f3a5d5856660d48837689d51eb18100/third_party/WebKit/Source/modules/payments/PaymentAppRequestConversion.h
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.h
[rename] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/Source/modules/payments/PaymentRequestEventDataConversion.cpp
[add] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/Source/modules/payments/PaymentRequestEventDataConversion.h
[rename] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/Source/modules/payments/PaymentRequestEventDataConversionTest.cpp
[rename] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/Source/modules/payments/PaymentRequestEventInit.idl
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.h
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/public/BUILD.gn
[rename] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/public/platform/modules/payments/WebPaymentRequestEventData.h
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h

Project Member

Comment 65 by bugdroid1@chromium.org, Jun 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bb3f76109a2e6b8be54745b7235c650b7b6f77c1

commit bb3f76109a2e6b8be54745b7235c650b7b6f77c1
Author: jinho.bang <jinho.bang@samsung.com>
Date: Tue Jun 06 19:59:07 2017

PaymentHandler: Implement PaymentRequestEvent constructor.

Need the constructor and init dictionary for compatibility with DOM events.
This CL contains IDL change but blink-intent is not required because it is still
behind runtime flag.

Related spec link:
  https://w3c.github.io/payment-handler/#dom-paymentrequestevent
  https://w3c.github.io/payment-handler/#dom-paymentrequesteventinit

BUG= 661608 , 720027 
TEST=payment-request-event.html

Review-Url: https://codereview.chromium.org/2903643002
Cr-Commit-Position: refs/heads/master@{#477382}

[modify] https://crrev.com/bb3f76109a2e6b8be54745b7235c650b7b6f77c1/third_party/WebKit/LayoutTests/http/tests/payments/resources/payment-request-event.js
[modify] https://crrev.com/bb3f76109a2e6b8be54745b7235c650b7b6f77c1/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp
[modify] https://crrev.com/bb3f76109a2e6b8be54745b7235c650b7b6f77c1/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.h
[modify] https://crrev.com/bb3f76109a2e6b8be54745b7235c650b7b6f77c1/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.idl
[modify] https://crrev.com/bb3f76109a2e6b8be54745b7235c650b7b6f77c1/third_party/WebKit/Source/modules/payments/PaymentRequestEventInit.idl

Project Member

Comment 67 by bugdroid1@chromium.org, Jun 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/87f775b01eff2468818a0ef5476ee1f6177bc9b1

commit 87f775b01eff2468818a0ef5476ee1f6177bc9b1
Author: jinho.bang <jinho.bang@samsung.com>
Date: Mon Jun 12 16:11:59 2017

Replace sequence with FrozenArray in PaymentRequestEvent.idl.

According to the spec[1], |methodData| and |modifiers| attributes should be
FrozenArray instead of sequence.

[1] https://w3c.github.io/payment-handler/#the-paymentrequestevent

BUG= 661608 , 720027 

Review-Url: https://codereview.chromium.org/2934703002
Cr-Commit-Position: refs/heads/master@{#478647}

[modify] https://crrev.com/87f775b01eff2468818a0ef5476ee1f6177bc9b1/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.idl

Blockedon: 736745
Project Member

Comment 70 by bugdroid1@chromium.org, Jul 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/542f14dc4e95cb61f0d784a9eb4fb03742d71130

commit 542f14dc4e95cb61f0d784a9eb4fb03742d71130
Author: Jinho Bang <jinho.bang@samsung.com>
Date: Sat Jul 15 02:33:12 2017

PaymentHandler: Replace PaymentAppResponse with PaymentHandlerResponse.

The spec[1] was changed.

[1] https://github.com/w3c/payment-handler/pull/167

Bug:  661608 
Change-Id: I38e7ff1d6e6da4ffb99e83fdb37f4cda94eab91d
Reviewed-on: https://chromium-review.googlesource.com/565078
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Jinho Bang <jinho.bang@samsung.com>
Cr-Commit-Position: refs/heads/master@{#486969}
[modify] https://crrev.com/542f14dc4e95cb61f0d784a9eb4fb03742d71130/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
[modify] https://crrev.com/542f14dc4e95cb61f0d784a9eb4fb03742d71130/content/browser/payments/payment_app_browsertest.cc
[modify] https://crrev.com/542f14dc4e95cb61f0d784a9eb4fb03742d71130/content/browser/payments/payment_app_content_unittest_base.cc
[modify] https://crrev.com/542f14dc4e95cb61f0d784a9eb4fb03742d71130/content/browser/payments/payment_app_provider_impl.cc
[modify] https://crrev.com/542f14dc4e95cb61f0d784a9eb4fb03742d71130/content/browser/payments/payment_app_provider_impl_unittest.cc
[modify] https://crrev.com/542f14dc4e95cb61f0d784a9eb4fb03742d71130/content/browser/service_worker/embedded_worker_test_helper.cc
[modify] https://crrev.com/542f14dc4e95cb61f0d784a9eb4fb03742d71130/content/browser/service_worker/embedded_worker_test_helper.h
[modify] https://crrev.com/542f14dc4e95cb61f0d784a9eb4fb03742d71130/content/common/service_worker/service_worker_event_dispatcher.mojom
[modify] https://crrev.com/542f14dc4e95cb61f0d784a9eb4fb03742d71130/content/public/browser/payment_app_provider.h
[modify] https://crrev.com/542f14dc4e95cb61f0d784a9eb4fb03742d71130/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/542f14dc4e95cb61f0d784a9eb4fb03742d71130/content/renderer/service_worker/service_worker_context_client.h
[modify] https://crrev.com/542f14dc4e95cb61f0d784a9eb4fb03742d71130/third_party/WebKit/Source/modules/modules_idl_files.gni
[modify] https://crrev.com/542f14dc4e95cb61f0d784a9eb4fb03742d71130/third_party/WebKit/Source/modules/payments/CanMakePaymentRespondWithObserver.cpp
[rename] https://crrev.com/542f14dc4e95cb61f0d784a9eb4fb03742d71130/third_party/WebKit/Source/modules/payments/PaymentHandlerResponse.idl
[modify] https://crrev.com/542f14dc4e95cb61f0d784a9eb4fb03742d71130/third_party/WebKit/Source/modules/payments/PaymentRequestRespondWithObserver.cpp
[modify] https://crrev.com/542f14dc4e95cb61f0d784a9eb4fb03742d71130/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.cpp
[modify] https://crrev.com/542f14dc4e95cb61f0d784a9eb4fb03742d71130/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.h
[modify] https://crrev.com/542f14dc4e95cb61f0d784a9eb4fb03742d71130/third_party/WebKit/public/BUILD.gn
[delete] https://crrev.com/e43049df31f1516f0b2202e7f7684942dc991d99/third_party/WebKit/public/platform/modules/payments/WebPaymentAppResponse.h
[add] https://crrev.com/542f14dc4e95cb61f0d784a9eb4fb03742d71130/third_party/WebKit/public/platform/modules/payments/WebPaymentHandlerResponse.h
[modify] https://crrev.com/542f14dc4e95cb61f0d784a9eb4fb03742d71130/third_party/WebKit/public/platform/modules/payments/payment_app.mojom
[modify] https://crrev.com/542f14dc4e95cb61f0d784a9eb4fb03742d71130/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h

Project Member

Comment 71 by bugdroid1@chromium.org, Jul 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ffcdf40755f1a15e12098e6c9f17ff791d301fa7

commit ffcdf40755f1a15e12098e6c9f17ff791d301fa7
Author: Jinho Bang <jinho.bang@samsung.com>
Date: Sat Jul 15 08:12:48 2017

PaymentHandler: PaymentRequestEvent.total should be PaymentCurrencyAmount.

The spec[1] was changed. FYI, this feature is still behind runtime flag.

[1] https://github.com/w3c/payment-handler/pull/187

Bug:  661608 
Change-Id: I134c668110fcdc79d237dfd349e3dbf4203fb090
Reviewed-on: https://chromium-review.googlesource.com/564097
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Jinho Bang <jinho.bang@samsung.com>
Cr-Commit-Position: refs/heads/master@{#486988}
[modify] https://crrev.com/ffcdf40755f1a15e12098e6c9f17ff791d301fa7/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentAppBridge.java
[modify] https://crrev.com/ffcdf40755f1a15e12098e6c9f17ff791d301fa7/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
[modify] https://crrev.com/ffcdf40755f1a15e12098e6c9f17ff791d301fa7/content/browser/payments/payment_app_browsertest.cc
[modify] https://crrev.com/ffcdf40755f1a15e12098e6c9f17ff791d301fa7/content/browser/payments/payment_app_provider_impl_unittest.cc
[modify] https://crrev.com/ffcdf40755f1a15e12098e6c9f17ff791d301fa7/content/renderer/service_worker/service_worker_type_converters.cc
[modify] https://crrev.com/ffcdf40755f1a15e12098e6c9f17ff791d301fa7/third_party/WebKit/LayoutTests/http/tests/payments/resources/payment-request-event.js
[modify] https://crrev.com/ffcdf40755f1a15e12098e6c9f17ff791d301fa7/third_party/WebKit/Source/modules/payments/PaymentEventDataConversion.cpp
[modify] https://crrev.com/ffcdf40755f1a15e12098e6c9f17ff791d301fa7/third_party/WebKit/Source/modules/payments/PaymentEventDataConversionTest.cpp
[modify] https://crrev.com/ffcdf40755f1a15e12098e6c9f17ff791d301fa7/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.h
[modify] https://crrev.com/ffcdf40755f1a15e12098e6c9f17ff791d301fa7/third_party/WebKit/Source/modules/payments/PaymentRequestEventInit.idl
[modify] https://crrev.com/ffcdf40755f1a15e12098e6c9f17ff791d301fa7/third_party/WebKit/public/platform/modules/payments/WebPaymentRequestEventData.h
[modify] https://crrev.com/ffcdf40755f1a15e12098e6c9f17ff791d301fa7/third_party/WebKit/public/platform/modules/payments/payment_app.mojom

Blocking: 775647
Project Member

Comment 73 by bugdroid1@chromium.org, Mar 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2ad145c2668c11e70b211365707c1c62de79c462

commit 2ad145c2668c11e70b211365707c1c62de79c462
Author: Rouslan Solomakhin <rouslan@chromium.org>
Date: Fri Mar 23 16:37:26 2018

[Payment Handler] Add a use counter.

This patch adds a use counter for paymentManager.instruments.set().
Setting an instrument is what makes a service worker into a payment
handler.

Bug:  661608 
Change-Id: I86acc1aa3e07120a4470d8972232501e229ff78d
Reviewed-on: https://chromium-review.googlesource.com/975833
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Reviewed-by: Rick Byers <rbyers@chromium.org>
Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545480}
[rename] https://crrev.com/2ad145c2668c11e70b211365707c1c62de79c462/chrome/browser/page_load_metrics/observers/use_counter/OWNERS
[modify] https://crrev.com/2ad145c2668c11e70b211365707c1c62de79c462/chrome/browser/page_load_metrics/observers/use_counter/ukm_features.cc
[modify] https://crrev.com/2ad145c2668c11e70b211365707c1c62de79c462/third_party/WebKit/Source/modules/payments/PaymentInstruments.cpp
[modify] https://crrev.com/2ad145c2668c11e70b211365707c1c62de79c462/third_party/WebKit/public/platform/web_feature.mojom
[modify] https://crrev.com/2ad145c2668c11e70b211365707c1c62de79c462/tools/metrics/histograms/enums.xml

Status: Fixed (was: Started)
Hi @jinho.bang I think we could close this bug now since we've implemented the current spec, right? We can create new bugs for future spec changes.
Hi Ganggui,

Yes we can. But I hope that it doesn't mean shipping this feature. We are currently facing a few major API changes. If we are shipping this feature without considering the issues, this feature might be broken due to compatibility/interoperability.

[1] https://github.com/w3c/payment-handler/issues/299
[2] https://github.com/w3c/payment-handler/issues/300
[3] https://github.com/w3c/payment-handler/issues/302
Hi jinho,

Thanks for your feedback. We do want to ship it as soon as possible.

Have you looked my comments in [2]. If it works, then we shouldn't expect big API changes, right?

For [3], it's still under discussion and we could do it in a compatible way. WDYT?


Comment 77 by zino@chromium.org, May 22 2018

Hi Ganggui,

If you are fine, there is no reason for me to prevent shipping this.
Because I love this feature, I'd like to ship it as soon as possible, too.

I left a comment in [2]. Please see my comment.

Sign in to add a comment