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

Side by Side Diff: webkit/fileapi/native_file_util.h

Issue 7470037: [Refactor] to rename and re-layer the file_util stack layers. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Reflected the comments. Created 9 years, 4 months 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 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_NATIVE_FILE_UTIL_H_
6 #define WEBKIT_FILEAPI_NATIVE_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/file_system_file_util.h"
12
13 namespace base {
14 class Time;
15 }
16
17 namespace fileapi {
18
19 using base::PlatformFile;
20 using base::PlatformFileError;
21 class FileSystemOperationContext;
22
23 // TODO(dmikurube): Add unit tests for NativeFileUtil.
24 // This class handles accessing to the OS native filesystem.
kinuko 2011/08/29 07:20:00 nit: 'access to the OS' or 'accessing the OS'?
Dai Mikurube (NOT FULLTIME) 2011/08/30 07:47:28 Done.
25 class NativeFileUtil : public FileSystemFileUtil {
26 public:
27 NativeFileUtil() {}
28 virtual ~NativeFileUtil() {}
29
30 virtual PlatformFileError CreateOrOpen(
31 FileSystemOperationContext* unused,
32 const FilePath& file_path,
33 int file_flags,
34 PlatformFile* file_handle,
35 bool* created) OVERRIDE;
36
kinuko 2011/08/29 07:20:00 ditto about empty lines. Thanks!
Dai Mikurube (NOT FULLTIME) 2011/08/30 07:47:28 Done.
37 virtual PlatformFileError Close(
38 FileSystemOperationContext* unused,
39 PlatformFile) OVERRIDE;
40
41 virtual PlatformFileError EnsureFileExists(
42 FileSystemOperationContext* unused,
43 const FilePath& file_path, bool* created) OVERRIDE;
44
45 virtual PlatformFileError CreateDirectory(
46 FileSystemOperationContext* context,
47 const FilePath& file_path,
48 bool exclusive,
49 bool recursive) OVERRIDE;
50
51 virtual PlatformFileError GetFileInfo(
52 FileSystemOperationContext* unused,
53 const FilePath& file_,
54 base::PlatformFileInfo* file_info,
55 FilePath* platform_path) OVERRIDE;
56
57 virtual PlatformFileError ReadDirectory(
58 FileSystemOperationContext* unused,
59 const FilePath& file_path,
60 std::vector<base::FileUtilProxy::Entry>* entries) OVERRIDE;
61
62 virtual AbstractFileEnumerator* CreateFileEnumerator(
63 FileSystemOperationContext* unused,
64 const FilePath& root_path) OVERRIDE;
65
66 virtual PlatformFileError GetLocalFilePath(
67 FileSystemOperationContext* unused,
68 const FilePath& virtual_path,
69 FilePath* local_path) OVERRIDE;
70
71 virtual PlatformFileError Touch(
72 FileSystemOperationContext* unused,
73 const FilePath& file_path,
74 const base::Time& last_access_time,
75 const base::Time& last_modified_time) OVERRIDE;
76
77 virtual PlatformFileError Truncate(
78 FileSystemOperationContext* unused,
79 const FilePath& path,
80 int64 length) OVERRIDE;
81
82 virtual bool PathExists(
83 FileSystemOperationContext* unused,
84 const FilePath& file_path) OVERRIDE;
85
86 virtual bool DirectoryExists(
87 FileSystemOperationContext* unused,
88 const FilePath& file_path) OVERRIDE;
89
90 virtual bool IsDirectoryEmpty(
91 FileSystemOperationContext* unused,
92 const FilePath& file_path) OVERRIDE;
93
94 virtual PlatformFileError CopyOrMoveFile(
95 FileSystemOperationContext* unused,
96 const FilePath& src_file_path,
97 const FilePath& dest_file_path,
98 bool copy) OVERRIDE;
99
100 virtual PlatformFileError CopyInForeignFile(
101 FileSystemOperationContext* unused,
102 const FilePath& src_file_path,
103 const FilePath& dest_file_path) OVERRIDE;
104
105 virtual PlatformFileError DeleteFile(
106 FileSystemOperationContext* unused,
107 const FilePath& file_path) OVERRIDE;
108
109 virtual PlatformFileError DeleteSingleDirectory(
110 FileSystemOperationContext* unused,
111 const FilePath& file_path) OVERRIDE;
112
113 private:
114 DISALLOW_COPY_AND_ASSIGN(NativeFileUtil);
115 };
116
117 } // namespace fileapi
118
119 #endif // WEBKIT_FILEAPI_NATIVE_FILE_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698