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

Unified Diff: webkit/chromeos/fileapi/cros_mount_point_provider.cc

Issue 9016020: Cleanup FileSystemOperation for preparing for adding FSO-factory method (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix Created 8 years, 11 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/chromeos/fileapi/cros_mount_point_provider.cc
diff --git a/webkit/chromeos/fileapi/cros_mount_point_provider.cc b/webkit/chromeos/fileapi/cros_mount_point_provider.cc
index 4c16e449103d5eae9f8df5a16ba50264126b027b..8951c0c7b16f79d013191859ee6dbeac40a29630 100644
--- a/webkit/chromeos/fileapi/cros_mount_point_provider.cc
+++ b/webkit/chromeos/fileapi/cros_mount_point_provider.cc
@@ -78,21 +78,17 @@ bool CrosMountPointProvider::GetRootForVirtualPath(
return true;
}
-void CrosMountPointProvider::ValidateFileSystemRootAndGetURL(
+void CrosMountPointProvider::ValidateFileSystemRoot(
const GURL& origin_url,
fileapi::FileSystemType type,
bool create,
- const GetRootPathCallback& callback) {
+ const ValidateFileSystemCallback& callback) {
+ // Nothing to validate for external filesystem.
DCHECK(type == fileapi::kFileSystemTypeExternal);
- std::string name(GetOriginIdentifierFromURL(origin_url));
- name += ':';
- name += fileapi::kExternalName;
- FilePath root_path;
- root_path = FilePath(fileapi::kExternalDir);
- callback.Run(true, root_path, name);
+ callback.Run(base::PLATFORM_FILE_OK);
}
-FilePath CrosMountPointProvider::ValidateFileSystemRootAndGetPathOnFileThread(
+FilePath CrosMountPointProvider::GetFileSystemRootPathOnFileThread(
const GURL& origin_url,
fileapi::FileSystemType type,
const FilePath& virtual_path,
@@ -105,11 +101,6 @@ FilePath CrosMountPointProvider::ValidateFileSystemRootAndGetPathOnFileThread(
return root_path;
}
-// TODO(zelidrag): Share this code with SandboxMountPointProvider impl.
-bool CrosMountPointProvider::IsRestrictedFileName(const FilePath& path) const {
- return false;
-}
-
bool CrosMountPointProvider::IsAccessAllowed(const GURL& origin_url,
fileapi::FileSystemType type,
const FilePath& virtual_path) {
@@ -129,6 +120,11 @@ bool CrosMountPointProvider::IsAccessAllowed(const GURL& origin_url,
virtual_path);
}
+// TODO(zelidrag): Share this code with SandboxMountPointProvider impl.
+bool CrosMountPointProvider::IsRestrictedFileName(const FilePath& path) const {
+ return false;
+}
+
void CrosMountPointProvider::AddMountPoint(FilePath mount_point) {
base::AutoLock locker(lock_);
mount_point_map_.erase(mount_point.BaseName().value());

Powered by Google App Engine
This is Rietveld 408576698