| 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_ISOLATED_FILE_UTIL_H_ | 5 #ifndef WEBKIT_FILEAPI_ISOLATED_FILE_UTIL_H_ |
| 6 #define WEBKIT_FILEAPI_ISOLATED_FILE_UTIL_H_ | 6 #define WEBKIT_FILEAPI_ISOLATED_FILE_UTIL_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "webkit/fileapi/local_file_util.h" | 9 #include "webkit/fileapi/local_file_util.h" |
| 10 #include "webkit/storage/webkit_storage_export.h" | 10 #include "webkit/storage/webkit_storage_export.h" |
| 11 | 11 |
| 12 namespace fileapi { | 12 namespace fileapi { |
| 13 | 13 |
| 14 class FileSystemOperationContext; | 14 class FileSystemOperationContext; |
| 15 | 15 |
| 16 class WEBKIT_STORAGE_EXPORT_PRIVATE IsolatedFileUtil : public LocalFileUtil { | 16 class WEBKIT_STORAGE_EXPORT_PRIVATE IsolatedFileUtil : public LocalFileUtil { |
| 17 public: | 17 public: |
| 18 IsolatedFileUtil(); | 18 IsolatedFileUtil(); |
| 19 virtual ~IsolatedFileUtil() {} | 19 virtual ~IsolatedFileUtil() {} |
| 20 | 20 |
| 21 // LocalFileUtil overrides. | 21 // LocalFileUtil overrides. |
| 22 virtual base::PlatformFileError GetLocalFilePath( | 22 virtual base::PlatformFileError GetLocalFilePath( |
| 23 FileSystemOperationContext* context, | 23 FileSystemOperationContext* context, |
| 24 const FileSystemURL& file_system_url, | 24 const FileSystemURL& file_system_url, |
| 25 FilePath* local_file_path) OVERRIDE; | 25 base::FilePath* local_file_path) OVERRIDE; |
| 26 }; | 26 }; |
| 27 | 27 |
| 28 // Dragged file system is a specialized IsolatedFileUtil where read access to | 28 // Dragged file system is a specialized IsolatedFileUtil where read access to |
| 29 // the virtual root directory (i.e. empty cracked path case) is allowed | 29 // the virtual root directory (i.e. empty cracked path case) is allowed |
| 30 // and single isolated context may be associated with multiple file paths. | 30 // and single isolated context may be associated with multiple file paths. |
| 31 class WEBKIT_STORAGE_EXPORT_PRIVATE DraggedFileUtil : public IsolatedFileUtil { | 31 class WEBKIT_STORAGE_EXPORT_PRIVATE DraggedFileUtil : public IsolatedFileUtil { |
| 32 public: | 32 public: |
| 33 DraggedFileUtil(); | 33 DraggedFileUtil(); |
| 34 virtual ~DraggedFileUtil() {} | 34 virtual ~DraggedFileUtil() {} |
| 35 | 35 |
| 36 // FileSystemFileUtil overrides. | 36 // FileSystemFileUtil overrides. |
| 37 virtual base::PlatformFileError GetFileInfo( | 37 virtual base::PlatformFileError GetFileInfo( |
| 38 FileSystemOperationContext* context, | 38 FileSystemOperationContext* context, |
| 39 const FileSystemURL& url, | 39 const FileSystemURL& url, |
| 40 base::PlatformFileInfo* file_info, | 40 base::PlatformFileInfo* file_info, |
| 41 FilePath* platform_path) OVERRIDE; | 41 base::FilePath* platform_path) OVERRIDE; |
| 42 virtual scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator( | 42 virtual scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator( |
| 43 FileSystemOperationContext* context, | 43 FileSystemOperationContext* context, |
| 44 const FileSystemURL& root_url, | 44 const FileSystemURL& root_url, |
| 45 bool recursive) OVERRIDE; | 45 bool recursive) OVERRIDE; |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 DISALLOW_COPY_AND_ASSIGN(DraggedFileUtil); | 48 DISALLOW_COPY_AND_ASSIGN(DraggedFileUtil); |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 } // namespace fileapi | 51 } // namespace fileapi |
| 52 | 52 |
| 53 #endif // WEBKIT_FILEAPI_ISOLATED_FILE_UTIL_H_ | 53 #endif // WEBKIT_FILEAPI_ISOLATED_FILE_UTIL_H_ |
| OLD | NEW |