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

Issue 23146016: Add support for directory access to the file system API. (Closed)

Created:
7 years, 4 months ago by Sam McNally
Modified:
7 years, 3 months ago
Reviewers:
benwells, Matt Giuca
CC:
chromium-reviews, tzik+watch_chromium.org, tfarina, kinuko+watch, extensions-reviews_chromium.org, chromium-apps-reviews_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@simpler-write-permissions
Visibility:
Public.

Description

Add support for directory access to the file system API. This adds 'openDirectory' as a type option for chrome.fileSystem.chooseEntry to allow access to directories. This is restricted to apps with the fileSystem.directory permission. BUG=148486 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=220287

Patch Set 1 : #

Patch Set 2 : rebase #

Total comments: 9

Patch Set 3 : #

Total comments: 13

Patch Set 4 : #

Total comments: 11

Patch Set 5 : #

Total comments: 16

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+598 lines, -115 lines) Patch
M apps/app_restore_service_browsertest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M apps/launcher.cc View 1 2 3 2 chunks +7 lines, -2 lines 0 comments Download
M apps/saved_files_service.h View 3 chunks +6 lines, -1 line 0 comments Download
M apps/saved_files_service.cc View 6 chunks +19 lines, -7 lines 0 comments Download
M apps/saved_files_service_unittest.cc View 5 chunks +8 lines, -7 lines 0 comments Download
M chrome/app/generated_resources.grd View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/file_handlers/app_file_handler_util.h View 1 2 3 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/file_handlers/app_file_handler_util.cc View 1 2 3 4 8 chunks +20 lines, -6 lines 0 comments Download
M chrome/browser/extensions/api/file_system/file_system_api.h View 1 2 4 chunks +20 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/file_system/file_system_api.cc View 1 2 3 4 10 chunks +90 lines, -26 lines 0 comments Download
M chrome/browser/extensions/api/file_system/file_system_apitest.cc View 1 2 3 4 5 6 4 chunks +96 lines, -7 lines 0 comments Download
M chrome/common/extensions/api/_permission_features.json View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/file_system.idl View 3 chunks +27 lines, -18 lines 0 comments Download
M chrome/common/extensions/permissions/api_permission.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/permissions/chrome_api_permissions.cc View 1 2 1 chunk +9 lines, -4 lines 0 comments Download
M chrome/common/extensions/permissions/permission_message.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/renderer/resources/extensions/file_system_custom_bindings.js View 3 chunks +22 lines, -14 lines 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/open_directory/background.js View 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/test/data/extensions/api_test/file_system/open_directory/manifest.json View 1 chunk +15 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/open_directory/test.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/test/data/extensions/api_test/file_system/open_directory/test.js View 1 2 3 4 5 6 7 1 chunk +98 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/open_directory/test_util.js View 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/open_directory_with_only_write/background.js View 1 2 3 4 5 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/open_directory_with_only_write/manifest.json View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/open_directory_with_only_write/test.html View 1 2 3 4 5 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/open_directory_with_only_write/test.js View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/open_directory_with_write/background.js View 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/test/data/extensions/api_test/file_system/open_directory_with_write/manifest.json View 1 chunk +15 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/open_directory_with_write/test.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/test/data/extensions/api_test/file_system/open_directory_with_write/test.js View 1 2 3 4 5 6 7 1 chunk +99 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/open_directory_with_write/test_util.js View 1 2 3 4 5 2 chunks +20 lines, -14 lines 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/open_directory_without_permission/background.js View 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/open_directory_without_permission/manifest.json View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/open_directory_without_permission/test.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/open_directory_without_permission/test.js View 1 chunk +2 lines, -2 lines 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/restore_directory/background.js View 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/restore_directory/manifest.json View 1 chunk +1 line, -1 line 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/restore_directory/test.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/restore_directory/test.js View 1 chunk +5 lines, -7 lines 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/restore_directory/test_util.js View 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/retain_directory/background.js View 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/retain_directory/manifest.json View 1 chunk +1 line, -1 line 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/retain_directory/test.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/retain_directory/test.js View 1 chunk +10 lines, -2 lines 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/retain_directory/test_other_window.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/retain_directory/test_other_window.js View 1 chunk +1 line, -1 line 0 comments Download
A + chrome/test/data/extensions/api_test/file_system/retain_directory/test_util.js View 0 chunks +-1 lines, --1 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
Sam McNally
7 years, 4 months ago (2013-08-26 01:10:59 UTC) #1
Matt Giuca
Some initial comments after a quick read through. https://codereview.chromium.org/23146016/diff/44001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/23146016/diff/44001/chrome/app/generated_resources.grd#newcode4151 chrome/app/generated_resources.grd:4151: + ...
7 years, 3 months ago (2013-08-27 04:30:52 UTC) #2
Sam McNally
https://codereview.chromium.org/23146016/diff/44001/chrome/browser/extensions/api/file_handlers/app_file_handler_util.cc File chrome/browser/extensions/api/file_handlers/app_file_handler_util.cc (right): https://codereview.chromium.org/23146016/diff/44001/chrome/browser/extensions/api/file_handlers/app_file_handler_util.cc#newcode68 chrome/browser/extensions/api/file_handlers/app_file_handler_util.cc:68: return base::PathIsWritable(path); On 2013/08/27 04:30:53, Matt Giuca wrote: > ...
7 years, 3 months ago (2013-08-27 05:16:36 UTC) #3
benwells
still looking, this is what i have so far https://codereview.chromium.org/23146016/diff/59001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (left): https://codereview.chromium.org/23146016/diff/59001/chrome/app/generated_resources.grd#oldcode4151 chrome/app/generated_resources.grd:4151: ...
7 years, 3 months ago (2013-08-27 09:05:05 UTC) #4
Matt Giuca
https://codereview.chromium.org/23146016/diff/59001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (left): https://codereview.chromium.org/23146016/diff/59001/chrome/app/generated_resources.grd#oldcode4151 chrome/app/generated_resources.grd:4151: Write to files that you have opened in the ...
7 years, 3 months ago (2013-08-28 00:37:42 UTC) #5
Sam McNally
https://codereview.chromium.org/23146016/diff/59001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/23146016/diff/59001/chrome/app/generated_resources.grd#newcode4151 chrome/app/generated_resources.grd:4151: + Access directories that you have opened in the ...
7 years, 3 months ago (2013-08-28 05:44:25 UTC) #6
benwells
Looked at everything except tests now... https://codereview.chromium.org/23146016/diff/66001/chrome/browser/extensions/api/file_handlers/app_file_handler_util.cc File chrome/browser/extensions/api/file_handlers/app_file_handler_util.cc (right): https://codereview.chromium.org/23146016/diff/66001/chrome/browser/extensions/api/file_handlers/app_file_handler_util.cc#newcode69 chrome/browser/extensions/api/file_handlers/app_file_handler_util.cc:69: return file_util::CreateDirectory(path); I'm ...
7 years, 3 months ago (2013-08-29 00:04:23 UTC) #7
Sam McNally
https://codereview.chromium.org/23146016/diff/66001/chrome/browser/extensions/api/file_handlers/app_file_handler_util.cc File chrome/browser/extensions/api/file_handlers/app_file_handler_util.cc (right): https://codereview.chromium.org/23146016/diff/66001/chrome/browser/extensions/api/file_handlers/app_file_handler_util.cc#newcode69 chrome/browser/extensions/api/file_handlers/app_file_handler_util.cc:69: return file_util::CreateDirectory(path); On 2013/08/29 00:04:24, benwells wrote: > I'm ...
7 years, 3 months ago (2013-08-29 00:16:08 UTC) #8
benwells
Super close now! https://codereview.chromium.org/23146016/diff/66001/apps/app_restore_service_browsertest.cc File apps/app_restore_service_browsertest.cc (right): https://codereview.chromium.org/23146016/diff/66001/apps/app_restore_service_browsertest.cc#newcode102 apps/app_restore_service_browsertest.cc:102: IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_FileAccessIsRestored) { Is there value ...
7 years, 3 months ago (2013-08-29 04:10:50 UTC) #9
Sam McNally
https://codereview.chromium.org/23146016/diff/75001/chrome/browser/extensions/api/file_system/file_system_apitest.cc File chrome/browser/extensions/api/file_system/file_system_apitest.cc (right): https://codereview.chromium.org/23146016/diff/75001/chrome/browser/extensions/api/file_system/file_system_apitest.cc#newcode303 chrome/browser/extensions/api/file_system/file_system_apitest.cc:303: FileSystemApiOpenDirectoryWithoutPermissionTest) { On 2013/08/29 04:10:50, benwells wrote: > I'd ...
7 years, 3 months ago (2013-08-29 05:31:03 UTC) #10
benwells
lgtm. LGTM. LLLGGTTTMMM!!!!!!!! https://codereview.chromium.org/23146016/diff/75001/chrome/browser/extensions/api/file_system/file_system_apitest.cc File chrome/browser/extensions/api/file_system/file_system_apitest.cc (right): https://codereview.chromium.org/23146016/diff/75001/chrome/browser/extensions/api/file_system/file_system_apitest.cc#newcode549 chrome/browser/extensions/api/file_system/file_system_apitest.cc:549: { On 2013/08/29 05:31:04, Sam McNally ...
7 years, 3 months ago (2013-08-29 05:43:08 UTC) #11
Sam McNally
https://codereview.chromium.org/23146016/diff/75001/chrome/browser/extensions/api/file_system/file_system_apitest.cc File chrome/browser/extensions/api/file_system/file_system_apitest.cc (right): https://codereview.chromium.org/23146016/diff/75001/chrome/browser/extensions/api/file_system/file_system_apitest.cc#newcode549 chrome/browser/extensions/api/file_system/file_system_apitest.cc:549: { On 2013/08/29 05:43:09, benwells wrote: > On 2013/08/29 ...
7 years, 3 months ago (2013-08-29 05:51:25 UTC) #12
Matt Giuca
lgtm with nits https://codereview.chromium.org/23146016/diff/75001/chrome/test/data/extensions/api_test/file_system/open_directory/test.js File chrome/test/data/extensions/api_test/file_system/open_directory/test.js (right): https://codereview.chromium.org/23146016/diff/75001/chrome/test/data/extensions/api_test/file_system/open_directory/test.js#newcode5 chrome/test/data/extensions/api_test/file_system/open_directory/test.js:5: chrome.test.runTests([ // Testing with directory access, ...
7 years, 3 months ago (2013-08-29 09:34:44 UTC) #13
Sam McNally
https://codereview.chromium.org/23146016/diff/75001/chrome/test/data/extensions/api_test/file_system/open_directory/test.js File chrome/test/data/extensions/api_test/file_system/open_directory/test.js (right): https://codereview.chromium.org/23146016/diff/75001/chrome/test/data/extensions/api_test/file_system/open_directory/test.js#newcode5 chrome/test/data/extensions/api_test/file_system/open_directory/test.js:5: chrome.test.runTests([ On 2013/08/29 09:34:44, Matt Giuca wrote: > // ...
7 years, 3 months ago (2013-08-29 11:08:08 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sammc@chromium.org/23146016/54001
7 years, 3 months ago (2013-08-29 11:09:28 UTC) #15
commit-bot: I haz the power
7 years, 3 months ago (2013-08-29 14:16:28 UTC) #16
Message was sent while issue was closed.
Change committed as 220287

Powered by Google App Engine
This is Rietveld 408576698