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 #include "webkit/browser/fileapi/copy_or_move_operation_delegate.h" | 5 #include "storage/browser/fileapi/copy_or_move_operation_delegate.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "net/base/io_buffer.h" | 9 #include "net/base/io_buffer.h" |
10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
11 #include "webkit/browser/blob/file_stream_reader.h" | 11 #include "storage/browser/blob/file_stream_reader.h" |
12 #include "webkit/browser/fileapi/copy_or_move_file_validator.h" | 12 #include "storage/browser/fileapi/copy_or_move_file_validator.h" |
13 #include "webkit/browser/fileapi/file_observers.h" | 13 #include "storage/browser/fileapi/file_observers.h" |
14 #include "webkit/browser/fileapi/file_stream_writer.h" | 14 #include "storage/browser/fileapi/file_stream_writer.h" |
15 #include "webkit/browser/fileapi/file_system_context.h" | 15 #include "storage/browser/fileapi/file_system_context.h" |
16 #include "webkit/browser/fileapi/file_system_operation_runner.h" | 16 #include "storage/browser/fileapi/file_system_operation_runner.h" |
17 #include "webkit/browser/fileapi/file_system_url.h" | 17 #include "storage/browser/fileapi/file_system_url.h" |
18 #include "webkit/browser/fileapi/recursive_operation_delegate.h" | 18 #include "storage/browser/fileapi/recursive_operation_delegate.h" |
19 #include "webkit/common/blob/shareable_file_reference.h" | 19 #include "storage/common/blob/shareable_file_reference.h" |
20 #include "webkit/common/fileapi/file_system_util.h" | 20 #include "storage/common/fileapi/file_system_util.h" |
21 | 21 |
22 namespace storage { | 22 namespace storage { |
23 | 23 |
24 const int64 kFlushIntervalInBytes = 10 << 20; // 10MB. | 24 const int64 kFlushIntervalInBytes = 10 << 20; // 10MB. |
25 | 25 |
26 class CopyOrMoveOperationDelegate::CopyOrMoveImpl { | 26 class CopyOrMoveOperationDelegate::CopyOrMoveImpl { |
27 public: | 27 public: |
28 virtual ~CopyOrMoveImpl() {} | 28 virtual ~CopyOrMoveImpl() {} |
29 virtual void Run( | 29 virtual void Run( |
30 const CopyOrMoveOperationDelegate::StatusCallback& callback) = 0; | 30 const CopyOrMoveOperationDelegate::StatusCallback& callback) = 0; |
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1025 base::FilePath relative = dest_root_.virtual_path(); | 1025 base::FilePath relative = dest_root_.virtual_path(); |
1026 src_root_.virtual_path().AppendRelativePath(src_url.virtual_path(), | 1026 src_root_.virtual_path().AppendRelativePath(src_url.virtual_path(), |
1027 &relative); | 1027 &relative); |
1028 return file_system_context()->CreateCrackedFileSystemURL( | 1028 return file_system_context()->CreateCrackedFileSystemURL( |
1029 dest_root_.origin(), | 1029 dest_root_.origin(), |
1030 dest_root_.mount_type(), | 1030 dest_root_.mount_type(), |
1031 relative); | 1031 relative); |
1032 } | 1032 } |
1033 | 1033 |
1034 } // namespace storage | 1034 } // namespace storage |
OLD | NEW |