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

Issue 6864040: Fixed file/directory url resolution for external mount point provider. (Closed)

Created:
9 years, 8 months ago by zel
Modified:
9 years, 6 months ago
Reviewers:
ericu, kinuko
CC:
chromium-reviews, pam+watch_chromium.org, Aaron Boodman, kinuko+watch, darin-cc_chromium.org, Erik does not do reviews
Visibility:
Public.

Description

Fixed file/directory url resolution for external mount point provider. Per Eric's request, refactored FileSystemDirURLRequestJob and FileSystemURLRequestJob classes to resolve local file system through a new operation. BUG=chromium-os:14225 TEST=added new test cases to FileSystemPathManagerTest.*, added FileSystemOperationTest.TestGetLocalFilePathSuccess Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=82266

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 11

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Patch Set 13 : '' #

Patch Set 14 : '' #

Patch Set 15 : '' #

Patch Set 16 : '' #

Total comments: 53

Patch Set 17 : '' #

Patch Set 18 : '' #

Total comments: 6

Patch Set 19 : '' #

Patch Set 20 : '' #

Total comments: 6

Patch Set 21 : '' #

Patch Set 22 : '' #

Patch Set 23 : '' #

Patch Set 24 : '' #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+684 lines, -229 lines) Patch
M base/platform_file.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -0 lines 0 comments Download
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 21 22 23 5 chunks +16 lines, -7 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 23 1 chunk +31 lines, -2 lines 0 comments Download
M chrome/browser/net/file_system_url_request_job_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +4 lines, -4 lines 0 comments Download
M content/browser/file_system/browser_file_system_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/file_system/file_system_dispatcher_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +4 lines, -0 lines 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 21 22 23 3 chunks +12 lines, -3 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 21 22 23 4 chunks +46 lines, -21 lines 1 comment Download
M webkit/fileapi/file_system_callback_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +5 lines, -0 lines 0 comments Download
M webkit/fileapi/file_system_callback_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +4 lines, -0 lines 0 comments Download
M webkit/fileapi/file_system_context.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +2 lines, -1 line 0 comments Download
M webkit/fileapi/file_system_context.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +8 lines, -4 lines 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 21 22 23 1 chunk +1 line, -1 line 0 comments Download
M webkit/fileapi/file_system_dir_url_request_job.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +10 lines, -14 lines 0 comments Download
M webkit/fileapi/file_system_dir_url_request_job.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 6 chunks +27 lines, -55 lines 0 comments Download
M webkit/fileapi/file_system_dir_url_request_job_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 5 chunks +31 lines, -6 lines 0 comments Download
M webkit/fileapi/file_system_file_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 chunks +9 lines, -1 line 0 comments Download
M webkit/fileapi/file_system_file_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +8 lines, -0 lines 0 comments Download
M webkit/fileapi/file_system_file_util_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +10 lines, -0 lines 0 comments Download
M webkit/fileapi/file_system_file_util_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +42 lines, -2 lines 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 21 22 23 3 chunks +6 lines, -2 lines 0 comments Download
M webkit/fileapi/file_system_operation.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 chunks +4 lines, -0 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 21 22 23 5 chunks +34 lines, -3 lines 0 comments Download
M webkit/fileapi/file_system_operation_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 6 chunks +30 lines, -0 lines 0 comments Download
M webkit/fileapi/file_system_operation_write_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +4 lines, -0 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 21 22 23 1 chunk +6 lines, -6 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 21 22 23 2 chunks +6 lines, -6 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 21 22 23 8 chunks +58 lines, -16 lines 0 comments Download
M webkit/fileapi/file_system_url_request_job.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 chunks +11 lines, -18 lines 0 comments Download
M webkit/fileapi/file_system_url_request_job.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 6 chunks +15 lines, -40 lines 0 comments Download
A webkit/fileapi/file_system_url_request_job_base.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +48 lines, -0 lines 0 comments Download
A webkit/fileapi/file_system_url_request_job_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +109 lines, -0 lines 0 comments Download
M webkit/fileapi/file_system_url_request_job_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 5 chunks +33 lines, -7 lines 0 comments Download
M webkit/fileapi/local_file_system_file_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +6 lines, -1 line 0 comments Download
M webkit/fileapi/local_file_system_file_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +16 lines, -1 line 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 21 22 23 2 chunks +2 lines, -2 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 22 23 2 chunks +3 lines, -2 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 21 22 23 1 chunk +2 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/file_callbacks.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -0 lines 0 comments Download
M webkit/plugins/ppapi/file_callbacks.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +4 lines, -0 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 21 22 23 2 chunks +7 lines, -1 line 0 comments Download
M webkit/tools/test_shell/simple_file_writer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +4 lines, -0 lines 0 comments Download
M webkit/tools/test_shell/simple_resource_loader_bridge.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
zel
9 years, 8 months ago (2011-04-18 19:41:24 UTC) #1
ericu
Just a quick once-over, as I'm trying to figure out what you're doing. http://codereview.chromium.org/6864040/diff/6001/webkit/chromeos/fileapi/cros_mount_point_provider.cc File ...
9 years, 8 months ago (2011-04-18 20:35:56 UTC) #2
zel
http://codereview.chromium.org/6864040/diff/6001/webkit/chromeos/fileapi/cros_mount_point_provider.cc File webkit/chromeos/fileapi/cros_mount_point_provider.cc (right): http://codereview.chromium.org/6864040/diff/6001/webkit/chromeos/fileapi/cros_mount_point_provider.cc#newcode60 webkit/chromeos/fileapi/cros_mount_point_provider.cc:60: // On the other hand, the root path of ...
9 years, 8 months ago (2011-04-18 20:51:12 UTC) #3
zel
PTAL Eric, I haven't fully finished with all unit tests here, but you can see ...
9 years, 8 months ago (2011-04-19 04:08:10 UTC) #4
ericu
Looks good overall, but there's a bunch of small stuff left. http://codereview.chromium.org/6864040/diff/10095/chrome/browser/extensions/extension_file_browser_private_api.cc File chrome/browser/extensions/extension_file_browser_private_api.cc (right): ...
9 years, 8 months ago (2011-04-19 20:30:49 UTC) #5
zel
I am still working on file_system_operation_unittest.cc, other comments should be addressed. http://codereview.chromium.org/6864040/diff/10095/chrome/browser/extensions/extension_file_browser_private_api.cc File chrome/browser/extensions/extension_file_browser_private_api.cc (right): ...
9 years, 8 months ago (2011-04-19 23:14:00 UTC) #6
ericu
Very close. Looking forward to the new unit test, and then we're good to go. ...
9 years, 8 months ago (2011-04-19 23:36:19 UTC) #7
zel
http://codereview.chromium.org/6864040/diff/10095/chrome/browser/extensions/extension_file_browser_private_api.cc File chrome/browser/extensions/extension_file_browser_private_api.cc (right): http://codereview.chromium.org/6864040/diff/10095/chrome/browser/extensions/extension_file_browser_private_api.cc#newcode403 chrome/browser/extensions/extension_file_browser_private_api.cc:403: // Callback to report information for a file. On ...
9 years, 8 months ago (2011-04-20 02:02:07 UTC) #8
ericu
http://codereview.chromium.org/6864040/diff/9373/chrome/browser/extensions/extension_file_browser_private_api.cc File chrome/browser/extensions/extension_file_browser_private_api.cc (right): http://codereview.chromium.org/6864040/diff/9373/chrome/browser/extensions/extension_file_browser_private_api.cc#newcode192 chrome/browser/extensions/extension_file_browser_private_api.cc:192: This comment should have stayed. http://codereview.chromium.org/6864040/diff/9373/webkit/fileapi/file_system_operation_unittest.cc File webkit/fileapi/file_system_operation_unittest.cc (right): ...
9 years, 8 months ago (2011-04-20 02:23:46 UTC) #9
zel
http://codereview.chromium.org/6864040/diff/9373/chrome/browser/extensions/extension_file_browser_private_api.cc File chrome/browser/extensions/extension_file_browser_private_api.cc (right): http://codereview.chromium.org/6864040/diff/9373/chrome/browser/extensions/extension_file_browser_private_api.cc#newcode192 chrome/browser/extensions/extension_file_browser_private_api.cc:192: On 2011/04/20 02:23:46, ericu wrote: > This comment should ...
9 years, 8 months ago (2011-04-20 02:49:57 UTC) #10
ericu
LGTM, although if you find that that /extension path can go away, I'm happier with ...
9 years, 8 months ago (2011-04-20 02:53:21 UTC) #11
kinuko
(Drive-by comment...) http://codereview.chromium.org/6864040/diff/10170/webkit/chromeos/fileapi/cros_mount_point_provider.cc File webkit/chromeos/fileapi/cros_mount_point_provider.cc (right): http://codereview.chromium.org/6864040/diff/10170/webkit/chromeos/fileapi/cros_mount_point_provider.cc#newcode78 webkit/chromeos/fileapi/cros_mount_point_provider.cc:78: void CrosMountPointProvider::ValidateFileSystemRootAndGetURL( I'm afraid this new method ...
9 years, 8 months ago (2011-04-20 14:44:18 UTC) #12
ericu
On Wed, Apr 20, 2011 at 7:44 AM, <kinuko@chromium.org> wrote: > (Drive-by comment...) > > ...
9 years, 8 months ago (2011-04-22 15:01:47 UTC) #13
kinuko
9 years, 8 months ago (2011-04-22 16:43:34 UTC) #14
On Sat, Apr 23, 2011 at 12:01 AM, Eric Uhrhane <ericu@chromium.org> wrote:

