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

Issue 762593006: Prototype implementation of MediaImportHandler. (Closed)

Created:
6 years ago by Ben Kwa
Modified:
6 years ago
CC:
chromium-reviews, nkostylev+watch_chromium.org, tfarina, yoshiki+watch_chromium.org, rginda+watch_chromium.org, mtomasz+watch_chromium.org, oshima+watch_chromium.org, vitalyp+closure_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
Project:
chromium
Visibility:
Public.

Description

Prototype implementation of MediaImportHandler. The MediaImportHandler is the overall framework class for coordinating the import of media from attached media devices to Drive. This initial implementation sketches out the process, using FileOperationManager to provide the actual copy functionality. - UI and checks for opt-in to Drive->Photos sync and Photos->Drive sync are just stubbed out as TODOs. - The use of FileOperationManager means that the import process is surfaced as a normal copy operaion, which is not the final goal. Follow-up work is needed to implement a separate import queue and associated task management and UI. BUG=420680 Committed: https://crrev.com/157ed95ab034b76ac8491b9f926051d6e9ac9055 Cr-Commit-Position: refs/heads/master@{#307076}

Patch Set 1 #

Patch Set 2 : Sync to master. #

Total comments: 81

Patch Set 3 : Address feedback. #

Patch Set 4 : Move MediaImportHandler into the importer namespace; make the import destination pluggable. #

Total comments: 5

Patch Set 5 : Rename MediaImportHandler#import. #

Total comments: 16

Patch Set 6 : Address feedback. #

