Index: components/payments/content/payment_request.cc |
diff --git a/components/payments/content/payment_request.cc b/components/payments/content/payment_request.cc |
index e55e68b272a5ec75112dfe572c94fadd4b8f4389..613bff17b6c79a3c6d14b32facd805f16cac8557 100644 |
--- a/components/payments/content/payment_request.cc |
+++ b/components/payments/content/payment_request.cc |
@@ -135,6 +135,24 @@ CurrencyFormatter* PaymentRequest::GetOrCreateCurrencyFormatter( |
return currency_formatter_.get(); |
} |
+base::string16 PaymentRequest::GetFormattedCurrencyAmount( |
+ const std::string& amount) { |
+ CurrencyFormatter* formatter = |
+ GetOrCreateCurrencyFormatter(details()->total->amount->currency, |
+ details()->total->amount->currency_system, |
+ delegate_->GetApplicationLocale()); |
+ return formatter->Format(amount); |
+} |
+ |
+std::string PaymentRequest::GetFormattedCurrencyCode() { |
+ CurrencyFormatter* formatter = |
+ GetOrCreateCurrencyFormatter(details()->total->amount->currency, |
+ details()->total->amount->currency_system, |
+ delegate_->GetApplicationLocale()); |
+ |
+ return formatter->formatted_currency_code(); |
+} |
+ |
void PaymentRequest::SetSelectedShippingProfile( |
autofill::AutofillProfile* profile) { |
selected_shipping_profile_ = profile; |