OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_UTIL_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_UTIL_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_UTIL_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 // Returns the path of the top root of the pseudo tree. | 53 // Returns the path of the top root of the pseudo tree. |
54 const base::FilePath& GetDriveGrandRootPath(); | 54 const base::FilePath& GetDriveGrandRootPath(); |
55 | 55 |
56 // Returns the path of the directory representing "My Drive". | 56 // Returns the path of the directory representing "My Drive". |
57 const base::FilePath& GetDriveMyDriveRootPath(); | 57 const base::FilePath& GetDriveMyDriveRootPath(); |
58 | 58 |
59 // Returns the Drive mount point path, which looks like "/special/drive-<hash>". | 59 // Returns the Drive mount point path, which looks like "/special/drive-<hash>". |
60 base::FilePath GetDriveMountPointPath(Profile* profile); | 60 base::FilePath GetDriveMountPointPath(Profile* profile); |
61 | 61 |
| 62 // Returns the Drive mount point path, which looks like |
| 63 // "/special/drive-<username_hash>", when provided with the |user_id_hash|. |
| 64 base::FilePath GetDriveMountPointPathForUserIdHash(std::string user_id_hash); |
| 65 |
62 // Returns the FileSystem for the |profile|. If not available (not mounted | 66 // Returns the FileSystem for the |profile|. If not available (not mounted |
63 // or disabled), returns NULL. | 67 // or disabled), returns NULL. |
64 FileSystemInterface* GetFileSystemByProfile(Profile* profile); | 68 FileSystemInterface* GetFileSystemByProfile(Profile* profile); |
65 | 69 |
66 // Returns a FileSystemInterface instance for the |profile_id|, or NULL | 70 // Returns a FileSystemInterface instance for the |profile_id|, or NULL |
67 // if the Profile for |profile_id| is destructed or Drive File System is | 71 // if the Profile for |profile_id| is destructed or Drive File System is |
68 // disabled for the profile. | 72 // disabled for the profile. |
69 // Note: |profile_id| should be the pointer of the Profile instance if it is | 73 // Note: |profile_id| should be the pointer of the Profile instance if it is |
70 // alive. Considering timing issues due to task posting across threads, | 74 // alive. Considering timing issues due to task posting across threads, |
71 // this function can accept a dangling pointer as |profile_id| (and will return | 75 // this function can accept a dangling pointer as |profile_id| (and will return |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 DRIVE_CONNECTED, | 213 DRIVE_CONNECTED, |
210 }; | 214 }; |
211 | 215 |
212 // Returns the Drive connection status for the |profile|. | 216 // Returns the Drive connection status for the |profile|. |
213 ConnectionStatusType GetDriveConnectionStatus(Profile* profile); | 217 ConnectionStatusType GetDriveConnectionStatus(Profile* profile); |
214 | 218 |
215 } // namespace util | 219 } // namespace util |
216 } // namespace drive | 220 } // namespace drive |
217 | 221 |
218 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_UTIL_H_ | 222 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_UTIL_H_ |
OLD | NEW |