Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9681)

Unified Diff: components/autofill/core/browser/payments/full_card_request.cc

Issue 1950203002: Cancel ongoing requests in full card requester. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/autofill/core/browser/autofill_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/payments/full_card_request.cc
diff --git a/components/autofill/core/browser/payments/full_card_request.cc b/components/autofill/core/browser/payments/full_card_request.cc
index d03e953ebb9878bfbefcf01ad9559cffabad54b2..f5a9d7d831129788e84b73f8a154c795f43de542 100644
--- a/components/autofill/core/browser/payments/full_card_request.cc
+++ b/components/autofill/core/browser/payments/full_card_request.cc
@@ -100,7 +100,6 @@ void FullCardRequest::OnUnmaskPromptClosed() {
delegate_->OnFullCardError();
Reset();
- payments_client_->CancelRequest();
}
void FullCardRequest::OnDidGetUnmaskRiskData(const std::string& risk_data) {
@@ -137,6 +136,8 @@ void FullCardRequest::OnDidGetRealPan(AutofillClient::PaymentsRpcResult result,
}
void FullCardRequest::Reset() {
+ weak_ptr_factory_.InvalidateWeakPtrs();
+ payments_client_->CancelRequest();
delegate_ = nullptr;
request_.reset();
should_unmask_card_ = false;
« no previous file with comments | « components/autofill/core/browser/autofill_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698