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

Issue 14317004: Add ContentBrowserClient::GetAdditionalFileSystemMountPointProviders() (Closed)

Created:
7 years, 8 months ago by kinuko
Modified:
7 years, 8 months ago
Reviewers:
jam
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, kinuko+watch, tzik+watch_chromium.org
Visibility:
Public.

Description

Add ContentBrowserClient::GetAdditionalFileSystemMountPointProviders() So that we can instantiate and add chrome-specific FileSystem modules in its implementation (i.e. ChromeContentBrowserClient). (Brief bigger plan: Brief change plan (internal): https://docs.google.com/a/google.com/document/d/1XEtX0OO_RIA_c0KuKvd9yqK5l3XtsTulwXs3c-mAQ1o/view) BUG=175936

Patch Set 1 : #

Total comments: 1

Patch Set 2 : AdditionalFSMountPointProvider -> AdditionalFSMountPointProviders #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -1 line) Patch
M content/browser/fileapi/browser_file_system_helper.cc View 1 1 chunk +3 lines, -0 lines 0 comments Download
M content/public/browser/content_browser_client.h View 1 3 chunks +11 lines, -1 line 0 comments Download

Messages

Total messages: 10 (0 generated)
kinuko
Hi Jam, I want to add GetAdditionalFileSystemMountPointProviders method to ContentBrowserClient so that chrome layer modules ...
7 years, 8 months ago (2013-04-18 06:05:22 UTC) #1
jam
https://codereview.chromium.org/14317004/diff/5003/content/public/browser/content_browser_client.h File content/public/browser/content_browser_client.h (right): https://codereview.chromium.org/14317004/diff/5003/content/public/browser/content_browser_client.h#newcode505 content/public/browser/content_browser_client.h:505: virtual void GetAdditionalFileSystemMountPointProvider( why is this a ScopedVector instead ...
7 years, 8 months ago (2013-04-18 16:16:29 UTC) #2
kinuko
2013/04/19 1:16 <jam@chromium.org>: > > > https://codereview.chromium.org/14317004/diff/5003/content/public/browser/content_browser_client.h > File content/public/browser/content_browser_client.h (right): > > https://codereview.chromium.org/14317004/diff/5003/content/public/browser/content_browser_client.h#newcode505 > ...
7 years, 8 months ago (2013-04-19 01:11:45 UTC) #3
Greg Billock
On 2013/04/19 01:11:45, kinuko wrote: > 2013/04/19 1:16 <jam@chromium.org>: > > > > > > ...
7 years, 8 months ago (2013-04-19 16:30:15 UTC) #4
tommycli
On 2013/04/19 16:30:15, Greg Billock wrote: > On 2013/04/19 01:11:45, kinuko wrote: > > 2013/04/19 ...
7 years, 8 months ago (2013-04-20 00:56:45 UTC) #5
kinuko
On 2013/04/19 16:30:15, Greg Billock wrote: > On 2013/04/19 01:11:45, kinuko wrote: > > 2013/04/19 ...
7 years, 8 months ago (2013-04-22 15:46:12 UTC) #6
kinuko
On 2013/04/20 00:56:45, tommycli wrote: > On 2013/04/19 16:30:15, Greg Billock wrote: > > On ...
7 years, 8 months ago (2013-04-22 15:48:19 UTC) #7
tommycli
On 2013/04/22 15:48:19, kinuko wrote: > On 2013/04/20 00:56:45, tommycli wrote: > > On 2013/04/19 ...
7 years, 8 months ago (2013-04-22 17:01:49 UTC) #8
jam
On 2013/04/20 00:56:45, tommycli wrote: > On 2013/04/19 16:30:15, Greg Billock wrote: > > On ...
7 years, 8 months ago (2013-04-22 17:39:13 UTC) #9
kinuko
7 years, 8 months ago (2013-04-23 03:51:10 UTC) #10
On 2013/04/22 17:39:13, jam wrote:
> On 2013/04/20 00:56:45, tommycli wrote:
> > On 2013/04/19 16:30:15, Greg Billock wrote:
> > > On 2013/04/19 01:11:45, kinuko wrote:
> > > > 2013/04/19 1:16 <jam@chromium.org>:
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>
https://codereview.chromium.org/14317004/diff/5003/content/public/browser/con...
> > > > > File content/public/browser/content_browser_client.h (right):
> > > > >
> > > > >
> > > >
> > >
> >
>
https://codereview.chromium.org/14317004/diff/5003/content/public/browser/con...
> > > > > content/public/browser/content_browser_client.h:505: virtual void
> > > > > GetAdditionalFileSystemMountPointProvider(
> > > > > why is this a ScopedVector instead of passing in a std::vector like
the
> > > > > other methods in this class?
> > > > 
> > > > I wanted to make it clear that the pointers returned by this method will
> be
> > > > owned by the caller.  I could change the code with explicit comment
about
> > > > ownership if this doesn't fit with other code here.
> > > > 
> > > > > nit: GetAdditionalFileSystemMountPointProviders
> > > > >
> > > > > https://codereview.chromium.org/14317004/
> > > 
> > > Do you plan on changing the interface so that the providers (which as I
> > > understand them ought to basically be per-filesystem-type factories that
> > produce
> > > AsyncFileUtils for particular instances of those filesystem types) remain
> > owned
> > > by the ContentBrowserClient? That architecture would make the most sense
to
> > me.
> > > It'd make the factories centrally registered, and then the per-instance
> > objects
> > > they make be owned by the filesystem api code.
> > > 
> > > Ultimately, it'd be nice to encapsulate that so the filesystem api code
only
> > > dealt with one FileSystemMountPointProvider, which then internally dealt
> with
> > > all the registered providers. That gives maximal separation between the
> > > filesystem api code which maps that API onto the JS world, and the
> > > implementation specifics needed to massage various data sources to conform
> to
> > > the API. My sense is that would better fit the overall mission of the
> webkit/*
> > > layer.
> > 
> > Based on this patch I was able to move all of webkit/fileapi/media into
> > chrome/browser/media_galleries/fileapi.
> > 
> > I had to change the signature to:
> > 
> > virtual void GetAdditionalFileSystemMountPointProviders(
> >       const base::FilePath& profile_path,
> >       ScopedVector<fileapi::FileSystemMountPointProvider>*
> >           additional_providers) {}
> > 
> > as MediaFileSystemMountPointProvider required a profile_path argument.
> 
> what does ChromeContentBrowserClient implementation look like? if the API is
> really keyed off the profile, it seems that this should be a method on
> BrowserContext instead.

Oh- having this in BrowserContext might make things simpler, but then we'll need
to change the callsites of CreateFileSystem, which is called from
StoragePartitionImpl::Create where we have a comment like this: "//
TODO(ajwong): Break the direct dependency on |context|. We only need 3 pieces of
info from it."

So looks it's not expected to have more dependencies to BrowserContext in
storage clients code.

ChromeContentBrowserClient implementation can be found in:
https://codereview.chromium.org/14247034/diff/10002/chrome/browser/chrome_con...

I'm going to close this issue and just cc you (jam@) to the tommycli's new CL
which subsumes this CL. Thanks!

Powered by Google App Engine
This is Rietveld 408576698