| 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 13 matching lines...) Expand all Loading... |
| 24 class DriveServiceInterface; | 24 class DriveServiceInterface; |
| 25 class FileSystemInterface; | 25 class FileSystemInterface; |
| 26 | 26 |
| 27 namespace util { | 27 namespace util { |
| 28 | 28 |
| 29 // Returns the Drive mount point path, which looks like "/special/drive-<hash>". | 29 // Returns the Drive mount point path, which looks like "/special/drive-<hash>". |
| 30 base::FilePath GetDriveMountPointPath(Profile* profile); | 30 base::FilePath GetDriveMountPointPath(Profile* profile); |
| 31 | 31 |
| 32 // Returns the Drive mount point path, which looks like | 32 // Returns the Drive mount point path, which looks like |
| 33 // "/special/drive-<username_hash>", when provided with the |user_id_hash|. | 33 // "/special/drive-<username_hash>", when provided with the |user_id_hash|. |
| 34 base::FilePath GetDriveMountPointPathForUserIdHash(std::string user_id_hash); | 34 base::FilePath GetDriveMountPointPathForUserIdHash( |
| 35 const std::string& user_id_hash); |
| 35 | 36 |
| 36 // Returns true if the given path is under the Drive mount point. | 37 // Returns true if the given path is under the Drive mount point. |
| 37 bool IsUnderDriveMountPoint(const base::FilePath& path); | 38 bool IsUnderDriveMountPoint(const base::FilePath& path); |
| 38 | 39 |
| 39 // Extracts the Drive path from the given path located under the Drive mount | 40 // Extracts the Drive path from the given path located under the Drive mount |
| 40 // point. Returns an empty path if |path| is not under the Drive mount point. | 41 // point. Returns an empty path if |path| is not under the Drive mount point. |
| 41 // Examples: ExtractDrivePath("/special/drive-xxx/foo.txt") => "drive/foo.txt" | 42 // Examples: ExtractDrivePath("/special/drive-xxx/foo.txt") => "drive/foo.txt" |
| 42 base::FilePath ExtractDrivePath(const base::FilePath& path); | 43 base::FilePath ExtractDrivePath(const base::FilePath& path); |
| 43 | 44 |
| 44 // Returns the FileSystem for the |profile|. If not available (not mounted | 45 // Returns the FileSystem for the |profile|. If not available (not mounted |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 DRIVE_CONNECTED, | 124 DRIVE_CONNECTED, |
| 124 }; | 125 }; |
| 125 | 126 |
| 126 // Returns the Drive connection status for the |profile|. | 127 // Returns the Drive connection status for the |profile|. |
| 127 ConnectionStatusType GetDriveConnectionStatus(Profile* profile); | 128 ConnectionStatusType GetDriveConnectionStatus(Profile* profile); |
| 128 | 129 |
| 129 } // namespace util | 130 } // namespace util |
| 130 } // namespace drive | 131 } // namespace drive |
| 131 | 132 |
| 132 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_UTIL_H_ | 133 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_UTIL_H_ |
| OLD | NEW |