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

Issue 2934143002: Move chrome.fileSystem implementation to //extensions (Closed)

Created:
3 years, 6 months ago by michaelpg
Modified:
3 years, 5 months ago
Reviewers:
tommycli, Devlin, benwells, sky
CC:
chromium-reviews, extensions-reviews_chromium.org, tzik, Lei Zhang, tfarina, yamaguchi+watch_chromium.org, oka+watch_chromium.org, nhiroki, tommycli, rginda+watch_chromium.org, oshima+watch_chromium.org, fukino+watch_chromium.org, chromium-apps-reviews_chromium.org, kinuko+fileapi, davemoore+watch_chromium.org, rkc, dlaz
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Move chrome.fileSystem implementation to //extensions This ancient API has several Chrome dependencies, which have been moved into a FileSystemDelegate class that performs the Chrome-specific work. I also made a delegate for apps::SavedFilesService which is only implemented in //apps, but allows //extensions to invoke this apps-specific code without adding a hard dependency. Since so much of the code was shuffled around anyway, I also ran `git cl format` on everything. Future work includes creating an AppShellFileSystemDelegate to make certain functionality available in app_shell. BUG=729713 R=benwells@chromium.org,rdevlin.cronin@chromium.org Review-Url: https://codereview.chromium.org/2934143002 Cr-Commit-Position: refs/heads/master@{#486609} Committed: https://chromium.googlesource.com/chromium/src/+/56c27b3401b61598c079687a032fc9a55258dbdb

Patch Set 1 #

Patch Set 2 : Rebase on git cl format (oops, forgot similarity) #

Patch Set 3 : Rebase and set similarity #

Patch Set 4 : . #

Total comments: 12

Patch Set 5 : benwells, test fix #

Total comments: 32

Patch Set 6 : devlin #

Total comments: 4

Patch Set 7 : devlin #

Patch Set 8 : rebase onto ToT #

Patch Set 9 : rebase on SavedFilesServiceInterface #

Patch Set 10 : . #

Total comments: 3

Patch Set 11 : benwells/rebase #

Patch Set 12 : get, not create #

Patch Set 13 : tentative workaround for file_manager tests #

Total comments: 1

Patch Set 14 : revert #

Patch Set 15 : rebase #

Patch Set 16 : header tweak #

Patch Set 17 : Move FilePicker to //chrome for Files app tests #

Patch Set 18 : ignore #

Patch Set 19 : Rebase on ToT #

Patch Set 20 : Patch 17 is now a parent CL #

