Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / chromeos / drive / fileapi / async_file_util.h
blobb62b48d0fe913b75fc46270f1fe95d2ca0cc3c7a
1 // Copyright 2014 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.
5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILEAPI_ASYNC_FILE_UTIL_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILEAPI_ASYNC_FILE_UTIL_H_
8 #include "base/basictypes.h"
9 #include "base/callback.h"
10 #include "storage/browser/fileapi/async_file_util.h"
12 namespace drive {
14 class FileSystemInterface;
16 namespace internal {
18 // The implementation of storage::AsyncFileUtil for Drive File System.
19 class AsyncFileUtil : public storage::AsyncFileUtil {
20 public:
21 AsyncFileUtil();
22 ~AsyncFileUtil() override;
24 // storage::AsyncFileUtil overrides.
25 void CreateOrOpen(scoped_ptr<storage::FileSystemOperationContext> context,
26 const storage::FileSystemURL& url,
27 int file_flags,
28 const CreateOrOpenCallback& callback) override;
29 void EnsureFileExists(scoped_ptr<storage::FileSystemOperationContext> context,
30 const storage::FileSystemURL& url,
31 const EnsureFileExistsCallback& callback) override;
32 void CreateDirectory(scoped_ptr<storage::FileSystemOperationContext> context,
33 const storage::FileSystemURL& url,
34 bool exclusive,
35 bool recursive,
36 const StatusCallback& callback) override;
37 void GetFileInfo(scoped_ptr<storage::FileSystemOperationContext> context,
38 const storage::FileSystemURL& url,
39 const GetFileInfoCallback& callback) override;
40 void ReadDirectory(scoped_ptr<storage::FileSystemOperationContext> context,
41 const storage::FileSystemURL& url,
42 const ReadDirectoryCallback& callback) override;
43 void Touch(scoped_ptr<storage::FileSystemOperationContext> context,
44 const storage::FileSystemURL& url,
45 const base::Time& last_access_time,
46 const base::Time& last_modified_time,
47 const StatusCallback& callback) override;
48 void Truncate(scoped_ptr<storage::FileSystemOperationContext> context,
49 const storage::FileSystemURL& url,
50 int64 length,
51 const StatusCallback& callback) override;
52 void CopyFileLocal(scoped_ptr<storage::FileSystemOperationContext> context,
53 const storage::FileSystemURL& src_url,
54 const storage::FileSystemURL& dest_url,
55 CopyOrMoveOption option,
56 const CopyFileProgressCallback& progress_callback,
57 const StatusCallback& callback) override;
58 void MoveFileLocal(scoped_ptr<storage::FileSystemOperationContext> context,
59 const storage::FileSystemURL& src_url,
60 const storage::FileSystemURL& dest_url,
61 CopyOrMoveOption option,
62 const StatusCallback& callback) override;
63 void CopyInForeignFile(
64 scoped_ptr<storage::FileSystemOperationContext> context,
65 const base::FilePath& src_file_path,
66 const storage::FileSystemURL& dest_url,
67 const StatusCallback& callback) override;
68 void DeleteFile(scoped_ptr<storage::FileSystemOperationContext> context,
69 const storage::FileSystemURL& url,
70 const StatusCallback& callback) override;
71 void DeleteDirectory(scoped_ptr<storage::FileSystemOperationContext> context,
72 const storage::FileSystemURL& url,
73 const StatusCallback& callback) override;
74 void DeleteRecursively(
75 scoped_ptr<storage::FileSystemOperationContext> context,
76 const storage::FileSystemURL& url,
77 const StatusCallback& callback) override;
78 void CreateSnapshotFile(
79 scoped_ptr<storage::FileSystemOperationContext> context,
80 const storage::FileSystemURL& url,
81 const CreateSnapshotFileCallback& callback) override;
83 private:
84 DISALLOW_COPY_AND_ASSIGN(AsyncFileUtil);
87 } // namespace internal
88 } // namespace drive
90 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILEAPI_ASYNC_FILE_UTIL_H_