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

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: '' Created 9 years 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 62b21f08af2f7e5f9209edf57340f1423c9a7282..58de2b3fe59bf637dae2c044bc562e9c58d2ed71 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"
@@ -100,7 +100,10 @@ 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);
+ DCHECK(mount_point_provider);
+ mount_point_provider->ValidateFileSystemRootAndGetURL(
origin_url, type, create,
base::Bind(&FileSystemOperation::DidGetRootPath,
base::Owned(this)));
@@ -773,8 +776,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;
}
@@ -791,13 +795,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;

Powered by Google App Engine
This is Rietveld 408576698