Index: webkit/fileapi/mount_points.h |
diff --git a/webkit/fileapi/mount_points.h b/webkit/fileapi/mount_points.h |
index 0cfb57b927682ea6f028fb80e44285def988c650..cd1ce56b5a5b130805f01f9cce58256bd179ad37 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,25 @@ 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 given url is valid and MountPoints implementation can |
+ // be used to crack FileSystemURLs with the url's type. |
+ virtual bool CanHandleURL(const FileSystemURL& url) const = 0; |
+ |
+ // Cracks a given FileSystemURL. |
+ // 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 CrackFileSystemURL(const FileSystemURL& url) const = 0; |
+ |
+ // Same as CrackFileSystemURL, but cracks FileSystemURL created from |url|. |
+ virtual FileSystemURL CrackURL(const GURL& url) const = 0; |
+ |
+ // Same as CrackFileSystemURL, but cracks FileSystemURL created from |
+ // method arguments. |
+ 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, |