• Rouslan Solomakhin's avatar
    [Web Payment] Split RespondWithCallbacks class. · 7347301c
    Rouslan Solomakhin authored
    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}
    7347301c
payment_app_provider_impl.cc 37.1 KB