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

Issue 2070713002: Format remaining download time in java code (Closed)

Created:
4 years, 6 months ago by qinmin
Modified:
4 years, 6 months ago
Reviewers:
Ted C
CC:
chromium-reviews, asanka
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Format remaining download time in java code When displaying the remaining download time, ui::TimeFormat::Simple() is called. It calls into third_party/icu, and is quite expensive, takes 70kB from memory dump. This CL adds a simple java method to replace that call. The Java method is similar to android.java.text.Formatter.formatShortElapsedTime(). And it should generate the same output string as ui::TimeFormat::Simple(). BUG=620479 Committed: https://crrev.com/9d2f27dd1d80ce3a4c295e9551d16d91329f3e9e Cr-Commit-Position: refs/heads/master@{#400370}

Patch Set 1 #

Total comments: 6

Patch Set 2 : adding test #

Patch Set 3 : fix findbugs warning #

Messages

Total messages: 18 (8 generated)
qinmin
PTAL
4 years, 6 months ago (2016-06-15 22:32:45 UTC) #2
Ted C
Can you add some simple tests for this as well? https://codereview.chromium.org/2070713002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java File chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java (right): https://codereview.chromium.org/2070713002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java#newcode571 ...
4 years, 6 months ago (2016-06-16 18:28:59 UTC) #3
qinmin
https://codereview.chromium.org/2070713002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java File chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java (right): https://codereview.chromium.org/2070713002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java#newcode571 chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java:571: private static final int SECONDS_PER_MINUTE = 60; On 2016/06/16 ...
4 years, 6 months ago (2016-06-16 19:44:52 UTC) #4
qinmin
On 2016/06/16 18:28:59, Ted C wrote: > Can you add some simple tests for this ...
4 years, 6 months ago (2016-06-16 19:45:43 UTC) #5
Ted C
On 2016/06/16 19:45:43, qinmin wrote: > On 2016/06/16 18:28:59, Ted C wrote: > > Can ...
4 years, 6 months ago (2016-06-16 20:06:31 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2070713002/20001
4 years, 6 months ago (2016-06-16 20:22:39 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/82850)
4 years, 6 months ago (2016-06-16 21:30:05 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2070713002/40001
4 years, 6 months ago (2016-06-17 04:39:45 UTC) #15
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 6 months ago (2016-06-17 05:45:13 UTC) #16
commit-bot: I haz the power
4 years, 6 months ago (2016-06-17 05:47:53 UTC) #18
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/9d2f27dd1d80ce3a4c295e9551d16d91329f3e9e
Cr-Commit-Position: refs/heads/master@{#400370}

Powered by Google App Engine
This is Rietveld 408576698