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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/file_path.h" | 12 #include "base/file_path.h" |
13 #include "base/file_util.h" | 13 #include "base/file_util.h" |
14 #include "base/file_util_proxy.h" | 14 #include "base/file_util_proxy.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/platform_file.h" | 16 #include "base/platform_file.h" |
| 17 #include "webkit/fileapi/fileapi_export.h" |
17 #include "webkit/fileapi/file_system_file_util.h" | 18 #include "webkit/fileapi/file_system_file_util.h" |
18 #include "webkit/fileapi/file_system_types.h" | 19 #include "webkit/fileapi/file_system_types.h" |
19 | 20 |
20 namespace base { | 21 namespace base { |
21 struct PlatformFileInfo; | 22 struct PlatformFileInfo; |
22 class Time; | 23 class Time; |
23 } | 24 } |
24 | 25 |
25 class GURL; | 26 class GURL; |
26 | 27 |
27 namespace fileapi { | 28 namespace fileapi { |
28 | 29 |
29 using base::PlatformFile; | 30 using base::PlatformFile; |
30 using base::PlatformFileError; | 31 using base::PlatformFileError; |
31 | 32 |
32 class FileSystemOperationContext; | 33 class FileSystemOperationContext; |
33 class FileSystemPath; | 34 class FileSystemPath; |
34 | 35 |
35 // An instance of this class is created and owned by *MountPointProvider. | 36 // An instance of this class is created and owned by *MountPointProvider. |
36 class LocalFileUtil : public FileSystemFileUtil { | 37 class FILEAPI_EXPORT_PRIVATE LocalFileUtil : public FileSystemFileUtil { |
37 public: | 38 public: |
38 // |underlying_file_util| is owned by the instance. It will be deleted by | 39 // |underlying_file_util| is owned by the instance. It will be deleted by |
39 // the owner instance. For example, it can be instanciated as follows: | 40 // the owner instance. For example, it can be instanciated as follows: |
40 // FileSystemFileUtil* file_util = new LocalFileUtil(new NativeFileUtil()); | 41 // FileSystemFileUtil* file_util = new LocalFileUtil(new NativeFileUtil()); |
41 LocalFileUtil(); | 42 LocalFileUtil(); |
42 virtual ~LocalFileUtil(); | 43 virtual ~LocalFileUtil(); |
43 | 44 |
44 virtual PlatformFileError CreateOrOpen( | 45 virtual PlatformFileError CreateOrOpen( |
45 FileSystemOperationContext* context, | 46 FileSystemOperationContext* context, |
46 const FileSystemPath& path, | 47 const FileSystemPath& path, |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 FileSystemPath GetLocalPath( | 112 FileSystemPath GetLocalPath( |
112 FileSystemOperationContext* context, | 113 FileSystemOperationContext* context, |
113 const FileSystemPath& path); | 114 const FileSystemPath& path); |
114 | 115 |
115 DISALLOW_COPY_AND_ASSIGN(LocalFileUtil); | 116 DISALLOW_COPY_AND_ASSIGN(LocalFileUtil); |
116 }; | 117 }; |
117 | 118 |
118 } // namespace fileapi | 119 } // namespace fileapi |
119 | 120 |
120 #endif // WEBKIT_FILEAPI_LOCAL_FILE_UTIL_H_ | 121 #endif // WEBKIT_FILEAPI_LOCAL_FILE_UTIL_H_ |
OLD | NEW |