Commit 7347301c authored by Rouslan Solomakhin's avatar Rouslan Solomakhin Committed by Commit Bot

[Web Payment] Split RespondWithCallbacks class.

Before this patch, RespondWithCallbacks in payment_app_provider_impl.cc
contained three callbacks, only one of which was used at any time.

This patch changes RespondWithCallbacks into an abstract class with
three concrete sub-classes instead: CanMakePaymentResponWithCallback,
InvokeRespondWithCallback, and AbortRespondWithCallback.

In addition, when the payment handler respond with "false" to
"abortpayment" event, payment_app_provider_impl.cc no longer clears the
list of Invoke callbacks, because "false" indicates that the payment has
not been aborted.

After this patch, there're three callback classes with one callback
member variable each.

Bug: 1060298
Change-Id: Ie5c141bc01a6d3c663afd768ea829b750587f0de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2094666
Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
Reviewed-by: default avatarSahel Sharify <sahel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#749586}
parent 0ba01cf0
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