diff options
author | kinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-28 06:59:58 +0000 |
---|---|---|
committer | kinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-28 06:59:58 +0000 |
commit | bee0df31a527dbf5c5875796637fee98fc749b86 (patch) | |
tree | 1f47cd7235ac58dbc20ecf5c967e6c6e53381a97 /webkit/browser | |
parent | a934f4d5e2208d00e70c5aa529aa23ea9e6eb89e (diff) | |
download | chromium_src-bee0df31a527dbf5c5875796637fee98fc749b86.zip chromium_src-bee0df31a527dbf5c5875796637fee98fc749b86.tar.gz chromium_src-bee0df31a527dbf5c5875796637fee98fc749b86.tar.bz2 |
Mount MTP devices in Chrome OS Files.app.
This CL
* Adds new filesystem type kFileSystemTypeDeviceMediaAsFileStorage,
which is handled by chromeos::FileSystemBackend.
It uses DeviceMediaAsyncFileUtil, so the implementation is
shared with MTP support in mediaGalleries API (MediaFileSystemBackend).
We need different types since we need different handlings.
(Permission management for file handler extensions, unlimited CopyOrMoveValidator
for allowing non-media files, etc.)
* Adds monitoring by storage_monitor::RemovableStorageObserver in
file_manager::VolumeManager so that MTP device is detected and
mounted to the file manager.
BUG=363960
Review URL: https://codereview.chromium.org/246293011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266458 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/browser')
-rw-r--r-- | webkit/browser/fileapi/external_mount_points.cc | 3 | ||||
-rw-r--r-- | webkit/browser/fileapi/file_system_context.cc | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/webkit/browser/fileapi/external_mount_points.cc b/webkit/browser/fileapi/external_mount_points.cc index 010fb08..1924c56 100644 --- a/webkit/browser/fileapi/external_mount_points.cc +++ b/webkit/browser/fileapi/external_mount_points.cc @@ -31,7 +31,8 @@ base::FilePath NormalizeFilePath(const base::FilePath& path) { } bool IsOverlappingMountPathForbidden(fileapi::FileSystemType type) { - return type != fileapi::kFileSystemTypeNativeMedia; + return type != fileapi::kFileSystemTypeNativeMedia && + type != fileapi::kFileSystemTypeDeviceMedia; } // Wrapper around ref-counted ExternalMountPoints that will be used to lazily diff --git a/webkit/browser/fileapi/file_system_context.cc b/webkit/browser/fileapi/file_system_context.cc index 847a68b..5492939 100644 --- a/webkit/browser/fileapi/file_system_context.cc +++ b/webkit/browser/fileapi/file_system_context.cc @@ -91,6 +91,7 @@ int FileSystemContext::GetPermissionPolicy(FileSystemType type) { case kFileSystemTypeNativeLocal: case kFileSystemTypeCloudDevice: case kFileSystemTypeProvided: + case kFileSystemTypeDeviceMediaAsFileStorage: return FILE_PERMISSION_USE_FILE_PERMISSION; case kFileSystemTypeRestrictedNativeLocal: |