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

Side by Side Diff: chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.h

Issue 2572683004: mediaview: Introduce ArcDocumentsProviderRoot. (Closed)
Patch Set: Addressed lhchavez's comments. Created 4 years 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 unified diff | Download patch
OLDNEW
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"
10 #include "base/memory/weak_ptr.h"
hashimoto 2016/12/16 09:03:52 weak_ptr_factory_ looks unused.
Shuhei Takahashi 2016/12/16 09:42:13 Done.
12 #include "storage/browser/fileapi/async_file_util.h" 11 #include "storage/browser/fileapi/async_file_util.h"
13 12
14 namespace arc { 13 namespace arc {
15 14
15 class ArcDocumentsProviderRootMap;
16
16 // The implementation of storage::AsyncFileUtil for media view. 17 // The implementation of storage::AsyncFileUtil for media view.
17 // 18 //
18 // All of the methods must be called on the IO thread. 19 // All of the methods must be called on the IO thread.
19 class ArcDocumentsProviderAsyncFileUtil : public storage::AsyncFileUtil { 20 class ArcDocumentsProviderAsyncFileUtil : public storage::AsyncFileUtil {
20 public: 21 public:
21 ArcDocumentsProviderAsyncFileUtil(); 22 explicit ArcDocumentsProviderAsyncFileUtil(
23 ArcDocumentsProviderRootMap* roots);
22 ~ArcDocumentsProviderAsyncFileUtil() override; 24 ~ArcDocumentsProviderAsyncFileUtil() override;
23 25
24 // storage::AsyncFileUtil overrides. 26 // storage::AsyncFileUtil overrides.
25 void CreateOrOpen( 27 void CreateOrOpen(
26 std::unique_ptr<storage::FileSystemOperationContext> context, 28 std::unique_ptr<storage::FileSystemOperationContext> context,
27 const storage::FileSystemURL& url, 29 const storage::FileSystemURL& url,
28 int file_flags, 30 int file_flags,
29 const CreateOrOpenCallback& callback) override; 31 const CreateOrOpenCallback& callback) override;
30 void EnsureFileExists( 32 void EnsureFileExists(
31 std::unique_ptr<storage::FileSystemOperationContext> context, 33 std::unique_ptr<storage::FileSystemOperationContext> context,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 void DeleteRecursively( 84 void DeleteRecursively(
83 std::unique_ptr<storage::FileSystemOperationContext> context, 85 std::unique_ptr<storage::FileSystemOperationContext> context,
84 const storage::FileSystemURL& url, 86 const storage::FileSystemURL& url,
85 const StatusCallback& callback) override; 87 const StatusCallback& callback) override;
86 void CreateSnapshotFile( 88 void CreateSnapshotFile(
87 std::unique_ptr<storage::FileSystemOperationContext> context, 89 std::unique_ptr<storage::FileSystemOperationContext> context,
88 const storage::FileSystemURL& url, 90 const storage::FileSystemURL& url,
89 const CreateSnapshotFileCallback& callback) override; 91 const CreateSnapshotFileCallback& callback) override;
90 92
91 private: 93 private:
94 // Owned by ArcDocumentsProviderBackendDelegate.
95 ArcDocumentsProviderRootMap* const roots_;
96
97 base::WeakPtrFactory<ArcDocumentsProviderAsyncFileUtil> weak_ptr_factory_;
98
92 DISALLOW_COPY_AND_ASSIGN(ArcDocumentsProviderAsyncFileUtil); 99 DISALLOW_COPY_AND_ASSIGN(ArcDocumentsProviderAsyncFileUtil);
93 }; 100 };
94 101
95 } // namespace arc 102 } // namespace arc
96 103
97 #endif // CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_ASYNC_FILE _UTIL_H_ 104 #endif // CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_ASYNC_FILE _UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698