OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_ASYNC_FILE_UT
IL_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_ASYNC_FILE_UT
IL_H_ |
6 #define CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_ASYNC_FILE_UT
IL_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_ASYNC_FILE_UT
IL_H_ |
7 | 7 |
8 #include <memory> | |
9 | |
10 #include "base/callback.h" | 8 #include "base/callback.h" |
11 #include "base/macros.h" | 9 #include "base/macros.h" |
12 #include "storage/browser/fileapi/async_file_util.h" | 10 #include "storage/browser/fileapi/async_file_util.h" |
13 | 11 |
14 namespace arc { | 12 namespace arc { |
15 | 13 |
| 14 class ArcDocumentsProviderRootMap; |
| 15 |
16 // The implementation of storage::AsyncFileUtil for media view. | 16 // The implementation of storage::AsyncFileUtil for media view. |
17 // | 17 // |
18 // All of the methods must be called on the IO thread. | 18 // All of the methods must be called on the IO thread. |
19 class ArcDocumentsProviderAsyncFileUtil : public storage::AsyncFileUtil { | 19 class ArcDocumentsProviderAsyncFileUtil : public storage::AsyncFileUtil { |
20 public: | 20 public: |
21 ArcDocumentsProviderAsyncFileUtil(); | 21 explicit ArcDocumentsProviderAsyncFileUtil( |
| 22 ArcDocumentsProviderRootMap* roots); |
22 ~ArcDocumentsProviderAsyncFileUtil() override; | 23 ~ArcDocumentsProviderAsyncFileUtil() override; |
23 | 24 |
24 // storage::AsyncFileUtil overrides. | 25 // storage::AsyncFileUtil overrides. |
25 void CreateOrOpen( | 26 void CreateOrOpen( |
26 std::unique_ptr<storage::FileSystemOperationContext> context, | 27 std::unique_ptr<storage::FileSystemOperationContext> context, |
27 const storage::FileSystemURL& url, | 28 const storage::FileSystemURL& url, |
28 int file_flags, | 29 int file_flags, |
29 const CreateOrOpenCallback& callback) override; | 30 const CreateOrOpenCallback& callback) override; |
30 void EnsureFileExists( | 31 void EnsureFileExists( |
31 std::unique_ptr<storage::FileSystemOperationContext> context, | 32 std::unique_ptr<storage::FileSystemOperationContext> context, |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 void DeleteRecursively( | 83 void DeleteRecursively( |
83 std::unique_ptr<storage::FileSystemOperationContext> context, | 84 std::unique_ptr<storage::FileSystemOperationContext> context, |
84 const storage::FileSystemURL& url, | 85 const storage::FileSystemURL& url, |
85 const StatusCallback& callback) override; | 86 const StatusCallback& callback) override; |
86 void CreateSnapshotFile( | 87 void CreateSnapshotFile( |
87 std::unique_ptr<storage::FileSystemOperationContext> context, | 88 std::unique_ptr<storage::FileSystemOperationContext> context, |
88 const storage::FileSystemURL& url, | 89 const storage::FileSystemURL& url, |
89 const CreateSnapshotFileCallback& callback) override; | 90 const CreateSnapshotFileCallback& callback) override; |
90 | 91 |
91 private: | 92 private: |
| 93 // Owned by ArcDocumentsProviderBackendDelegate. |
| 94 ArcDocumentsProviderRootMap* const roots_; |
| 95 |
92 DISALLOW_COPY_AND_ASSIGN(ArcDocumentsProviderAsyncFileUtil); | 96 DISALLOW_COPY_AND_ASSIGN(ArcDocumentsProviderAsyncFileUtil); |
93 }; | 97 }; |
94 | 98 |
95 } // namespace arc | 99 } // namespace arc |
96 | 100 |
97 #endif // CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_ASYNC_FILE
_UTIL_H_ | 101 #endif // CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_ASYNC_FILE
_UTIL_H_ |
OLD | NEW |