[WebLayer] Creates PaymentNotShownError to ease error handling
Changes: * Creates PaymentNotShownError that can be used to return more error details. Going forwards, this is used to replace the error string return in multiple methods, so that the methods callers can handle errors more flexibly. * Renames disconnectIfNoPaymentMethodsSupported, disconnectForStrictShow. Behavioural changes: * After the change, when disconnectIfNoPaymentMethodsSupported fails, sObserverForTest.onPaymentRequestServiceShowFailed() is invoked. This makes sense because the disconnect method is invoked only after show(). Bug: 1153353 Change-Id: I9ad81fb26b9ffd89aec06eb68072960955626ce5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2562750 Commit-Queue: Liquan (Max) Gu <maxlg@chromium.org> Reviewed-by:Rouslan Solomakhin <rouslan@chromium.org> Cr-Commit-Position: refs/heads/master@{#832224}
Showing
Please register or sign in to comment