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

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

Issue 16413007: Make FileSystemOperation NOT self-destruct (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix browser_tests 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
« no previous file with comments | « webkit/browser/fileapi/async_file_util.h ('k') | webkit/browser/fileapi/async_file_util_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/browser/fileapi/async_file_util_adapter.h
diff --git a/webkit/browser/fileapi/async_file_util_adapter.h b/webkit/browser/fileapi/async_file_util_adapter.h
index 3a850282b31e5e8fe433f02ce9d9a7bba3c44b8f..0c6fcbd85339bd86d508056dfc6a7a3168dfb19a 100644
--- a/webkit/browser/fileapi/async_file_util_adapter.h
+++ b/webkit/browser/fileapi/async_file_util_adapter.h
@@ -20,6 +20,8 @@ class FileSystemFileUtil;
// FileSystemFileUtil and atach it to this adapter, or
// - directly implement AsyncFileUtil.
//
+// This instance (as thus this->sync_file_util_) is guaranteed to be alive
+// as far as FileSystemOperationContext given to each operation is kept alive.
class WEBKIT_STORAGE_EXPORT_PRIVATE AsyncFileUtilAdapter
: public AsyncFileUtil {
public:
@@ -37,64 +39,64 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE AsyncFileUtilAdapter
// AsyncFileUtil overrides.
virtual bool CreateOrOpen(
- FileSystemOperationContext* context,
+ scoped_ptr<FileSystemOperationContext> context,
const FileSystemURL& url,
int file_flags,
const CreateOrOpenCallback& callback) OVERRIDE;
virtual bool EnsureFileExists(
- FileSystemOperationContext* context,
+ scoped_ptr<FileSystemOperationContext> context,
const FileSystemURL& url,
const EnsureFileExistsCallback& callback) OVERRIDE;
virtual bool CreateDirectory(
- FileSystemOperationContext* context,
+ scoped_ptr<FileSystemOperationContext> context,
const FileSystemURL& url,
bool exclusive,
bool recursive,
const StatusCallback& callback) OVERRIDE;
virtual bool GetFileInfo(
- FileSystemOperationContext* context,
+ scoped_ptr<FileSystemOperationContext> context,
const FileSystemURL& url,
const GetFileInfoCallback& callback) OVERRIDE;
virtual bool ReadDirectory(
- FileSystemOperationContext* context,
+ scoped_ptr<FileSystemOperationContext> context,
const FileSystemURL& url,
const ReadDirectoryCallback& callback) OVERRIDE;
virtual bool Touch(
- FileSystemOperationContext* context,
+ scoped_ptr<FileSystemOperationContext> context,
const FileSystemURL& url,
const base::Time& last_access_time,
const base::Time& last_modified_time,
const StatusCallback& callback) OVERRIDE;
virtual bool Truncate(
- FileSystemOperationContext* context,
+ scoped_ptr<FileSystemOperationContext> context,
const FileSystemURL& url,
int64 length,
const StatusCallback& callback) OVERRIDE;
virtual bool CopyFileLocal(
- FileSystemOperationContext* context,
+ scoped_ptr<FileSystemOperationContext> context,
const FileSystemURL& src_url,
const FileSystemURL& dest_url,
const StatusCallback& callback) OVERRIDE;
virtual bool MoveFileLocal(
- FileSystemOperationContext* context,
+ scoped_ptr<FileSystemOperationContext> context,
const FileSystemURL& src_url,
const FileSystemURL& dest_url,
const StatusCallback& callback) OVERRIDE;
virtual bool CopyInForeignFile(
- FileSystemOperationContext* context,
- const base::FilePath& src_file_path,
- const FileSystemURL& dest_url,
- const StatusCallback& callback) OVERRIDE;
+ scoped_ptr<FileSystemOperationContext> context,
+ const base::FilePath& src_file_path,
+ const FileSystemURL& dest_url,
+ const StatusCallback& callback) OVERRIDE;
virtual bool DeleteFile(
- FileSystemOperationContext* context,
+ scoped_ptr<FileSystemOperationContext> context,
const FileSystemURL& url,
const StatusCallback& callback) OVERRIDE;
virtual bool DeleteDirectory(
- FileSystemOperationContext* context,
+ scoped_ptr<FileSystemOperationContext> context,
const FileSystemURL& url,
const StatusCallback& callback) OVERRIDE;
virtual bool CreateSnapshotFile(
- FileSystemOperationContext* context,
+ scoped_ptr<FileSystemOperationContext> context,
const FileSystemURL& url,
const CreateSnapshotFileCallback& callback) OVERRIDE;
« no previous file with comments | « webkit/browser/fileapi/async_file_util.h ('k') | webkit/browser/fileapi/async_file_util_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698