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

Unified Diff: webkit/fileapi/mount_points.h

Issue 11787028: New FileSystemURL cracking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test on Win Created 7 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/fileapi/mount_points.h
diff --git a/webkit/fileapi/mount_points.h b/webkit/fileapi/mount_points.h
index 0cfb57b927682ea6f028fb80e44285def988c650..27df0f279ab17cf9410dae2a0bd650882f7ecdab 100644
--- a/webkit/fileapi/mount_points.h
+++ b/webkit/fileapi/mount_points.h
@@ -16,6 +16,10 @@
class GURL;
namespace fileapi {
+class FileSystemURL;
+}
+
+namespace fileapi {
// Represents a set of mount points for File API.
class WEBKIT_STORAGE_EXPORT MountPoints {
@@ -46,6 +50,23 @@ class WEBKIT_STORAGE_EXPORT MountPoints {
// TODO(kinuko): Probably this should be rather named RevokeMountPoint.
virtual bool RevokeFileSystem(const std::string& mount_name) = 0;
+ // Returns true if the MountPoints implementation handles filesystems with
+ // the given mount type.
+ virtual bool HandlesFileSystemMountType(FileSystemType type) const = 0;
+
+ // Same as CreateCrackedFileSystemURL, but cracks FileSystemURL created
+ // from |url|.
+ virtual FileSystemURL CrackURL(const GURL& url) const = 0;
+
+ // Creates a FileSystemURL with the given origin, type and path and tries to
+ // crack it as a part of one of the registered mount points.
+ // If the the URL is not valid or does not belong to any of the mount points
+ // registered in this context, returns empty, invalid FileSystemURL.
+ virtual FileSystemURL CreateCrackedFileSystemURL(
+ const GURL& origin,
+ fileapi::FileSystemType type,
+ const FilePath& path) const = 0;
+
// Returns the mount point root path registered for a given |mount_name|.
// Returns false if the given |mount_name| is not valid.
virtual bool GetRegisteredPath(const std::string& mount_name,
« no previous file with comments | « webkit/fileapi/media/native_media_file_util_unittest.cc ('k') | webkit/fileapi/sandbox_mount_point_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698