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

Unified Diff: webkit/browser/fileapi/async_file_util.h

Issue 16413007: Make FileSystemOperation NOT self-destruct (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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: webkit/browser/fileapi/async_file_util.h
diff --git a/webkit/browser/fileapi/async_file_util.h b/webkit/browser/fileapi/async_file_util.h
index 0b61194b20c6d4b28ad1528386c3a1e038ad35ff..7bdb2d7445f6c2fe2793450b135a511d254fb6c7 100644
--- a/webkit/browser/fileapi/async_file_util.h
+++ b/webkit/browser/fileapi/async_file_util.h
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/callback_forward.h"
#include "base/files/file_util_proxy.h"
+#include "base/memory/scoped_ptr.h"
#include "base/platform_file.h"
#include "webkit/common/fileapi/directory_entry.h"
#include "webkit/storage/webkit_storage_export.h"
@@ -75,7 +76,7 @@ class WEBKIT_STORAGE_EXPORT AsyncFileUtil {
// This returns false if it fails to post an async task.
//
virtual bool CreateOrOpen(
- FileSystemOperationContext* context,
+ scoped_ptr<FileSystemOperationContext> context,
const FileSystemURL& url,
int file_flags,
const CreateOrOpenCallback& callback) = 0;
@@ -95,7 +96,7 @@ class WEBKIT_STORAGE_EXPORT AsyncFileUtil {
// and there was an error while creating a new file.
//
virtual bool EnsureFileExists(
- FileSystemOperationContext* context,
+ scoped_ptr<FileSystemOperationContext> context,
const FileSystemURL& url,
const EnsureFileExistsCallback& callback) = 0;
@@ -115,7 +116,7 @@ class WEBKIT_STORAGE_EXPORT AsyncFileUtil {
// - Other error code if it failed to create a directory.
//
virtual bool CreateDirectory(
- FileSystemOperationContext* context,
+ scoped_ptr<FileSystemOperationContext> context,
const FileSystemURL& url,
bool exclusive,
bool recursive,
@@ -132,7 +133,7 @@ class WEBKIT_STORAGE_EXPORT AsyncFileUtil {
// - Other error code if there was an error while retrieving the file info.
//
virtual bool GetFileInfo(
- FileSystemOperationContext* context,
+ scoped_ptr<FileSystemOperationContext> context,
const FileSystemURL& url,
const GetFileInfoCallback& callback) = 0;
@@ -157,7 +158,7 @@ class WEBKIT_STORAGE_EXPORT AsyncFileUtil {
// is a file (not a directory).
//
virtual bool ReadDirectory(
- FileSystemOperationContext* context,
+ scoped_ptr<FileSystemOperationContext> context,
const FileSystemURL& url,
const ReadDirectoryCallback& callback) = 0;
@@ -170,7 +171,7 @@ class WEBKIT_STORAGE_EXPORT AsyncFileUtil {
//
// This returns false if it fails to post an async task.
virtual bool Touch(
- FileSystemOperationContext* context,
+ scoped_ptr<FileSystemOperationContext> context,
const FileSystemURL& url,
const base::Time& last_access_time,
const base::Time& last_modified_time,
@@ -188,7 +189,7 @@ class WEBKIT_STORAGE_EXPORT AsyncFileUtil {
// - PLATFORM_FILE_ERROR_NOT_FOUND if the file doesn't exist.
//
virtual bool Truncate(
- FileSystemOperationContext* context,
+ scoped_ptr<FileSystemOperationContext> context,
const FileSystemURL& url,
int64 length,
const StatusCallback& callback) = 0;
@@ -211,7 +212,7 @@ class WEBKIT_STORAGE_EXPORT AsyncFileUtil {
// its parent path is a file.
//
virtual bool CopyFileLocal(
- FileSystemOperationContext* context,
+ scoped_ptr<FileSystemOperationContext> context,
const FileSystemURL& src_url,
const FileSystemURL& dest_url,
const StatusCallback& callback) = 0;
@@ -234,7 +235,7 @@ class WEBKIT_STORAGE_EXPORT AsyncFileUtil {
// its parent path is a file.
//
virtual bool MoveFileLocal(
- FileSystemOperationContext* context,
+ scoped_ptr<FileSystemOperationContext> context,
const FileSystemURL& src_url,
const FileSystemURL& dest_url,
const StatusCallback& callback) = 0;
@@ -255,7 +256,7 @@ class WEBKIT_STORAGE_EXPORT AsyncFileUtil {
// its parent path is a file.
//
virtual bool CopyInForeignFile(
- FileSystemOperationContext* context,
+ scoped_ptr<FileSystemOperationContext> context,
const base::FilePath& src_file_path,
const FileSystemURL& dest_url,
const StatusCallback& callback) = 0;
@@ -271,7 +272,7 @@ class WEBKIT_STORAGE_EXPORT AsyncFileUtil {
// - PLATFORM_FILE_ERROR_NOT_A_FILE if |url| is not a file.
//
virtual bool DeleteFile(
- FileSystemOperationContext* context,
+ scoped_ptr<FileSystemOperationContext> context,
const FileSystemURL& url,
const StatusCallback& callback) = 0;
@@ -287,7 +288,7 @@ class WEBKIT_STORAGE_EXPORT AsyncFileUtil {
// - PLATFORM_FILE_ERROR_NOT_EMPTY if |url| is not empty.
//
virtual bool DeleteDirectory(
- FileSystemOperationContext* context,
+ scoped_ptr<FileSystemOperationContext> context,
const FileSystemURL& url,
const StatusCallback& callback) = 0;
@@ -325,7 +326,7 @@ class WEBKIT_STORAGE_EXPORT AsyncFileUtil {
// dependent) in error cases, and the caller should always
// check the return code.
virtual bool CreateSnapshotFile(
- FileSystemOperationContext* context,
+ scoped_ptr<FileSystemOperationContext> context,
const FileSystemURL& url,
const CreateSnapshotFileCallback& callback) = 0;

Powered by Google App Engine
This is Rietveld 408576698