Commit b26a1af5 authored by Rouslan Solomakhin's avatar Rouslan Solomakhin Committed by Commit Bot

[WebView] Disable PaymentMethodChangeEvent.

Before this patch, the PaymentMethodChangeEvent would be exposed in
WebView, because it has its own feature flag that was not explicitly
turned off in WebView.

This patch disables PaymentMethodChangeEvent and PaymentApp features in
WebView when the overarching feature PaymentRequest is also disabled.

After this patch, the PaymentMethodChangeEvent is not exposed in
WebView.

Bug: 965980
Change-Id: I4fb351a367638c9d830cfb189a5c9e8011c0a8eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1625265
Commit-Queue: Xi Han <hanxi@chromium.org>
Reviewed-by: default avatarRaymond Toy <rtoy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662224}
parent 23a9fbc1
...@@ -338,6 +338,11 @@ void WebRuntimeFeatures::EnablePaymentApp(bool enable) { ...@@ -338,6 +338,11 @@ void WebRuntimeFeatures::EnablePaymentApp(bool enable) {
void WebRuntimeFeatures::EnablePaymentRequest(bool enable) { void WebRuntimeFeatures::EnablePaymentRequest(bool enable) {
RuntimeEnabledFeatures::SetPaymentRequestEnabled(enable); RuntimeEnabledFeatures::SetPaymentRequestEnabled(enable);
if (!enable) {
// Disable features that depend on Payment Request API.
RuntimeEnabledFeatures::SetPaymentMethodChangeEventEnabled(false);
RuntimeEnabledFeatures::SetPaymentAppEnabled(false);
}
} }
void WebRuntimeFeatures::EnablePaymentRequestHasEnrolledInstrument( void WebRuntimeFeatures::EnablePaymentRequestHasEnrolledInstrument(
......
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