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

Issue 6810037: File API changes needed for safely passing user selected file entities from the file browser comp... (Closed)

Created:
9 years, 8 months ago by zel
Modified:
9 years, 6 months ago
CC:
chromium-reviews, Erik does not do reviews, Aaron Boodman, pam+watch_chromium.org, Paweł Hajdan Jr., darin-cc_chromium.org, kinuko+watch, Dai Mikurube (NOT FULLTIME)
Visibility:
Public.

Description

File API changes needed for safely passing user selected file entities from the file browser component extension to a 3rd party extension. BUG=chromium-os:11996 TEST=FileAccessPermissionsTest.FileAccessChecks Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=81860

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 13

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Total comments: 4

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Total comments: 33

Patch Set 11 : '' #

Total comments: 2

Patch Set 12 : '' #

Patch Set 13 : '' #

Total comments: 15

Patch Set 14 : '' #

Patch Set 15 : '' #

Patch Set 16 : '' #

Patch Set 17 : '' #

Patch Set 18 : '' #

Patch Set 19 : '' #

Patch Set 20 : '' #

Patch Set 21 : '' #

Patch Set 22 : '' #

Patch Set 23 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+473 lines, -120 lines) Patch
M chrome/browser/extensions/extension_file_browser_private_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 +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_local_filesystem_apitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_special_storage_policy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extension_special_storage_policy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 6 chunks +22 lines, -17 lines 0 comments Download
M chrome/browser/extensions/extension_special_storage_policy_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +53 lines, -0 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/extension.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, -0 lines 0 comments Download
M chrome/common/extensions/extension_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/extension_process_bindings.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -1 line 0 comments Download
M webkit/chromeos/fileapi/cros_mount_point_provider.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +18 lines, -13 lines 0 comments Download
M webkit/chromeos/fileapi/cros_mount_point_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 6 chunks +58 lines, -30 lines 0 comments Download
A webkit/chromeos/fileapi/file_access_permissions.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +44 lines, -0 lines 0 comments Download
A webkit/chromeos/fileapi/file_access_permissions.cc View 1 2 3 4 5 6 7 1 chunk +58 lines, -0 lines 0 comments Download
A webkit/chromeos/fileapi/file_access_permissions_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +67 lines, -0 lines 0 comments Download
M webkit/database/database_tracker_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -1 line 0 comments Download
M webkit/fileapi/file_system_context_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -1 line 0 comments Download
M webkit/fileapi/file_system_mount_point_provider.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +28 lines, -2 lines 0 comments Download
M webkit/fileapi/file_system_operation.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +4 lines, -4 lines 0 comments Download
M webkit/fileapi/file_system_path_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +10 lines, -4 lines 0 comments Download
M webkit/fileapi/file_system_path_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 7 chunks +22 lines, -18 lines 0 comments Download
M webkit/fileapi/file_system_path_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -1 line 0 comments Download
M webkit/fileapi/file_system_types.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -1 line 0 comments Download
M webkit/fileapi/file_system_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +7 lines, -0 lines 0 comments Download
M webkit/fileapi/file_system_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +12 lines, -8 lines 0 comments Download
M webkit/fileapi/sandbox_mount_point_provider.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +7 lines, -5 lines 0 comments Download
M webkit/fileapi/sandbox_mount_point_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 4 chunks +15 lines, -6 lines 0 comments Download
M webkit/fileapi/webkit_fileapi.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +3 lines, -0 lines 0 comments Download
M webkit/quota/special_storage_policy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +5 lines, -2 lines 0 comments Download
M webkit/tools/test_shell/simple_file_system.cc 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, -0 lines 0 comments Download
M webkit/tools/test_shell/test_shell.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
zel
Please note that code for this CL was originally in http://codereview.chromium.org/6749021/. This now contains only ...
9 years, 8 months ago (2011-04-08 04:21:52 UTC) #1
michaeln
http://codereview.chromium.org/6810037/diff/6006/chrome/browser/extensions/extension_special_storage_policy.cc File chrome/browser/extensions/extension_special_storage_policy.cc (right): http://codereview.chromium.org/6810037/diff/6006/chrome/browser/extensions/extension_special_storage_policy.cc#newcode92 chrome/browser/extensions/extension_special_storage_policy.cc:92: CachedResults::const_iterator found = cached_results_.find(origin); ooops... thnx http://codereview.chromium.org/6810037/diff/6006/chrome/browser/extensions/extension_special_storage_policy.cc#newcode134 chrome/browser/extensions/extension_special_storage_policy.cc:134: ExtensionSpecialStoragePolicy::SpecialCollection::Clear(); ...
9 years, 8 months ago (2011-04-09 00:16:44 UTC) #2
ericu
http://codereview.chromium.org/6810037/diff/6006/chrome/browser/extensions/extension_special_storage_policy_unittest.cc File chrome/browser/extensions/extension_special_storage_policy_unittest.cc (right): http://codereview.chromium.org/6810037/diff/6006/chrome/browser/extensions/extension_special_storage_policy_unittest.cc#newcode62 chrome/browser/extensions/extension_special_storage_policy_unittest.cc:62: scoped_refptr<Extension> CreateComponentApp() { I'm not really sure what you're ...
9 years, 8 months ago (2011-04-09 01:45:13 UTC) #3
zel
9 years, 8 months ago (2011-04-11 22:34:36 UTC) #4
zel
http://codereview.chromium.org/6810037/diff/6006/chrome/browser/extensions/extension_special_storage_policy.cc File chrome/browser/extensions/extension_special_storage_policy.cc (right): http://codereview.chromium.org/6810037/diff/6006/chrome/browser/extensions/extension_special_storage_policy.cc#newcode134 chrome/browser/extensions/extension_special_storage_policy.cc:134: ExtensionSpecialStoragePolicy::SpecialCollection::Clear(); On 2011/04/09 00:16:45, michaeln wrote: > i think ...
9 years, 8 months ago (2011-04-13 00:44:25 UTC) #5
ericu
http://codereview.chromium.org/6810037/diff/6006/chrome/browser/extensions/extension_special_storage_policy_unittest.cc File chrome/browser/extensions/extension_special_storage_policy_unittest.cc (right): http://codereview.chromium.org/6810037/diff/6006/chrome/browser/extensions/extension_special_storage_policy_unittest.cc#newcode62 chrome/browser/extensions/extension_special_storage_policy_unittest.cc:62: scoped_refptr<Extension> CreateComponentApp() { On 2011/04/13 00:44:26, zel wrote: > ...
9 years, 8 months ago (2011-04-13 20:12:45 UTC) #6
zel
http://codereview.chromium.org/6810037/diff/21002/chrome/browser/extensions/extension_special_storage_policy.h File chrome/browser/extensions/extension_special_storage_policy.h (right): http://codereview.chromium.org/6810037/diff/21002/chrome/browser/extensions/extension_special_storage_policy.h#newcode33 chrome/browser/extensions/extension_special_storage_policy.h:33: virtual void GrantLocalFileSystemAccess(const GURL& origin, On 2011/04/13 20:12:46, ericu ...
9 years, 8 months ago (2011-04-13 20:38:55 UTC) #7
ericu
http://codereview.chromium.org/6810037/diff/21002/chrome/browser/extensions/extension_special_storage_policy.h File chrome/browser/extensions/extension_special_storage_policy.h (right): http://codereview.chromium.org/6810037/diff/21002/chrome/browser/extensions/extension_special_storage_policy.h#newcode33 chrome/browser/extensions/extension_special_storage_policy.h:33: virtual void GrantLocalFileSystemAccess(const GURL& origin, On 2011/04/13 20:38:55, zel ...
9 years, 8 months ago (2011-04-13 22:51:27 UTC) #8
michaeln
> chrome/browser/extensions/extension_special_storage_policy.h:58: class > SpecialPathCollection : public SpecialCollection { > On 2011/04/09 00:16:45, michaeln wrote: ...
9 years, 8 months ago (2011-04-13 22:59:40 UTC) #9
michaeln
http://codereview.chromium.org/6810037/diff/21002/chrome/browser/extensions/extension_special_storage_policy.cc File chrome/browser/extensions/extension_special_storage_policy.cc (right): http://codereview.chromium.org/6810037/diff/21002/chrome/browser/extensions/extension_special_storage_policy.cc#newcode199 chrome/browser/extensions/extension_special_storage_policy.cc:199: if (iter->second->OverlapsWithOrigin(origin)) ooops... forgot to hit send earlier today... ...
9 years, 8 months ago (2011-04-14 01:26:25 UTC) #10
zel
PTAL I have implemented all suggestions from Eric and Michael in this iteration - access ...
9 years, 8 months ago (2011-04-14 20:10:52 UTC) #11
michaeln
Thank you for revisiting the StoragePolicy parts of this change! http://codereview.chromium.org/6810037/diff/21016/chrome/browser/extensions/extension_special_storage_policy.cc File chrome/browser/extensions/extension_special_storage_policy.cc (right): http://codereview.chromium.org/6810037/diff/21016/chrome/browser/extensions/extension_special_storage_policy.cc#newcode7 ...
9 years, 8 months ago (2011-04-14 21:25:34 UTC) #12
zel
http://codereview.chromium.org/6810037/diff/21016/chrome/browser/extensions/extension_special_storage_policy.cc File chrome/browser/extensions/extension_special_storage_policy.cc (right): http://codereview.chromium.org/6810037/diff/21016/chrome/browser/extensions/extension_special_storage_policy.cc#newcode7 chrome/browser/extensions/extension_special_storage_policy.cc:7: #include "base/command_line.h" On 2011/04/14 21:25:34, michaeln wrote: > still ...
9 years, 8 months ago (2011-04-14 21:46:20 UTC) #13
michaeln
http://codereview.chromium.org/6810037/diff/21016/webkit/chromeos/fileapi/cros_mount_point_provider.cc File webkit/chromeos/fileapi/cros_mount_point_provider.cc (right): http://codereview.chromium.org/6810037/diff/21016/webkit/chromeos/fileapi/cros_mount_point_provider.cc#newcode31 webkit/chromeos/fileapi/cros_mount_point_provider.cc:31: {"/", "media"}, > Actually they don't. The mapping is ...
9 years, 8 months ago (2011-04-14 22:36:58 UTC) #14
zel
http://codereview.chromium.org/6810037/diff/21016/webkit/chromeos/fileapi/cros_mount_point_provider.cc File webkit/chromeos/fileapi/cros_mount_point_provider.cc (right): http://codereview.chromium.org/6810037/diff/21016/webkit/chromeos/fileapi/cros_mount_point_provider.cc#newcode35 webkit/chromeos/fileapi/cros_mount_point_provider.cc:35: const char CrosMountPointProvider::kExternalName[] = "External"; On 2011/04/14 22:36:58, michaeln ...
9 years, 8 months ago (2011-04-14 22:53:03 UTC) #15
michaeln
thank you for taking the trouble to massage things ok... from my limited point of ...
9 years, 8 months ago (2011-04-15 01:02:01 UTC) #16
ericu
http://codereview.chromium.org/6810037/diff/32003/webkit/chromeos/fileapi/cros_mount_point_provider.cc File webkit/chromeos/fileapi/cros_mount_point_provider.cc (right): http://codereview.chromium.org/6810037/diff/32003/webkit/chromeos/fileapi/cros_mount_point_provider.cc#newcode126 webkit/chromeos/fileapi/cros_mount_point_provider.cc:126: // All we care about here is access from ...
9 years, 8 months ago (2011-04-15 01:46:41 UTC) #17
zel
http://codereview.chromium.org/6810037/diff/32003/webkit/chromeos/fileapi/cros_mount_point_provider.cc File webkit/chromeos/fileapi/cros_mount_point_provider.cc (right): http://codereview.chromium.org/6810037/diff/32003/webkit/chromeos/fileapi/cros_mount_point_provider.cc#newcode126 webkit/chromeos/fileapi/cros_mount_point_provider.cc:126: // All we care about here is access from ...
9 years, 8 months ago (2011-04-15 02:18:55 UTC) #18
ericu
9 years, 8 months ago (2011-04-15 02:31:04 UTC) #19
LGTM.

http://codereview.chromium.org/6810037/diff/32003/webkit/chromeos/fileapi/fil...
File webkit/chromeos/fileapi/file_access_permissions.cc (right):

http://codereview.chromium.org/6810037/diff/32003/webkit/chromeos/fileapi/fil...
webkit/chromeos/fileapi/file_access_permissions.cc:40: // has access to it.
On 2011/04/15 02:18:55, zel wrote:
> On 2011/04/15 01:46:42, ericu wrote:
> > Don't you need to loop over the paths in the PathSet that is *path_map_iter?
> 
> It actually traverses dir structure backward from the file that we are testing
> to see if any of its parent dirs is permitted. We do the same type of file
> access check in ChildProcessSecurityPolicy.
> 
>  

Ah--I see--I was misreading the find as being in a string, not a set.

Powered by Google App Engine
This is Rietveld 408576698