Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / storage / browser / fileapi / remove_operation_delegate.h
blob9625059516abe48295bdca3c49bdfac7dfe7df34
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef STORAGE_BROWSER_FILEAPI_REMOVE_OPERATION_DELEGATE_H_
6 #define STORAGE_BROWSER_FILEAPI_REMOVE_OPERATION_DELEGATE_H_
8 #include <stack>
10 #include "storage/browser/fileapi/recursive_operation_delegate.h"
12 namespace storage {
14 class RemoveOperationDelegate : public RecursiveOperationDelegate {
15 public:
16 RemoveOperationDelegate(FileSystemContext* file_system_context,
17 const FileSystemURL& url,
18 const StatusCallback& callback);
19 ~RemoveOperationDelegate() override;
21 // RecursiveOperationDelegate overrides:
22 void Run() override;
23 void RunRecursively() override;
24 void ProcessFile(const FileSystemURL& url,
25 const StatusCallback& callback) override;
26 void ProcessDirectory(const FileSystemURL& url,
27 const StatusCallback& callback) override;
28 void PostProcessDirectory(const FileSystemURL& url,
29 const StatusCallback& callback) override;
31 private:
32 void DidTryRemoveFile(base::File::Error error);
33 void DidTryRemoveDirectory(base::File::Error remove_file_error,
34 base::File::Error remove_directory_error);
35 void DidRemoveFile(const StatusCallback& callback,
36 base::File::Error error);
38 FileSystemURL url_;
39 StatusCallback callback_;
40 base::WeakPtrFactory<RemoveOperationDelegate> weak_factory_;
41 DISALLOW_COPY_AND_ASSIGN(RemoveOperationDelegate);
44 } // namespace storage
46 #endif // STORAGE_BROWSER_FILEAPI_REMOVE_OPERATION_DELEGATE_H_