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

Issue 792233009: Reflect scanning status in command UI. Only allow import once scanning is complete. (Closed)

Created:
6 years ago by Steve McKay
Modified:
6 years ago
Reviewers:
mtomasz
CC:
chromium-reviews, extensions-reviews_chromium.org, nkostylev+watch_chromium.org, tfarina, rginda+watch_chromium.org, mtomasz+watch_chromium.org, oshima+watch_chromium.org, vitalyp+closure_chromium.org, chromium-apps-reviews_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, dbeam+watch-closure_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reflect scanning status in command UI. Only allow import once scanning is complete. This is a sizeable change that reworks the flow of control. Introduce an ImportController in the foreground that manages scanning. Move cloud-import command logic out of file_manager_commands into ImportController. Update MediaImportHandler to accept a ScanResult instead of an array of entries. Make MediaScanner observable, so that commands can be updated when a scan finishes. NOTE: I due to slow and frequently broken (not by me) ChromeOS builds, I have not yet sucessfully tested this on ChromeOS. Still, I wanted to get the change mailed. All tests are passing. I'll remedy the situation with ChromeOS ASAP. BUG=420680 TEST=browser_test: FileManagerJsTest.* Committed: https://crrev.com/66e1ad07571c8d2d1a64adab5e03680d07fac03f Cr-Commit-Position: refs/heads/master@{#309229}

Patch Set 1 #

Patch Set 2 : Refactoring input into ImporterCommand for easier testing. #

