PaymentRequest: The currencySystem should be non-nullable.
The currencySystem attribute is defined in PaymentCurrencyAmount interface
to indicate the currency system that the currency identifier belongs to.
The spec[1] defines it as non-nullable, and our current IDL implementation
follows it well. However, its mapping value for mojom is nullable. It looks
strange. As a result, in browser side, we are unnecessarily checking whether
the value is null or not everytime.
Therefore, This CL is fixing the value as non-nullable and remove unncessary
checks. This is initiated from Tommy's comment([email protected]) on the code
review[2].
[1] https://w3c.github.io/browser-payment-api/#paymentcurrencyamount
[2] https://codereview.chromium.org/2646313002/#msg5
BUG=none
Review-Url: https://codereview.chromium.org/2649143003
Cr-Commit-Position: refs/heads/master@{#445725}
diff --git a/components/payments/payment_request.h b/components/payments/payment_request.h
index 61077b2..cbc9905 100644
--- a/components/payments/payment_request.h
+++ b/components/payments/payment_request.h
@@ -64,7 +64,7 @@
// the CurrencyFormatter is cached here.
CurrencyFormatter* GetOrCreateCurrencyFormatter(
const std::string& currency_code,
- const base::Optional<std::string> currency_system,
+ const std::string& currency_system,
const std::string& locale_name);
// Returns the Autofill Profile, representing the shipping address and contact