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

Unified Diff: chrome/browser/chromeos/drive/file_system_util.h

Issue 150163003: drive: Switch Drive mount path to per-profile one. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fix. Created 6 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: chrome/browser/chromeos/drive/file_system_util.h
diff --git a/chrome/browser/chromeos/drive/file_system_util.h b/chrome/browser/chromeos/drive/file_system_util.h
index 2b3ead4c13714ca587f132dc0cc368006ae44fcd..e6b56b9efba857e0ed9d32986a87bad0ba9e58f9 100644
--- a/chrome/browser/chromeos/drive/file_system_util.h
+++ b/chrome/browser/chromeos/drive/file_system_util.h
@@ -59,9 +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-<unique-id-of-profile>".
-const base::FilePath& GetDriveMountPointPath(Profile* profile);
+// 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.
@@ -102,6 +101,11 @@ bool IsUnderDriveMountPoint(const base::FilePath& path);
// 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(
« no previous file with comments | « chrome/browser/chromeos/drive/drive_integration_service.cc ('k') | chrome/browser/chromeos/drive/file_system_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698