Index: chrome/browser/chromeos/arc/fileapi/arc_documents_provider_util.cc |
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_util.cc b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_util.cc |
index 8068a7f3d96d991b71c71c12ef21388c5cf251f3..249ebd5240158858448b72e1abeae906ef8f5cb1 100644 |
--- a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_util.cc |
+++ b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_util.cc |
@@ -19,6 +19,14 @@ const base::FilePath::CharType kDocumentsProviderMountPointPath[] = |
"/special/arc-documents-provider"; |
const char kAndroidDirectoryMimeType[] = "vnd.android.document/directory"; |
+base::FilePath GetDocumentsProviderMountPath( |
mtomasz
2017/01/11 09:35:22
Is this going to be reused for any document provid
Shuhei Takahashi
2017/01/12 08:20:28
Right, done.
|
+ const std::string& authority, |
+ const std::string& root_document_id) { |
+ return base::FilePath(kDocumentsProviderMountPointPath) |
+ .Append(authority) |
+ .Append(root_document_id); |
+} |
+ |
bool ParseDocumentsProviderUrl(const storage::FileSystemURL& url, |
std::string* authority, |
std::string* root_document_id, |
mtomasz
2017/01/11 09:35:22
nit: Is the returned root_document_id escaped or n
Shuhei Takahashi
2017/01/12 08:20:28
Done.
|
@@ -42,9 +50,8 @@ bool ParseDocumentsProviderUrl(const storage::FileSystemURL& url, |
*authority = components[3]; |
*root_document_id = components[4]; |
- base::FilePath root_path = base::FilePath(kDocumentsProviderMountPointPath) |
- .Append(*authority) |
- .Append(*root_document_id); |
+ base::FilePath root_path = |
+ GetDocumentsProviderMountPath(*authority, *root_document_id); |
// Special case: AppendRelativePath() fails for identical paths. |
if (url_path_stripped == root_path) { |
path->clear(); |