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

Unified Diff: webkit/browser/fileapi/file_writer_delegate.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/file_writer_delegate.h
diff --git a/webkit/browser/fileapi/file_writer_delegate.h b/webkit/browser/fileapi/file_writer_delegate.h
index 6fd8fab013eb44babeb5efb145e40544ab6939be..8e4b02804829101e08db8094f02707bd6e6737ba 100644
--- a/webkit/browser/fileapi/file_writer_delegate.h
+++ b/webkit/browser/fileapi/file_writer_delegate.h
@@ -13,17 +13,15 @@
#include "net/base/file_stream.h"
#include "net/base/io_buffer.h"
#include "net/url_request/url_request.h"
-#include "webkit/browser/fileapi/file_system_operation.h"
#include "webkit/storage/webkit_storage_export.h"
namespace fileapi {
class FileStreamWriter;
-class FileSystemOperationContext;
-class FileSystemQuotaUtil;
class WEBKIT_STORAGE_EXPORT_PRIVATE FileWriterDelegate
- : public net::URLRequest::Delegate {
+ : public net::URLRequest::Delegate,
+ public base::SupportsWeakPtr<FileWriterDelegate> {
public:
enum WriteProgressStatus {
SUCCESS_IO_PENDING,
@@ -44,11 +42,10 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE FileWriterDelegate
void Start(scoped_ptr<net::URLRequest> request);
- // Cancels the current write operation. Returns true if it is ok to
- // delete this instance immediately. Otherwise this will call
- // |write_operation|->DidWrite() with complete=true to let the operation
- // perform the final cleanup.
- bool Cancel();
+ // Cancels the current write operation. This will synchronously or
+ // asynchronously call the given write callback (which may result in
+ // deleting this).
+ void Cancel();
virtual void OnReceivedRedirect(net::URLRequest* request,
const GURL& new_url,
@@ -85,7 +82,6 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE FileWriterDelegate
WriteProgressStatus progress_status,
int flush_error);
- FileSystemQuotaUtil* quota_util() const;
WriteProgressStatus GetCompletionStatusOnError() const;
DelegateWriteCallback write_callback_;
@@ -98,7 +94,6 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE FileWriterDelegate
scoped_refptr<net::IOBufferWithSize> io_buffer_;
scoped_refptr<net::DrainableIOBuffer> cursor_;
scoped_ptr<net::URLRequest> request_;
- base::WeakPtrFactory<FileWriterDelegate> weak_factory_;
};
} // namespace fileapi
« no previous file with comments | « webkit/browser/fileapi/file_system_operation_runner.cc ('k') | webkit/browser/fileapi/file_writer_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698