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

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

Issue 2923533002: [Merge M60][Payments] Do not select an address if the merchant doesn't support it (Closed)
Patch Set: Created 3 years, 6 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_state.h ('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 350cccf6035ceaba89bc19b3389eae9369ee8654..d9c392826038506425be59f8d5dd959a097ff83b 100644
--- a/components/payments/content/payment_request_state.cc
+++ b/components/payments/content/payment_request_state.cc
@@ -35,6 +35,7 @@ PaymentRequestState::PaymentRequestState(
delegate_(delegate),
personal_data_manager_(personal_data_manager),
selected_shipping_profile_(nullptr),
+ selected_shipping_option_error_profile_(nullptr),
selected_contact_profile_(nullptr),
selected_instrument_(nullptr),
payment_request_delegate_(payment_request_delegate),
@@ -65,6 +66,12 @@ void PaymentRequestState::OnCouldNotNormalize(
}
void PaymentRequestState::OnSpecUpdated() {
+ if (spec_->selected_shipping_option_error().empty()) {
+ selected_shipping_option_error_profile_ = nullptr;
+ } else {
+ selected_shipping_option_error_profile_ = selected_shipping_profile_;
+ selected_shipping_profile_ = nullptr;
+ }
is_waiting_for_merchant_validation_ = false;
UpdateIsReadyToPayAndNotifyObservers();
}
« no previous file with comments | « components/payments/content/payment_request_state.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698