OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/fileapi/file_system_operation_context.h" | 5 #include "webkit/fileapi/file_system_operation_context.h" |
6 | 6 |
7 #include "webkit/fileapi/file_system_context.h" | 7 #include "webkit/fileapi/file_system_context.h" |
8 #include "webkit/fileapi/file_system_util.h" | 8 #include "webkit/fileapi/file_system_util.h" |
9 | 9 |
10 namespace fileapi { | 10 namespace fileapi { |
11 | 11 |
12 FileSystemOperationContext::FileSystemOperationContext( | 12 FileSystemOperationContext::FileSystemOperationContext( |
13 FileSystemContext* context, | 13 FileSystemContext* context, |
14 FileSystemFileUtil* file_system_file_util) | 14 FileSystemFileUtil* file_util) |
15 : file_system_context_(context), | 15 : file_system_context_(context), |
16 src_file_system_file_util_(file_system_file_util), | 16 src_file_util_(file_util), |
17 dest_file_system_file_util_(file_system_file_util), | 17 dest_file_util_(file_util), |
18 src_type_(kFileSystemTypeUnknown), | 18 src_type_(kFileSystemTypeUnknown), |
19 dest_type_(kFileSystemTypeUnknown), | 19 dest_type_(kFileSystemTypeUnknown), |
20 allowed_bytes_growth_(0) { | 20 allowed_bytes_growth_(0) { |
21 } | 21 } |
22 | 22 |
23 FileSystemOperationContext::~FileSystemOperationContext() { | 23 FileSystemOperationContext::~FileSystemOperationContext() { |
24 } | 24 } |
25 | 25 |
26 FileSystemOperationContext* | 26 FileSystemOperationContext* |
27 FileSystemOperationContext::CreateInheritedContextForDest() const { | 27 FileSystemOperationContext::CreateInheritedContextForDest() const { |
28 FileSystemOperationContext* context = new FileSystemOperationContext( | 28 FileSystemOperationContext* context = new FileSystemOperationContext( |
29 file_system_context_.get(), dest_file_system_file_util_); | 29 file_system_context_.get(), dest_file_util_); |
30 context->set_src_origin_url(dest_origin_url_); | 30 context->set_src_origin_url(dest_origin_url_); |
31 context->set_src_type(dest_type_); | 31 context->set_src_type(dest_type_); |
32 context->set_allowed_bytes_growth(allowed_bytes_growth_); | 32 context->set_allowed_bytes_growth(allowed_bytes_growth_); |
33 return context; | 33 return context; |
34 } | 34 } |
35 | 35 |
36 } // namespace fileapi | 36 } // namespace fileapi |
OLD | NEW |