| 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_BROWSER_FILEAPI_LOCAL_FILE_UTIL_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_LOCAL_FILE_UTIL_H_ |
| 6 #define WEBKIT_BROWSER_FILEAPI_LOCAL_FILE_UTIL_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_LOCAL_FILE_UTIL_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 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 *FileSystemBackend. | 26 // An instance of this class is created and owned by *FileSystemBackend. |
| 27 class WEBKIT_STORAGE_BROWSER_EXPORT LocalFileUtil | 27 class WEBKIT_STORAGE_BROWSER_EXPORT LocalFileUtil |
| 28 : public FileSystemFileUtil { | 28 : public FileSystemFileUtil { |
| 29 public: | 29 public: |
| 30 LocalFileUtil(); | 30 LocalFileUtil(); |
| 31 virtual ~LocalFileUtil(); | 31 virtual ~LocalFileUtil(); |
| 32 | 32 |
| 33 virtual base::PlatformFileError CreateOrOpen( | 33 virtual base::File::Error CreateOrOpen( |
| 34 FileSystemOperationContext* context, | 34 FileSystemOperationContext* context, |
| 35 const FileSystemURL& url, | 35 const FileSystemURL& url, |
| 36 int file_flags, | 36 int file_flags, |
| 37 base::PlatformFile* file_handle, | 37 base::PlatformFile* file_handle, |
| 38 bool* created) OVERRIDE; | 38 bool* created) OVERRIDE; |
| 39 virtual base::PlatformFileError Close( | 39 virtual base::File::Error Close( |
| 40 FileSystemOperationContext* context, | 40 FileSystemOperationContext* context, |
| 41 base::PlatformFile file) OVERRIDE; | 41 base::PlatformFile file) OVERRIDE; |
| 42 virtual base::PlatformFileError EnsureFileExists( | 42 virtual base::File::Error EnsureFileExists( |
| 43 FileSystemOperationContext* context, | 43 FileSystemOperationContext* context, |
| 44 const FileSystemURL& url, bool* created) OVERRIDE; | 44 const FileSystemURL& url, bool* created) OVERRIDE; |
| 45 virtual base::PlatformFileError CreateDirectory( | 45 virtual base::File::Error CreateDirectory( |
| 46 FileSystemOperationContext* context, | 46 FileSystemOperationContext* context, |
| 47 const FileSystemURL& url, | 47 const FileSystemURL& url, |
| 48 bool exclusive, | 48 bool exclusive, |
| 49 bool recursive) OVERRIDE; | 49 bool recursive) OVERRIDE; |
| 50 virtual base::PlatformFileError GetFileInfo( | 50 virtual base::File::Error GetFileInfo( |
| 51 FileSystemOperationContext* context, | 51 FileSystemOperationContext* context, |
| 52 const FileSystemURL& url, | 52 const FileSystemURL& url, |
| 53 base::PlatformFileInfo* file_info, | 53 base::File::Info* file_info, |
| 54 base::FilePath* platform_file) OVERRIDE; | 54 base::FilePath* platform_file) OVERRIDE; |
| 55 virtual scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator( | 55 virtual scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator( |
| 56 FileSystemOperationContext* context, | 56 FileSystemOperationContext* context, |
| 57 const FileSystemURL& root_url) OVERRIDE; | 57 const FileSystemURL& root_url) OVERRIDE; |
| 58 virtual base::PlatformFileError GetLocalFilePath( | 58 virtual base::File::Error GetLocalFilePath( |
| 59 FileSystemOperationContext* context, | 59 FileSystemOperationContext* context, |
| 60 const FileSystemURL& file_system_url, | 60 const FileSystemURL& file_system_url, |
| 61 base::FilePath* local_file_path) OVERRIDE; | 61 base::FilePath* local_file_path) OVERRIDE; |
| 62 virtual base::PlatformFileError Touch( | 62 virtual base::File::Error 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::File::Error 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::File::Error 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 CopyOrMoveOption option, | 75 CopyOrMoveOption option, |
| 76 bool copy) OVERRIDE; | 76 bool copy) OVERRIDE; |
| 77 virtual base::PlatformFileError CopyInForeignFile( | 77 virtual base::File::Error CopyInForeignFile( |
| 78 FileSystemOperationContext* context, | 78 FileSystemOperationContext* context, |
| 79 const base::FilePath& src_file_path, | 79 const base::FilePath& src_file_path, |
| 80 const FileSystemURL& dest_url) OVERRIDE; | 80 const FileSystemURL& dest_url) OVERRIDE; |
| 81 virtual base::PlatformFileError DeleteFile( | 81 virtual base::File::Error DeleteFile( |
| 82 FileSystemOperationContext* context, | 82 FileSystemOperationContext* context, |
| 83 const FileSystemURL& url) OVERRIDE; | 83 const FileSystemURL& url) OVERRIDE; |
| 84 virtual base::PlatformFileError DeleteDirectory( | 84 virtual base::File::Error DeleteDirectory( |
| 85 FileSystemOperationContext* context, | 85 FileSystemOperationContext* context, |
| 86 const FileSystemURL& url) OVERRIDE; | 86 const FileSystemURL& url) OVERRIDE; |
| 87 virtual webkit_blob::ScopedFile CreateSnapshotFile( | 87 virtual webkit_blob::ScopedFile CreateSnapshotFile( |
| 88 FileSystemOperationContext* context, | 88 FileSystemOperationContext* context, |
| 89 const FileSystemURL& url, | 89 const FileSystemURL& url, |
| 90 base::PlatformFileError* error, | 90 base::File::Error* error, |
| 91 base::PlatformFileInfo* file_info, | 91 base::File::Info* file_info, |
| 92 base::FilePath* platform_path) OVERRIDE; | 92 base::FilePath* platform_path) OVERRIDE; |
| 93 | 93 |
| 94 private: | 94 private: |
| 95 DISALLOW_COPY_AND_ASSIGN(LocalFileUtil); | 95 DISALLOW_COPY_AND_ASSIGN(LocalFileUtil); |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 } // namespace fileapi | 98 } // namespace fileapi |
| 99 | 99 |
| 100 #endif // WEBKIT_BROWSER_FILEAPI_LOCAL_FILE_UTIL_H_ | 100 #endif // WEBKIT_BROWSER_FILEAPI_LOCAL_FILE_UTIL_H_ |
| OLD | NEW |