|
|
Chromium Code Reviews|
Created:
4 years ago by yamaguchi Modified:
4 years ago Reviewers:
oka CC:
chromium-reviews, posciak+watch_chromium.org, yamaguchi+watch_chromium.org, oka+watch_chromium.org, rginda+watch_chromium.org, mtomasz+watch_chromium.org, fukino+watch_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionRemember the last volume level in Video Player.
BUG=545399
TEST=manual test by the repro steps in the bug
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
Committed: https://crrev.com/c62148132902714359f601b07423ac28541ce112
Cr-Commit-Position: refs/heads/master@{#434925}
Patch Set 1 #Patch Set 2 : Move the constants for volume control to its relevant section. #
Total comments: 7
Patch Set 3 : Rename volume to normalized_volume. #
Total comments: 2
Patch Set 4 : Use lowerCamelCase for local variable. #Messages
Total messages: 29 (20 generated)
Description was changed from ========== Remember the last volume level in Video Player. BUG=545399 ========== to ========== Remember the last volume level in Video Player. BUG=545399 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ==========
The CQ bit was checked by yamaguchi@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
yamaguchi@chromium.org changed reviewers: + oka@chromium.org
LGTM with nits and optional suggestion. https://codereview.chromium.org/2535713003/diff/20001/ui/file_manager/video_p... File ui/file_manager/video_player/js/media_controls.js (right): https://codereview.chromium.org/2535713003/diff/20001/ui/file_manager/video_p... ui/file_manager/video_player/js/media_controls.js:526: ? retrieved[MediaControls.KEY_VOLUME] : 1; retrieved[MediaControls.KEY_VOLUME] || 1; is common construct IMO. https://codereview.chromium.org/2535713003/diff/20001/ui/file_manager/video_p... ui/file_manager/video_player/js/media_controls.js:533: valuesToStore[MediaControls.KEY_VOLUME] = this.media_.volume; Optional: media_.volume actually means the ratio of volume/max. How about renaming volume to volumeRatio while we are here? https://codereview.chromium.org/2535713003/diff/20001/ui/file_manager/video_p... ui/file_manager/video_player/js/media_controls.js:534: chrome.storage.local.set(valuesToStore, function() {}); Remove the callback, which is optional.
The CQ bit was checked by yamaguchi@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2535713003/diff/20001/ui/file_manager/video_p... File ui/file_manager/video_player/js/media_controls.js (right): https://codereview.chromium.org/2535713003/diff/20001/ui/file_manager/video_p... ui/file_manager/video_player/js/media_controls.js:526: ? retrieved[MediaControls.KEY_VOLUME] : 1; On 2016/11/29 05:58:41, oka wrote: > retrieved[MediaControls.KEY_VOLUME] || 1; > is common construct IMO. The stored volume can be 0 when muted or the slider is moved to the minimum. https://codereview.chromium.org/2535713003/diff/20001/ui/file_manager/video_p... ui/file_manager/video_player/js/media_controls.js:533: valuesToStore[MediaControls.KEY_VOLUME] = this.media_.volume; On 2016/11/29 05:58:41, oka wrote: > Optional: media_.volume actually means the ratio of volume/max. How about > renaming volume to volumeRatio while we are here? Added "normalized" to those symbol names. I also think it's safer to declare it's a [0,1] value because media_ has a [0,1] volume whereas the PaperSlider (this.volume_) has [0,100] volume. https://codereview.chromium.org/2535713003/diff/20001/ui/file_manager/video_p... ui/file_manager/video_player/js/media_controls.js:534: chrome.storage.local.set(valuesToStore, function() {}); On 2016/11/29 05:58:41, oka wrote: > Remove the callback, which is optional. Done.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2535713003/diff/40001/ui/file_manager/video_p... File ui/file_manager/video_player/js/media_controls.js (right): https://codereview.chromium.org/2535713003/diff/40001/ui/file_manager/video_p... ui/file_manager/video_player/js/media_controls.js:527: var normalized_volume = (MediaControls.KEY_NORMALIZED_VOLUME Use camelCase. https://google.github.io/styleguide/jsguide.html#naming-local-variable-names
https://codereview.chromium.org/2535713003/diff/20001/ui/file_manager/video_p... File ui/file_manager/video_player/js/media_controls.js (right): https://codereview.chromium.org/2535713003/diff/20001/ui/file_manager/video_p... ui/file_manager/video_player/js/media_controls.js:526: ? retrieved[MediaControls.KEY_VOLUME] : 1; On 2016/11/29 06:51:32, yamaguchi wrote: > On 2016/11/29 05:58:41, oka wrote: > > retrieved[MediaControls.KEY_VOLUME] || 1; > > is common construct IMO. > > The stored volume can be 0 when muted or the slider is moved to the minimum. Ah. Sorry.
The CQ bit was checked by yamaguchi@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2535713003/diff/40001/ui/file_manager/video_p... File ui/file_manager/video_player/js/media_controls.js (right): https://codereview.chromium.org/2535713003/diff/40001/ui/file_manager/video_p... ui/file_manager/video_player/js/media_controls.js:527: var normalized_volume = (MediaControls.KEY_NORMALIZED_VOLUME On 2016/11/29 07:13:01, oka wrote: > Use camelCase. > https://google.github.io/styleguide/jsguide.html#naming-local-variable-names Done.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by yamaguchi@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from oka@chromium.org Link to the patchset: https://codereview.chromium.org/2535713003/#ps60001 (title: "Use lowerCamelCase for local variable.")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Remember the last volume level in Video Player. BUG=545399 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ========== to ========== Remember the last volume level in Video Player. BUG=545399 TEST=manual test by the repro steps in the bug CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ==========
CQ is committing da patch.
Bot data: {"patchset_id": 60001, "attempt_start_ts": 1480405041739330,
"parent_rev": "1286a2cf5517d70055f11fa6282a5d88d1a3892f", "commit_rev":
"21cb305f4631f0f9ec3017b40f27b000cd02c387"}
Message was sent while issue was closed.
Description was changed from ========== Remember the last volume level in Video Player. BUG=545399 TEST=manual test by the repro steps in the bug CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ========== to ========== Remember the last volume level in Video Player. BUG=545399 TEST=manual test by the repro steps in the bug CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001)
Message was sent while issue was closed.
Description was changed from ========== Remember the last volume level in Video Player. BUG=545399 TEST=manual test by the repro steps in the bug CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ========== to ========== Remember the last volume level in Video Player. BUG=545399 TEST=manual test by the repro steps in the bug CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/c62148132902714359f601b07423ac28541ce112 Cr-Commit-Position: refs/heads/master@{#434925} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/c62148132902714359f601b07423ac28541ce112 Cr-Commit-Position: refs/heads/master@{#434925} |
