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

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

Issue 2568033002: mediaview: Skeleton for ARC Documents Provider FS. (Closed)
Patch Set: 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
(Empty)
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
3 // found in the LICENSE file.
4
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_
7
8 #include <memory>
9
10 #include "base/callback.h"
11 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h"
13 #include "storage/browser/fileapi/async_file_util.h"
14
15 namespace arc {
16
17 // The implementation of storage::AsyncFileUtil for media view.
18 //
19 // All of the methods must be called on the IO thread.
20 class ArcDocumentsProviderAsyncFileUtil : public storage::AsyncFileUtil {
21 public:
22 ArcDocumentsProviderAsyncFileUtil();
23 ~ArcDocumentsProviderAsyncFileUtil() override;
24
25 // storage::AsyncFileUtil overrides.
26 void CreateOrOpen(
27 std::unique_ptr<storage::FileSystemOperationContext> context,
28 const storage::FileSystemURL& url,
29 int file_flags,
30 const CreateOrOpenCallback& callback) override;
31 void EnsureFileExists(
32 std::unique_ptr<storage::FileSystemOperationContext> context,
33 const storage::FileSystemURL& url,
34 const EnsureFileExistsCallback& callback) override;
35 void CreateDirectory(
36 std::unique_ptr<storage::FileSystemOperationContext> context,
37 const storage::FileSystemURL& url,
38 bool exclusive,
39 bool recursive,
40 const StatusCallback& callback) override;
41 void GetFileInfo(std::unique_ptr<storage::FileSystemOperationContext> context,
42 const storage::FileSystemURL& url,
43 int fields,
44 const GetFileInfoCallback& callback) override;
45 void ReadDirectory(
46 std::unique_ptr<storage::FileSystemOperationContext> context,
47 const storage::FileSystemURL& url,
48 const ReadDirectoryCallback& callback) override;
49 void Touch(std::unique_ptr<storage::FileSystemOperationContext> context,
50 const storage::FileSystemURL& url,
51 const base::Time& last_access_time,
52 const base::Time& last_modified_time,
53 const StatusCallback& callback) override;
54 void Truncate(std::unique_ptr<storage::FileSystemOperationContext> context,
55 const storage::FileSystemURL& url,
56 int64_t length,
57 const StatusCallback& callback) override;
58 void CopyFileLocal(
59 std::unique_ptr<storage::FileSystemOperationContext> context,
60 const storage::FileSystemURL& src_url,
61 const storage::FileSystemURL& dest_url,
62 CopyOrMoveOption option,
63 const CopyFileProgressCallback& progress_callback,
64 const StatusCallback& callback) override;
65 void MoveFileLocal(
66 std::unique_ptr<storage::FileSystemOperationContext> context,
67 const storage::FileSystemURL& src_url,
68 const storage::FileSystemURL& dest_url,
69 CopyOrMoveOption option,
70 const StatusCallback& callback) override;
71 void CopyInForeignFile(
72 std::unique_ptr<storage::FileSystemOperationContext> context,
73 const base::FilePath& src_file_path,
74 const storage::FileSystemURL& dest_url,
75 const StatusCallback& callback) override;
76 void DeleteFile(std::unique_ptr<storage::FileSystemOperationContext> context,
77 const storage::FileSystemURL& url,
78 const StatusCallback& callback) override;
79 void DeleteDirectory(
80 std::unique_ptr<storage::FileSystemOperationContext> context,
81 const storage::FileSystemURL& url,
82 const StatusCallback& callback) override;
83 void DeleteRecursively(
84 std::unique_ptr<storage::FileSystemOperationContext> context,
85 const storage::FileSystemURL& url,
86 const StatusCallback& callback) override;
87 void CreateSnapshotFile(
88 std::unique_ptr<storage::FileSystemOperationContext> context,
89 const storage::FileSystemURL& url,
90 const CreateSnapshotFileCallback& callback) override;
91
92 private:
93 base::WeakPtrFactory<ArcDocumentsProviderAsyncFileUtil> weak_ptr_factory_;
hashimoto 2016/12/13 07:52:29 How about adding this when it's actually needed?
Shuhei Takahashi 2016/12/13 10:27:47 Done.
94
95 DISALLOW_COPY_AND_ASSIGN(ArcDocumentsProviderAsyncFileUtil);
96 };
97
98 } // namespace arc
99
100 #endif // CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_ASYNC_FILE _UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698