Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Unified Diff: webkit/fileapi/isolated_mount_point_provider.cc

Issue 10781014: Isolated FS for media devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/fileapi/isolated_mount_point_provider.h ('k') | webkit/fileapi/media_device_map_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « webkit/fileapi/isolated_mount_point_provider.h ('k') | webkit/fileapi/media_device_map_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698