Patch Set 7 : Sync to master. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+520 lines, -73 lines) Patch
M chrome/browser/chromeos/file_manager/file_manager_jstest.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
A + chrome/test/data/file_manager/unit_tests/media_import_handler_unittest.html View 1 chunk +6 lines, -2 lines 0 comments Download
A chrome/test/data/file_manager/unit_tests/media_import_handler_unittest.js View 1 2 3 4 5 1 chunk +109 lines, -0 lines 0 comments Download
M chrome/test/data/file_manager/unit_tests/media_scanner_unittest.js View 1 2 3 4 5 6 5 chunks +10 lines, -8 lines 0 comments Download
M chrome/test/data/file_manager/unit_tests/mocks/mock_entry.js View 1 2 3 chunks +49 lines, -9 lines 0 comments Download
M chrome/test/data/file_manager/unit_tests/mocks/mock_file_operation_manager.js View 1 2 3 chunks +63 lines, -0 lines 0 comments Download
A chrome/test/data/file_manager/unit_tests/mocks/mock_media_scanner.js View 1 2 1 chunk +29 lines, -0 lines 0 comments Download
M chrome/test/data/file_manager/unit_tests/mocks/mock_volume_manager.js View 1 2 chunks +26 lines, -0 lines 0 comments Download
M chrome/test/data/file_manager/unit_tests/volume_manager_unittest.js View 1 2 6 chunks +7 lines, -18 lines 0 comments Download
M ui/file_manager/file_manager/background/js/background.js View 1 2 3 8 chunks +21 lines, -18 lines 0 comments Download
M ui/file_manager/file_manager/background/js/compiled_resources.gyp View 1 1 chunk +1 line, -0 lines 0 comments Download
M ui/file_manager/file_manager/background/js/file_operation_manager.js View 1 chunk +1 line, -1 line 0 comments Download
A ui/file_manager/file_manager/background/js/media_import_handler.js View 1 2 3 4 5 1 chunk +181 lines, -0 lines 0 comments Download
M ui/file_manager/file_manager/background/js/media_scanner.js View 1 2 3 chunks +7 lines, -17 lines 0 comments Download
M ui/file_manager/file_manager/foreground/js/compiled_resources.gyp View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M ui/file_manager/file_manager/manifest.json View 2 chunks +2 lines, -0 lines 0 comments Download
M ui/file_manager/file_manager_resources.grd View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 28 (6 generated)
Ben Kwa
6 years ago (2014-12-03 22:31:44 UTC) #2
hirono
https://codereview.chromium.org/762593006/diff/20001/chrome/test/data/file_manager/unit_tests/media_import_handler_unittest.js File chrome/test/data/file_manager/unit_tests/media_import_handler_unittest.js (right): https://codereview.chromium.org/762593006/diff/20001/chrome/test/data/file_manager/unit_tests/media_import_handler_unittest.js#newcode41 chrome/test/data/file_manager/unit_tests/media_import_handler_unittest.js:41: '/root/', nit: Indent should be 2 for array literals. ...
6 years ago (2014-12-04 04:44:26 UTC) #3
Ben Kwa
https://codereview.chromium.org/762593006/diff/20001/chrome/test/data/file_manager/unit_tests/mocks/mock_file_operation_manager.js File chrome/test/data/file_manager/unit_tests/mocks/mock_file_operation_manager.js (right): https://codereview.chromium.org/762593006/diff/20001/chrome/test/data/file_manager/unit_tests/mocks/mock_file_operation_manager.js#newcode21 chrome/test/data/file_manager/unit_tests/mocks/mock_file_operation_manager.js:21: /** @type {!Array<string>} */ On 2014/12/04 04:44:24, hirono wrote: ...
6 years ago (2014-12-04 07:43:49 UTC) #4
Ben Kwa
https://codereview.chromium.org/762593006/diff/20001/chrome/test/data/file_manager/unit_tests/media_scanner_unittest.js File chrome/test/data/file_manager/unit_tests/media_scanner_unittest.js (right): https://codereview.chromium.org/762593006/diff/20001/chrome/test/data/file_manager/unit_tests/media_scanner_unittest.js#newcode88 chrome/test/data/file_manager/unit_tests/media_scanner_unittest.js:88: errorIf(files.length !== 0); On 2014/12/04 04:44:23, hirono wrote: > ...
6 years ago (2014-12-04 07:48:08 UTC) #5
hirono
On 2014/12/04 07:43:49, Ben Kwa wrote: > https://codereview.chromium.org/762593006/diff/20001/chrome/test/data/file_manager/unit_tests/mocks/mock_file_operation_manager.js > File > chrome/test/data/file_manager/unit_tests/mocks/mock_file_operation_manager.js > (right): > ...
6 years ago (2014-12-04 08:42:41 UTC) #6
hirono
On 2014/12/04 07:48:08, Ben Kwa wrote: > https://codereview.chromium.org/762593006/diff/20001/chrome/test/data/file_manager/unit_tests/media_scanner_unittest.js > File chrome/test/data/file_manager/unit_tests/media_scanner_unittest.js (right): > > https://codereview.chromium.org/762593006/diff/20001/chrome/test/data/file_manager/unit_tests/media_scanner_unittest.js#newcode88 ...
6 years ago (2014-12-04 08:42:54 UTC) #7
Ben Kwa
https://codereview.chromium.org/762593006/diff/20001/chrome/test/data/file_manager/unit_tests/media_import_handler_unittest.js File chrome/test/data/file_manager/unit_tests/media_import_handler_unittest.js (right): https://codereview.chromium.org/762593006/diff/20001/chrome/test/data/file_manager/unit_tests/media_import_handler_unittest.js#newcode41 chrome/test/data/file_manager/unit_tests/media_import_handler_unittest.js:41: '/root/', On 2014/12/04 04:44:22, hirono wrote: > nit: Indent ...
6 years ago (2014-12-04 19:53:02 UTC) #8
Ben Kwa
+cc smckay Spoke with Steve offline and he suggested two changes: - move the MediaImportHandler ...
6 years ago (2014-12-04 23:03:21 UTC) #9
Steve McKay
https://codereview.chromium.org/762593006/diff/60001/chrome/test/data/file_manager/unit_tests/mocks/mock_media_scanner.js File chrome/test/data/file_manager/unit_tests/mocks/mock_media_scanner.js (right): https://codereview.chromium.org/762593006/diff/60001/chrome/test/data/file_manager/unit_tests/mocks/mock_media_scanner.js#newcode10 chrome/test/data/file_manager/unit_tests/mocks/mock_media_scanner.js:10: function MockMediaScanner() { This is a Stub, not a ...
6 years ago (2014-12-04 23:47:59 UTC) #11
Dan Beam
https://codereview.chromium.org/762593006/diff/60001/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/762593006/diff/60001/ui/file_manager/file_manager/background/js/media_scanner.js#newcode15 ui/file_manager/file_manager/background/js/media_scanner.js:15: * @param {!Array<!Entry>} entries A list of file and ...
6 years ago (2014-12-04 23:54:10 UTC) #13
Steve McKay
https://codereview.chromium.org/762593006/diff/60001/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/762593006/diff/60001/ui/file_manager/file_manager/background/js/media_scanner.js#newcode15 ui/file_manager/file_manager/background/js/media_scanner.js:15: * @param {!Array<!Entry>} entries A list of file and ...
6 years ago (2014-12-04 23:58:01 UTC) #14
Ben Kwa
On 2014/12/04 23:58:01, Steve McKay wrote: > https://codereview.chromium.org/762593006/diff/60001/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/762593006/diff/60001/ui/file_manager/file_manager/background/js/media_scanner.js#newcode15 ...
6 years ago (2014-12-04 23:59:19 UTC) #15
Steve McKay
On 2014/12/04 23:59:19, Ben Kwa wrote: > On 2014/12/04 23:58:01, Steve McKay wrote: > > ...
6 years ago (2014-12-05 00:27:55 UTC) #16
Steve McKay
A few more comments, most about how I'd like to see the design evolve. But ...
6 years ago (2014-12-05 01:09:39 UTC) #17
hirono
lgtm with nits. Please also get lgtm from @smckay. https://codereview.chromium.org/762593006/diff/20001/ui/file_manager/file_manager/background/js/background.js File ui/file_manager/file_manager/background/js/background.js (right): https://codereview.chromium.org/762593006/diff/20001/ui/file_manager/file_manager/background/js/background.js#newcode88 ui/file_manager/file_manager/background/js/background.js:88: ...
6 years ago (2014-12-05 05:57:37 UTC) #18
Ben Kwa
Done. One small note: cleaning up the importer.MediaImportHandler.defaultDestination.getDriveRoot_ function as hirono@ suggested, necessitated a change ...
6 years ago (2014-12-05 17:22:50 UTC) #19
Steve McKay
Perfectly fine prototype! LGTM
6 years ago (2014-12-05 19:01:17 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/762593006/100001
6 years ago (2014-12-05 19:05:00 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/90554) win8_chromium_rel on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_rel/builds/35065) win_chromium_compile_dbg ...
6 years ago (2014-12-05 19:08:40 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/762593006/120001
6 years ago (2014-12-05 19:57:22 UTC) #26
commit-bot: I haz the power
Committed patchset #7 (id:120001)
6 years ago (2014-12-05 20:53:30 UTC) #27
commit-bot: I haz the power
6 years ago (2014-12-05 20:54:27 UTC) #28
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/157ed95ab034b76ac8491b9f926051d6e9ac9055
Cr-Commit-Position: refs/heads/master@{#307076}

Powered by Google App Engine
This is Rietveld 408576698