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

Issue 985533004: Implement chrome.fileSystem.requestFileSystem(). (Closed)

Created:
5 years, 9 months ago by mtomasz
Modified:
5 years, 9 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, asvitkine+watch_chromium.org, tzik, nhiroki, 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, kinuko+fileapi, davemoore+watch_chromium.org, dbeam+watch-closure_chromium.org, kinuko
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement chrome.fileSystem.requestFileSystem(). This CL moves the private chrome.fileManagerPrivate.requestFileSystem to the new namespace with the following differences: - It returns an isolated file system (instead of an external). - It's much simplified. It's currently enabled to component apps only. This restriction will be released in the upcoming CL. TEST=Tested partially by existing browser tests. BUG=323422 R=benwells@chromium.org, fukino@chromium.org, hirono@chromium.org, isherman@chromium.org, xiyuan@chromium.org Committed: https://chromium.googlesource.com/chromium/src/+/26fbaa282e764f3e340332d12a7032a488e0a41a

Patch Set 1 #

Patch Set 2 : Rebased. #

Patch Set 3 : WIP (2) #

Patch Set 4 : Fixed. #

Patch Set 5 : Fixed jsdoc. #

Patch Set 6 : Split the CL. #

Patch Set 7 : Cleaned up. #

Total comments: 8

Patch Set 8 : Addressed @hirono's comments. #

Patch Set 9 : Fixed compile issues. #

Total comments: 8

Patch Set 10 : Fixed. #

Total comments: 21

Patch Set 11 : Addressed comments + fixed tests. #

Total comments: 5

