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_stream_writer.h" | 13 #include "storage/browser/fileapi/file_stream_writer.h" |
14 #include "webkit/browser/fileapi/file_system_context.h" | 14 #include "storage/browser/fileapi/file_system_context.h" |
15 #include "webkit/browser/fileapi/file_system_operation_runner.h" | 15 #include "storage/browser/fileapi/file_system_operation_runner.h" |
16 #include "webkit/browser/fileapi/file_system_url.h" | 16 #include "storage/browser/fileapi/file_system_url.h" |
17 #include "webkit/browser/fileapi/recursive_operation_delegate.h" | 17 #include "storage/browser/fileapi/recursive_operation_delegate.h" |
18 #include "webkit/common/blob/shareable_file_reference.h" | 18 #include "storage/common/blob/shareable_file_reference.h" |
19 #include "webkit/common/fileapi/file_system_util.h" | 19 #include "storage/common/fileapi/file_system_util.h" |
20 | 20 |
21 namespace storage { | 21 namespace storage { |
22 | 22 |
23 const int64 kFlushIntervalInBytes = 10 << 20; // 10MB. | 23 const int64 kFlushIntervalInBytes = 10 << 20; // 10MB. |
24 | 24 |
25 class CopyOrMoveOperationDelegate::CopyOrMoveImpl { | 25 class CopyOrMoveOperationDelegate::CopyOrMoveImpl { |
26 public: | 26 public: |
27 virtual ~CopyOrMoveImpl() {} | 27 virtual ~CopyOrMoveImpl() {} |
28 virtual void Run( | 28 virtual void Run( |
29 const CopyOrMoveOperationDelegate::StatusCallback& callback) = 0; | 29 const CopyOrMoveOperationDelegate::StatusCallback& callback) = 0; |
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
986 base::FilePath relative = dest_root_.virtual_path(); | 986 base::FilePath relative = dest_root_.virtual_path(); |
987 src_root_.virtual_path().AppendRelativePath(src_url.virtual_path(), | 987 src_root_.virtual_path().AppendRelativePath(src_url.virtual_path(), |
988 &relative); | 988 &relative); |
989 return file_system_context()->CreateCrackedFileSystemURL( | 989 return file_system_context()->CreateCrackedFileSystemURL( |
990 dest_root_.origin(), | 990 dest_root_.origin(), |
991 dest_root_.mount_type(), | 991 dest_root_.mount_type(), |
992 relative); | 992 relative); |
993 } | 993 } |
994 | 994 |
995 } // namespace storage | 995 } // namespace storage |
OLD | NEW |