Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / chromeos / drive / file_system_util.h
index bfbd2e5..e6b56b9 100644 (file)
@@ -59,8 +59,8 @@ const base::FilePath& GetDriveGrandRootPath();
 // Returns the path of the directory representing "My Drive".
 const base::FilePath& GetDriveMyDriveRootPath();
 
-// Returns the Drive mount point path, which looks like "/special/drive".
-const base::FilePath& GetDriveMountPointPath();
+// Returns the Drive mount point path, which looks like "/special/drive-<hash>".
+base::FilePath GetDriveMountPointPath(Profile* profile);
 
 // Returns the FileSystem for the |profile|. If not available (not mounted
 // or disabled), returns NULL.
@@ -98,9 +98,14 @@ bool IsUnderDriveMountPoint(const base::FilePath& path);
 
 // Extracts the Drive path from the given path located under the Drive mount
 // point. Returns an empty path if |path| is not under the Drive mount point.
-// Examples: ExtractDrivePath("/special/drive/foo.txt") => "drive/foo.txt"
+// Examples: ExtractDrivePath("/special/drive-xxx/foo.txt") => "drive/foo.txt"
 base::FilePath ExtractDrivePath(const base::FilePath& path);
 
+// Extracts |profile| from the given paths located under
+// GetDriveMountPointPath(profile). Returns NULL if it does not correspond to
+// a valid mount point path. Must be called from UI thread.
+Profile* ExtractProfileFromPath(const base::FilePath& path);
+
 // Extracts the Drive path (e.g., "drive/foo.txt") from the filesystem URL.
 // Returns an empty path if |url| does not point under Drive mount point.
 base::FilePath ExtractDrivePathFromFileSystemUrl(