OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/sequenced_task_runner.h" |
7 #include "webkit/fileapi/file_system_context.h" | 8 #include "webkit/fileapi/file_system_context.h" |
8 | 9 |
9 namespace fileapi { | 10 namespace fileapi { |
10 | 11 |
11 FileSystemOperationContext::FileSystemOperationContext( | 12 FileSystemOperationContext::FileSystemOperationContext( |
12 FileSystemContext* context) | 13 FileSystemContext* context) |
13 : file_system_context_(context), | 14 : file_system_context_(context), |
| 15 task_runner_(file_system_context_->file_task_runner()), |
14 allowed_bytes_growth_(0) {} | 16 allowed_bytes_growth_(0) {} |
15 | 17 |
16 FileSystemOperationContext::~FileSystemOperationContext() {} | 18 FileSystemOperationContext::~FileSystemOperationContext() {} |
17 | 19 |
18 base::SequencedTaskRunner* | 20 void FileSystemOperationContext::SetTaskRunner( |
19 FileSystemOperationContext::file_task_runner() const { | 21 base::SequencedTaskRunner* task_runner) { |
20 return file_system_context_->file_task_runner(); | 22 task_runner_ = task_runner; |
21 } | 23 } |
22 | 24 |
23 } // namespace fileapi | 25 } // namespace fileapi |
OLD | NEW |