Patch Set 21 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+715 lines, -3277 lines) Patch
M apps/app_restore_service_browsertest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/extensions/file_manager/event_router.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/chrome_extensions_api_client.h View 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/chrome_extensions_api_client.cc View 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/developer_private/developer_private_api.h View 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/file_system/DEPS View 1 chunk +0 lines, -1 line 0 comments Download
A chrome/browser/extensions/api/file_system/chrome_file_system_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 19 1 chunk +71 lines, -0 lines 0 comments Download
A + chrome/browser/extensions/api/file_system/chrome_file_system_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +237 lines, -1021 lines 0 comments Download
M chrome/browser/extensions/api/file_system/consent_provider.h View 1 2 3 4 5 6 chunks +8 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/file_system/consent_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/extensions/api/file_system/consent_provider_unittest.cc View 1 2 3 4 5 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/extensions/api/file_system/file_entry_picker.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +9 lines, -10 lines 0 comments Download
M chrome/browser/extensions/api/file_system/file_entry_picker.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +2 lines, -1 line 0 comments Download
D chrome/browser/extensions/api/file_system/file_system_api.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 19 1 chunk +0 lines, -329 lines 0 comments Download
D chrome/browser/extensions/api/file_system/file_system_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +0 lines, -1182 lines 0 comments Download
M chrome/browser/extensions/api/file_system/file_system_api_unittest.cc View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/file_system/file_system_apitest.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/file_system/file_system_apitest_chromeos.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/image_writer_private_apitest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/media_galleries/media_galleries_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/extensions/native_bindings_apitest.cc View 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/media_galleries/media_galleries_permission_controller.cc View 2 chunks +1 line, -1 line 0 comments Download
M chrome/common/extensions/api/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
D chrome/common/extensions/api/file_system.idl View 1 chunk +0 lines, -234 lines 0 comments Download
M extensions/browser/api/extensions_api_client.h View 2 chunks +4 lines, -0 lines 0 comments Download
M extensions/browser/api/extensions_api_client.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M extensions/browser/api/file_system/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +17 lines, -1 line 0 comments Download
A + extensions/browser/api/file_system/DEPS View 2 1 chunk +1 line, -8 lines 0 comments Download
A extensions/browser/api/file_system/OWNERS View 1 chunk +3 lines, -0 lines 0 comments Download
A + extensions/browser/api/file_system/file_system_api.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 19 10 chunks +23 lines, -34 lines 0 comments Download
A + extensions/browser/api/file_system/file_system_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 29 chunks +219 lines, -388 lines 0 comments Download
A + extensions/browser/api/file_system/file_system_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +75 lines, -40 lines 0 comments Download
A + extensions/common/api/file_system.idl View 0 chunks +-1 lines, --1 lines 0 comments Download
M extensions/common/api/schema.gni View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 43 (18 generated)
michaelpg
benwells: PTAL. Sorry it's large -- I extracted what I could beforehand. This extension API ...
3 years, 6 months ago (2017-06-13 20:36:49 UTC) #2
benwells
I'm unfamiliar with the new extension function stuff so I'll leave that to Devlin. Overall ...
3 years, 6 months ago (2017-06-14 03:46:37 UTC) #3
michaelpg
https://codereview.chromium.org/2934143002/diff/60001/extensions/browser/api/file_system/file_system_api.cc File extensions/browser/api/file_system/file_system_api.cc (right): https://codereview.chromium.org/2934143002/diff/60001/extensions/browser/api/file_system/file_system_api.cc#newcode400 extensions/browser/api/file_system/file_system_api.cc:400: // TODO(michaelpg): Use the FileSystemdelegate to override functionality for ...
3 years, 6 months ago (2017-06-14 04:51:41 UTC) #4
benwells
https://codereview.chromium.org/2934143002/diff/60001/extensions/browser/api/file_system/file_system_api.cc File extensions/browser/api/file_system/file_system_api.cc (right): https://codereview.chromium.org/2934143002/diff/60001/extensions/browser/api/file_system/file_system_api.cc#newcode883 extensions/browser/api/file_system/file_system_api.cc:883: auto saved_files_service_delegate = On 2017/06/14 04:51:41, michaelpg wrote: > ...
3 years, 6 months ago (2017-06-14 06:33:04 UTC) #5
Devlin
Oof, this one's rough (though not your fault at all - it's a tricky space). ...
3 years, 6 months ago (2017-06-14 14:53:22 UTC) #6
michaelpg
Some minor changes. I've uploaded benwells' suggestion for SavedFilesService as a separate standalone CL. So ...
3 years, 6 months ago (2017-06-21 00:40:08 UTC) #7
Devlin
nice! A few last comments. https://codereview.chromium.org/2934143002/diff/80001/chrome/browser/extensions/api/file_system/chrome_file_system_delegate.cc File chrome/browser/extensions/api/file_system/chrome_file_system_delegate.cc (right): https://codereview.chromium.org/2934143002/diff/80001/chrome/browser/extensions/api/file_system/chrome_file_system_delegate.cc#newcode258 chrome/browser/extensions/api/file_system/chrome_file_system_delegate.cc:258: &ChromeFileSystemDelegate::OnConsentReceived, base::Unretained(this), On 2017/06/21 ...
3 years, 6 months ago (2017-06-21 14:53:30 UTC) #8
michaelpg
PTAL. Surprisingly the diffs to previous patchsets are quite tame, even after rebasing and splitting ...
3 years, 6 months ago (2017-06-23 21:30:53 UTC) #9
michaelpg
tommycli: media_galleries files sky: added "+ui/shell_dialogs" to //extensions/browser/api/file_system/DEPS (it's hard to avoid using concepts like ...
3 years, 6 months ago (2017-06-23 21:34:46 UTC) #11
benwells
lgtm https://codereview.chromium.org/2934143002/diff/180001/extensions/browser/api/file_system/file_system_delegate.h File extensions/browser/api/file_system/file_system_delegate.h (right): https://codereview.chromium.org/2934143002/diff/180001/extensions/browser/api/file_system/file_system_delegate.h#newcode109 extensions/browser/api/file_system/file_system_delegate.h:109: CreateSavedFilesServiceInterface( On 2017/06/23 21:30:53, michaelpg wrote: > benwells: ...
3 years, 6 months ago (2017-06-26 02:28:15 UTC) #12
Devlin
lgtm
3 years, 5 months ago (2017-06-26 15:05:21 UTC) #13
michaelpg
Thanks guys! tommycli, sky, PTAL. tommycli: media_galleries files sky: added "+ui/shell_dialogs" to //extensions/browser/api/file_system/DEPS (it's hard ...
3 years, 5 months ago (2017-06-26 15:36:33 UTC) #14
tommycli
media_galleries LGTM. Feel free to TBR me on trivial changes to media_galleries. I won't get ...
3 years, 5 months ago (2017-06-26 15:59:03 UTC) #15
sky
new DEPS LGTM
3 years, 5 months ago (2017-06-26 17:16:12 UTC) #16
michaelpg
On 2017/06/26 15:59:03, tommycli wrote: > media_galleries LGTM. > > Feel free to TBR me ...
3 years, 5 months ago (2017-06-26 18:03:49 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2934143002/200001
3 years, 5 months ago (2017-06-26 18:04:37 UTC) #20
michaelpg
Devlin: I'm having trouble understanding why GetAssociatedWebContents() is null. The web contents is either gone ...
3 years, 5 months ago (2017-06-26 20:30:46 UTC) #25
michaelpg
On 2017/06/26 20:30:46, michaelpg wrote: > Devlin: I'm having trouble understanding why GetAssociatedWebContents() is > ...
3 years, 5 months ago (2017-06-26 21:49:08 UTC) #26
Devlin
On 2017/06/26 21:49:08, michaelpg wrote: > On 2017/06/26 20:30:46, michaelpg wrote: > > Devlin: I'm ...
3 years, 5 months ago (2017-06-26 21:57:52 UTC) #27
michaelpg
Haven't solved the test issue yet. https://codereview.chromium.org/2934143002/diff/240001/extensions/browser/api/file_system/file_system_api.cc File extensions/browser/api/file_system/file_system_api.cc (right): https://codereview.chromium.org/2934143002/diff/240001/extensions/browser/api/file_system/file_system_api.cc#newcode508 extensions/browser/api/file_system/file_system_api.cc:508: if (extension_->is_platform_app() && ...
3 years, 5 months ago (2017-06-27 15:34:49 UTC) #32
michaelpg
On 2017/06/27 15:34:49, michaelpg wrote: > Haven't solved the test issue yet. > > https://codereview.chromium.org/2934143002/diff/240001/extensions/browser/api/file_system/file_system_api.cc ...
3 years, 5 months ago (2017-07-05 20:17:45 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2934143002/400001
3 years, 5 months ago (2017-07-13 20:54:51 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/428469)
3 years, 5 months ago (2017-07-13 22:38:32 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2934143002/400001
3 years, 5 months ago (2017-07-13 22:50:47 UTC) #40
commit-bot: I haz the power
3 years, 5 months ago (2017-07-14 01:35:48 UTC) #43
Message was sent while issue was closed.
Committed patchset #21 (id:400001) as
https://chromium.googlesource.com/chromium/src/+/56c27b3401b61598c079687a032f...

Powered by Google App Engine
This is Rietveld 408576698