OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 // Utilities for ARC documents provider file system. | 5 // Utilities for ARC documents provider file system. |
6 | 6 |
7 #ifndef CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_UTIL_H_ | 7 #ifndef CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_UTIL_H_ |
8 #define CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_UTIL_H_ | 8 #define CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_UTIL_H_ |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 11 matching lines...) Expand all Loading... |
22 // The name of ARC documents provider file system mount point. | 22 // The name of ARC documents provider file system mount point. |
23 extern const char kDocumentsProviderMountPointName[]; | 23 extern const char kDocumentsProviderMountPointName[]; |
24 | 24 |
25 // The path of ARC documents provider file system mount point. | 25 // The path of ARC documents provider file system mount point. |
26 extern const base::FilePath::CharType kDocumentsProviderMountPointPath[]; | 26 extern const base::FilePath::CharType kDocumentsProviderMountPointPath[]; |
27 | 27 |
28 // MIME type for directories in Android. | 28 // MIME type for directories in Android. |
29 // Defined as DocumentsContract.Document.MIME_TYPE_DIR in Android. | 29 // Defined as DocumentsContract.Document.MIME_TYPE_DIR in Android. |
30 extern const char kAndroidDirectoryMimeType[]; | 30 extern const char kAndroidDirectoryMimeType[]; |
31 | 31 |
| 32 // Returns the path of a directory where the specified DocumentsProvider is |
| 33 // mounted. |
| 34 base::FilePath GetDocumentsProviderMountPath( |
| 35 const std::string& authority, |
| 36 const std::string& root_document_id); |
| 37 |
32 // Parses a FileSystemURL pointing to ARC documents provider file system. | 38 // Parses a FileSystemURL pointing to ARC documents provider file system. |
33 // On success, true is returned. All arguments must not be nullptr. | 39 // On success, true is returned. All arguments must not be nullptr. |
34 bool ParseDocumentsProviderUrl(const storage::FileSystemURL& url, | 40 bool ParseDocumentsProviderUrl(const storage::FileSystemURL& url, |
35 std::string* authority, | 41 std::string* authority, |
36 std::string* root_document_id, | 42 std::string* root_document_id, |
37 base::FilePath* path); | 43 base::FilePath* path); |
38 | 44 |
39 // C++ implementation of DocumentsContract.buildDocumentUri() in Android. | 45 // C++ implementation of DocumentsContract.buildDocumentUri() in Android. |
40 GURL BuildDocumentUrl(const std::string& authority, | 46 GURL BuildDocumentUrl(const std::string& authority, |
41 const std::string& document_id); | 47 const std::string& document_id); |
42 | 48 |
43 } // namespace arc | 49 } // namespace arc |
44 | 50 |
45 #endif // CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_UTIL_H_ | 51 #endif // CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_UTIL_H_ |
OLD | NEW |