Commit 8856b5f4 authored by Liquan (Max) Gu's avatar Liquan (Max) Gu Committed by Commit Bot

[PaymentHandler] Enable ScrollToExpandPaymentHandler from about flags

ScrollToExpandPaymentHandler can be enabled with a cmd flag, but not
from about://flags. In order to make it possible for users to enable
this feature from about://flags, this CL attaches this feature to
PaymentsExperimentalFeatures, which is one of about://flags, so that
enabling PaymentsExperimentalFeatures from either about://flags,
or cmd, will also enable this feature.

Bug: 999196

Change-Id: I28dae381fe2e4123db078f7b85addb6616ee24a1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1913163
Commit-Queue: Liquan (Max) Gu <maxlg@chromium.org>
Reviewed-by: default avatarRouslan Solomakhin <rouslan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714994}
parent 19741dc5
......@@ -8,6 +8,7 @@ import org.chromium.chrome.browser.ChromeActivity;
import org.chromium.chrome.browser.ChromeFeatureList;
import org.chromium.chrome.browser.ChromeVersionInfo;
import org.chromium.chrome.browser.WebContentsFactory;
import org.chromium.chrome.browser.payments.PaymentsExperimentalFeatures;
import org.chromium.chrome.browser.payments.handler.toolbar.PaymentHandlerToolbarCoordinator;
import org.chromium.chrome.browser.widget.bottomsheet.BottomSheetController;
import org.chromium.components.embedder_support.view.ContentView;
......@@ -90,6 +91,9 @@ public class PaymentHandlerCoordinator {
* solution.
*/
public static boolean isEnabled() {
return ChromeFeatureList.isEnabled(ChromeFeatureList.SCROLL_TO_EXPAND_PAYMENT_HANDLER);
// Enabling the flag of either ScrollToExpand or PaymentsExperimentalFeatures will enable
// this feature.
return PaymentsExperimentalFeatures.isEnabled(
ChromeFeatureList.SCROLL_TO_EXPAND_PAYMENT_HANDLER);
}
}
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