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

Unified Diff: components/payments/payment_details_validation.cc

Issue 2649143003: PaymentRequest: The currencySystem should be non-nullable. (Closed)
Patch Set: PaymentRequest: The currencySystem should be non-nullable. Created 3 years, 11 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/currency_formatter_unittest.cc ('k') | components/payments/payment_request.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/payments/payment_details_validation.cc
diff --git a/components/payments/payment_details_validation.cc b/components/payments/payment_details_validation.cc
index 81c42cdbb4924298c0e2f32f831986b48a999677..5fce52febfc8f32b98308cd7a6c3eae4601c19d2 100644
--- a/components/payments/payment_details_validation.cc
+++ b/components/payments/payment_details_validation.cc
@@ -44,16 +44,13 @@ bool validateShippingOptionOrPaymentItem(
return false;
}
- if (item->amount->currency_system.has_value() &&
- item->amount->currency_system.value().empty()) {
+ if (item->amount->currency_system.empty()) {
*error_message = "Currency system can't be empty";
return false;
}
if (!payments::PaymentsValidators::isValidCurrencyCodeFormat(
- item->amount->currency, item->amount->currency_system.has_value()
- ? item->amount->currency_system.value()
- : "",
+ item->amount->currency, item->amount->currency_system,
error_message)) {
return false;
}
« no previous file with comments | « components/payments/currency_formatter_unittest.cc ('k') | components/payments/payment_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698