| Index: webkit/fileapi/overlay_file_util.h
|
| diff --git a/webkit/fileapi/local_file_system_file_util.h b/webkit/fileapi/overlay_file_util.h
|
| similarity index 66%
|
| rename from webkit/fileapi/local_file_system_file_util.h
|
| rename to webkit/fileapi/overlay_file_util.h
|
| index 314895e4e7c3a1df757b4a4ed2c223cf0bd0c855..172cadf59ec3cbf32ffc0947c91a1c8b7797b6b2 100644
|
| --- a/webkit/fileapi/local_file_system_file_util.h
|
| +++ b/webkit/fileapi/overlay_file_util.h
|
| @@ -2,45 +2,28 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef WEBKIT_FILEAPI_LOCAL_FILE_SYSTEM_FILE_UTIL_H_
|
| -#define WEBKIT_FILEAPI_LOCAL_FILE_SYSTEM_FILE_UTIL_H_
|
| +#ifndef WEBKIT_FILEAPI_OVERLAY_FILE_UTIL_H_
|
| +#define WEBKIT_FILEAPI_OVERLAY_FILE_UTIL_H_
|
|
|
| -#include <vector>
|
| -
|
| -#include "base/callback.h"
|
| #include "base/file_path.h"
|
| -#include "base/file_util.h"
|
| #include "base/file_util_proxy.h"
|
| -#include "base/logging.h"
|
| -#include "base/memory/scoped_ptr.h"
|
| #include "base/platform_file.h"
|
| -#include "webkit/fileapi/file_system_file_util.h"
|
| -#include "webkit/fileapi/file_system_types.h"
|
| +#include "webkit/fileapi/fileapi_file_util.h"
|
|
|
| namespace base {
|
| -struct PlatformFileInfo;
|
| -class MessageLoopProxy;
|
| class Time;
|
| }
|
|
|
| -class GURL;
|
| -
|
| namespace fileapi {
|
|
|
| using base::PlatformFile;
|
| using base::PlatformFileError;
|
| -
|
| class FileSystemOperationContext;
|
|
|
| -// An instance of this class is created and owned by *MountPointProvider.
|
| -class LocalFileSystemFileUtil : public FileSystemFileUtil {
|
| +class OverlayFileUtil : public FileUtil {
|
| public:
|
| - // |underlying_file_util| is owned by the instance. It will be deleted by
|
| - // the owner instance. For example, it can be instanciated as follows:
|
| - // FileSystemFileUtil* file_system_file_util =
|
| - // new LocalFileSystemFileUtil(new FileSystemFileUtil());
|
| - explicit LocalFileSystemFileUtil(FileSystemFileUtil* underlying_file_util);
|
| - virtual ~LocalFileSystemFileUtil();
|
| + explicit OverlayFileUtil(FileUtil* underlying_file_util);
|
| + virtual ~OverlayFileUtil();
|
|
|
| virtual PlatformFileError CreateOrOpen(
|
| FileSystemOperationContext* context,
|
| @@ -49,20 +32,24 @@ class LocalFileSystemFileUtil : public FileSystemFileUtil {
|
| PlatformFile* file_handle,
|
| bool* created);
|
|
|
| + virtual PlatformFileError Close(
|
| + FileSystemOperationContext* context,
|
| + PlatformFile);
|
| +
|
| virtual PlatformFileError EnsureFileExists(
|
| FileSystemOperationContext* context,
|
| const FilePath& file_path, bool* created);
|
|
|
| virtual PlatformFileError GetLocalFilePath(
|
| FileSystemOperationContext* context,
|
| - const FilePath& virtual_file,
|
| + const FilePath& virtual_path,
|
| FilePath* local_path);
|
|
|
| virtual PlatformFileError GetFileInfo(
|
| FileSystemOperationContext* context,
|
| - const FilePath& file,
|
| + const FilePath& file_,
|
| base::PlatformFileInfo* file_info,
|
| - FilePath* platform_file);
|
| + FilePath* platform_path);
|
|
|
| virtual PlatformFileError ReadDirectory(
|
| FileSystemOperationContext* context,
|
| @@ -121,20 +108,13 @@ class LocalFileSystemFileUtil : public FileSystemFileUtil {
|
| FileSystemOperationContext* context,
|
| const FilePath& root_path);
|
|
|
| - private:
|
| - // Given the filesystem's root URL and a virtual path, produces a real, full
|
| - // local path.
|
| - FilePath GetLocalPath(
|
| - FileSystemOperationContext* context,
|
| - const GURL& origin_url,
|
| - FileSystemType type,
|
| - const FilePath& virtual_path);
|
| + protected:
|
| + scoped_ptr<FileUtil> underlying_file_util_;
|
|
|
| - scoped_ptr<FileSystemFileUtil> underlying_file_util_;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(LocalFileSystemFileUtil);
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(OverlayFileUtil);
|
| };
|
|
|
| } // namespace fileapi
|
|
|
| -#endif // WEBKIT_FILEAPI_LOCAL_FILE_SYSTEM_FILE_UTIL_H_
|
| +#endif // WEBKIT_FILEAPI_OVERLAY_FILE_UTIL_H_
|
|
|