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

Unified Diff: webkit/fileapi/file_system_operation.cc

Issue 9004019: Cleanup: Removing FileSystemPathManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 12 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
Index: webkit/fileapi/file_system_operation.cc
diff --git a/webkit/fileapi/file_system_operation.cc b/webkit/fileapi/file_system_operation.cc
index 745273bd903fbadab8f3e99722ec161664924e23..38e13e360b82867c7757367ce17cc1fe81f7a7e1 100644
--- a/webkit/fileapi/file_system_operation.cc
+++ b/webkit/fileapi/file_system_operation.cc
@@ -12,8 +12,8 @@
#include "webkit/fileapi/file_system_callback_dispatcher.h"
#include "webkit/fileapi/file_system_context.h"
#include "webkit/fileapi/file_system_file_util_proxy.h"
+#include "webkit/fileapi/file_system_mount_point_provider.h"
#include "webkit/fileapi/file_system_operation_context.h"
-#include "webkit/fileapi/file_system_path_manager.h"
#include "webkit/fileapi/file_system_quota_util.h"
#include "webkit/fileapi/file_system_types.h"
#include "webkit/fileapi/file_system_util.h"
@@ -101,7 +101,14 @@ void FileSystemOperation::OpenFileSystem(
// create an unpredictable directory name. Without that, we could lazily
// create the root later on the first filesystem write operation, and just
// return GetFileSystemRootURI() here.
- file_system_context()->path_manager()->ValidateFileSystemRootAndGetURL(
+ FileSystemMountPointProvider* mount_point_provider =
+ file_system_context()->GetMountPointProvider(type);
+ if (!mount_point_provider) {
+ DidGetRootPath(false, FilePath(), std::string());
+ delete this;
+ return;
+ }
+ mount_point_provider->ValidateFileSystemRootAndGetURL(
origin_url, type, create,
base::Bind(&FileSystemOperation::DidGetRootPath,
base::Owned(this)));
@@ -776,8 +783,9 @@ bool FileSystemOperation::VerifyFileSystemPathForWrite(
dispatcher_->DidFail(base::PLATFORM_FILE_ERROR_SECURITY);
return false;
}
- if (create && file_system_context()->path_manager()->IsRestrictedFileName(
- *type, virtual_path->BaseName())) {
+ if (create &&
+ file_system_context()->GetMountPointProvider(*type)->IsRestrictedFileName(
+ virtual_path->BaseName())) {
dispatcher_->DidFail(base::PLATFORM_FILE_ERROR_SECURITY);
return false;
}
@@ -794,13 +802,13 @@ bool FileSystemOperation::VerifyFileSystemPath(
dispatcher_->DidFail(base::PLATFORM_FILE_ERROR_INVALID_URL);
return false;
}
- if (!file_system_context()->path_manager()->IsAccessAllowed(
+ if (!file_system_context()->GetMountPointProvider(*type)->IsAccessAllowed(
*origin_url, *type, *virtual_path)) {
dispatcher_->DidFail(base::PLATFORM_FILE_ERROR_SECURITY);
return false;
}
DCHECK(file_util);
- *file_util = file_system_context()->path_manager()->GetFileUtil(*type);
+ *file_util = file_system_context()->GetFileUtil(*type);
DCHECK(*file_util);
return true;
« no previous file with comments | « webkit/fileapi/file_system_mount_point_provider_unittest.cc ('k') | webkit/fileapi/file_system_operation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698