Patch Set 3 : Barebones (and probably doesn't work yet) test for import controller. #

Total comments: 21

Patch Set 4 : Respond to review comments. #

Patch Set 5 : Make tests pass and stuff generally work as expected! Don't load controller unless feature is enabl… #

Patch Set 6 : Update controller to return a response with instructions to be interpreted in command, rather than … #

Patch Set 7 : Fix a small command visibility bug. #

Total comments: 2

Patch Set 8 : Respond to review comments. #

Patch Set 9 : Merge w/ master...naughty, naughty master. #

Patch Set 10 : Fix FM.jstests.cc && Finalize scan results in MediaImportHandlerTest...unbreaking the test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+976 lines, -265 lines) Patch
M chrome/app/chromeos_strings.grdp View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -1 line 0 comments Download
M chrome/browser/chromeos/extensions/file_manager/private_api_strings.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/file_manager/file_manager_jstest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M ui/file_manager/file_manager/background/js/background.js View 1 chunk +7 lines, -2 lines 0 comments Download
M ui/file_manager/file_manager/background/js/import_history.js View 1 chunk +1 line, -1 line 0 comments Download
M ui/file_manager/file_manager/background/js/media_import_handler.js View 1 2 3 4 5 6 7 8 9 5 chunks +26 lines, -37 lines 0 comments Download
M ui/file_manager/file_manager/background/js/media_import_handler_unittest.html View 1 chunk +1 line, -1 line 0 comments Download
M ui/file_manager/file_manager/background/js/media_import_handler_unittest.js View 1 2 3 4 5 6 7 8 9 3 chunks +43 lines, -45 lines 0 comments Download
M ui/file_manager/file_manager/background/js/media_scanner.js View 1 2 3 4 9 chunks +75 lines, -5 lines 0 comments Download
M ui/file_manager/file_manager/background/js/media_scanner_unittest.js View 1 2 3 4 5 6 7 8 9 8 chunks +125 lines, -62 lines 0 comments Download
M ui/file_manager/file_manager/background/js/mock_media_scanner.js View 1 2 3 4 2 chunks +101 lines, -15 lines 0 comments Download
M ui/file_manager/file_manager/background/js/mock_volume_manager.js View 1 2 3 4 2 chunks +25 lines, -6 lines 0 comments Download
M ui/file_manager/file_manager/common/js/importer_common.js View 1 2 3 4 2 chunks +11 lines, -13 lines 0 comments Download
M ui/file_manager/file_manager/common/js/mock_entry.js View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M ui/file_manager/file_manager/common/js/unittest_util.js View 1 2 1 chunk +1 line, -1 line 0 comments Download
M ui/file_manager/file_manager/foreground/js/compiled_resources.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M ui/file_manager/file_manager/foreground/js/file_manager.js View 1 2 3 4 8 chunks +41 lines, -20 lines 0 comments Download
M ui/file_manager/file_manager/foreground/js/file_manager_commands.js View 1 2 3 4 5 6 1 chunk +13 lines, -46 lines 0 comments Download
A ui/file_manager/file_manager/foreground/js/import_controller.js View 1 2 3 4 5 6 1 chunk +250 lines, -0 lines 0 comments Download
A + ui/file_manager/file_manager/foreground/js/import_controller_unittest.html View 1 2 3 4 1 chunk +8 lines, -9 lines 0 comments Download
A ui/file_manager/file_manager/foreground/js/import_controller_unittest.js View 1 2 3 4 5 6 7 1 chunk +228 lines, -0 lines 0 comments Download
M ui/file_manager/file_manager/foreground/js/main_scripts.js View 1 chunk +1 line, -0 lines 0 comments Download
M ui/file_manager/file_manager/main.html View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 27 (5 generated)
Steve McKay
Refactoring input into ImporterCommand for easier testing.
6 years ago (2014-12-18 00:02:36 UTC) #1
Steve McKay
Barebones (and probably doesn't work yet) test for import controller.
6 years ago (2014-12-18 00:40:10 UTC) #2
Steve McKay
Note that this is not yet thoroughly tested. Test is still in progress. But since ...
6 years ago (2014-12-18 00:41:41 UTC) #4
mtomasz
https://codereview.chromium.org/792233009/diff/40001/chrome/app/chromeos_strings.grdp File chrome/app/chromeos_strings.grdp (right): https://codereview.chromium.org/792233009/diff/40001/chrome/app/chromeos_strings.grdp#newcode449 chrome/app/chromeos_strings.grdp:449: Insufficient space on local device! Local device may sound ...
6 years ago (2014-12-18 01:39:05 UTC) #5
Steve McKay
Respond to review comments.
6 years ago (2014-12-18 03:34:40 UTC) #6
Steve McKay
More to come tomorrow. Cheers! https://codereview.chromium.org/792233009/diff/40001/chrome/app/chromeos_strings.grdp File chrome/app/chromeos_strings.grdp (right): https://codereview.chromium.org/792233009/diff/40001/chrome/app/chromeos_strings.grdp#newcode449 chrome/app/chromeos_strings.grdp:449: Insufficient space on local ...
6 years ago (2014-12-18 03:34:53 UTC) #7
mtomasz
https://codereview.chromium.org/792233009/diff/40001/ui/file_manager/file_manager/background/js/media_scanner.js File ui/file_manager/file_manager/background/js/media_scanner.js (right): https://codereview.chromium.org/792233009/diff/40001/ui/file_manager/file_manager/background/js/media_scanner.js#newcode256 ui/file_manager/file_manager/background/js/media_scanner.js:256: return !this.settled_; On 2014/12/18 03:34:52, Steve McKay wrote: > ...
6 years ago (2014-12-18 08:59:06 UTC) #8
Steve McKay
Make tests pass and stuff generally work as expected! Don't load controller unless feature is ...
6 years ago (2014-12-18 22:48:21 UTC) #9
Steve McKay
Okay. I think I've addressed all of your comments and my promises. One sort of ...
6 years ago (2014-12-18 23:04:11 UTC) #10
Steve McKay
Update controller to return a response with instructions to be interpreted in command, rather than ...
6 years ago (2014-12-18 23:40:13 UTC) #11
Steve McKay
Update controller to return a response with instructions to be interpreted in command, rather than ...
6 years ago (2014-12-18 23:48:43 UTC) #13
Steve McKay
Fix a small command visibility bug.
6 years ago (2014-12-19 00:01:41 UTC) #14
mtomasz
lgtm https://codereview.chromium.org/792233009/diff/140001/ui/file_manager/file_manager/foreground/js/import_controller_unittest.js File ui/file_manager/file_manager/foreground/js/import_controller_unittest.js (right): https://codereview.chromium.org/792233009/diff/140001/ui/file_manager/file_manager/foreground/js/import_controller_unittest.js#newcode201 ui/file_manager/file_manager/foreground/js/import_controller_unittest.js:201: nit: Remove \n?
6 years ago (2014-12-19 05:10:09 UTC) #15
Steve McKay
Respond to review comments.
6 years ago (2014-12-19 05:15:09 UTC) #16
Steve McKay
DOne. Thanks! Submitting. https://codereview.chromium.org/792233009/diff/140001/ui/file_manager/file_manager/foreground/js/import_controller_unittest.js File ui/file_manager/file_manager/foreground/js/import_controller_unittest.js (right): https://codereview.chromium.org/792233009/diff/140001/ui/file_manager/file_manager/foreground/js/import_controller_unittest.js#newcode201 ui/file_manager/file_manager/foreground/js/import_controller_unittest.js:201: On 2014/12/19 05:10:09, mtomasz wrote: > ...
6 years ago (2014-12-19 05:15:49 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/792233009/160001
6 years ago (2014-12-19 05:16:46 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_arm64_dbg_recipe/builds/32307) android_chromium_gn_compile_dbg on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_dbg/builds/27681) android_chromium_gn_compile_rel ...
6 years ago (2014-12-19 05:20:30 UTC) #21
Steve McKay
Merge w/ master...naughty, naughty master.
6 years ago (2014-12-19 06:49:41 UTC) #22
Steve McKay
Fix FM.jstests.cc && Finalize scan results in MediaImportHandlerTest...unbreaking the test.
6 years ago (2014-12-19 18:08:20 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/792233009/200001
6 years ago (2014-12-19 18:08:51 UTC) #25
commit-bot: I haz the power
Committed patchset #10 (id:200001)
6 years ago (2014-12-19 19:33:00 UTC) #26
commit-bot: I haz the power
6 years ago (2014-12-19 19:33:57 UTC) #27
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/66e1ad07571c8d2d1a64adab5e03680d07fac03f
Cr-Commit-Position: refs/heads/master@{#309229}

Powered by Google App Engine
This is Rietveld 408576698