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

Issue 9808023: Grant file access permissions for cached file paths to file browsers/handlers. (Closed)

Created:
8 years, 9 months ago by tbarzic
Modified:
8 years, 9 months ago
Reviewers:
satorux1, zel, tonibarzic
CC:
chromium-reviews, nkostylev+watch_chromium.org, jam, achuith+watch_chromium.org, mihaip+watch_chromium.org, joi+watch-content_chromium.org, Aaron Boodman, rginda+watch_chromium.org, darin-cc_chromium.org, kinuko+watch, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

Grant file access permissions for cached file paths to file browsers/handlers. File browser extensions are given access permissions for whole pinned and tmp cache dirs. File handlers are given permissions during runtime for files for wich their task is being executed. To simplify things they are given permissions for all possible file's cache paths. Since we check permissions for cache paths only when performing entry.file(), read-only permissions should be sufficient. BUG=chromium-os:27926 TEST=manual. browser_tests:*FileSystemExtension* Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=128417

Patch Set 1 #

Patch Set 2 : cleaned up #

Patch Set 3 : . #

Patch Set 4 : . #

Total comments: 14

Patch Set 5 : review iteration #1 #

Patch Set 6 : forgot to comment a method #

Patch Set 7 : 'disregard patch set #6, screwed up with rebasing :/' #

Patch Set 8 : missing method comment #

Patch Set 9 : rebase #

Patch Set 10 : another rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+194 lines, -289 lines) Patch
A + chrome/browser/chromeos/extensions/external_filesystem_apitest.cc View 1 2 6 chunks +26 lines, -26 lines 0 comments Download
M chrome/browser/chromeos/extensions/file_browser_private_api.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/extensions/file_browser_private_api.cc View 1 2 3 4 5 6 7 8 2 chunks +25 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/extensions/file_handler_util.h View 1 2 3 4 2 chunks +12 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/extensions/file_handler_util.cc View 1 2 3 4 5 chunks +24 lines, -10 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_file_system.h View 1 2 3 4 5 6 7 8 9 3 chunks +17 lines, -7 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_file_system.cc View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/chromeos/gdata/gdata_util.h View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_util.cc View 1 2 3 4 5 6 7 8 9 3 chunks +55 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/gdata/mock_gdata_file_system.h View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
D chrome/browser/extensions/extension_local_filesystem_apitest.cc View 1 chunk +0 lines, -237 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 3 chunks +1 line, -3 lines 0 comments Download
M chrome/test/data/extensions/api_test/filebrowser_component/remote.js View 1 1 chunk +13 lines, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
tbarzic
https://chromiumcodereview.appspot.com/9808023/diff/6001/chrome/chrome_tests.gypi File chrome/chrome_tests.gypi (left): https://chromiumcodereview.appspot.com/9808023/diff/6001/chrome/chrome_tests.gypi#oldcode2988 chrome/chrome_tests.gypi:2988: 'browser/chromeos/extensions/file_browser_private_apitest.cc', whole browser/chromeos is already excluded, so we don't ...
8 years, 9 months ago (2012-03-22 22:14:45 UTC) #1
tbarzic
http://codereview.chromium.org/9808023/diff/6001/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc File chrome/browser/chromeos/extensions/external_filesystem_apitest.cc (right): http://codereview.chromium.org/9808023/diff/6001/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc#newcode141 chrome/browser/chromeos/extensions/external_filesystem_apitest.cc:141: ASSERT_TRUE(test_mount_point_.CreateUniqueTempDirUnderPath(tmp_dir_path)); I randomized this to make sure the cache ...
8 years, 9 months ago (2012-03-22 22:18:28 UTC) #2
zel
This will work for file manager only. You also need to grant such permissions to ...
8 years, 9 months ago (2012-03-22 22:21:52 UTC) #3
satorux1
http://codereview.chromium.org/9808023/diff/6001/chrome/browser/chromeos/extensions/file_browser_private_api.cc File chrome/browser/chromeos/extensions/file_browser_private_api.cc (right): http://codereview.chromium.org/9808023/diff/6001/chrome/browser/chromeos/extensions/file_browser_private_api.cc#newcode1048 chrome/browser/chromeos/extensions/file_browser_private_api.cc:1048: file_handler_util::GetReadOnlyPermissions()); PinnedDirectory only contains symlinks, and the real files ...
8 years, 9 months ago (2012-03-22 22:28:29 UTC) #4
zel
ok, works for handlers too... need test for hanlders
8 years, 9 months ago (2012-03-22 22:32:54 UTC) #5
tonibarzic
http://codereview.chromium.org/9808023/diff/6001/chrome/browser/chromeos/extensions/file_browser_private_api.cc File chrome/browser/chromeos/extensions/file_browser_private_api.cc (right): http://codereview.chromium.org/9808023/diff/6001/chrome/browser/chromeos/extensions/file_browser_private_api.cc#newcode1048 chrome/browser/chromeos/extensions/file_browser_private_api.cc:1048: file_handler_util::GetReadOnlyPermissions()); On 2012/03/22 22:28:29, satorux1 wrote: > PinnedDirectory only ...
8 years, 9 months ago (2012-03-22 23:38:20 UTC) #6
zel
8 years, 9 months ago (2012-03-23 02:32:44 UTC) #7
LGTM


please add additional handler tests to another CL

Powered by Google App Engine
This is Rietveld 408576698