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

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

Issue 2855203002: [Payments] Display the shipping option error alongside the address (Closed)
Patch Set: android test fix Created 3 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/payments/content/BUILD.gn ('k') | components/payments/content/payment_request_spec.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..dba1e0357d25c46fe9167831f5c89d9ffdd8e83e 100644
--- a/components/payments/content/payment_request_spec.h
+++ b/components/payments/content/payment_request_spec.h
@@ -11,6 +11,7 @@
#include "base/macros.h"
#include "base/observer_list.h"
+#include "base/strings/string16.h"
#include "components/payments/core/currency_formatter.h"
#include "components/payments/core/payment_options_provider.h"
#include "components/payments/mojom/payment_request.mojom.h"
@@ -94,6 +95,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 base::string16& selected_shipping_option_error() const {
+ return selected_shipping_option_error_;
+ }
const mojom::PaymentDetails& details() const { return *details_.get(); }
@@ -132,6 +138,7 @@ class PaymentRequestSpec : public PaymentOptionsProvider {
const std::string app_locale_;
// The currently shipping option as specified by the merchant.
mojom::PaymentShippingOption* selected_shipping_option_;
+ base::string16 selected_shipping_option_error_;
std::unique_ptr<CurrencyFormatter> currency_formatter_;
« no previous file with comments | « components/payments/content/BUILD.gn ('k') | components/payments/content/payment_request_spec.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698