| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before, on Chrome OS, JS Entry objects were holding the same DOMFileSystem
object, and they were attached to the same big root. All of the mount points
were first-level directories. This looks like a Linux approach.
However, for better isolation a different approach has been suggested. To have
a separate DOMFileSystem object per every volume on Chrome OS. So, Downloads
and Drive files would be separate, and the filesystem's root would be one of
the mount points.
What is more, restricting DOMFileSystem objects to a mount point is not enough.
In case of `archive` and `removable`, we have two level mount points. The first
level is either `archive` or `removable`. Either of them contains mounted
volumes - archives or removable devices.
This patch restricts DOMFileSystem objects (and thereof Entry objects) to the
inner most mount point. For example: /Downloads, /drive, /archive/archive-1,
/archive/archive-2, /removable/disk-1, /removable/disk-2.
Having this solution it is impossible to access the grand root containing all
of the outer mount points, which was until now restricted in JavaScript. Also,
it doesn't allow to get an Entry for /archive and /removable, which was also
filtered out in JS layer.
Moreover, and what is the most important, this approach allows to map a C++
VolumeInfo to a DOMFileSystem object with 1:1 relationship.
To achieve that, the OpenFileSystem has been renamed to ResolveURL, since this
method has been always used to Resolving a file system URL. Opening the file
system was a side effect. This allowed to unify the code paths for sandboxed
and non-sandboxed file systems. Before, for non-sandboxed file systems, the
root url (and the name) were manually computed using a deprecated utility
function fileapi::GetFileSystemInfoForChromeOS(), which is removed in this
patch.
The drawback of this change was that the root_url and the fs name resolution
became asynchonous. The reason for that is that sandboxed file systems may
perform operations on different threads, therefore they have to be
asynchronous. To simplify migration a utility function has been introduced to
convert FileDefinition vectors to EntryDefinition vectors.
Finally, this change will allow simplifying Files app volumes logic
significantly. The JS VolumeInfo will match C++ VolumeInfo 1:1, as well as
either VolumeInfo will match a DOMFileSystem object 1:1. As a result, we will
be able to remove special cases for inner mount points (for archives and
removables). Another advantage is simple way to pass names of JS-provided file
systems.
The permission management is currently simplified, but the next step will be to
grant permissions per inner-most mount point, which will clean up security
policy comparing to the former implementation.
TBR=phajdan.jr@chromium.org
BUG=318021
TEST=Tested manually.
Review URL: https://codereview.chromium.org/162963003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253351 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
This adds the fileapi infrastructure changes kinuko recommended in the comments to: https://codereview.chromium.org/107833003/
TBR=sky
BUG=110119
Review URL: https://codereview.chromium.org/165943010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252946 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately, this brings in changes to webkit/browser/fileapi, and once
that changes, a lot of files have to be updated.
The bright side is that most of the collateral changes are just trivial
renaming of PlatformFileError -> File::Error and PlatformFileInfo ->
File::Info
BUG=322664
Review URL: https://codereview.chromium.org/145303002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247301 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SyncFileSystemBackend
- Add RegisterQuotaUpdateObserver() method to remove
sandbox_quota_observer dependency in SyncFileSystemBackend.
- Also move IsAccessValid() and IsAllowedScheme() to private
in SandboxFileSystemBackendDelegate.
BUG=265770
R=tzik@chromium.org
Review URL: https://codereview.chromium.org/26906007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229273 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FileStream{Reader,Writer} implementation
that are defined in webkit/.
New public static Create methods:
- FileStreamReader::CreateForLocalFile()
- FileStreamReader::CreateForFileSystemFile()
- FileStreamWriter::CreateForLocalFile()
As a preparation for moving fileapi code from webkit/ to content/.
(webkit_blob / fileapi namespaces will be cleaned up when they're moved
under content/)
BUG=265770
Review URL: https://chromiumcodereview.appspot.com/23576016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222802 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead introducing a static FileSystemOperation::Create method.
As a preparation for moving fileapi code from webkit/ to content/.
(file_system_operation.h will be placed under content/public/browser/ while
file_system_operation_impl.{h,cc} will be placed under content/browser/fileapi
and will be hidden from chrome/)
BUG=265770
TEST=existing tests
Review URL: https://chromiumcodereview.appspot.com/23835005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221976 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=272715
TEST=existing tests
Review URL: https://chromiumcodereview.appspot.com/23601005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220444 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes SandboxFileSystemBackendDelegate to implement FileSystemQuotaUtil
instead of Sandbox/SyncFileSystemBackend so that it can remove a thin layer from
those backends.
And also moves common implementations of FileSystemBackend
(e.g. CreateFileStreamReader()) into the delegate.
BUG=272078
TEST=unit_tests, content_unittests
Review URL: https://chromiumcodereview.appspot.com/22821006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218987 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=272078
TEST=n/a (renaming only)
TBR=jochen
Review URL: https://chromiumcodereview.appspot.com/23167002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217752 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes unnecessary interfaces (InvalidateUsageCache and
StickyInvalidateUsageCache) from FileSystemQuotaUtil.
Current implementation calls usage-cache related functions of SandboxContext
via Sandbox/SyncFileSystembackend, but actually it's possible to call them
directly.
BUG=272078
TEST=pass all existing tests (no behavioral change)
Review URL: https://chromiumcodereview.appspot.com/22818004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217495 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now it only has two members, IO and default file task runner,
and only file runner accessor is used.
BUG=266232
TEST=compile
R=satorux@chromium.org, tzik@chromium.org, vandebo@chromium.org
Review URL: https://codereview.chromium.org/20989003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215538 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change introduces SyncaFileSystemBackend to remove SyncFS dependencies
from FileSystemContext and SandboxFileSystemBackend.
BUG=242422
TEST=content_unittests
R=kinuko@chromium.org, tzik@chromium.org
Review URL: https://codereview.chromium.org/18668003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215222 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drive File System starts to use LocalFileSystemOperation, so it is no longer
"local". As it is the default implementation of FileSystemOperation,
this CL renames it to FileSystemOperationImpl
BUG=261477
TEST=Ran unit_tests
Review URL: https://chromiumcodereview.appspot.com/21370003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215033 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This moves SandboxFileSystemBackend::OpenFileSystem to SandboxContext so that
the backend can share the function with SyncFileSystemBackend which will be
introduced in the following CL.
BUG=242422
TEST=content_unittests
R=kinuko@chromium.org, tzik@chromium.org
Review URL: https://codereview.chromium.org/21305005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214991 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This moves FileSystemQuotaUtil related functions from SandboxFileSystemBackend
to SandboxContext so that SyncFileSystemBackend which will be introduced in the
following CL can use the same code.
This does not include any behavioral changes of those functions.
This is a preparation patch to introduce SyncFileSystemBackend
https://codereview.chromium.org/18668003/
BUG=242422
TEST=content_unittests
NOTRY=true
TBR=jochen@chromium.org
Review URL: https://chromiumcodereview.appspot.com/21116008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214977 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When open a filesystem, quota usage recalculation is scheduled so that
the quota manager can correctly track file operations done without usage
tracking, but those operations have gone away.
This change removes the scheduling parts and related parts.
BUG=none
TEST=should pass all existing tests
R=kinuko@chromium.org, tzik@chromium.org
Review URL: https://codereview.chromium.org/20147004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214565 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=none
TEST=none (no behavioral changes)
R=kinuko@chromium.org, tzik@chromium.org
Review URL: https://codereview.chromium.org/20303002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214544 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Outdated comments and variable names still remain around FileSystemBackend.
This change cleans them up.
BUG=241701
TEST=none
R=kinuko@chromium.org
Review URL: https://codereview.chromium.org/20277003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213616 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a preliminary change for adding SyncFileSystemBackend.
At first, we planed to do initializing process for SyncFileSystemBackend in
InitializeFileSystem(), but it revealed that there are some hassles on that
way (see [*]), so we decieded to introduce a separate initialze function and
to rename InitializeFileSystem() to its original name (i.e. OpenFileSystem()).
[*] https://codereview.chromium.org/18668003/
BUG=242422
TEST=should pass all existing tests
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/19632004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213382 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=242422
TEST=should pass all exising tests (no behavioral changes)
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/19616007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213070 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change renames FileSystemBackend::OpenFileSystem to InitializeFileSystem
and makes it accept FileSystemContext object as one of its arguments.
This is a preliminary change for adding SyncFileSystemBackend in the following
change sets. Please see the issue for details.
BUG=242422
TEST=should pass all existing tests
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/19092002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211888 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
to the base namespace.
TBR=sky
Review URL: https://codereview.chromium.org/19052005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211675 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To deprecate TaskRunnerBoundObserverList::Source, which tends to
add more code just to ensure constness of the observer list.
BUG=241701
TEST=no behavioral changes (content_unittests:*File*)
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/18943006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211356 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds FileObserver related interfaces into FileSystemQuotaUtil and
adapts existing functions in SandboxFileSystemBackend and TestFileSystemBackend
to them.
These functions are used only in sandbox filesystem and we are moving all of
those kinds of functions to FileSystemQuotaUtil so that other backends don't
have to take care of them.
BUG=242422
TEST=content_unittests
R=kinuko@chromium.org, tzik@chromium.org
Review URL: https://codereview.chromium.org/18418009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211332 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We plan to introduce SyncFileSystemBackend to remove SyncFS related code from
webkit/browser/fileapi. To do that, this change moves getting root URI and
filesystem name parts from FileSystemContext to each FileSystemBackend.
BUG=242422
TEST=content_unittests
R=kinuko@chromium.org, satorux@chromium.org, tzik@chromium.org
Review URL: https://codereview.chromium.org/18300006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211318 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change introduces SandboxContext class which keeps and provides a sandbox
filesystem context so that we can share the context among multiple FS backends.
BUG=242422
TEST=content_unittests
Review URL: https://chromiumcodereview.appspot.com/18378005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210790 0039d316-1c4b-4281-b951-d872f2087c98
|
|
The old name is a misnomer as this class no longer provides mount points!
Per some discussion, FileSystemBackend matches what the class is currently
doing and trying to be.
BUG=257016
TEST=none
TBR=hidehiko@chromium.org, joi@chromium.org, kinuko@chromium.org, vandebo@chromium.org
# for one-line #include renames in
chrome/browser/browsing_data/browsing_data_file_system_helper.cc
chrome/browser/extensions/component_loader.cc
chrome/browser/extensions/extension_service.cc
Review URL: https://codereview.chromium.org/18344013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210480 0039d316-1c4b-4281-b951-d872f2087c98
|