We started redesigning GpuMemoryBuffer interface to handle multiple buffers [0].
[chromium-blink-merge.git] / storage / browser / fileapi / local_file_util.h
blob44dddb6f5322fd99da4b7b31ae8928273bdda749
1 // Copyright (c) 2012 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 STORAGE_BROWSER_FILEAPI_LOCAL_FILE_UTIL_H_
6 #define STORAGE_BROWSER_FILEAPI_LOCAL_FILE_UTIL_H_
8 #include "base/compiler_specific.h"
9 #include "base/files/file_path.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "storage/browser/fileapi/file_system_file_util.h"
12 #include "storage/browser/storage_browser_export.h"
14 namespace base {
15 class Time;
18 class GURL;
20 namespace storage {
22 class FileSystemOperationContext;
23 class FileSystemURL;
25 // An instance of this class is created and owned by *FileSystemBackend.
26 class STORAGE_EXPORT LocalFileUtil
27 : public FileSystemFileUtil {
28 public:
29 LocalFileUtil();
30 ~LocalFileUtil() override;
32 base::File CreateOrOpen(FileSystemOperationContext* context,
33 const FileSystemURL& url,
34 int file_flags) override;
35 base::File::Error EnsureFileExists(FileSystemOperationContext* context,
36 const FileSystemURL& url,
37 bool* created) override;
38 base::File::Error CreateDirectory(FileSystemOperationContext* context,
39 const FileSystemURL& url,
40 bool exclusive,
41 bool recursive) override;
42 base::File::Error GetFileInfo(FileSystemOperationContext* context,
43 const FileSystemURL& url,
44 base::File::Info* file_info,
45 base::FilePath* platform_file) override;
46 scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator(
47 FileSystemOperationContext* context,
48 const FileSystemURL& root_url) override;
49 base::File::Error GetLocalFilePath(FileSystemOperationContext* context,
50 const FileSystemURL& file_system_url,
51 base::FilePath* local_file_path) override;
52 base::File::Error Touch(FileSystemOperationContext* context,
53 const FileSystemURL& url,
54 const base::Time& last_access_time,
55 const base::Time& last_modified_time) override;
56 base::File::Error Truncate(FileSystemOperationContext* context,
57 const FileSystemURL& url,
58 int64 length) override;
59 base::File::Error CopyOrMoveFile(FileSystemOperationContext* context,
60 const FileSystemURL& src_url,
61 const FileSystemURL& dest_url,
62 CopyOrMoveOption option,
63 bool copy) override;
64 base::File::Error CopyInForeignFile(FileSystemOperationContext* context,
65 const base::FilePath& src_file_path,
66 const FileSystemURL& dest_url) override;
67 base::File::Error DeleteFile(FileSystemOperationContext* context,
68 const FileSystemURL& url) override;
69 base::File::Error DeleteDirectory(FileSystemOperationContext* context,
70 const FileSystemURL& url) override;
71 storage::ScopedFile CreateSnapshotFile(
72 FileSystemOperationContext* context,
73 const FileSystemURL& url,
74 base::File::Error* error,
75 base::File::Info* file_info,
76 base::FilePath* platform_path) override;
78 private:
79 DISALLOW_COPY_AND_ASSIGN(LocalFileUtil);
82 } // namespace storage
84 #endif // STORAGE_BROWSER_FILEAPI_LOCAL_FILE_UTIL_H_