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

Issue 2516923002: [Merge M-56] Add canMakeActivePayment() method to web payments. (Closed)

Created:
4 years, 1 month ago by please use gerrit instead
Modified:
4 years, 1 month ago
Reviewers:
CC:
chromium-reviews
Target Ref:
refs/pending/branch-heads/2924
Project:
chromium
Visibility:
Public.

Description

[Merge M-56] Add canMakeActivePayment() method to web payments. canMakeActivePayment() is a proposed function on PaymentRequest object. Proposal: https://github.com/zkoch/zkoch.github.io/blob/master/pr-detect-avail.md Example usage: pr.canMakeActivePayment() .then(result => { if (result) return pr.show(); }) .catch(error => { console.log(error); }); When canMakeActivePayment() is called, Chrome stores the website origin and the payment methods that it's checking in memory. That's shared across the whole browser, in global state. (Not storing this on disk, so the user can clear this data via browser restart.) Then Chrome starts a timer for 30 minutes. When the timer fires, Chrome removes that origin and the payment methods that it was checking from the list. If the same origin tries to check different payment methods within the 30 minute window, Chrome rejects that request. If canMakeActivePayment() is rejected, then pr.show() can still be called regardless. Intent to implement and ship: https://groups.google.com/a/chromium.org/d/msg/blink-dev/IoIxRpn6l9g/ux1C1Cj7AQAJ Tag review: https://github.com/w3ctag/spec-reviews/issues/146 OWP launch tracking bug: http://crbug.com/664619 Link to entry on the feature dashboard: https://www.chromestatus.com/feature/5702608073261056 The feature is behind chrome://flags/#enable-experimental-web-platform-features until it is approved to ship. BUG=662931, 664619 Review-Url: https://codereview.chromium.org/2467393002 Cr-Commit-Position: refs/heads/master@{#433164} (cherry picked from commit 5132963daf4b866cc573b06ff8e84f9b6ec4534c) Committed: https://chromium.googlesource.com/chromium/src/+/cb165c5fd06d65d0083dcd544d93672db183ae2a

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+821 lines, -56 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestFactory.java View 4 chunks +10 lines, -13 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java View 17 chunks +96 lines, -28 lines 0 comments Download
M chrome/android/java_sources.gni View 2 chunks +5 lines, -0 lines 0 comments Download
A chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestActivePaymentQueryNoCardTest.java View 1 chunk +81 lines, -0 lines 0 comments Download
A chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestActivePaymentQueryTest.java View 1 chunk +86 lines, -0 lines 0 comments Download
A chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCcActivePaymentQueryNoCardTest.java View 1 chunk +45 lines, -0 lines 0 comments Download
A chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCcActivePaymentQueryTest.java View 1 chunk +65 lines, -0 lines 0 comments Download
A chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppActivePaymentQueryTest.java View 1 chunk +71 lines, -0 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestBase.java View 3 chunks +8 lines, -0 lines 0 comments Download
A chrome/test/data/android/payments/active_payment_query.js View 1 chunk +28 lines, -0 lines 0 comments Download
A chrome/test/data/android/payments/active_payment_query_bobpay.js View 1 chunk +28 lines, -0 lines 0 comments Download
A chrome/test/data/android/payments/active_payment_query_cc.js View 1 chunk +48 lines, -0 lines 0 comments Download
A chrome/test/data/android/payments/payment_request_active_payment_query_bobpay_test.html View 1 chunk +20 lines, -0 lines 0 comments Download
A chrome/test/data/android/payments/payment_request_active_payment_query_cc_test.html View 1 chunk +20 lines, -0 lines 0 comments Download
A chrome/test/data/android/payments/payment_request_active_payment_query_test.html View 1 chunk +20 lines, -0 lines 0 comments Download
M components/payments/payment_request.mojom View 3 chunks +8 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/payments/ActivePaymentTest.cpp View 1 chunk +114 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/payments/PaymentRequest.h View 3 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/payments/PaymentRequest.cpp View 15 chunks +57 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/modules/payments/PaymentRequest.idl View 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
please use gerrit instead
4 years, 1 month ago (2016-11-19 21:36:04 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
cb165c5fd06d65d0083dcd544d93672db183ae2a (tree was closed).

Powered by Google App Engine
This is Rietveld 408576698