| 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 18 matching lines...) Expand all Loading... |
| 29 class ResourceEntry; | 29 class ResourceEntry; |
| 30 | 30 |
| 31 namespace util { | 31 namespace util { |
| 32 | 32 |
| 33 // "drive" diretory's local ID is fixed to this value. | 33 // "drive" diretory's local ID is fixed to this value. |
| 34 const char kDriveGrandRootLocalId[] = "<drive>"; | 34 const char kDriveGrandRootLocalId[] = "<drive>"; |
| 35 | 35 |
| 36 // "drive/other" diretory's local ID is fixed to this value. | 36 // "drive/other" diretory's local ID is fixed to this value. |
| 37 const char kDriveOtherDirLocalId[] = "<other>"; | 37 const char kDriveOtherDirLocalId[] = "<other>"; |
| 38 | 38 |
| 39 // "drive/trash" diretory's local ID is fixed to this value. |
| 40 const char kDriveTrashDirLocalId[] = "<trash>"; |
| 41 |
| 39 // The directory names used for the Google Drive file system tree. These names | 42 // The directory names used for the Google Drive file system tree. These names |
| 40 // are used in URLs for the file manager, hence user-visible. | 43 // are used in URLs for the file manager, hence user-visible. |
| 41 const base::FilePath::CharType kDriveGrandRootDirName[] = | 44 const base::FilePath::CharType kDriveGrandRootDirName[] = |
| 42 FILE_PATH_LITERAL("drive"); | 45 FILE_PATH_LITERAL("drive"); |
| 43 | 46 |
| 44 const base::FilePath::CharType kDriveMyDriveRootDirName[] = | 47 const base::FilePath::CharType kDriveMyDriveRootDirName[] = |
| 45 FILE_PATH_LITERAL("root"); | 48 FILE_PATH_LITERAL("root"); |
| 46 | 49 |
| 47 const base::FilePath::CharType kDriveOtherDirName[] = | 50 const base::FilePath::CharType kDriveOtherDirName[] = |
| 48 FILE_PATH_LITERAL("other"); | 51 FILE_PATH_LITERAL("other"); |
| 49 | 52 |
| 53 const base::FilePath::CharType kDriveTrashDirName[] = |
| 54 FILE_PATH_LITERAL("trash"); |
| 55 |
| 50 // Returns the path of the top root of the pseudo tree. | 56 // Returns the path of the top root of the pseudo tree. |
| 51 const base::FilePath& GetDriveGrandRootPath(); | 57 const base::FilePath& GetDriveGrandRootPath(); |
| 52 | 58 |
| 53 // Returns the path of the directory representing "My Drive". | 59 // Returns the path of the directory representing "My Drive". |
| 54 const base::FilePath& GetDriveMyDriveRootPath(); | 60 const base::FilePath& GetDriveMyDriveRootPath(); |
| 55 | 61 |
| 56 // Returns the Drive mount point path, which looks like "/special/drive". | 62 // Returns the Drive mount point path, which looks like "/special/drive". |
| 57 const base::FilePath& GetDriveMountPointPath(); | 63 const base::FilePath& GetDriveMountPointPath(); |
| 58 | 64 |
| 59 // Returns the FileSystem for the |profile|. If not available (not mounted | 65 // Returns the FileSystem for the |profile|. If not available (not mounted |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 // Reads resource ID from a GDoc file. | 200 // Reads resource ID from a GDoc file. |
| 195 std::string ReadResourceIdFromGDocFile(const base::FilePath& file_path); | 201 std::string ReadResourceIdFromGDocFile(const base::FilePath& file_path); |
| 196 | 202 |
| 197 // Returns true if Drive is enabled for the given Profile. | 203 // Returns true if Drive is enabled for the given Profile. |
| 198 bool IsDriveEnabledForProfile(Profile* profile); | 204 bool IsDriveEnabledForProfile(Profile* profile); |
| 199 | 205 |
| 200 } // namespace util | 206 } // namespace util |
| 201 } // namespace drive | 207 } // namespace drive |
| 202 | 208 |
| 203 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_UTIL_H_ | 209 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_UTIL_H_ |
| OLD | NEW |