summaryrefslogtreecommitdiffstats
path: root/webkit/common
diff options
context:
space:
mode:
authorkinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-28 06:59:58 +0000
committerkinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-28 06:59:58 +0000
commitbee0df31a527dbf5c5875796637fee98fc749b86 (patch)
tree1f47cd7235ac58dbc20ecf5c967e6c6e53381a97 /webkit/common
parenta934f4d5e2208d00e70c5aa529aa23ea9e6eb89e (diff)
downloadchromium_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/common')
-rw-r--r--webkit/common/fileapi/file_system_types.h4
-rw-r--r--webkit/common/fileapi/file_system_util.cc2
2 files changed, 6 insertions, 0 deletions
diff --git a/webkit/common/fileapi/file_system_types.h b/webkit/common/fileapi/file_system_types.h
index c24d8d3..409f3dc 100644
--- a/webkit/common/fileapi/file_system_types.h
+++ b/webkit/common/fileapi/file_system_types.h
@@ -122,6 +122,10 @@ enum FileSystemType {
// A filesystem that is mounted via the FileSystemProvider API.
kFileSystemTypeProvided,
+ // A media filesystem such as MTP or PTP, mounted as a file storage not
+ // limited to media files.
+ kFileSystemTypeDeviceMediaAsFileStorage,
+
// --------------------------------------------------------------------
// Marks the end of internal type enum. (This is not the actual fs type)
// New internal filesystem types must be added above this line.
diff --git a/webkit/common/fileapi/file_system_util.cc b/webkit/common/fileapi/file_system_util.cc
index 84c59b2..a19136a 100644
--- a/webkit/common/fileapi/file_system_util.cc
+++ b/webkit/common/fileapi/file_system_util.cc
@@ -319,6 +319,8 @@ std::string GetFileSystemTypeString(FileSystemType type) {
return "CloudDevice";
case kFileSystemTypeProvided:
return "Provided";
+ case kFileSystemTypeDeviceMediaAsFileStorage:
+ return "DeviceMediaStorage";
case kFileSystemInternalTypeEnumStart:
case kFileSystemInternalTypeEnumEnd:
NOTREACHED();