Chromium Code Reviews| 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..9f803dd54d09ef2911f107d66522f953e32f5a3e 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,13 @@ FileSystemOperationInterface* |
| IsolatedMountPointProvider::CreateFileSystemOperation( |
| const FileSystemURL& url, |
| FileSystemContext* context) const { |
| + if (url.type() /* == kFileSystemMedia*/) { |
| + FilePath actual_path = GetPathFromURL(url); |
| + if (actual_path.empty()) |
| + return NULL; |
| + FilePath::StringType device_name(actual_path.value()); |
|
Lei Zhang
2012/07/25 04:48:29
Let's say we have a device called "usb_foo". The f
kmadhusu
2012/07/27 02:13:40
It is not intentional. I fixed the code to get the
|
| + MediaDeviceMapService::GetInstance()->AddMediaDevice(device_name); |
| + } |
| return new LocalFileSystemOperation(context); |
| } |