Index: webkit/fileapi/isolated_mount_point_provider.cc |
diff --git a/webkit/fileapi/isolated_mount_point_provider.cc b/webkit/fileapi/isolated_mount_point_provider.cc |
index 770bbfe9fe1d0f091690653b5046d56ca4948ffa..1b8d0a258ccc1319bcd6d7becd2efb02fbcf8bb4 100644 |
--- a/webkit/fileapi/isolated_mount_point_provider.cc |
+++ b/webkit/fileapi/isolated_mount_point_provider.cc |
@@ -19,6 +19,8 @@ |
#include "webkit/fileapi/file_system_util.h" |
#include "webkit/fileapi/isolated_context.h" |
#include "webkit/fileapi/isolated_file_util.h" |
+#include "webkit/fileapi/media_device_map_service.h" |
+#include "webkit/fileapi/media_file_util.h" |
#include "webkit/fileapi/local_file_stream_writer.h" |
#include "webkit/fileapi/local_file_system_operation.h" |
#include "webkit/fileapi/native_file_util.h" |
@@ -44,7 +46,8 @@ FilePath GetPathFromURL(const FileSystemURL& url) { |
} // namespace |
IsolatedMountPointProvider::IsolatedMountPointProvider() |
- : isolated_file_util_(new IsolatedFileUtil()) { |
+ : isolated_file_util_(new IsolatedFileUtil()), |
+ media_file_util_(new MediaFileUtil()) { |
} |
IsolatedMountPointProvider::~IsolatedMountPointProvider() { |
@@ -93,6 +96,8 @@ bool IsolatedMountPointProvider::IsRestrictedFileName( |
} |
FileSystemFileUtil* IsolatedMountPointProvider::GetFileUtil() { |
+ if (true /* FIX THIS */) |
+ return media_file_util_.get(); |
return isolated_file_util_.get(); |
} |
@@ -109,6 +114,15 @@ FileSystemOperationInterface* |
IsolatedMountPointProvider::CreateFileSystemOperation( |
const FileSystemURL& url, |
FileSystemContext* context) const { |
+ if (url.type() /* == kFileSystemMedia*/) { |
+ std::string fsid; |
+ FilePath path; |
+ IsolatedContext::FileInfo root; |
+ if (!isolated_context()->CrackIsolatedPath(url.path(), &fsid, &root, &path)) |
+ return NULL; |
+ FilePath::StringType device_name(root.path.value()); |
+ MediaDeviceMapService::GetInstance()->AddMediaDevice(device_name); |
+ } |
return new LocalFileSystemOperation(context); |
} |