| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_DRIVE_FILE_SYSTEM_CORE_UTIL_H_ | 5 #ifndef COMPONENTS_DRIVE_FILE_SYSTEM_CORE_UTIL_H_ |
| 6 #define COMPONENTS_DRIVE_FILE_SYSTEM_CORE_UTIL_H_ | 6 #define COMPONENTS_DRIVE_FILE_SYSTEM_CORE_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 24 matching lines...) Expand all Loading... |
| 35 const char kDriveOtherDirName[] = "other"; | 35 const char kDriveOtherDirName[] = "other"; |
| 36 const char kDriveTeamDrivesDirName[] = "team_drives"; | 36 const char kDriveTeamDrivesDirName[] = "team_drives"; |
| 37 const char kDriveTrashDirName[] = "trash"; | 37 const char kDriveTrashDirName[] = "trash"; |
| 38 | 38 |
| 39 // Returns the path of the top root of the pseudo tree. | 39 // Returns the path of the top root of the pseudo tree. |
| 40 const base::FilePath& GetDriveGrandRootPath(); | 40 const base::FilePath& GetDriveGrandRootPath(); |
| 41 | 41 |
| 42 // Returns the path of the directory representing "My Drive". | 42 // Returns the path of the directory representing "My Drive". |
| 43 const base::FilePath& GetDriveMyDriveRootPath(); | 43 const base::FilePath& GetDriveMyDriveRootPath(); |
| 44 | 44 |
| 45 // Returns the path of the directory representing "Team Drives". |
| 46 const base::FilePath& GetDriveTeamDrivesRootPath(); |
| 47 |
| 45 // Escapes a file name in Drive cache. | 48 // Escapes a file name in Drive cache. |
| 46 // Replaces percent ('%'), period ('.') and slash ('/') with %XX (hex) | 49 // Replaces percent ('%'), period ('.') and slash ('/') with %XX (hex) |
| 47 std::string EscapeCacheFileName(const std::string& filename); | 50 std::string EscapeCacheFileName(const std::string& filename); |
| 48 | 51 |
| 49 // Unescapes a file path in Drive cache. | 52 // Unescapes a file path in Drive cache. |
| 50 // This is the inverse of EscapeCacheFileName. | 53 // This is the inverse of EscapeCacheFileName. |
| 51 std::string UnescapeCacheFileName(const std::string& filename); | 54 std::string UnescapeCacheFileName(const std::string& filename); |
| 52 | 55 |
| 53 // Converts the given string to a form suitable as a file name. Specifically, | 56 // Converts the given string to a form suitable as a file name. Specifically, |
| 54 // - Normalizes in Unicode Normalization Form C. | 57 // - Normalizes in Unicode Normalization Form C. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 81 // Reads URL from a GDoc file. | 84 // Reads URL from a GDoc file. |
| 82 GURL ReadUrlFromGDocFile(const base::FilePath& file_path); | 85 GURL ReadUrlFromGDocFile(const base::FilePath& file_path); |
| 83 | 86 |
| 84 // Reads resource ID from a GDoc file. | 87 // Reads resource ID from a GDoc file. |
| 85 std::string ReadResourceIdFromGDocFile(const base::FilePath& file_path); | 88 std::string ReadResourceIdFromGDocFile(const base::FilePath& file_path); |
| 86 | 89 |
| 87 } // namespace util | 90 } // namespace util |
| 88 } // namespace drive | 91 } // namespace drive |
| 89 | 92 |
| 90 #endif // COMPONENTS_DRIVE_FILE_SYSTEM_CORE_UTIL_H_ | 93 #endif // COMPONENTS_DRIVE_FILE_SYSTEM_CORE_UTIL_H_ |
| OLD | NEW |