| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef STORAGE_BROWSER_FILEAPI_COPY_OR_MOVE_OPERATION_DELEGATE_H_ | 5 #ifndef STORAGE_BROWSER_FILEAPI_COPY_OR_MOVE_OPERATION_DELEGATE_H_ |
| 6 #define STORAGE_BROWSER_FILEAPI_COPY_OR_MOVE_OPERATION_DELEGATE_H_ | 6 #define STORAGE_BROWSER_FILEAPI_COPY_OR_MOVE_OPERATION_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <stack> | 9 #include <stack> |
| 10 | 10 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 CopyOrMoveOperationDelegate( | 93 CopyOrMoveOperationDelegate( |
| 94 FileSystemContext* file_system_context, | 94 FileSystemContext* file_system_context, |
| 95 const FileSystemURL& src_root, | 95 const FileSystemURL& src_root, |
| 96 const FileSystemURL& dest_root, | 96 const FileSystemURL& dest_root, |
| 97 OperationType operation_type, | 97 OperationType operation_type, |
| 98 CopyOrMoveOption option, | 98 CopyOrMoveOption option, |
| 99 const CopyProgressCallback& progress_callback, | 99 const CopyProgressCallback& progress_callback, |
| 100 const StatusCallback& callback); | 100 const StatusCallback& callback); |
| 101 virtual ~CopyOrMoveOperationDelegate(); | 101 ~CopyOrMoveOperationDelegate() override; |
| 102 | 102 |
| 103 // RecursiveOperationDelegate overrides: | 103 // RecursiveOperationDelegate overrides: |
| 104 virtual void Run() override; | 104 void Run() override; |
| 105 virtual void RunRecursively() override; | 105 void RunRecursively() override; |
| 106 virtual void ProcessFile(const FileSystemURL& url, | 106 void ProcessFile(const FileSystemURL& url, |
| 107 const StatusCallback& callback) override; | 107 const StatusCallback& callback) override; |
| 108 virtual void ProcessDirectory(const FileSystemURL& url, | 108 void ProcessDirectory(const FileSystemURL& url, |
| 109 const StatusCallback& callback) override; | 109 const StatusCallback& callback) override; |
| 110 virtual void PostProcessDirectory(const FileSystemURL& url, | 110 void PostProcessDirectory(const FileSystemURL& url, |
| 111 const StatusCallback& callback) override; | 111 const StatusCallback& callback) override; |
| 112 | |
| 113 | 112 |
| 114 protected: | 113 protected: |
| 115 virtual void OnCancel() override; | 114 void OnCancel() override; |
| 116 | 115 |
| 117 private: | 116 private: |
| 118 void DidCopyOrMoveFile(const FileSystemURL& src_url, | 117 void DidCopyOrMoveFile(const FileSystemURL& src_url, |
| 119 const FileSystemURL& dest_url, | 118 const FileSystemURL& dest_url, |
| 120 const StatusCallback& callback, | 119 const StatusCallback& callback, |
| 121 CopyOrMoveImpl* impl, | 120 CopyOrMoveImpl* impl, |
| 122 base::File::Error error); | 121 base::File::Error error); |
| 123 void DidTryRemoveDestRoot(const StatusCallback& callback, | 122 void DidTryRemoveDestRoot(const StatusCallback& callback, |
| 124 base::File::Error error); | 123 base::File::Error error); |
| 125 void ProcessDirectoryInternal(const FileSystemURL& src_url, | 124 void ProcessDirectoryInternal(const FileSystemURL& src_url, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 153 | 152 |
| 154 std::set<CopyOrMoveImpl*> running_copy_set_; | 153 std::set<CopyOrMoveImpl*> running_copy_set_; |
| 155 base::WeakPtrFactory<CopyOrMoveOperationDelegate> weak_factory_; | 154 base::WeakPtrFactory<CopyOrMoveOperationDelegate> weak_factory_; |
| 156 | 155 |
| 157 DISALLOW_COPY_AND_ASSIGN(CopyOrMoveOperationDelegate); | 156 DISALLOW_COPY_AND_ASSIGN(CopyOrMoveOperationDelegate); |
| 158 }; | 157 }; |
| 159 | 158 |
| 160 } // namespace storage | 159 } // namespace storage |
| 161 | 160 |
| 162 #endif // STORAGE_BROWSER_FILEAPI_COPY_OR_MOVE_OPERATION_DELEGATE_H_ | 161 #endif // STORAGE_BROWSER_FILEAPI_COPY_OR_MOVE_OPERATION_DELEGATE_H_ |
| OLD | NEW |