OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 WEBKIT_FILEAPI_LOCAL_FILE_UTIL_H_ | 5 #ifndef WEBKIT_FILEAPI_LOCAL_FILE_UTIL_H_ |
6 #define WEBKIT_FILEAPI_LOCAL_FILE_UTIL_H_ | 6 #define WEBKIT_FILEAPI_LOCAL_FILE_UTIL_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
11 #include "webkit/fileapi/file_system_file_util.h" | 11 #include "webkit/fileapi/file_system_file_util.h" |
12 #include "webkit/storage/webkit_storage_export.h" | 12 #include "webkit/storage/webkit_storage_export.h" |
13 | 13 |
14 namespace base { | 14 namespace base { |
| 15 class FilePath; |
15 class Time; | 16 class Time; |
16 } | 17 } |
17 | 18 |
18 class FilePath; | |
19 class GURL; | 19 class GURL; |
20 | 20 |
21 namespace fileapi { | 21 namespace fileapi { |
22 | 22 |
23 class FileSystemOperationContext; | 23 class FileSystemOperationContext; |
24 class FileSystemURL; | 24 class FileSystemURL; |
25 | 25 |
26 // An instance of this class is created and owned by *MountPointProvider. | 26 // An instance of this class is created and owned by *MountPointProvider. |
27 class WEBKIT_STORAGE_EXPORT_PRIVATE LocalFileUtil : public FileSystemFileUtil { | 27 class WEBKIT_STORAGE_EXPORT_PRIVATE LocalFileUtil : public FileSystemFileUtil { |
28 public: | 28 public: |
(...skipping 14 matching lines...) Expand all Loading... |
43 const FileSystemURL& url, bool* created) OVERRIDE; | 43 const FileSystemURL& url, bool* created) OVERRIDE; |
44 virtual base::PlatformFileError CreateDirectory( | 44 virtual base::PlatformFileError CreateDirectory( |
45 FileSystemOperationContext* context, | 45 FileSystemOperationContext* context, |
46 const FileSystemURL& url, | 46 const FileSystemURL& url, |
47 bool exclusive, | 47 bool exclusive, |
48 bool recursive) OVERRIDE; | 48 bool recursive) OVERRIDE; |
49 virtual base::PlatformFileError GetFileInfo( | 49 virtual base::PlatformFileError GetFileInfo( |
50 FileSystemOperationContext* context, | 50 FileSystemOperationContext* context, |
51 const FileSystemURL& url, | 51 const FileSystemURL& url, |
52 base::PlatformFileInfo* file_info, | 52 base::PlatformFileInfo* file_info, |
53 FilePath* platform_file) OVERRIDE; | 53 base::FilePath* platform_file) OVERRIDE; |
54 virtual scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator( | 54 virtual scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator( |
55 FileSystemOperationContext* context, | 55 FileSystemOperationContext* context, |
56 const FileSystemURL& root_url, | 56 const FileSystemURL& root_url, |
57 bool recursive) OVERRIDE; | 57 bool recursive) OVERRIDE; |
58 virtual base::PlatformFileError GetLocalFilePath( | 58 virtual base::PlatformFileError GetLocalFilePath( |
59 FileSystemOperationContext* context, | 59 FileSystemOperationContext* context, |
60 const FileSystemURL& file_system_url, | 60 const FileSystemURL& file_system_url, |
61 FilePath* local_file_path) OVERRIDE; | 61 base::FilePath* local_file_path) OVERRIDE; |
62 virtual base::PlatformFileError Touch( | 62 virtual base::PlatformFileError Touch( |
63 FileSystemOperationContext* context, | 63 FileSystemOperationContext* context, |
64 const FileSystemURL& url, | 64 const FileSystemURL& url, |
65 const base::Time& last_access_time, | 65 const base::Time& last_access_time, |
66 const base::Time& last_modified_time) OVERRIDE; | 66 const base::Time& last_modified_time) OVERRIDE; |
67 virtual base::PlatformFileError Truncate( | 67 virtual base::PlatformFileError Truncate( |
68 FileSystemOperationContext* context, | 68 FileSystemOperationContext* context, |
69 const FileSystemURL& url, | 69 const FileSystemURL& url, |
70 int64 length) OVERRIDE; | 70 int64 length) OVERRIDE; |
71 virtual base::PlatformFileError CopyOrMoveFile( | 71 virtual base::PlatformFileError CopyOrMoveFile( |
72 FileSystemOperationContext* context, | 72 FileSystemOperationContext* context, |
73 const FileSystemURL& src_url, | 73 const FileSystemURL& src_url, |
74 const FileSystemURL& dest_url, | 74 const FileSystemURL& dest_url, |
75 bool copy) OVERRIDE; | 75 bool copy) OVERRIDE; |
76 virtual base::PlatformFileError CopyInForeignFile( | 76 virtual base::PlatformFileError CopyInForeignFile( |
77 FileSystemOperationContext* context, | 77 FileSystemOperationContext* context, |
78 const FilePath& src_file_path, | 78 const base::FilePath& src_file_path, |
79 const FileSystemURL& dest_url) OVERRIDE; | 79 const FileSystemURL& dest_url) OVERRIDE; |
80 virtual base::PlatformFileError DeleteFile( | 80 virtual base::PlatformFileError DeleteFile( |
81 FileSystemOperationContext* context, | 81 FileSystemOperationContext* context, |
82 const FileSystemURL& url) OVERRIDE; | 82 const FileSystemURL& url) OVERRIDE; |
83 virtual base::PlatformFileError DeleteDirectory( | 83 virtual base::PlatformFileError DeleteDirectory( |
84 FileSystemOperationContext* context, | 84 FileSystemOperationContext* context, |
85 const FileSystemURL& url) OVERRIDE; | 85 const FileSystemURL& url) OVERRIDE; |
86 virtual base::PlatformFileError CreateSnapshotFile( | 86 virtual base::PlatformFileError CreateSnapshotFile( |
87 FileSystemOperationContext* context, | 87 FileSystemOperationContext* context, |
88 const FileSystemURL& url, | 88 const FileSystemURL& url, |
89 base::PlatformFileInfo* file_info, | 89 base::PlatformFileInfo* file_info, |
90 FilePath* platform_path, | 90 base::FilePath* platform_path, |
91 SnapshotFilePolicy* snapshot_policy) OVERRIDE; | 91 SnapshotFilePolicy* snapshot_policy) OVERRIDE; |
92 | 92 |
93 private: | 93 private: |
94 // Given the filesystem url, produces a real, full local path for the | 94 // Given the filesystem url, produces a real, full local path for the |
95 // underlying filesystem (which is usually the native filesystem). | 95 // underlying filesystem (which is usually the native filesystem). |
96 FileSystemURL GetLocalPath( | 96 FileSystemURL GetLocalPath( |
97 FileSystemOperationContext* context, | 97 FileSystemOperationContext* context, |
98 const FileSystemURL& url); | 98 const FileSystemURL& url); |
99 | 99 |
100 DISALLOW_COPY_AND_ASSIGN(LocalFileUtil); | 100 DISALLOW_COPY_AND_ASSIGN(LocalFileUtil); |
101 }; | 101 }; |
102 | 102 |
103 } // namespace fileapi | 103 } // namespace fileapi |
104 | 104 |
105 #endif // WEBKIT_FILEAPI_LOCAL_FILE_UTIL_H_ | 105 #endif // WEBKIT_FILEAPI_LOCAL_FILE_UTIL_H_ |
OLD | NEW |