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

Unified Diff: storage/browser/fileapi/file_system_operation.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_operation.h
diff --git a/webkit/browser/fileapi/file_system_operation.h b/storage/browser/fileapi/file_system_operation.h
similarity index 93%
rename from webkit/browser/fileapi/file_system_operation.h
rename to storage/browser/fileapi/file_system_operation.h
index 4261a2bd39a8aae759caaec9db4b60e104c4975d..c1ecabc8b84e27d902833b338689ad071f0d8bf3 100644
--- a/webkit/browser/fileapi/file_system_operation.h
+++ b/storage/browser/fileapi/file_system_operation.h
@@ -11,9 +11,9 @@
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/process/process.h"
-#include "webkit/browser/fileapi/file_system_operation_context.h"
-#include "webkit/browser/webkit_storage_browser_export.h"
-#include "webkit/common/fileapi/directory_entry.h"
+#include "storage/browser/fileapi/file_system_operation_context.h"
+#include "storage/common/storage_export.h"
+#include "storage/common/fileapi/directory_entry.h"
namespace base {
class Time;
@@ -23,13 +23,13 @@ namespace net {
class URLRequest;
}
-namespace webkit_blob {
+namespace storage {
class ShareableFileReference;
}
class GURL;
-namespace fileapi {
+namespace storage {
class FileSystemContext;
class FileSystemURL;
@@ -58,7 +58,7 @@ class FileWriterDelegate;
// it gets called.
class FileSystemOperation {
public:
- WEBKIT_STORAGE_BROWSER_EXPORT static FileSystemOperation* Create(
+ STORAGE_EXPORT static FileSystemOperation* Create(
const FileSystemURL& url,
FileSystemContext* file_system_context,
scoped_ptr<FileSystemOperationContext> operation_context);
@@ -71,15 +71,15 @@ class FileSystemOperation {
// Used for GetMetadata(). |result| is the return code of the operation,
// |file_info| is the obtained file info.
typedef base::Callback<
- void(base::File::Error result,
- const base::File::Info& file_info)> GetMetadataCallback;
+ void(base::File::Error result, const base::File::Info& file_info)>
+ GetMetadataCallback;
// Used for OpenFile(). |on_close_callback| will be called after the file is
// closed in the child process. It can be null, if no operation is needed on
// closing a file.
typedef base::Callback<
- void(base::File file,
- const base::Closure& on_close_callback)> OpenFileCallback;
+ void(base::File file, const base::Closure& on_close_callback)>
+ OpenFileCallback;
// Used for ReadDirectoryCallback.
typedef std::vector<DirectoryEntry> FileEntryList;
@@ -87,10 +87,9 @@ class FileSystemOperation {
// Used for ReadDirectory(). |result| is the return code of the operation,
// |file_list| is the list of files read, and |has_more| is true if some files
// are yet to be read.
- typedef base::Callback<
- void(base::File::Error result,
- const FileEntryList& file_list,
- bool has_more)> ReadDirectoryCallback;
+ typedef base::Callback<void(base::File::Error result,
+ const FileEntryList& file_list,
+ bool has_more)> ReadDirectoryCallback;
// Used for CreateSnapshotFile(). (Please see the comment at
// CreateSnapshotFile() below for how the method is called)
@@ -117,8 +116,8 @@ class FileSystemOperation {
void(base::File::Error result,
const base::File::Info& file_info,
const base::FilePath& platform_path,
- const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref)>
- SnapshotFileCallback;
+ const scoped_refptr<storage::ShareableFileReference>& file_ref)>
+ SnapshotFileCallback;
// Used for progress update callback for Copy().
//
@@ -197,8 +196,7 @@ class FileSystemOperation {
typedef base::Callback<void(CopyProgressType type,
const FileSystemURL& source_url,
const FileSystemURL& destination_url,
- int64 size)>
- CopyProgressCallback;
+ int64 size)> CopyProgressCallback;
// Used for CopyFileLocal() to report progress update.
// |size| is the cumulative copied bytes for the copy.
@@ -220,9 +218,8 @@ class FileSystemOperation {
};
// Used for Write().
- typedef base::Callback<void(base::File::Error result,
- int64 bytes,
- bool complete)> WriteCallback;
+ typedef base::Callback<
+ void(base::File::Error result, int64 bytes, bool complete)> WriteCallback;
// Creates a file at |path|. If |exclusive| is true, an error is raised
// in case a file is already present at the URL.
@@ -299,20 +296,21 @@ class FileSystemOperation {
// Removes a file or directory at |path|. If |recursive| is true, remove
// all files and directories under the directory at |path| recursively.
- virtual void Remove(const FileSystemURL& path, bool recursive,
+ virtual void Remove(const FileSystemURL& path,
+ bool recursive,
const StatusCallback& callback) = 0;
// Writes the data read from |blob_request| using |writer_delegate|.
- virtual void Write(
- const FileSystemURL& url,
- scoped_ptr<FileWriterDelegate> writer_delegate,
- scoped_ptr<net::URLRequest> blob_request,
- const WriteCallback& callback) = 0;
+ virtual void Write(const FileSystemURL& url,
+ scoped_ptr<FileWriterDelegate> writer_delegate,
+ scoped_ptr<net::URLRequest> blob_request,
+ const WriteCallback& callback) = 0;
// Truncates a file at |path| to |length|. If |length| is larger than
// the original file size, the file will be extended, and the extended
// part is filled with null bytes.
- virtual void Truncate(const FileSystemURL& path, int64 length,
+ virtual void Truncate(const FileSystemURL& path,
+ int64 length,
const StatusCallback& callback) = 0;
// Tries to cancel the current operation [we support cancelling write or
@@ -480,6 +478,6 @@ class FileSystemOperation {
};
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_H_
« no previous file with comments | « storage/browser/fileapi/file_system_file_util.cc ('k') | storage/browser/fileapi/file_system_operation_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698