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

Unified Diff: webkit/fileapi/remove_operation_delegate.h

Issue 12036022: Split recursive Copy/Move into async tasks and support cross operation (in local case) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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/fileapi/recursive_operation_delegate.cc ('k') | webkit/fileapi/remove_operation_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/remove_operation_delegate.h
diff --git a/webkit/fileapi/remove_operation_delegate.h b/webkit/fileapi/remove_operation_delegate.h
index 43ea9d2059619ca0ca772499ea0d88cd3270c9e8..2a296c71b4a26f6a0a8b58f2ff5217d074e2a479 100644
--- a/webkit/fileapi/remove_operation_delegate.h
+++ b/webkit/fileapi/remove_operation_delegate.h
@@ -5,57 +5,42 @@
#ifndef WEBKIT_FILEAPI_REMOVE_OPERATION_DELEGATE_H_
#define WEBKIT_FILEAPI_REMOVE_OPERATION_DELEGATE_H_
-#include <queue>
#include <stack>
-#include "base/basictypes.h"
-#include "base/callback.h"
-#include "base/memory/weak_ptr.h"
-#include "webkit/fileapi/file_system_operation.h"
-#include "webkit/fileapi/file_system_url.h"
+#include "webkit/fileapi/recursive_operation_delegate.h"
namespace fileapi {
-class FileSystemURL;
-class LocalFileSystemOperation;
-
class RemoveOperationDelegate
- : public base::SupportsWeakPtr<RemoveOperationDelegate> {
+ : public RecursiveOperationDelegate,
+ public base::SupportsWeakPtr<RemoveOperationDelegate> {
public:
- typedef FileSystemOperation::StatusCallback StatusCallback;
- typedef FileSystemOperation::FileEntryList FileEntryList;
-
RemoveOperationDelegate(LocalFileSystemOperation* original_operation,
+ const FileSystemURL& url,
const StatusCallback& callback);
virtual ~RemoveOperationDelegate();
- void Run(const FileSystemURL& url);
- void RunRecursively(const FileSystemURL& url);
+ // RecursiveOperationDelegate overrides:
+ virtual void Run() OVERRIDE;
+ virtual void RunRecursively() OVERRIDE;
+ virtual void ProcessFile(const FileSystemURL& url,
+ const StatusCallback& callback) OVERRIDE;
+ virtual void ProcessDirectory(const FileSystemURL& url,
+ const StatusCallback& callback) OVERRIDE;
+
+ using base::SupportsWeakPtr<RemoveOperationDelegate>::AsWeakPtr;
private:
- void ProcessNextDirectory(base::PlatformFileError error);
- void DidTryRemoveFile(
- const FileSystemURL& url,
- base::PlatformFileError error);
- void DidReadDirectory(
- const FileSystemURL& parent,
- base::PlatformFileError error,
- const FileEntryList& entries,
- bool has_more);
- void RemoveFile(const FileSystemURL& url);
- void DidRemoveFile(base::PlatformFileError error);
+ void DidTryRemoveFile(base::PlatformFileError error);
+ void DidRemoveFile(const StatusCallback& callback,
+ base::PlatformFileError error);
void RemoveNextDirectory(base::PlatformFileError error);
- LocalFileSystemOperation* NewOperation(const FileSystemURL& url);
-
- LocalFileSystemOperation* original_operation_;
+ FileSystemURL url_;
StatusCallback callback_;
- std::queue<FileSystemURL> pending_directories_;
std::stack<FileSystemURL> to_remove_directories_;
- int inflight_operations_;
-
DISALLOW_COPY_AND_ASSIGN(RemoveOperationDelegate);
};
« no previous file with comments | « webkit/fileapi/recursive_operation_delegate.cc ('k') | webkit/fileapi/remove_operation_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698