[WebLayer] Encapsulate createShippingSectionForPaymentRequestUI
This CL combines two invocation of createShippingSectionForPaymentRequestUI() into one and simplify the invocation conditions. Before the CL, the method was called in the following control routes: 1. PRService#updateWith() -> CPRService#continueShow() -> if isPaymentRequestUiAlive() -> invoke 2. PRService#onShowCalledAndAppsQueried() -> CPRService#showOrSkipAppSelector() -> PaymentUiService#buildPaymentRequestUI -> if !isShowWaitingForUpdatedDetails -> invoke Observing the invocation conditions of the two routes, we know that they are invoked under the same conditions because: 1. isShowWaitingForUpdatedDetails == false: satisfied by updateWith() show() called and apps queried: satisfied by isPaymentRequestUiAlive(). 2. isShowWaitingForUpdatedDetails == false: satisfied by the if. show() called and apps queried: satisfied by showOrSkipAppSelector(). Based on the conditions, these invocations is equivalent to one in CPRService#onShowCalledAndAppsQueriedAndDetailsFinalized(). Bug: 1155582 Change-Id: Id2978142bd62f4396bdae3937973631bc9408d73 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2575203 Commit-Queue: Liquan (Max) Gu <maxlg@chromium.org> Reviewed-by:Rouslan Solomakhin <rouslan@chromium.org> Cr-Commit-Position: refs/heads/master@{#835245}
Showing
Please register or sign in to comment