Chromium Code Reviews
DescriptionReturn 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)
|
||||||||||||||||||||||||||||||||||||||||||||||