OLD | NEW |
---|---|
(Empty) | |
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. | |
4 | |
5 #ifndef WEBKIT_FILEAPI_MEDIA_DEVICE_MEDIA_FILE_UTIL_H_ | |
6 #define WEBKIT_FILEAPI_MEDIA_DEVICE_MEDIA_FILE_UTIL_H_ | |
7 | |
8 #include "base/file_path.h" | |
9 #include "base/file_util_proxy.h" | |
10 #include "base/platform_file.h" | |
11 #include "webkit/fileapi/fileapi_export.h" | |
12 #include "webkit/fileapi/file_system_file_util.h" | |
13 | |
14 namespace base { | |
15 class Time; | |
16 } | |
17 | |
18 namespace fileapi { | |
19 | |
20 class FileSystemOperationContext; | |
21 | |
22 class FILEAPI_EXPORT_PRIVATE DeviceMediaFileUtil : public FileSystemFileUtil { | |
23 public: | |
24 DeviceMediaFileUtil(const FilePath& profile_path); | |
Lei Zhang
2012/07/31 20:04:37
nit: explicit
kmadhusu
2012/08/01 01:43:59
Done.
| |
25 virtual ~DeviceMediaFileUtil() {} | |
26 | |
27 // FileSystemFileUtil overrides. | |
28 virtual base::PlatformFileError CreateOrOpen( | |
29 FileSystemOperationContext* context, | |
30 const FileSystemURL& url, | |
31 int file_flags, | |
32 base::PlatformFile* file_handle, | |
33 bool* created) OVERRIDE; | |
34 virtual base::PlatformFileError Close( | |
35 FileSystemOperationContext* context, | |
36 base::PlatformFile file) OVERRIDE; | |
37 virtual base::PlatformFileError EnsureFileExists( | |
38 FileSystemOperationContext* context, | |
39 const FileSystemURL& url, bool* created) OVERRIDE; | |
40 virtual base::PlatformFileError CreateDirectory( | |
41 FileSystemOperationContext* context, | |
42 const FileSystemURL& url, | |
43 bool exclusive, | |
44 bool recursive) OVERRIDE; | |
45 virtual base::PlatformFileError GetFileInfo( | |
46 FileSystemOperationContext* context, | |
47 const FileSystemURL& url, | |
48 base::PlatformFileInfo* file_info, | |
49 FilePath* platform_path) OVERRIDE; | |
50 virtual AbstractFileEnumerator* CreateFileEnumerator( | |
51 FileSystemOperationContext* context, | |
52 const FileSystemURL& root_url, | |
53 bool recursive) OVERRIDE; | |
54 virtual PlatformFileError GetLocalFilePath( | |
55 FileSystemOperationContext* context, | |
56 const FileSystemURL& file_system_url, | |
57 FilePath* local_file_path) OVERRIDE; | |
58 virtual base::PlatformFileError Touch( | |
59 FileSystemOperationContext* context, | |
60 const FileSystemURL& url, | |
61 const base::Time& last_access_time, | |
62 const base::Time& last_modified_time) OVERRIDE; | |
63 virtual base::PlatformFileError Truncate( | |
64 FileSystemOperationContext* context, | |
65 const FileSystemURL& url, | |
66 int64 length) OVERRIDE; | |
67 virtual bool PathExists( | |
68 FileSystemOperationContext* context, | |
69 const FileSystemURL& url) OVERRIDE; | |
70 virtual bool DirectoryExists( | |
71 FileSystemOperationContext* context, | |
72 const FileSystemURL& url) OVERRIDE; | |
73 virtual bool IsDirectoryEmpty( | |
74 FileSystemOperationContext* context, | |
75 const FileSystemURL& url) OVERRIDE; | |
76 virtual base::PlatformFileError CopyOrMoveFile( | |
77 FileSystemOperationContext* context, | |
78 const FileSystemURL& src_url, | |
79 const FileSystemURL& dest_url, | |
80 bool copy) OVERRIDE; | |
81 virtual base::PlatformFileError CopyInForeignFile( | |
82 FileSystemOperationContext* context, | |
83 const FilePath& src_file_path, | |
84 const FileSystemURL& dest_url) OVERRIDE; | |
85 virtual base::PlatformFileError DeleteFile( | |
86 FileSystemOperationContext* context, | |
87 const FileSystemURL& url) OVERRIDE; | |
88 virtual base::PlatformFileError DeleteSingleDirectory( | |
89 FileSystemOperationContext* context, | |
90 const FileSystemURL& url) OVERRIDE; | |
91 virtual scoped_refptr<webkit_blob::ShareableFileReference> | |
92 CreateSnapshotFile(FileSystemOperationContext* context, | |
93 const FileSystemURL& url, | |
94 base::PlatformFileError* result, | |
95 base::PlatformFileInfo* file_info, | |
96 FilePath* platform_path) OVERRIDE; | |
97 private: | |
Lei Zhang
2012/07/31 20:04:37
nit: need blank line before private:
kmadhusu
2012/08/01 01:43:59
Done.
| |
98 // Profile path | |
99 const FilePath profile_path_; | |
100 | |
101 DISALLOW_COPY_AND_ASSIGN(DeviceMediaFileUtil); | |
102 }; | |
103 | |
104 } // namespace fileapi | |
105 | |
106 #endif // WEBKIT_FILEAPI_MEDIA_DEVICE_MEDIA_FILE_UTIL_H_ | |
OLD | NEW |