| Index: storage/browser/fileapi/file_system_operation_impl.h
|
| diff --git a/webkit/browser/fileapi/file_system_operation_impl.h b/storage/browser/fileapi/file_system_operation_impl.h
|
| similarity index 84%
|
| rename from webkit/browser/fileapi/file_system_operation_impl.h
|
| rename to storage/browser/fileapi/file_system_operation_impl.h
|
| index 5d93cb3b8b29e42304980dba592290d37c1ae2b5..00f40fb7581dfa9cd4c7ed8a6fa28b825da7e12b 100644
|
| --- a/webkit/browser/fileapi/file_system_operation_impl.h
|
| +++ b/storage/browser/fileapi/file_system_operation_impl.h
|
| @@ -10,22 +10,22 @@
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/memory/weak_ptr.h"
|
| -#include "webkit/browser/fileapi/file_system_operation.h"
|
| -#include "webkit/browser/fileapi/file_system_operation_context.h"
|
| -#include "webkit/browser/fileapi/file_system_url.h"
|
| -#include "webkit/browser/fileapi/file_writer_delegate.h"
|
| -#include "webkit/browser/webkit_storage_browser_export.h"
|
| -#include "webkit/common/blob/scoped_file.h"
|
| -#include "webkit/common/quota/quota_types.h"
|
| +#include "storage/browser/fileapi/file_system_operation.h"
|
| +#include "storage/browser/fileapi/file_system_operation_context.h"
|
| +#include "storage/browser/fileapi/file_system_url.h"
|
| +#include "storage/browser/fileapi/file_writer_delegate.h"
|
| +#include "storage/common/storage_export.h"
|
| +#include "storage/common/blob/scoped_file.h"
|
| +#include "storage/common/quota/quota_types.h"
|
|
|
| -namespace fileapi {
|
| +namespace storage {
|
|
|
| class AsyncFileUtil;
|
| class FileSystemContext;
|
| class RecursiveOperationDelegate;
|
|
|
| // The default implementation of FileSystemOperation for file systems.
|
| -class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemOperationImpl
|
| +class STORAGE_EXPORT FileSystemOperationImpl
|
| : public NON_EXPORTED_BASE(FileSystemOperation) {
|
| public:
|
| virtual ~FileSystemOperationImpl();
|
| @@ -55,13 +55,15 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemOperationImpl
|
| const GetMetadataCallback& callback) OVERRIDE;
|
| virtual void ReadDirectory(const FileSystemURL& url,
|
| const ReadDirectoryCallback& callback) OVERRIDE;
|
| - virtual void Remove(const FileSystemURL& url, bool recursive,
|
| + virtual void Remove(const FileSystemURL& url,
|
| + bool recursive,
|
| const StatusCallback& callback) OVERRIDE;
|
| virtual void Write(const FileSystemURL& url,
|
| scoped_ptr<FileWriterDelegate> writer_delegate,
|
| scoped_ptr<net::URLRequest> blob_request,
|
| const WriteCallback& callback) OVERRIDE;
|
| - virtual void Truncate(const FileSystemURL& url, int64 length,
|
| + virtual void Truncate(const FileSystemURL& url,
|
| + int64 length,
|
| const StatusCallback& callback) OVERRIDE;
|
| virtual void TouchFile(const FileSystemURL& url,
|
| const base::Time& last_access_time,
|
| @@ -108,26 +110,26 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemOperationImpl
|
|
|
| // Queries the quota and usage and then runs the given |task|.
|
| // If an error occurs during the quota query it runs |error_callback| instead.
|
| - void GetUsageAndQuotaThenRunTask(
|
| - const FileSystemURL& url,
|
| - const base::Closure& task,
|
| - const base::Closure& error_callback);
|
| + void GetUsageAndQuotaThenRunTask(const FileSystemURL& url,
|
| + const base::Closure& task,
|
| + const base::Closure& error_callback);
|
|
|
| // Called after the quota info is obtained from the quota manager
|
| // (which is triggered by GetUsageAndQuotaThenRunTask).
|
| // Sets the quota info in the operation_context_ and then runs the given
|
| // |task| if the returned quota status is successful, otherwise runs
|
| // |error_callback|.
|
| - void DidGetUsageAndQuotaAndRunTask(
|
| - const base::Closure& task,
|
| - const base::Closure& error_callback,
|
| - quota::QuotaStatusCode status,
|
| - int64 usage, int64 quota);
|
| + void DidGetUsageAndQuotaAndRunTask(const base::Closure& task,
|
| + const base::Closure& error_callback,
|
| + quota::QuotaStatusCode status,
|
| + int64 usage,
|
| + int64 quota);
|
|
|
| // The 'body' methods that perform the actual work (i.e. posting the
|
| // file task on proxy_) after the quota check.
|
| void DoCreateFile(const FileSystemURL& url,
|
| - const StatusCallback& callback, bool exclusive);
|
| + const StatusCallback& callback,
|
| + bool exclusive);
|
| void DoCreateDirectory(const FileSystemURL& url,
|
| const StatusCallback& callback,
|
| bool exclusive,
|
| @@ -145,9 +147,11 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemOperationImpl
|
| const FileSystemURL& dest,
|
| const StatusCallback& callback);
|
| void DoTruncate(const FileSystemURL& url,
|
| - const StatusCallback& callback, int64 length);
|
| + const StatusCallback& callback,
|
| + int64 length);
|
| void DoOpenFile(const FileSystemURL& url,
|
| - const OpenFileCallback& callback, int file_flags);
|
| + const OpenFileCallback& callback,
|
| + int file_flags);
|
|
|
| // Callback for CreateFile for |exclusive|=true cases.
|
| void DidEnsureFileExistsExclusive(const StatusCallback& callback,
|
| @@ -159,8 +163,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemOperationImpl
|
| base::File::Error rv,
|
| bool created);
|
|
|
| - void DidFinishOperation(const StatusCallback& callback,
|
| - base::File::Error rv);
|
| + void DidFinishOperation(const StatusCallback& callback, base::File::Error rv);
|
| void DidDirectoryExists(const StatusCallback& callback,
|
| base::File::Error rv,
|
| const base::File::Info& file_info);
|
| @@ -201,6 +204,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemOperationImpl
|
| DISALLOW_COPY_AND_ASSIGN(FileSystemOperationImpl);
|
| };
|
|
|
| -} // namespace fileapi
|
| +} // namespace storage
|
|
|
| #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_IMPL_H_
|
|
|