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

Side by Side Diff: components/payments/currency_formatter.h

Issue 2621033003: [Payments] Currency formatter for order amounts. (Closed)
Patch Set: Initial 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_PAYMENTS_CURRENCY_FORMATTER_H_
6 #define COMPONENTS_PAYMENTS_CURRENCY_FORMATTER_H_
7
8 #include <string>
9
10 #include "third_party/icu/source/common/unicode/locid.h"
11
12 namespace payments {
13
14 // Formats the |amount| according to the |currency_code|, which typically
15 // adheres to [ISO4217] (for example, "USD" for US Dollars). The result will NOT
16 // contain the currency code, nor a subset of it. Rather, the caller of this
17 // function should display the currency code separately. Note that |amount|
18 // and |currency_code| should have been validated (as part of
19 // payment_details_validation.h) before this is called, but this function will
20 // still do light validation, and return |amount| in failure cases. The return
21 // value may contain non-breaking space.
22 const std::string FormatAmountForCurrency(const std::string& amount,
please use gerrit instead 2017/01/11 18:29:30 The "const" keyword here does not seem to server a
Mathieu 2017/01/11 22:22:26 Done.
23 const std::string& currency_code,
24 const icu::Locale& locale);
25
26 } // namespace payments
27
28 #endif // COMPONENTS_PAYMENTS_CURRENCY_FORMATTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698