Index: webkit/fileapi/external_mount_points.h |
diff --git a/webkit/fileapi/external_mount_points.h b/webkit/fileapi/external_mount_points.h |
index a2660c24536d118b643e29f8baadc9fadeb786fb..1d912aa2e29f280ac984f6ae2a1c2b7fee83cc76 100644 |
--- a/webkit/fileapi/external_mount_points.h |
+++ b/webkit/fileapi/external_mount_points.h |
@@ -86,11 +86,12 @@ class WEBKIT_STORAGE_EXPORT ExternalMountPoints |
FileSystemType type, |
const base::FilePath& path) const OVERRIDE; |
- // Retrieves the remote file system proxy for the registered file system. |
- // Returns NULL if there is no file system with the given name, or if the file |
- // system does not have a remote file system proxy. |
- RemoteFileSystemProxyInterface* GetRemoteFileSystemProxy( |
- const std::string& mount_name) const; |
+ // Retrieves the remote file system proxy for a path on a registered file |
+ // system. |
+ // Returns NULL if there is no file system for the path, or if the file system |
+ // does not have a remote file system proxy. |
+ RemoteFileSystemProxyInterface* GetRemoteFileSystemProxyForPath( |
+ const base::FilePath& full_path) const; |
// Returns a list of registered MountPointInfos (of <mount_name, path>). |
void AddMountPointInfosTo(std::vector<MountPointInfo>* mount_points) const; |
@@ -136,6 +137,16 @@ class WEBKIT_STORAGE_EXPORT ExternalMountPoints |
bool ValidateNewMountPoint(const std::string& mount_name, |
const base::FilePath& path); |
+ // Sets |mount_point_name| and |mount_point_root| to the name and root path of |
+ // the mount point that |path| belongs to. |mount_point_root| may be NULL in |
+ // which case it is ignored. |
+ // If the path doesn't belong to any of the mount points, both |
+ // |mount_point_name| and |mount_point_root| are not changed. |
+ // Returns whether the mount point could be found. |
+ bool GetMountPointForPath(const base::FilePath& path, |
+ std::string* mount_point_name, |
+ base::FilePath* mount_point_root) const; |
+ |
// This lock needs to be obtained when accessing the instance_map_. |
mutable base::Lock lock_; |