| Index: chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h
|
| diff --git a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h
|
| index 086e510b34013a0b35b3b582d1be83209154a8c6..8688e7279813ee04d12e7c6f6b0b71cd179cbb1b 100644
|
| --- a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h
|
| +++ b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h
|
| @@ -17,6 +17,8 @@
|
| #include "components/arc/common/file_system.mojom.h"
|
| #include "storage/browser/fileapi/async_file_util.h"
|
|
|
| +class GURL;
|
| +
|
| namespace arc {
|
|
|
| // Represents a file system root in Android Documents Provider.
|
| @@ -28,6 +30,8 @@ class ArcDocumentsProviderRoot {
|
| public:
|
| using GetFileInfoCallback = storage::AsyncFileUtil::GetFileInfoCallback;
|
| using ReadDirectoryCallback = storage::AsyncFileUtil::ReadDirectoryCallback;
|
| + using ResolveToContentUrlCallback =
|
| + base::Callback<void(const GURL& content_url)>;
|
|
|
| ArcDocumentsProviderRoot(const std::string& authority,
|
| const std::string& root_document_id);
|
| @@ -42,6 +46,13 @@ class ArcDocumentsProviderRoot {
|
| void ReadDirectory(const base::FilePath& path,
|
| const ReadDirectoryCallback& callback);
|
|
|
| + // Resolves a file path into a content:// URL pointing to the file
|
| + // on DocumentsProvider. Returns URL that can be passed to
|
| + // ArcContentFileSystemFileSystemReader to read the content.
|
| + // On errors, an invalid GURL is returned.
|
| + void ResolveToContentUrl(const base::FilePath& path,
|
| + const ResolveToContentUrlCallback& callback);
|
| +
|
| private:
|
| // Thin representation of a document in documents provider.
|
| struct ThinDocument {
|
| @@ -67,6 +78,10 @@ class ArcDocumentsProviderRoot {
|
| void ReadDirectoryWithNameMapping(const ReadDirectoryCallback& callback,
|
| NameMapping mapping);
|
|
|
| + void ResolveToContentUrlWithDocumentId(
|
| + const ResolveToContentUrlCallback& callback,
|
| + const std::string& document_id);
|
| +
|
| // Resolves |path| to a document ID. Failures are indicated by an empty
|
| // document ID.
|
| void ResolveToDocumentId(const base::FilePath& path,
|
|
|