Patch Set 12 : Fixed kiosk mode. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+1027 lines, -599 lines) Patch
M chrome/browser/chromeos/app_mode/kiosk_app_manager.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/extensions/file_manager/private_api_file_system.h View 1 1 chunk +0 lines, -37 lines 0 comments Download
M chrome/browser/chromeos/extensions/file_manager/private_api_file_system.cc View 1 2 chunks +5 lines, -122 lines 0 comments Download
M chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/file_system/file_system_api.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +31 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/file_system/file_system_api.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +218 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/_permission_features.json View 1 2 3 4 5 6 7 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/file_manager_private.idl View 3 chunks +3 lines, -10 lines 0 comments Download
M chrome/common/extensions/api/file_system.idl View 1 2 3 4 5 6 7 8 9 10 3 chunks +21 lines, -1 line 0 comments Download
M chrome/renderer/resources/extensions/file_manager_private_custom_bindings.js View 1 chunk +0 lines, -9 lines 0 comments Download
M chrome/renderer/resources/extensions/file_system_custom_bindings.js View 2 chunks +15 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_browser/app_file_handler_multi/manifest.json View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_browser/app_file_handler_multi/test.js View 1 2 3 4 5 2 chunks +71 lines, -52 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_browser/content_checksum_test/manifest.json View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/file_browser/content_checksum_test/test.js View 1 2 3 4 5 6 7 8 9 10 2 chunks +35 lines, -13 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_browser/drive_search_test/manifest.json View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/file_browser/drive_search_test/test.js View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_browser/file_watcher_test/manifest.json View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/file_browser/file_watcher_test/test.js View 1 2 3 4 5 2 chunks +15 lines, -3 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_browser/filesystem_operations_test/manifest.json View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/file_browser/filesystem_operations_test/test.js View 1 2 3 4 5 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_browser/handler_test_runner/manifest.json View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/file_browser/handler_test_runner/test.js View 1 2 3 4 5 2 chunks +18 lines, -13 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_browser/multi_profile_copy/manifest.json View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/file_browser/multi_profile_copy/test.js View 1 2 3 4 5 1 chunk +24 lines, -15 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_system_provider/add_watcher/manifest.json View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_system_provider/add_watcher/test.js View 1 2 3 chunks +50 lines, -33 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_system_provider/big_file/manifest.json View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_system_provider/copy_entry/manifest.json View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_system_provider/create_directory/manifest.json View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_system_provider/create_file/manifest.json View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_system_provider/delete_entry/manifest.json View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_system_provider/evil/manifest.json View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_system_provider/get_all/manifest.json View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_system_provider/get_metadata/manifest.json View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_system_provider/mime_type/manifest.json View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_system_provider/mime_type/test.js View 1 2 3 chunks +55 lines, -42 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_system_provider/move_entry/manifest.json View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_system_provider/notify/manifest.json View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_system_provider/notify/test.js View 1 2 3 chunks +82 lines, -67 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_system_provider/read_directory/manifest.json View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_system_provider/read_file/manifest.json View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_system_provider/remove_watcher/manifest.json View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_system_provider/remove_watcher/test.js View 1 2 3 chunks +46 lines, -33 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_system_provider/test_util/test_util.js View 1 2 2 chunks +24 lines, -2 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_system_provider/thumbnail/manifest.json View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_system_provider/thumbnail/test.js View 1 2 3 chunks +48 lines, -36 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_system_provider/truncate/manifest.json View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_system_provider/write_file/manifest.json View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M extensions/browser/extension_function_histogram_value.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M third_party/closure_compiler/externs/chrome_extensions.js View 1 2 3 4 5 6 7 8 9 2 chunks +19 lines, -0 lines 1 comment Download
M third_party/closure_compiler/externs/file_manager_private.js View 1 chunk +0 lines, -11 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 chunk +1 line, -1 line 0 comments Download
M ui/file_manager/audio_player/manifest.json View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M ui/file_manager/file_manager/background/js/volume_manager.js View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +113 lines, -69 lines 0 comments Download
M ui/file_manager/file_manager/background/js/volume_manager_unittest.js View 1 2 3 4 5 6 7 8 9 10 2 chunks +14 lines, -2 lines 0 comments Download
M ui/file_manager/file_manager/manifest.json View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M ui/file_manager/gallery/manifest.json View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -1 line 0 comments Download
M ui/file_manager/image_loader/image_loader.js View 1 2 3 4 5 6 7 8 9 2 chunks +10 lines, -11 lines 0 comments Download
M ui/file_manager/image_loader/manifest.json View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M ui/file_manager/video_player/manifest.json View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (9 generated)
mtomasz
On 2015/03/17 06:58:25, mtomasz wrote: > mailto:mtomasz@chromium.org changed reviewers: > + mailto:benwells@chromium.org, mailto:hirono@chromium.org, mailto:isherman@chromium.org, > ...
5 years, 9 months ago (2015-03-17 06:59:04 UTC) #3
fukino
chrome_extensions.js will be overridden by future compiler updates (https://code.google.com/p/chromium/codesearch#chromium/src/third_party/closure_compiler/bump_compiler_version&q=bump_&sq=package:chromium&l=35), so you need to update the ...
5 years, 9 months ago (2015-03-17 07:20:46 UTC) #5
hirono
https://codereview.chromium.org/985533004/diff/140001/chrome/browser/extensions/api/file_system/file_system_api.cc File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://codereview.chromium.org/985533004/diff/140001/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode1026 chrome/browser/extensions/api/file_system/file_system_api.cc:1026: LOG(ERROR) << params->options.volume_id << ": " << writable; nit: ...
5 years, 9 months ago (2015-03-18 03:41:05 UTC) #6
Ilya Sherman
histograms.xml lgtm
5 years, 9 months ago (2015-03-18 23:46:41 UTC) #7
mtomasz
https://codereview.chromium.org/985533004/diff/140001/chrome/browser/extensions/api/file_system/file_system_api.cc File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://codereview.chromium.org/985533004/diff/140001/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode1026 chrome/browser/extensions/api/file_system/file_system_api.cc:1026: LOG(ERROR) << params->options.volume_id << ": " << writable; On ...
5 years, 9 months ago (2015-03-19 01:17:20 UTC) #8
mtomasz
On 2015/03/19 01:17:20, mtomasz wrote: > https://codereview.chromium.org/985533004/diff/140001/chrome/browser/extensions/api/file_system/file_system_api.cc > File chrome/browser/extensions/api/file_system/file_system_api.cc (right): > > https://codereview.chromium.org/985533004/diff/140001/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode1026 > ...
5 years, 9 months ago (2015-03-19 01:26:03 UTC) #9
fukino
lgtm with a nit for third_party/closure_compiler/externs/* https://codereview.chromium.org/985533004/diff/180001/third_party/closure_compiler/externs/chrome_extensions.js File third_party/closure_compiler/externs/chrome_extensions.js (right): https://codereview.chromium.org/985533004/diff/180001/third_party/closure_compiler/externs/chrome_extensions.js#newcode6830 third_party/closure_compiler/externs/chrome_extensions.js:6830: * @typedef {{ ...
5 years, 9 months ago (2015-03-19 03:13:59 UTC) #10
hirono
lgtm, thanks! https://codereview.chromium.org/985533004/diff/180001/chrome/browser/extensions/api/file_system/file_system_api.h File chrome/browser/extensions/api/file_system/file_system_api.h (right): https://codereview.chromium.org/985533004/diff/180001/chrome/browser/extensions/api/file_system/file_system_api.h#newcode13 chrome/browser/extensions/api/file_system/file_system_api.h:13: #include "base/memory/ref_counted.h" nit: Is this ref_counted used? ...
5 years, 9 months ago (2015-03-19 03:33:54 UTC) #11
kinuko
looks like no change in storage/browser/fileapi/file_system_backend.h, so changes in storage/browser/fileapi/file_system_backend.h l/g/t/m :)
5 years, 9 months ago (2015-03-19 10:00:45 UTC) #12
mtomasz
On 2015/03/19 10:00:45, kinuko wrote: > looks like no change in storage/browser/fileapi/file_system_backend.h, so > changes ...
5 years, 9 months ago (2015-03-19 10:21:55 UTC) #13
mtomasz
https://codereview.chromium.org/985533004/diff/180001/chrome/browser/extensions/api/file_system/file_system_api.h File chrome/browser/extensions/api/file_system/file_system_api.h (right): https://codereview.chromium.org/985533004/diff/180001/chrome/browser/extensions/api/file_system/file_system_api.h#newcode13 chrome/browser/extensions/api/file_system/file_system_api.h:13: #include "base/memory/ref_counted.h" On 2015/03/19 03:33:54, hirono wrote: > nit: ...
5 years, 9 months ago (2015-03-19 10:28:41 UTC) #15
benwells
https://codereview.chromium.org/985533004/diff/200001/chrome/browser/extensions/api/file_system/file_system_api.cc File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://codereview.chromium.org/985533004/diff/200001/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode84 chrome/browser/extensions/api/file_system/file_system_api.cc:84: const char kNotSupportedError[] = "Operation not supported."; It would ...
5 years, 9 months ago (2015-03-20 00:42:40 UTC) #16
mtomasz
https://codereview.chromium.org/985533004/diff/200001/chrome/browser/extensions/api/file_system/file_system_api.cc File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://codereview.chromium.org/985533004/diff/200001/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode84 chrome/browser/extensions/api/file_system/file_system_api.cc:84: const char kNotSupportedError[] = "Operation not supported."; On 2015/03/20 ...
5 years, 9 months ago (2015-03-20 01:56:01 UTC) #17
mtomasz
@xiyuan: PTAL at checks for kiosk mode detection (auto vs. manual) in file_system_api.cc. Thanks.
5 years, 9 months ago (2015-03-20 01:56:57 UTC) #19
benwells
Just the one question.... https://codereview.chromium.org/985533004/diff/200001/chrome/browser/extensions/api/file_system/file_system_api.cc File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://codereview.chromium.org/985533004/diff/200001/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode1068 chrome/browser/extensions/api/file_system/file_system_api.cc:1068: extension()->location() != Manifest::COMPONENT; On 2015/03/20 ...
5 years, 9 months ago (2015-03-20 02:43:58 UTC) #20
xiyuan
https://codereview.chromium.org/985533004/diff/220001/chrome/browser/extensions/api/file_system/file_system_api.cc File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://codereview.chromium.org/985533004/diff/220001/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode1072 chrome/browser/extensions/api/file_system/file_system_api.cc:1072: !chromeos::KioskAppManager::Get()->IsAutoLaunchEnabled() && This name is a bit misleading. IsAutoLaunchEnabled ...
5 years, 9 months ago (2015-03-20 03:03:12 UTC) #21
mtomasz
https://codereview.chromium.org/985533004/diff/220001/chrome/browser/extensions/api/file_system/file_system_api.cc File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://codereview.chromium.org/985533004/diff/220001/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode1029 chrome/browser/extensions/api/file_system/file_system_api.cc:1029: // extensions and apps, which is not documented though. ...
5 years, 9 months ago (2015-03-20 03:26:23 UTC) #22
xiyuan
kiosk_app_manager.h and file_system_api.h/cc LGTM Thank you for helping cleaning the header.
5 years, 9 months ago (2015-03-20 03:34:34 UTC) #23
benwells
https://codereview.chromium.org/985533004/diff/220001/chrome/browser/extensions/api/file_system/file_system_api.cc File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://codereview.chromium.org/985533004/diff/220001/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode1029 chrome/browser/extensions/api/file_system/file_system_api.cc:1029: // extensions and apps, which is not documented though. ...
5 years, 9 months ago (2015-03-20 04:09:29 UTC) #24
mtomasz
On 2015/03/20 04:09:29, benwells wrote: > https://codereview.chromium.org/985533004/diff/220001/chrome/browser/extensions/api/file_system/file_system_api.cc > File chrome/browser/extensions/api/file_system/file_system_api.cc (right): > > https://codereview.chromium.org/985533004/diff/220001/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode1029 > ...
5 years, 9 months ago (2015-03-20 06:27:38 UTC) #25
benwells
On 2015/03/20 06:27:38, mtomasz wrote: > On 2015/03/20 04:09:29, benwells wrote: > > > https://codereview.chromium.org/985533004/diff/220001/chrome/browser/extensions/api/file_system/file_system_api.cc ...
5 years, 9 months ago (2015-03-20 06:52:21 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/985533004/240001
5 years, 9 months ago (2015-03-20 06:59:09 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/50991)
5 years, 9 months ago (2015-03-20 07:07:49 UTC) #31
commit-bot: I haz the power
Patchset 12 (id:??) landed as https://crrev.com/26fbaa282e764f3e340332d12a7032a488e0a41a Cr-Commit-Position: refs/heads/master@{#321538}
5 years, 9 months ago (2015-03-20 09:32:20 UTC) #32
mtomasz
Committed patchset #12 (id:240001) manually as 26fbaa282e764f3e340332d12a7032a488e0a41a (presubmit successful).
5 years, 9 months ago (2015-03-20 09:32:41 UTC) #33
Dan Beam
https://codereview.chromium.org/985533004/diff/240001/third_party/closure_compiler/externs/chrome_extensions.js File third_party/closure_compiler/externs/chrome_extensions.js (right): https://codereview.chromium.org/985533004/diff/240001/third_party/closure_compiler/externs/chrome_extensions.js#newcode6836 third_party/closure_compiler/externs/chrome_extensions.js:6836: chrome.fileSystem.RequestFileSystemOptions; this is a generated file, changes to it ...
5 years, 9 months ago (2015-03-25 23:00:20 UTC) #35
mtomasz
On 2015/03/25 23:00:20, Dan Beam wrote: > https://codereview.chromium.org/985533004/diff/240001/third_party/closure_compiler/externs/chrome_extensions.js > File third_party/closure_compiler/externs/chrome_extensions.js (right): > > https://codereview.chromium.org/985533004/diff/240001/third_party/closure_compiler/externs/chrome_extensions.js#newcode6836 ...
5 years, 9 months ago (2015-03-25 23:19:05 UTC) #36
Dan Beam
5 years, 9 months ago (2015-03-26 00:45:20 UTC) #37
Message was sent while issue was closed.
On 2015/03/25 23:19:05, mtomasz wrote:
> On 2015/03/25 23:00:20, Dan Beam wrote:
> >
>
https://codereview.chromium.org/985533004/diff/240001/third_party/closure_com...
> > File third_party/closure_compiler/externs/chrome_extensions.js (right):
> > 
> >
>
https://codereview.chromium.org/985533004/diff/240001/third_party/closure_com...
> > third_party/closure_compiler/externs/chrome_extensions.js:6836:
> > chrome.fileSystem.RequestFileSystemOptions;
> > this is a generated file, changes to it will be lost.
> > 
> > I'm adding a message to this effect now in bump_compiler_version
> > 
> > fukino@/hirono@: please don't LG changes to this file like this
> 
> Dan Beam: I committed the same changes to the original repository. I did it to
> the local file just so we don't need to wait until the original file is rolled
> out to Chromium. What's the correct way of doing it?

if you mirrored it to the internal file, then it's fine.  the correct way is
autogenerating externs canonically in chrome and pushing them to google3.

sorry for the confusion: as long as you upstreamed and they were eventually
consistent, that's fine.

Powered by Google App Engine
This is Rietveld 408576698