[WebLayer] Remove pendingApps from disconnectIfNoPaymentMethodsSupported
Motivation: This CL lays the preparatory work to create onShowCalledAndAppQueried() which will encapsulate the following methods: - disconnectIfNoPaymentMethodsSupported - showAppSelector - triggerPaymentAppUiSkipIfApplicable Behavioural changes: * When show() is called before app querying is finished, after the CL, notifyPaymentUiOfPendingApps() is triggered, and so mJourneyLogger.setNumberOfSuggestionsShown() get recorded, and so the NEEDS_COMPLETION_PAYMENT event is recorded. Before the CL, notifyPaymentUiOfPendingApps() was not triggered in this condition and setNumberOfSuggestionsShown() was not recorded. * When show() is called after app querying is finished, the CL doesn't change any behaviour (i.e., setNumberOfSuggestionsShown gets recorded). Note that the behavioural change is positive, because after the CL, setNumberOfSuggestionsShown gets recorded regardless of the order of show and app query finishing. The system has less states and thus less complicated. Structural changes: * Whether the payment methods are supported by any payment apps becomes solely decided by BrowserPaymentRequest.hasAvailableApps(). But this will be temporary, because hasAvailableApps() can be further broken down into whether regular apps are available and whether users can manually type in the payment information. * disconnectIfNoPaymentMethodsSupported() is moved together with showAppSelector() so they are ready to be encapsulated by onShowCalledAndAppQueried(). Bug: 1153353 Change-Id: I9ff13fdac6dd07c44b6c6c57d3353b4b5cca2c2f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2562837 Commit-Queue: Liquan (Max) Gu <maxlg@chromium.org> Reviewed-by:Rouslan Solomakhin <rouslan@chromium.org> Cr-Commit-Position: refs/heads/master@{#832210}
Showing
Please register or sign in to comment