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

Issue 2507063009: Return cached query result for canMakeActivePayment. (Closed)

Created:
4 years, 1 month ago by please use gerrit instead
Modified:
4 years, 1 month ago
Reviewers:
Ian Wen
CC:
chromium-reviews, rouslan+payments_chromium.org, sebsg+paymentswatch_chromium.org, agrieve+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Return cached query result for canMakeActivePayment. The PaymentRequest.canMakeActivePayment() feature, which is currently hidden behind a flag, throttles queries of supported methods to reduce the risk of user fingerprinting. Since the upcoming (not yet implemented) 'basic-card' method can be used with different subsets of card networks ('visa', 'mastercard', etc.) and types ('credit', 'debit', 'prepaid'), this patch changes canMakeActivePayment() to return last cached result instead of re-querying every time. This also happens to be more inline with the proposed specification language: "Multiple calls to canMakeActivePayment will result in cached response from previous call." Proposed PaymentRequest.canMakeActivePayment() specification: https://github.com/w3c/browser-payment-api/pull/316/files BUG=662931 Committed: https://crrev.com/639ffbbca80f848266bb78f5ce28f0eddc7649fd Cr-Commit-Position: refs/heads/master@{#433689}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Merge methods, add more tests, simplify impl" #

Messages

Total messages: 18 (12 generated)
please use gerrit instead
Ian, ptal. This is a part of http://crrev.com/2501593003, which Dan has asked me to split ...
4 years, 1 month ago (2016-11-18 20:57:50 UTC) #4
Ian Wen
lgtm. Things I mentioned are optional. https://codereview.chromium.org/2507063009/diff/1/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java File chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java (right): https://codereview.chromium.org/2507063009/diff/1/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java#newcode108 chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java:108: private static class ...
4 years, 1 month ago (2016-11-18 23:32:41 UTC) #7
please use gerrit instead
Addressed comments, added more tests, simplified code. Sending to CQ now. https://codereview.chromium.org/2507063009/diff/1/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java File chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java (right): ...
4 years, 1 month ago (2016-11-21 22:08:39 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2507063009/20001
4 years, 1 month ago (2016-11-21 22:09:17 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 1 month ago (2016-11-21 23:25:19 UTC) #16
commit-bot: I haz the power
4 years, 1 month ago (2016-11-21 23:30:53 UTC) #18
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/639ffbbca80f848266bb78f5ce28f0eddc7649fd
Cr-Commit-Position: refs/heads/master@{#433689}

Powered by Google App Engine
This is Rietveld 408576698