| 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 a144a740f1d5317bfb8fb3ea44553c1bdc69b856..3003df0a75457348993fe97965aa96507277be11 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() {
|
| @@ -94,6 +97,8 @@ bool IsolatedMountPointProvider::IsRestrictedFileName(
|
|
|
| FileSystemFileUtil* IsolatedMountPointProvider::GetFileUtil() {
|
| // TODO(kinuko): Return different FileUtil's based on types.
|
| + if (true /* FIX THIS */)
|
| + return media_file_util_.get();
|
| return isolated_file_util_.get();
|
| }
|
|
|
| @@ -110,6 +115,18 @@ FileSystemOperationInterface*
|
| IsolatedMountPointProvider::CreateFileSystemOperation(
|
| const FileSystemURL& url,
|
| FileSystemContext* context) const {
|
| + if (url.type() /* == kFileSystemMedia*/) {
|
| + std::string fsid;
|
| + FilePath path;
|
| + if (!isolated_context()->CrackIsolatedPath(url.path(), &fsid, NULL, &path))
|
| + return NULL;
|
| +
|
| + FilePath root_path;
|
| + if (!isolated_context()->GetRegisteredPath(fsid, &root_path))
|
| + return NULL;
|
| + printf("%s\n", __FUNCTION__);
|
| + MediaDeviceMapService::GetInstance()->AddMediaDevice(root_path.value());
|
| + }
|
| return new LocalFileSystemOperation(context);
|
| }
|
|
|
|
|