Commit d9503a0e authored by Danyao Wang's avatar Danyao Wang Committed by Commit Bot

[Payment Request][Android] Deprecate card network as supported_method.

This patch removes the special casing code that converts card network
payment methods to "basic-card" in the Android implementation of
Payment Request.

With this patch, requests that use a card network as a supported
payment method will be rejected as unsupported payment methods. Tests
are updated to reflect this new expectation.

This deprecation has been approved for M64, but was never implemented.
Intent to deprecate:
https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/1udpnrlQK4Q/ot_E-htQAQAJ

A Blink counter was added to count actual usage of card network as
payment method in the wild. This is now practically 0.
See "PaymentRequestNetworkNameInSupportedMethods" in the histogram:
https://uma.googleplex.com/p/chrome/histograms?endDate=20190525&dayCount=7&histograms=Blink.UseCounter.Features&fixupData=true&showMax=true&filters=channel%2CEQ%2C4%2Cisofficial%2CEQ%2CTrue&implicitFilters=isofficial

Bug: 719526
Change-Id: Iad1e44039628f7fd64c71871b1643776a21dd257
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1640778Reviewed-by: default avatarRouslan Solomakhin <rouslan@chromium.org>
Commit-Queue: Danyao Wang <danyao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#666070}
parent b2bbbb0a
......@@ -311,9 +311,7 @@ public class CardEditor extends EditorBase<AutofillPaymentInstrument>
public void addAcceptedPaymentMethodIfRecognized(PaymentMethodData data) {
assert data != null;
String method = data.supportedMethod;
if (mCardIssuerNetworks.containsKey(method)) {
addAcceptedNetwork(method);
} else if (BasicCardUtils.BASIC_CARD_METHOD_NAME.equals(method)) {
if (BasicCardUtils.BASIC_CARD_METHOD_NAME.equals(method)) {
Set<String> basicCardNetworks = BasicCardUtils.convertBasicCardToNetworks(data);
mAcceptedBasicCardIssuerNetworks.addAll(basicCardNetworks);
for (String network : basicCardNetworks) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment