New issue
Advanced search Search tips

Issue 679797 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

[Payments] Build a currency formatter in C++

Project Member Reported by ma...@chromium.org, Jan 10 2017

Issue description

Currency formatting is only handled for Android right now (using java.util.Currency). 

We should build a cross-platform system.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6758be03e71c7423fb1b43dc267049ebc4ceaf27

commit 6758be03e71c7423fb1b43dc267049ebc4ceaf27
Author: mathp <mathp@chromium.org>
Date: Fri Jan 13 04:49:50 2017

[Payments] Currency formatter for order amounts.

Uses ICU. This change also enables using it on the Desktop implementation. A followup will enable it on Android.

BUG= 679797 
TEST=CurrencyFormatterTest, LANGUAGE=fr_CA ./out/Default/chrome

Review-Url: https://codereview.chromium.org/2621033003
Cr-Commit-Position: refs/heads/master@{#443493}

[modify] https://crrev.com/6758be03e71c7423fb1b43dc267049ebc4ceaf27/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/6758be03e71c7423fb1b43dc267049ebc4ceaf27/chrome/browser/ui/views/payments/order_summary_view_controller.cc
[modify] https://crrev.com/6758be03e71c7423fb1b43dc267049ebc4ceaf27/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc
[modify] https://crrev.com/6758be03e71c7423fb1b43dc267049ebc4ceaf27/components/payments/BUILD.gn
[add] https://crrev.com/6758be03e71c7423fb1b43dc267049ebc4ceaf27/components/payments/currency_formatter.cc
[add] https://crrev.com/6758be03e71c7423fb1b43dc267049ebc4ceaf27/components/payments/currency_formatter.h
[add] https://crrev.com/6758be03e71c7423fb1b43dc267049ebc4ceaf27/components/payments/currency_formatter_unittest.cc
[modify] https://crrev.com/6758be03e71c7423fb1b43dc267049ebc4ceaf27/components/payments/payment_request.cc
[modify] https://crrev.com/6758be03e71c7423fb1b43dc267049ebc4ceaf27/components/payments/payment_request.h

Project Member

Comment 2 by bugdroid1@chromium.org, Jan 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/94af7a6d022fc5368503a8c47480d012617376f3

commit 94af7a6d022fc5368503a8c47480d012617376f3
Author: mathp <mathp@chromium.org>
Date: Sat Jan 14 11:10:05 2017

[Payment Request] Update the CurrencyStringFormatter to call the native impl.

Uses components/payments/currency_formatter.h by way of a JNI bridge.

Had to get rid of the junit tests because the implementation now require the
native libraries to be loaded.

BUG= 679797 
TEST=CurrencyStringFormatterTest, manual

Review-Url: https://codereview.chromium.org/2629883004
Cr-Commit-Position: refs/heads/master@{#443797}

[add] https://crrev.com/94af7a6d022fc5368503a8c47480d012617376f3/chrome/android/java/src/org/chromium/chrome/browser/payments/CurrencyFormatter.java
[delete] https://crrev.com/8c47492479edb7e7f9c1519e6366ca846f166dac/chrome/android/java/src/org/chromium/chrome/browser/payments/CurrencyStringFormatter.java
[modify] https://crrev.com/94af7a6d022fc5368503a8c47480d012617376f3/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
[modify] https://crrev.com/94af7a6d022fc5368503a8c47480d012617376f3/chrome/android/java_sources.gni
[add] https://crrev.com/94af7a6d022fc5368503a8c47480d012617376f3/chrome/android/javatests/src/org/chromium/chrome/browser/payments/CurrencyFormatterTest.java
[delete] https://crrev.com/8c47492479edb7e7f9c1519e6366ca846f166dac/chrome/android/javatests/src/org/chromium/chrome/browser/payments/CurrencyStringFormatterTest.java
[delete] https://crrev.com/8c47492479edb7e7f9c1519e6366ca846f166dac/chrome/android/junit/src/org/chromium/chrome/browser/payments/CurrencyStringFormatterUnitTest.java
[modify] https://crrev.com/94af7a6d022fc5368503a8c47480d012617376f3/chrome/browser/android/chrome_jni_registrar.cc
[modify] https://crrev.com/94af7a6d022fc5368503a8c47480d012617376f3/components/payments/android/BUILD.gn
[add] https://crrev.com/94af7a6d022fc5368503a8c47480d012617376f3/components/payments/android/currency_formatter_android.cc
[add] https://crrev.com/94af7a6d022fc5368503a8c47480d012617376f3/components/payments/android/currency_formatter_android.h
[modify] https://crrev.com/94af7a6d022fc5368503a8c47480d012617376f3/components/payments/currency_formatter.cc
[modify] https://crrev.com/94af7a6d022fc5368503a8c47480d012617376f3/components/payments/currency_formatter.h
[modify] https://crrev.com/94af7a6d022fc5368503a8c47480d012617376f3/components/payments/currency_formatter_unittest.cc

Comment 3 by ma...@chromium.org, Jan 16 2017

Status: Fixed (was: Assigned)
Components: -UI>Browser>Autofill>Payments UI>Browser>Payments

Sign in to add a comment