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

Unified Diff: components/payments/payment_request.cc

Issue 2621033003: [Payments] Currency formatter for order amounts. (Closed)
Patch Set: checked_cast 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/payment_request.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/payments/payment_request.cc
diff --git a/components/payments/payment_request.cc b/components/payments/payment_request.cc
index 98182c155672e0a96ae518de2a66c1702ffb3226..1a426c8edf4ddfd3a8a2698727799857b54f3590 100644
--- a/components/payments/payment_request.cc
+++ b/components/payments/payment_request.cc
@@ -61,4 +61,16 @@ void PaymentRequest::OnError() {
manager_->DestroyRequest(this);
}
+CurrencyFormatter* PaymentRequest::GetOrCreateCurrencyFormatter(
+ const std::string& currency_code,
+ const base::Optional<std::string> currency_system,
+ const std::string& locale_name) {
+ if (!currency_formatter_) {
+ currency_formatter_.reset(
+ new CurrencyFormatter(currency_code, currency_system, locale_name));
+ }
+
+ return currency_formatter_.get();
+}
+
} // namespace payments
« no previous file with comments | « components/payments/payment_request.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698