[PRImpl] Encapsulate PRClient in CPRImpl
Change: * Encapsulate PRClient in CPRImpl. Before the change, PRImpl had to manage the lifespan of PRClient and CPRImpl. After the change, PRImpl only need to manage the lifespan of CPRImpl, as PRClient is no longer visible to PRImpl. * Clarify that PR#close can only be called by the renderer * Create CPRImpl#teardown to play the role of closing (should have called #close if not for the collision with the PR#close interface). * Clarify the usage of CPRImpl#teardown, BPR#close, PRImpl#close. Add mHasClosed/mHasTorndown for CPRImpl#teardown and PRImpl#close to make sure these methods can be called within themself without worrying deadloop. For example, while PRImpl#close calls CPRImpl#teardown, CPRImpl#teardown can call PRImpl#close back without causing deadloop. Acronym: PRClient = PaymentRequestClient CPRImpl = ComponentPaymentRequestImpl BPR = BrowserPaymentRequest PR = PaymentRequest Bug: 1102522 Change-Id: Ic6495f02593f9a1cfad9747e52e9dcf3a05b1018 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2343631 Commit-Queue: Liquan (Max) Gu <maxlg@chromium.org> Reviewed-by:Rouslan Solomakhin <rouslan@chromium.org> Cr-Commit-Position: refs/heads/master@{#796532}
Showing
This diff is collapsed.
Please register or sign in to comment