Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2008)

Unified Diff: chrome/browser/chromeos/arc/fileapi/arc_documents_provider_util.cc

Issue 2580303002: mediaview: Mount ARC documents provider file system volumes. (Closed)
Patch Set: Add a getter of ArcFileSystemService to ArcServiceManager so that VolumeManager can subscribe to AF… Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();

Powered by Google App Engine
This is Rietveld 408576698