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 WEBKIT_BROWSER_FILEAPI_COPY_OR_MOVE_OPERATION_DELEGATE_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_COPY_OR_MOVE_OPERATION_DELEGATE_H_ |
6 #define WEBKIT_BROWSER_FILEAPI_COPY_OR_MOVE_OPERATION_DELEGATE_H_ | 6 #define WEBKIT_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 25 matching lines...) Expand all Loading... |
36 typedef FileSystemOperation::CopyProgressCallback CopyProgressCallback; | 36 typedef FileSystemOperation::CopyProgressCallback CopyProgressCallback; |
37 typedef FileSystemOperation::CopyOrMoveOption CopyOrMoveOption; | 37 typedef FileSystemOperation::CopyOrMoveOption CopyOrMoveOption; |
38 | 38 |
39 enum OperationType { | 39 enum OperationType { |
40 OPERATION_COPY, | 40 OPERATION_COPY, |
41 OPERATION_MOVE | 41 OPERATION_MOVE |
42 }; | 42 }; |
43 | 43 |
44 // Helper to copy a file by reader and writer streams. | 44 // Helper to copy a file by reader and writer streams. |
45 // Export for testing. | 45 // Export for testing. |
46 class WEBKIT_STORAGE_BROWSER_EXPORT StreamCopyHelper { | 46 class STORAGE_EXPORT StreamCopyHelper { |
47 public: | 47 public: |
48 StreamCopyHelper( | 48 StreamCopyHelper( |
49 scoped_ptr<storage::FileStreamReader> reader, | 49 scoped_ptr<storage::FileStreamReader> reader, |
50 scoped_ptr<FileStreamWriter> writer, | 50 scoped_ptr<FileStreamWriter> writer, |
51 bool need_flush, | 51 bool need_flush, |
52 int buffer_size, | 52 int buffer_size, |
53 const FileSystemOperation::CopyFileProgressCallback& | 53 const FileSystemOperation::CopyFileProgressCallback& |
54 file_progress_callback, | 54 file_progress_callback, |
55 const base::TimeDelta& min_progress_callback_invocation_span); | 55 const base::TimeDelta& min_progress_callback_invocation_span); |
56 ~StreamCopyHelper(); | 56 ~StreamCopyHelper(); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 | 153 |
154 std::set<CopyOrMoveImpl*> running_copy_set_; | 154 std::set<CopyOrMoveImpl*> running_copy_set_; |
155 base::WeakPtrFactory<CopyOrMoveOperationDelegate> weak_factory_; | 155 base::WeakPtrFactory<CopyOrMoveOperationDelegate> weak_factory_; |
156 | 156 |
157 DISALLOW_COPY_AND_ASSIGN(CopyOrMoveOperationDelegate); | 157 DISALLOW_COPY_AND_ASSIGN(CopyOrMoveOperationDelegate); |
158 }; | 158 }; |
159 | 159 |
160 } // namespace storage | 160 } // namespace storage |
161 | 161 |
162 #endif // WEBKIT_BROWSER_FILEAPI_COPY_OR_MOVE_OPERATION_DELEGATE_H_ | 162 #endif // WEBKIT_BROWSER_FILEAPI_COPY_OR_MOVE_OPERATION_DELEGATE_H_ |
OLD | NEW |