[Web Payment] Add a flag for identity in can-make-payment event
Before this patch, accessing merchant and user identity fields in the
"canmakepayment" event would print a deprecation message in dev tools.
This patch adds an enabled-by-default flag for passing the merchant and
user identity fields in the "canmakepayment" event for a service worker
and the IS_READY_TO_PAY intent for an Android payment app.
After this patch, Chrome's existing default behavior is not changed,
but if chrome://flags/#identity-in-can-make-payment flag is disabled,
then the "canmakepayment" event and the IS_READY_TO_PAY intent do not
pass the merchant and user identity to the payment handler.
Blink-dev intent:
https://groups.google.com/a/chromium.org/g/blink-dev/c/AM2bwKxXacQ/m/2V91nC9JHQAJ
Bug: 1317941, 1290492
Change-Id: I676b567947267b439743b6ef5e1936f4f95cc319
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3714562
Commit-Queue: Rouslan Solomakhin <[email protected]>
Reviewed-by: John Abd-El-Malek <[email protected]>
Reviewed-by: Stephen McGruer <[email protected]>
Reviewed-by: Philip Rogers <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1017464}
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index 902b55a31..1b87ac46 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -2908,6 +2908,12 @@
const char kPaymentRequestBasicCardDescription[] =
"The 'basic-card' payment method of the PaymentRequest API.";
+const char kIdentityInCanMakePaymentEventFeatureName[] =
+ "Identity in canmakepayment event";
+const char kIdentityInCanMakePaymentEventFeatureDescription[] =
+ "The payment app receives the merchant and user identity when the merchant "
+ "checks whether this payment app is present and can make payments.";
+
const char kAppStoreBillingDebugName[] =
"Web Payments App Store Billing Debug Mode";
const char kAppStoreBillingDebugDescription[] =