Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(416)

Unified Diff: storage/browser/fileapi/file_system_file_util.h

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: storage/browser/fileapi/file_system_file_util.h
diff --git a/webkit/browser/fileapi/file_system_file_util.h b/storage/browser/fileapi/file_system_file_util.h
similarity index 67%
rename from webkit/browser/fileapi/file_system_file_util.h
rename to storage/browser/fileapi/file_system_file_util.h
index 7957bbb29a9976d0c1f1fcaa5a71e23fa2e71848..335c0a57bee0f83fb362fe09a0d00f1c2eabfcc0 100644
--- a/webkit/browser/fileapi/file_system_file_util.h
+++ b/storage/browser/fileapi/file_system_file_util.h
@@ -8,15 +8,15 @@
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/memory/scoped_ptr.h"
-#include "webkit/browser/fileapi/file_system_operation.h"
-#include "webkit/browser/webkit_storage_browser_export.h"
-#include "webkit/common/blob/scoped_file.h"
+#include "storage/browser/fileapi/file_system_operation.h"
+#include "storage/common/storage_export.h"
+#include "storage/common/blob/scoped_file.h"
namespace base {
class Time;
}
-namespace fileapi {
+namespace storage {
class FileSystemOperationContext;
class FileSystemURL;
@@ -26,12 +26,12 @@ class FileSystemURL;
//
// Layering structure of the FileSystemFileUtil was split out.
// See http://crbug.com/128136 if you need it.
-class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemFileUtil {
+class STORAGE_EXPORT FileSystemFileUtil {
public:
typedef FileSystemOperation::CopyOrMoveOption CopyOrMoveOption;
// It will be implemented by each subclass such as FileSystemFileEnumerator.
- class WEBKIT_STORAGE_BROWSER_EXPORT AbstractFileEnumerator {
+ class STORAGE_EXPORT AbstractFileEnumerator {
public:
virtual ~AbstractFileEnumerator() {}
@@ -47,8 +47,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemFileUtil {
virtual bool IsDirectory() = 0;
};
- class WEBKIT_STORAGE_BROWSER_EXPORT EmptyFileEnumerator
- : public AbstractFileEnumerator {
+ class STORAGE_EXPORT EmptyFileEnumerator : public AbstractFileEnumerator {
virtual base::FilePath Next() OVERRIDE;
virtual int64 Size() OVERRIDE;
virtual base::Time LastModifiedTime() OVERRIDE;
@@ -60,33 +59,31 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemFileUtil {
// Creates or opens a file with the given flags.
// See header comments for AsyncFileUtil::CreateOrOpen() for more details.
// This is used only by Pepper/NaCl File API.
- virtual base::File CreateOrOpen(
- FileSystemOperationContext* context,
- const FileSystemURL& url,
- int file_flags) = 0;
+ virtual base::File CreateOrOpen(FileSystemOperationContext* context,
+ const FileSystemURL& url,
+ int file_flags) = 0;
// Ensures that the given |url| exist. This creates a empty new file
// at |url| if the |url| does not exist.
// See header comments for AsyncFileUtil::EnsureFileExists() for more details.
virtual base::File::Error EnsureFileExists(
FileSystemOperationContext* context,
- const FileSystemURL& url, bool* created) = 0;
+ const FileSystemURL& url,
+ bool* created) = 0;
// Creates directory at given url.
// See header comments for AsyncFileUtil::CreateDirectory() for more details.
- virtual base::File::Error CreateDirectory(
- FileSystemOperationContext* context,
- const FileSystemURL& url,
- bool exclusive,
- bool recursive) = 0;
+ virtual base::File::Error CreateDirectory(FileSystemOperationContext* context,
+ const FileSystemURL& url,
+ bool exclusive,
+ bool recursive) = 0;
// Retrieves the information about a file.
// See header comments for AsyncFileUtil::GetFileInfo() for more details.
- virtual base::File::Error GetFileInfo(
- FileSystemOperationContext* context,
- const FileSystemURL& url,
- base::File::Info* file_info,
- base::FilePath* platform_path) = 0;
+ virtual base::File::Error GetFileInfo(FileSystemOperationContext* context,
+ const FileSystemURL& url,
+ base::File::Info* file_info,
+ base::FilePath* platform_path) = 0;
// Returns a pointer to a new instance of AbstractFileEnumerator which is
// implemented for each FileSystemFileUtil subclass. The instance needs to be
@@ -109,18 +106,16 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemFileUtil {
// Updates the file metadata information.
// See header comments for AsyncFileUtil::Touch() for more details.
- virtual base::File::Error Touch(
- FileSystemOperationContext* context,
- const FileSystemURL& url,
- const base::Time& last_access_time,
- const base::Time& last_modified_time) = 0;
+ virtual base::File::Error Touch(FileSystemOperationContext* context,
+ const FileSystemURL& url,
+ const base::Time& last_access_time,
+ const base::Time& last_modified_time) = 0;
// Truncates a file to the given length.
// See header comments for AsyncFileUtil::Truncate() for more details.
- virtual base::File::Error Truncate(
- FileSystemOperationContext* context,
- const FileSystemURL& url,
- int64 length) = 0;
+ virtual base::File::Error Truncate(FileSystemOperationContext* context,
+ const FileSystemURL& url,
+ int64 length) = 0;
// Copies or moves a single file from |src_url| to |dest_url|.
// The filesystem type of |src_url| and |dest_url| MUST be same.
@@ -135,39 +130,36 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemFileUtil {
// - File::FILE_ERROR_FAILED if |dest_url| does not exist and
// its parent path is a file.
//
- virtual base::File::Error CopyOrMoveFile(
- FileSystemOperationContext* context,
- const FileSystemURL& src_url,
- const FileSystemURL& dest_url,
- CopyOrMoveOption option,
- bool copy) = 0;
+ virtual base::File::Error CopyOrMoveFile(FileSystemOperationContext* context,
+ const FileSystemURL& src_url,
+ const FileSystemURL& dest_url,
+ CopyOrMoveOption option,
+ bool copy) = 0;
// Copies in a single file from a different filesystem.
// See header comments for AsyncFileUtil::CopyInForeignFile() for
// more details.
virtual base::File::Error CopyInForeignFile(
- FileSystemOperationContext* context,
- const base::FilePath& src_file_path,
- const FileSystemURL& dest_url) = 0;
+ FileSystemOperationContext* context,
+ const base::FilePath& src_file_path,
+ const FileSystemURL& dest_url) = 0;
// Deletes a single file.
// See header comments for AsyncFileUtil::DeleteFile() for more details.
- virtual base::File::Error DeleteFile(
- FileSystemOperationContext* context,
- const FileSystemURL& url) = 0;
+ virtual base::File::Error DeleteFile(FileSystemOperationContext* context,
+ const FileSystemURL& url) = 0;
// Deletes a single empty directory.
// See header comments for AsyncFileUtil::DeleteDirectory() for more details.
- virtual base::File::Error DeleteDirectory(
- FileSystemOperationContext* context,
- const FileSystemURL& url) = 0;
+ virtual base::File::Error DeleteDirectory(FileSystemOperationContext* context,
+ const FileSystemURL& url) = 0;
// Creates a local snapshot file for a given |url| and returns the
// metadata and platform path of the snapshot file via |callback|.
//
// See header comments for AsyncFileUtil::CreateSnapshotFile() for
// more details.
- virtual webkit_blob::ScopedFile CreateSnapshotFile(
+ virtual storage::ScopedFile CreateSnapshotFile(
FileSystemOperationContext* context,
const FileSystemURL& url,
base::File::Error* error,
@@ -181,6 +173,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemFileUtil {
DISALLOW_COPY_AND_ASSIGN(FileSystemFileUtil);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_
« no previous file with comments | « storage/browser/fileapi/file_system_file_stream_reader.cc ('k') | storage/browser/fileapi/file_system_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698