| 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 123b268ed337951687eeabdd95f707f058a860ea..67b74cfbeaf84ddbaaa33eb7843fae83bf4cc84e 100644
|
| --- a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h
|
| +++ b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h
|
| @@ -16,6 +16,8 @@
|
| #include "components/arc/common/file_system.mojom.h"
|
| #include "storage/browser/fileapi/async_file_util.h"
|
|
|
| +class GURL;
|
| +
|
| namespace arc {
|
|
|
| class ArcDocumentsProviderDocument;
|
| @@ -29,6 +31,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);
|
| @@ -43,6 +47,12 @@ 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.
|
| + void ResolveToContentUrl(const base::FilePath& path,
|
| + const ResolveToContentUrlCallback& callback);
|
| +
|
| private:
|
| void GetFileInfoAfterCacheUpdate(const base::FilePath& path,
|
| const GetFileInfoCallback& callback);
|
| @@ -56,6 +66,10 @@ class ArcDocumentsProviderRoot {
|
| const ReadDirectoryCallback& callback,
|
| base::Optional<std::vector<mojom::DocumentPtr>> children);
|
|
|
| + void ResolveToContentUrlAfterCacheUpdate(
|
| + const base::FilePath& path,
|
| + const ResolveToContentUrlCallback& callback);
|
| +
|
| void UpdateDirectoryCacheUpTo(const base::FilePath& path,
|
| const base::Closure& callback);
|
| void UpdateDirectoryCacheIter(const base::FilePath& parent_directory_path,
|
|
|