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

Unified Diff: webkit/fileapi/file_system_operation.h

Issue 8424007: Bind: Merge FileUtilProxy and FileSystemFileUtilProxy: Delete/Touch/Truncate/Copy/Move (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased2 Created 9 years, 1 month 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/fileapi/file_system_file_util_proxy.cc ('k') | webkit/fileapi/file_system_operation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/file_system_operation.h
diff --git a/webkit/fileapi/file_system_operation.h b/webkit/fileapi/file_system_operation.h
index ccfb033c8918164cb5f25ea498d6b37fe9f834df..fdf26fc9176105dff7065235c313d3fe0adf2a41 100644
--- a/webkit/fileapi/file_system_operation.h
+++ b/webkit/fileapi/file_system_operation.h
@@ -13,7 +13,6 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_callback_factory.h"
#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
#include "base/message_loop_proxy.h"
#include "base/platform_file.h"
#include "base/process.h"
@@ -45,8 +44,8 @@ class FileSystemQuotaUtil;
// Only one method(CreateFile, CreateDirectory, Copy, Move, DirectoryExists,
// GetMetadata, ReadDirectory and Remove) may be called during the lifetime of
// this object and it should be called no more than once.
-// This class is self-destructed and an instance automatically gets deleted
-// when its operation is finished.
+// This class is self-destructed, or get deleted via base::Owned() fater the
+// operation finishes and completion callback is called.
class FileSystemOperation {
public:
// |dispatcher| will be owned by this class.
@@ -120,9 +119,11 @@ class FileSystemOperation {
const GURL& origin_url,
const quota::QuotaManager::GetUsageAndQuotaCallback& callback);
- void DelayedCreateFileForQuota(quota::QuotaStatusCode status,
+ void DelayedCreateFileForQuota(bool exclusive,
+ quota::QuotaStatusCode status,
int64 usage, int64 quota);
- void DelayedCreateDirectoryForQuota(quota::QuotaStatusCode status,
+ void DelayedCreateDirectoryForQuota(bool exclusive, bool recursive,
+ quota::QuotaStatusCode status,
int64 usage, int64 quota);
void DelayedCopyForQuota(quota::QuotaStatusCode status,
int64 usage, int64 quota);
@@ -130,9 +131,11 @@ class FileSystemOperation {
int64 usage, int64 quota);
void DelayedWriteForQuota(quota::QuotaStatusCode status,
int64 usage, int64 quota);
- void DelayedTruncateForQuota(quota::QuotaStatusCode status,
+ void DelayedTruncateForQuota(int64 length,
+ quota::QuotaStatusCode status,
int64 usage, int64 quota);
- void DelayedOpenFileForQuota(quota::QuotaStatusCode status,
+ void DelayedOpenFileForQuota(int file_flags,
+ quota::QuotaStatusCode status,
int64 usage, int64 quota);
// A callback used for OpenFileSystem.
@@ -251,12 +254,11 @@ class FileSystemOperation {
// Proxy for calling file_util_proxy methods.
scoped_refptr<base::MessageLoopProxy> proxy_;
+ // This can be NULL if the operation is cancelled on the way.
scoped_ptr<FileSystemCallbackDispatcher> dispatcher_;
FileSystemOperationContext operation_context_;
- base::WeakPtrFactory<FileSystemOperation> weak_factory_;
-
scoped_ptr<ScopedQuotaUtilHelper> quota_util_helper_;
// These are all used only by Write().
@@ -275,16 +277,6 @@ class FileSystemOperation {
FilePath src_virtual_path_;
FilePath dest_virtual_path_;
- // Options for CreateFile and CreateDirectory.
- bool exclusive_;
- bool recursive_;
-
- // Options for OpenFile.
- int file_flags_;
-
- // Length to be truncated.
- int64 length_;
-
DISALLOW_COPY_AND_ASSIGN(FileSystemOperation);
};
« no previous file with comments | « webkit/fileapi/file_system_file_util_proxy.cc ('k') | webkit/fileapi/file_system_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698