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

Unified Diff: webkit/browser/fileapi/syncable/syncable_file_system_operation.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
Index: webkit/browser/fileapi/syncable/syncable_file_system_operation.h
diff --git a/webkit/browser/fileapi/syncable/syncable_file_system_operation.h b/webkit/browser/fileapi/syncable/syncable_file_system_operation.h
index f8083479687f02ee3024609ad4ee75f386d35287..90b68b2d088fc6e3cc99b2135680a72452e05ff6 100644
--- a/webkit/browser/fileapi/syncable/syncable_file_system_operation.h
+++ b/webkit/browser/fileapi/syncable/syncable_file_system_operation.h
@@ -28,6 +28,7 @@ class SyncableFileOperationRunner;
// A wrapper class of LocalFileSystemOperation for syncable file system.
class WEBKIT_STORAGE_EXPORT SyncableFileSystemOperation
: public fileapi::LocalFileSystemOperation,
+ public base::SupportsWeakPtr<SyncableFileSystemOperation>,
public base::NonThreadSafe {
public:
virtual ~SyncableFileSystemOperation();
@@ -81,6 +82,8 @@ class WEBKIT_STORAGE_EXPORT SyncableFileSystemOperation
const fileapi::FileSystemURL& dest_url,
const StatusCallback& callback) OVERRIDE;
+ using base::SupportsWeakPtr<SyncableFileSystemOperation>::AsWeakPtr;
+
private:
typedef SyncableFileSystemOperation self;
class QueueableTask;
@@ -101,13 +104,11 @@ class WEBKIT_STORAGE_EXPORT SyncableFileSystemOperation
bool complete);
void OnCancelled();
- void AbortOperation(const StatusCallback& callback,
- base::PlatformFileError error);
const fileapi::FileSystemURL url_;
base::WeakPtr<SyncableFileOperationRunner> operation_runner_;
- fileapi::LocalFileSystemOperation* inflight_operation_;
+ scoped_ptr<fileapi::LocalFileSystemOperation> inflight_operation_;
std::vector<fileapi::FileSystemURL> target_paths_;
StatusCallback completion_callback_;

Powered by Google App Engine
This is Rietveld 408576698