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

Unified Diff: webkit/fileapi/mount_points.h

Issue 11787028: New FileSystemURL cracking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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..808316514a7dac39c4c1792596671a1cff6bef33 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,17 @@ 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.
+ // If the URL is successfully cracked, the returned URL will have |is_cracked|
+ // property set to true.
+ virtual FileSystemURL CrackURL(const FileSystemURL& url) 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,

Powered by Google App Engine
This is Rietveld 408576698