Commit 51f0c76d authored by Liquan (Max) Gu's avatar Liquan (Max) Gu Committed by Chromium LUCI CQ

Remove the unused parameter of buildPaymentRequestUI

Since the isShowWaitingForUpdatedDetails parameter is unused in
buildPaymentRequestUI(), this CL is to delete it.

Change-Id: Ia98e24fab92e71505358abaa80ded9ff20047520
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2615321Reviewed-by: default avatarNick Burris <nburris@chromium.org>
Commit-Queue: Liquan (Max) Gu <maxlg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841603}
parent ab6438ef
...@@ -320,8 +320,7 @@ public class ChromePaymentRequestService ...@@ -320,8 +320,7 @@ public class ChromePaymentRequestService
ChromeActivity chromeActivity = mDelegate.getChromeActivity(mWebContents); ChromeActivity chromeActivity = mDelegate.getChromeActivity(mWebContents);
if (chromeActivity == null) return ErrorStrings.ACTIVITY_NOT_FOUND; if (chromeActivity == null) return ErrorStrings.ACTIVITY_NOT_FOUND;
String error = mPaymentUiService.buildPaymentRequestUI(chromeActivity, String error = mPaymentUiService.buildPaymentRequestUI(chromeActivity,
/*isWebContentsActive=*/mDelegate.isWebContentsActive(mRenderFrameHost), /*isWebContentsActive=*/mDelegate.isWebContentsActive(mRenderFrameHost));
/*isShowWaitingForUpdatedDetails=*/isShowWaitingForUpdatedDetails);
if (error != null) return error; if (error != null) return error;
// Calculate skip ui and build ui only after all payment apps are ready and // Calculate skip ui and build ui only after all payment apps are ready and
// request.show() is called. // request.show() is called.
......
...@@ -1198,13 +1198,10 @@ public class PaymentUiService implements SettingsAutofillAndPaymentsObserver.Obs ...@@ -1198,13 +1198,10 @@ public class PaymentUiService implements SettingsAutofillAndPaymentsObserver.Obs
* Build the PaymentRequest UI. * Build the PaymentRequest UI.
* @param activity The ChromeActivity for the payment request, cannot be null. * @param activity The ChromeActivity for the payment request, cannot be null.
* @param isWebContentsActive Whether the merchant's WebContents is active. * @param isWebContentsActive Whether the merchant's WebContents is active.
* @param isShowWaitingForUpdatedDetails Whether showing payment app or the app selector is
* blocked on the updated payment details.
* @return The error message if built unsuccessfully; null otherwise. * @return The error message if built unsuccessfully; null otherwise.
*/ */
@Nullable @Nullable
public String buildPaymentRequestUI(ChromeActivity activity, boolean isWebContentsActive, public String buildPaymentRequestUI(ChromeActivity activity, boolean isWebContentsActive) {
boolean isShowWaitingForUpdatedDetails) {
// Payment methods section must be ready before building the rest of the UI. This is because // Payment methods section must be ready before building the rest of the UI. This is because
// shipping and contact sections (when requested by merchant) are populated depending on // shipping and contact sections (when requested by merchant) are populated depending on
// whether or not the selected payment app (if such exists) can provide the required // whether or not the selected payment app (if such exists) can provide the required
......
...@@ -24,7 +24,7 @@ public class MockPaymentUiServiceBuilder { ...@@ -24,7 +24,7 @@ public class MockPaymentUiServiceBuilder {
mPaymentUiService = Mockito.mock(PaymentUiService.class); mPaymentUiService = Mockito.mock(PaymentUiService.class);
Mockito.doReturn(null) Mockito.doReturn(null)
.when(mPaymentUiService) .when(mPaymentUiService)
.buildPaymentRequestUI(Mockito.any(), Mockito.anyBoolean(), Mockito.anyBoolean()); .buildPaymentRequestUI(Mockito.any(), Mockito.anyBoolean());
Mockito.doReturn(true).when(mPaymentUiService).hasAvailableApps(); Mockito.doReturn(true).when(mPaymentUiService).hasAvailableApps();
List<PaymentApp> apps = new ArrayList<>(); List<PaymentApp> apps = new ArrayList<>();
apps.add(app); apps.add(app);
...@@ -35,7 +35,7 @@ public class MockPaymentUiServiceBuilder { ...@@ -35,7 +35,7 @@ public class MockPaymentUiServiceBuilder {
/* package */ MockPaymentUiServiceBuilder setBuildPaymentRequestUIResult(String result) { /* package */ MockPaymentUiServiceBuilder setBuildPaymentRequestUIResult(String result) {
Mockito.doReturn(result) Mockito.doReturn(result)
.when(mPaymentUiService) .when(mPaymentUiService)
.buildPaymentRequestUI(Mockito.any(), Mockito.anyBoolean(), Mockito.anyBoolean()); .buildPaymentRequestUI(Mockito.any(), Mockito.anyBoolean());
return this; return this;
} }
......
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