| Index: webkit/fileapi/isolated_file_util.h
|
| diff --git a/webkit/fileapi/isolated_file_util.h b/webkit/fileapi/isolated_file_util.h
|
| index 8d40a936a654d567cbb0a4aa47eb85687422b7d6..8c67ebd70b5d89bff36caf453aa53f31948611d1 100644
|
| --- a/webkit/fileapi/isolated_file_util.h
|
| +++ b/webkit/fileapi/isolated_file_util.h
|
| @@ -5,44 +5,34 @@
|
| #ifndef WEBKIT_FILEAPI_ISOLATED_FILE_UTIL_H_
|
| #define WEBKIT_FILEAPI_ISOLATED_FILE_UTIL_H_
|
|
|
| -#include "base/file_path.h"
|
| -#include "base/file_util_proxy.h"
|
| -#include "base/platform_file.h"
|
| #include "webkit/fileapi/fileapi_export.h"
|
| -#include "webkit/fileapi/file_system_file_util.h"
|
| -
|
| -namespace base {
|
| -class Time;
|
| -}
|
| +#include "webkit/fileapi/local_file_util.h"
|
|
|
| namespace fileapi {
|
|
|
| class FileSystemOperationContext;
|
| -class IsolatedContext;
|
|
|
| -class FILEAPI_EXPORT_PRIVATE IsolatedFileUtil : public FileSystemFileUtil {
|
| +class FILEAPI_EXPORT_PRIVATE IsolatedFileUtil : public LocalFileUtil {
|
| public:
|
| IsolatedFileUtil();
|
| virtual ~IsolatedFileUtil() {}
|
|
|
| - // FileSystemFileUtil overrides.
|
| - virtual base::PlatformFileError CreateOrOpen(
|
| - FileSystemOperationContext* context,
|
| - const FileSystemURL& url,
|
| - int file_flags,
|
| - base::PlatformFile* file_handle,
|
| - bool* created) OVERRIDE;
|
| - virtual base::PlatformFileError Close(
|
| - FileSystemOperationContext* context,
|
| - base::PlatformFile file) OVERRIDE;
|
| - virtual base::PlatformFileError EnsureFileExists(
|
| - FileSystemOperationContext* context,
|
| - const FileSystemURL& url, bool* created) OVERRIDE;
|
| - virtual base::PlatformFileError CreateDirectory(
|
| + // LocalFileUtil overrides.
|
| + virtual PlatformFileError GetLocalFilePath(
|
| FileSystemOperationContext* context,
|
| - const FileSystemURL& url,
|
| - bool exclusive,
|
| - bool recursive) OVERRIDE;
|
| + const FileSystemURL& file_system_url,
|
| + FilePath* local_file_path) OVERRIDE;
|
| +};
|
| +
|
| +// Dragged file system is a specialized IsolatedFileUtil where read access to
|
| +// the virtual root directory (i.e. empty cracked path case) is allowed
|
| +// and single isolated context may be associated with multiple file paths.
|
| +class FILEAPI_EXPORT_PRIVATE DraggedFileUtil : public IsolatedFileUtil {
|
| + public:
|
| + DraggedFileUtil();
|
| + virtual ~DraggedFileUtil() {}
|
| +
|
| + // FileSystemFileUtil overrides.
|
| virtual base::PlatformFileError GetFileInfo(
|
| FileSystemOperationContext* context,
|
| const FileSystemURL& url,
|
| @@ -52,19 +42,6 @@ class FILEAPI_EXPORT_PRIVATE IsolatedFileUtil : public FileSystemFileUtil {
|
| FileSystemOperationContext* context,
|
| const FileSystemURL& root_url,
|
| bool recursive) OVERRIDE;
|
| - virtual PlatformFileError GetLocalFilePath(
|
| - FileSystemOperationContext* context,
|
| - const FileSystemURL& file_system_url,
|
| - FilePath* local_file_path) OVERRIDE;
|
| - virtual base::PlatformFileError Touch(
|
| - FileSystemOperationContext* context,
|
| - const FileSystemURL& url,
|
| - const base::Time& last_access_time,
|
| - const base::Time& last_modified_time) OVERRIDE;
|
| - virtual base::PlatformFileError Truncate(
|
| - FileSystemOperationContext* context,
|
| - const FileSystemURL& url,
|
| - int64 length) OVERRIDE;
|
| virtual bool PathExists(
|
| FileSystemOperationContext* context,
|
| const FileSystemURL& url) OVERRIDE;
|
| @@ -74,33 +51,12 @@ class FILEAPI_EXPORT_PRIVATE IsolatedFileUtil : public FileSystemFileUtil {
|
| virtual bool IsDirectoryEmpty(
|
| FileSystemOperationContext* context,
|
| const FileSystemURL& url) OVERRIDE;
|
| - virtual base::PlatformFileError CopyOrMoveFile(
|
| - FileSystemOperationContext* context,
|
| - const FileSystemURL& src_url,
|
| - const FileSystemURL& dest_url,
|
| - bool copy) OVERRIDE;
|
| - virtual base::PlatformFileError CopyInForeignFile(
|
| - FileSystemOperationContext* context,
|
| - const FilePath& src_file_path,
|
| - const FileSystemURL& dest_url) OVERRIDE;
|
| - virtual base::PlatformFileError DeleteFile(
|
| - FileSystemOperationContext* context,
|
| - const FileSystemURL& url) OVERRIDE;
|
| - virtual base::PlatformFileError DeleteSingleDirectory(
|
| - FileSystemOperationContext* context,
|
| - const FileSystemURL& url) OVERRIDE;
|
| - virtual scoped_refptr<webkit_blob::ShareableFileReference>
|
| - CreateSnapshotFile(FileSystemOperationContext* context,
|
| - const FileSystemURL& url,
|
| - base::PlatformFileError* result,
|
| - base::PlatformFileInfo* file_info,
|
| - FilePath* platform_path) OVERRIDE;
|
|
|
| private:
|
| // Returns false if the given |url| is not a valid path.
|
| bool GetPlatformPath(const FileSystemURL& url,
|
| FilePath* platform_path) const;
|
| - DISALLOW_COPY_AND_ASSIGN(IsolatedFileUtil);
|
| + DISALLOW_COPY_AND_ASSIGN(DraggedFileUtil);
|
| };
|
|
|
| } // namespace fileapi
|
|
|