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

Issue 1256343004: [Android] Add phone progress bar animation behind a flag. (Closed)

Created:
5 years, 4 months ago by Kibeom Kim (inactive)
Modified:
4 years, 8 months ago
CC:
chromium-reviews, asvitkine+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Android] Add phone progress bar animation behind a flag. Add progress bar animation behind "progress-bar-animation" flag with the following options: - "disabled" (default) - "smooth" - "fast-start" BUG=352839 Committed: https://crrev.com/5d14d9a3c4f02548a672837c591f6cea78918b24 Cr-Commit-Position: refs/heads/master@{#341472}

Patch Set 1 #

Patch Set 2 : minor cleanup #

Patch Set 3 : no animation by default #

Patch Set 4 : string update #

Total comments: 4

Patch Set 5 : added unit comment and fixed spaces #

Patch Set 6 : fix compile error on non-Android platforms by ifdefing kProgressBarAnimationChoices #

Patch Set 7 : rebase #

Patch Set 8 : telemetry_perf_unittest fix attempt #1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+287 lines, -12 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/ChromeSwitches.java View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarLayout.java View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/widget/ProgressAnimationFastStart.java View 1 2 3 4 1 chunk +40 lines, -0 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/widget/ProgressAnimationSmooth.java View 1 2 3 4 1 chunk +102 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/widget/ToolbarProgressBar.java View 1 2 3 4 5 6 7 5 chunks +87 lines, -5 lines 2 comments Download
M chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java View 1 2 2 chunks +12 lines, -7 lines 0 comments Download
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 1 chunk +14 lines, -0 lines 0 comments Download
M chrome/browser/about_flags.cc View 1 2 3 4 5 6 2 chunks +20 lines, -0 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 41 (18 generated)
Kibeom Kim (inactive)
ptal. I'll measure page loading time and battery drain rate today or tomorrow.
5 years, 4 months ago (2015-07-31 02:15:00 UTC) #2
Kibeom Kim (inactive)
I'm running perf bots and just got the first result: blink_perf.svg on Nexus 5. http://storage.googleapis.com/chromium-telemetry/html-results/results-2015-07-31_03-25-04 ...
5 years, 4 months ago (2015-07-31 10:36:37 UTC) #3
Kibeom Kim (inactive)
page_cycler.top_10_mobile on Nexus 6 http://storage.googleapis.com/chromium-telemetry/html-results/results-2015-07-31_04-28-05 Unfortunately, it doesn't look good, especially on N6 :/. I'll ...
5 years, 4 months ago (2015-07-31 11:46:47 UTC) #4
Kibeom Kim (inactive)
ptal. No animation by default.
5 years, 4 months ago (2015-07-31 19:16:48 UTC) #5
David Trainor- moved to gerrit
lgtm https://codereview.chromium.org/1256343004/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/widget/ProgressAnimationFastStart.java File chrome/android/java/src/org/chromium/chrome/browser/widget/ProgressAnimationFastStart.java (right): https://codereview.chromium.org/1256343004/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/widget/ProgressAnimationFastStart.java#newcode12 chrome/android/java/src/org/chromium/chrome/browser/widget/ProgressAnimationFastStart.java:12: private static final float NORMALIZED_INITIAL_SPEED = 1.5f; Can ...
5 years, 4 months ago (2015-07-31 21:01:52 UTC) #6
Kibeom Kim (inactive)
rkaplow@ : ptal tools/metrics/histograms/histograms.xml https://codereview.chromium.org/1256343004/diff/60001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/1256343004/diff/60001/chrome/app/generated_resources.grd#newcode7056 chrome/app/generated_resources.grd:7056: + <message name="IDS_FLAGS_PROGRESS_BAR_ANIMATION_NAME" desc= "Name ...
5 years, 4 months ago (2015-07-31 21:36:32 UTC) #8
rkaplow
lgtm histograms lgtm
5 years, 4 months ago (2015-07-31 21:39:41 UTC) #9
Kibeom Kim (inactive)
https://codereview.chromium.org/1256343004/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/widget/ProgressAnimationFastStart.java File chrome/android/java/src/org/chromium/chrome/browser/widget/ProgressAnimationFastStart.java (right): https://codereview.chromium.org/1256343004/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/widget/ProgressAnimationFastStart.java#newcode12 chrome/android/java/src/org/chromium/chrome/browser/widget/ProgressAnimationFastStart.java:12: private static final float NORMALIZED_INITIAL_SPEED = 1.5f; On 2015/07/31 ...
5 years, 4 months ago (2015-07-31 21:42:50 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1256343004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1256343004/80001
5 years, 4 months ago (2015-07-31 21:44:11 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_dbg on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_dbg/builds/98801)
5 years, 4 months ago (2015-07-31 21:56:52 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1256343004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1256343004/100001
5 years, 4 months ago (2015-07-31 21:58:22 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1256343004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1256343004/100001
5 years, 4 months ago (2015-07-31 23:48:40 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/50873)
5 years, 4 months ago (2015-08-01 04:00:02 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1256343004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1256343004/100001
5 years, 4 months ago (2015-08-01 06:59:21 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1256343004/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1256343004/120001
5 years, 4 months ago (2015-08-01 08:55:02 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/50975)
5 years, 4 months ago (2015-08-01 14:55:35 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1256343004/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1256343004/120001
5 years, 4 months ago (2015-08-01 18:28:23 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1256343004/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1256343004/140001
5 years, 4 months ago (2015-08-01 21:54:59 UTC) #35
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years, 4 months ago (2015-08-01 23:17:29 UTC) #36
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/5d14d9a3c4f02548a672837c591f6cea78918b24 Cr-Commit-Position: refs/heads/master@{#341472}
5 years, 4 months ago (2015-08-01 23:18:18 UTC) #37
Kibeom Kim (inactive)
OK it seems this crashes on tablet native initializaiton (and upstream doesn't have tablet bot). ...
5 years, 4 months ago (2015-08-03 18:47:59 UTC) #38
jdduke (slow)
https://codereview.chromium.org/1256343004/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/widget/ToolbarProgressBar.java File chrome/android/java/src/org/chromium/chrome/browser/widget/ToolbarProgressBar.java (right): https://codereview.chromium.org/1256343004/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/widget/ToolbarProgressBar.java#newcode127 chrome/android/java/src/org/chromium/chrome/browser/widget/ToolbarProgressBar.java:127: updateVisibleProgress(); Silly ignorant question: Is finish() allowed to be ...
5 years, 4 months ago (2015-08-03 23:35:35 UTC) #40
Kibeom Kim (inactive)
5 years, 4 months ago (2015-08-04 02:08:45 UTC) #41
Message was sent while issue was closed.
https://codereview.chromium.org/1256343004/diff/140001/chrome/android/java/sr...
File
chrome/android/java/src/org/chromium/chrome/browser/widget/ToolbarProgressBar.java
(right):

https://codereview.chromium.org/1256343004/diff/140001/chrome/android/java/sr...
chrome/android/java/src/org/chromium/chrome/browser/widget/ToolbarProgressBar.java:127:
updateVisibleProgress();
On 2015/08/03 23:35:35, jdduke wrote:
> Silly ignorant question: Is finish() allowed to be called multiple times
> redundantly? If so we might get into a scenario where the hide callback is
> posted a ton of times. I have no idea if this happens in practice. There are
> other places that call setProgress too, basically I'm wondering if there's any
> way we can safeguarding against posting a ton of hide runnables? Also, why not
> postOnAnimationDelayed?

Yeah currently finish() can be called multiple times aftert start(), though
normally it will be called only once. The list of events that calls finish():

- onCrash
- onPageLoadFailed
- onPageLoadFinished
- onPageLoadStarted (if it's native page)
- ToolbarManager#updateCurrentTabDisplayStatus()

So I don't think we're spamming, and actually only onPageLoadFinished will call
finished() with "delayed==true" argument, so definitely we're not spamming
posting tasks at least. I could have just guarded by |if (!mIsStarted) return;|
but didn't feel it's worth when I was writing this.

And yeah I think I should have used postOnAnimationDelayed. Thanks for pointing
out, I'll prepare CL shortly.

Powered by Google App Engine
This is Rietveld 408576698