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

Unified Diff: components/payments/currency_formatter.cc

Issue 2629883004: [Payment Request] Update the CurrencyStringFormatter to call the native impl. (Closed)
Patch Set: 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
Index: components/payments/currency_formatter.cc
diff --git a/components/payments/currency_formatter.cc b/components/payments/currency_formatter.cc
index f333787f521573fd044b819bd990bc0c103dff73..54279b6a0e90de3a7e445320699495ef5f373acd 100644
--- a/components/payments/currency_formatter.cc
+++ b/components/payments/currency_formatter.cc
@@ -17,6 +17,7 @@
namespace payments {
const char kIso4217CurrencySystem[] = "urn:iso:std:iso:4217";
+
namespace {
// Support a maximum of 10 fractional digits, similar to the ISO20022 standard.
@@ -47,11 +48,8 @@ CurrencyFormatter::CurrencyFormatter(
icu_formatter_.reset(
icu::NumberFormat::createCurrencyInstance(locale_, error_code));
if (U_FAILURE(error_code)) {
- icu::UnicodeString name;
- std::string locale_str;
- locale_.getDisplayName(name).toUTF8String(locale_str);
LOG(ERROR) << "Failed to initialize the currency formatter for "
- << locale_str;
+ << locale_name;
return;
}

Powered by Google App Engine
This is Rietveld 408576698