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

Unified Diff: components/payments/content/payment_request_spec.h

Issue 2855203002: [Payments] Display the shipping option error alongside the address (Closed)
Patch Set: added tests 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
Index: components/payments/content/payment_request_spec.h
diff --git a/components/payments/content/payment_request_spec.h b/components/payments/content/payment_request_spec.h
index 905cfb5fcc6533e7ce680f7f870bcf6b4376bb2c..30cad02cf7430e28bf112b161c5656fae8e7556a 100644
--- a/components/payments/content/payment_request_spec.h
+++ b/components/payments/content/payment_request_spec.h
@@ -94,6 +94,11 @@ class PaymentRequestSpec : public PaymentOptionsProvider {
mojom::PaymentShippingOption* selected_shipping_option() const {
return selected_shipping_option_;
}
+ // if |selected_shipping_option()| is nullptr, this may contain a non-empty
+ // error returned by the merchant.
+ const std::string& selected_shipping_option_error() const {
+ return selected_shipping_option_error_;
+ }
const mojom::PaymentDetails& details() const { return *details_.get(); }
@@ -132,6 +137,7 @@ class PaymentRequestSpec : public PaymentOptionsProvider {
const std::string app_locale_;
// The currently shipping option as specified by the merchant.
mojom::PaymentShippingOption* selected_shipping_option_;
+ std::string selected_shipping_option_error_;
std::unique_ptr<CurrencyFormatter> currency_formatter_;

Powered by Google App Engine
This is Rietveld 408576698