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 41135c9e0c255c8eef3c49e1278c1ad11362bc45..123b268ed337951687eeabdd95f707f058a860ea 100644 |
--- a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h |
+++ b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h |
@@ -5,17 +5,26 @@ |
#ifndef CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_ROOT_H_ |
#define CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_ROOT_H_ |
+#include <memory> |
#include <string> |
+#include <vector> |
#include "base/files/file_path.h" |
#include "base/macros.h" |
+#include "base/memory/weak_ptr.h" |
+#include "base/optional.h" |
+#include "components/arc/common/file_system.mojom.h" |
#include "storage/browser/fileapi/async_file_util.h" |
namespace arc { |
+class ArcDocumentsProviderDocument; |
+ |
// Represents a file system root in Android Documents Provider. |
// |
// All methods must be called on the IO thread. |
+// If this object is deleted while there are in-flight operations, callbacks |
+// for those operations will be never called. |
class ArcDocumentsProviderRoot { |
public: |
using GetFileInfoCallback = storage::AsyncFileUtil::GetFileInfoCallback; |
@@ -35,6 +44,33 @@ class ArcDocumentsProviderRoot { |
const ReadDirectoryCallback& callback); |
private: |
+ void GetFileInfoAfterCacheUpdate(const base::FilePath& path, |
+ const GetFileInfoCallback& callback); |
+ void GetFileInfoWithDocument(const GetFileInfoCallback& callback, |
+ mojom::DocumentPtr document); |
+ |
+ void ReadDirectoryAfterCacheUpdate(const base::FilePath& path, |
+ const ReadDirectoryCallback& callback); |
+ void ReadDirectoryWithChildDocuments( |
+ const base::FilePath& path, |
+ const ReadDirectoryCallback& callback, |
+ base::Optional<std::vector<mojom::DocumentPtr>> children); |
+ |
+ void UpdateDirectoryCacheUpTo(const base::FilePath& path, |
hashimoto
2016/12/19 06:40:48
Please add a comment to describe what this method
Shuhei Takahashi
2016/12/19 10:01:56
N/A
|
+ const base::Closure& callback); |
+ void UpdateDirectoryCacheIter(const base::FilePath& parent_directory_path, |
hashimoto
2016/12/19 06:40:48
What does "iter" mean?
Generally speaking, you sho
Shuhei Takahashi
2016/12/19 10:01:56
N/A
|
+ const base::FilePath& remaining_path, |
+ const base::Closure& callback); |
+ void UpdateDirectoryCacheIterWithChildDocuments( |
+ const base::FilePath& parent_directory_path, |
+ const base::FilePath& remaining_path, |
+ const base::Closure& callback, |
+ base::Optional<std::vector<mojom::DocumentPtr>> children); |
+ |
+ const std::string authority_; |
+ const std::unique_ptr<ArcDocumentsProviderDocument> root_directory_; |
+ base::WeakPtrFactory<ArcDocumentsProviderRoot> weak_ptr_factory_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ArcDocumentsProviderRoot); |
}; |