> On Wed, Apr 20, 2011 at 7:44 AM,  <kinuko@chromium.org> wrote:
> > (Drive-by comment...)
> >
> >
> >
>
http://codereview.chromium.org/6864040/diff/10170/webkit/chromeos/fileapi/cro...
> > File webkit/chromeos/fileapi/cros_mount_point_provider.cc (right):
> >
> >
>
http://codereview.chromium.org/6864040/diff/10170/webkit/chromeos/fileapi/cro...
> > webkit/chromeos/fileapi/cros_mount_point_provider.cc:78: void
> > CrosMountPointProvider::ValidateFileSystemRootAndGetURL(
> > I'm afraid this new method name may confuse the readers of
> > SandboxMountPointProvider, where it actually returns a path but not URL.
> >
> > Actually the url returned by this method is right now not used at the
> > callsite.  If we do not have a plan to use the returned URL could we
> > simply name this ValidateFileSystemRoot() and make it only return
> > boolean value?  It shouldn't contradict to the remaining TODO in the
> > FileSystemOperation (i.e. we shouldn't call this method when !create
> > cases).
> > The FileThread version could probably be named
> > ValidateAndGetFilesystemRootPathOnFileThread then.
> >
> > Wdyt?  I guess Eric may have some other future plan, but if it makes
> > sense we can make the followup patch.
> >
> > http://codereview.chromium.org/6864040/
>
> Kinuko--
>
>        So sorry I didn't respond to this yesterday; I got swamped and lost
> track.

 The reason I had Zelidrag change the name of this method is
> that, while it locally returns a path, overall its use in
> openFileSystem is to get the URL.  Looking back, maybe that wasn't the
> best decision, and I'll look at fixing it myself as I continue to
> clean up the code.


Sorry for nudging, this change just caught my eye while I was trying to make
other changes in the filesystem.

I had briefly read the review comment and somewhat know what motivated you
to make this change.  Just wanted to let you know the new method name may
not reflect what it does either.  And unfortunately now what the cros
implementation does is a bit diverted from other code-- but as you say
you'll want to take care of those remaining cleanups.

Thanks,


>        Eric
>

Powered by Google App Engine
This is Rietveld 408576698