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

Unified Diff: components/payments/content/payment_request_state.cc

Issue 2815723002: [Web Payments] Add Spinners and timeout while waiting for UpdateWith (Closed)
Patch Set: Address comments. Created 3 years, 8 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/payments/content/payment_request_spec.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/payments/content/payment_request_state.cc
diff --git a/components/payments/content/payment_request_state.cc b/components/payments/content/payment_request_state.cc
index 959ee9415f0fe604f25554f29c4a7d7119cc7fed..5e8071d5ef360cec8effaac41bf2310600c1e55d 100644
--- a/components/payments/content/payment_request_state.cc
+++ b/components/payments/content/payment_request_state.cc
@@ -98,6 +98,8 @@ void PaymentRequestState::AddAutofillPaymentInstrument(
void PaymentRequestState::SetSelectedShippingOption(
const std::string& shipping_option_id) {
+ spec_->StartWaitingForUpdateWith(
+ PaymentRequestSpec::UpdateReason::SHIPPING_OPTION);
// This will inform the merchant and will lead to them calling updateWith with
// new PaymentDetails.
delegate_->OnShippingOptionIdSelected(shipping_option_id);
@@ -105,6 +107,8 @@ void PaymentRequestState::SetSelectedShippingOption(
void PaymentRequestState::SetSelectedShippingProfile(
autofill::AutofillProfile* profile) {
+ spec_->StartWaitingForUpdateWith(
+ PaymentRequestSpec::UpdateReason::SHIPPING_ADDRESS);
selected_shipping_profile_ = profile;
UpdateIsReadyToPayAndNotifyObservers();
delegate_->OnShippingAddressSelected(
« no previous file with comments | « components/payments/content/payment_request_spec.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698