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

Issue 2621033003: [Payments] Currency formatter for order amounts. (Closed)

Created:
3 years, 11 months ago by Mathieu
Modified:
3 years, 11 months ago
CC:
chromium-reviews, rouslan+payments_chromium.org, sebsg+paymentswatch_chromium.org, gogerald+paymentswatch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[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} Committed: https://chromium.googlesource.com/chromium/src/+/6758be03e71c7423fb1b43dc267049ebc4ceaf27

Patch Set 1 : Initial #

Total comments: 30

Patch Set 2 : addressed rouslan's comments; caching CurrencyFormatter #

Patch Set 3 : Added tests #

Patch Set 4 : fix dependency #

Patch Set 5 : currency formatter takes locale_name as string #

Total comments: 14

Patch Set 6 : Addressed comments #

Total comments: 2

Patch Set 7 : deps -> public_deps #

Patch Set 8 : checked_cast #

Unified diffs Side-by-side diffs Delta from patch set Stats (+367 lines, -8 lines) Patch
M chrome/browser/ui/BUILD.gn View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/ui/views/payments/order_summary_view_controller.cc View 1 2 chunks +9 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_sheet_view_controller.cc View 1 2 chunks +9 lines, -3 lines 0 comments Download
M components/payments/BUILD.gn View 1 2 3 4 5 6 2 chunks +10 lines, -1 line 0 comments Download
A components/payments/currency_formatter.h View 1 2 3 4 5 1 chunk +54 lines, -0 lines 0 comments Download
A components/payments/currency_formatter.cc View 1 2 3 4 5 6 7 1 chunk +124 lines, -0 lines 0 comments Download
A components/payments/currency_formatter_unittest.cc View 1 2 3 4 5 1 chunk +132 lines, -0 lines 0 comments Download
M components/payments/payment_request.h View 1 3 chunks +13 lines, -0 lines 0 comments Download
M components/payments/payment_request.cc View 1 2 3 4 5 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (20 generated)
Mathieu
Hi Rouslan, please take a look!
3 years, 11 months ago (2017-01-11 17:41:49 UTC) #8
please use gerrit instead
Great work! https://codereview.chromium.org/2621033003/diff/100001/chrome/browser/ui/views/payments/order_summary_view_controller.cc File chrome/browser/ui/views/payments/order_summary_view_controller.cc (right): https://codereview.chromium.org/2621033003/diff/100001/chrome/browser/ui/views/payments/order_summary_view_controller.cc#newcode44 chrome/browser/ui/views/payments/order_summary_view_controller.cc:44: const std::string formatted_amount = FormatAmountForCurrency( nit1: no ...
3 years, 11 months ago (2017-01-11 18:29:31 UTC) #9
Mathieu
Thanks for your knowledge on this :) PTAL https://codereview.chromium.org/2621033003/diff/100001/chrome/browser/ui/views/payments/order_summary_view_controller.cc File chrome/browser/ui/views/payments/order_summary_view_controller.cc (right): https://codereview.chromium.org/2621033003/diff/100001/chrome/browser/ui/views/payments/order_summary_view_controller.cc#newcode44 chrome/browser/ui/views/payments/order_summary_view_controller.cc:44: const ...
3 years, 11 months ago (2017-01-11 22:22:26 UTC) #10
Mathieu
On 2017/01/11 22:22:26, Mathieu Perreault wrote: > Thanks for your knowledge on this :) > ...
3 years, 11 months ago (2017-01-11 23:35:30 UTC) #12
Mathieu
OK should be good to go, PTAL!
3 years, 11 months ago (2017-01-12 02:09:19 UTC) #13
please use gerrit instead
https://codereview.chromium.org/2621033003/diff/190001/chrome/browser/ui/views/payments/order_summary_view_controller.cc File chrome/browser/ui/views/payments/order_summary_view_controller.cc (right): https://codereview.chromium.org/2621033003/diff/190001/chrome/browser/ui/views/payments/order_summary_view_controller.cc#newcode43 chrome/browser/ui/views/payments/order_summary_view_controller.cc:43: CurrencyFormatter* formatter = request()->GetOrCreateCurrencyFormatter( perfection! https://codereview.chromium.org/2621033003/diff/190001/components/payments/currency_formatter.cc File components/payments/currency_formatter.cc (right): ...
3 years, 11 months ago (2017-01-12 19:23:24 UTC) #14
Mathieu
PTAL! https://codereview.chromium.org/2621033003/diff/190001/chrome/browser/ui/views/payments/order_summary_view_controller.cc File chrome/browser/ui/views/payments/order_summary_view_controller.cc (right): https://codereview.chromium.org/2621033003/diff/190001/chrome/browser/ui/views/payments/order_summary_view_controller.cc#newcode43 chrome/browser/ui/views/payments/order_summary_view_controller.cc:43: CurrencyFormatter* formatter = request()->GetOrCreateCurrencyFormatter( On 2017/01/12 19:23:23, rouslan ...
3 years, 11 months ago (2017-01-12 20:29:57 UTC) #15
please use gerrit instead
lgtm
3 years, 11 months ago (2017-01-12 20:36:35 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2621033003/210001
3 years, 11 months ago (2017-01-12 20:42:22 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/340968)
3 years, 11 months ago (2017-01-12 20:52:54 UTC) #20
Mathieu
sky@chromium.org: Please review changes in chrome/browser/ui
3 years, 11 months ago (2017-01-12 21:01:06 UTC) #22
sky
https://codereview.chromium.org/2621033003/diff/210001/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc File chrome/browser/ui/views/payments/payment_sheet_view_controller.cc (right): https://codereview.chromium.org/2621033003/diff/210001/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc#newcode164 chrome/browser/ui/views/payments/payment_sheet_view_controller.cc:164: request()->details()->total->amount->currencySystem, How come this isn't currency_sytem?
3 years, 11 months ago (2017-01-12 23:49:02 UTC) #23
Mathieu
Thanks Scott! https://codereview.chromium.org/2621033003/diff/210001/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc File chrome/browser/ui/views/payments/payment_sheet_view_controller.cc (right): https://codereview.chromium.org/2621033003/diff/210001/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc#newcode164 chrome/browser/ui/views/payments/payment_sheet_view_controller.cc:164: request()->details()->total->amount->currencySystem, On 2017/01/12 23:49:02, sky wrote: > ...
3 years, 11 months ago (2017-01-13 00:37:35 UTC) #26
sky
Ok, LGTM
3 years, 11 months ago (2017-01-13 00:38:35 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2621033003/230001
3 years, 11 months ago (2017-01-13 01:31:53 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2621033003/250001
3 years, 11 months ago (2017-01-13 01:56:28 UTC) #34
commit-bot: I haz the power
3 years, 11 months ago (2017-01-13 04:50:43 UTC) #37
Message was sent while issue was closed.
Committed patchset #8 (id:250001) as
https://chromium.googlesource.com/chromium/src/+/6758be03e71c7423fb1b43dc2670...

Powered by Google App Engine
This is Rietveld 408576698