| 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);
|
| };
|
|
|
|
|