| 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/browser/fileapi/file_system_operation_context.h" | 5 #include "webkit/browser/fileapi/file_system_operation_context.h" |
| 6 | 6 |
| 7 #include "base/sequenced_task_runner.h" | 7 #include "base/sequenced_task_runner.h" |
| 8 #include "webkit/browser/fileapi/file_system_context.h" | 8 #include "webkit/browser/fileapi/file_system_context.h" |
| 9 #include "webkit/browser/fileapi/file_system_task_runners.h" | |
| 10 | 9 |
| 11 namespace fileapi { | 10 namespace fileapi { |
| 12 | 11 |
| 13 FileSystemOperationContext::FileSystemOperationContext( | 12 FileSystemOperationContext::FileSystemOperationContext( |
| 14 FileSystemContext* context) | 13 FileSystemContext* context) |
| 15 : file_system_context_(context), | 14 : file_system_context_(context), |
| 16 task_runner_(file_system_context_->task_runners()->file_task_runner()), | 15 task_runner_(file_system_context_->default_file_task_runner()), |
| 17 allowed_bytes_growth_(0), | 16 allowed_bytes_growth_(0), |
| 18 quota_limit_type_(quota::kQuotaLimitTypeUnknown) {} | 17 quota_limit_type_(quota::kQuotaLimitTypeUnknown) {} |
| 19 | 18 |
| 20 FileSystemOperationContext::FileSystemOperationContext( | 19 FileSystemOperationContext::FileSystemOperationContext( |
| 21 FileSystemContext* context, | 20 FileSystemContext* context, |
| 22 base::SequencedTaskRunner* task_runner) | 21 base::SequencedTaskRunner* task_runner) |
| 23 : file_system_context_(context), | 22 : file_system_context_(context), |
| 24 task_runner_(task_runner), | 23 task_runner_(task_runner), |
| 25 allowed_bytes_growth_(0), | 24 allowed_bytes_growth_(0), |
| 26 quota_limit_type_(quota::kQuotaLimitTypeUnknown) {} | 25 quota_limit_type_(quota::kQuotaLimitTypeUnknown) {} |
| 27 | 26 |
| 28 FileSystemOperationContext::~FileSystemOperationContext() { | 27 FileSystemOperationContext::~FileSystemOperationContext() { |
| 29 DetachUserDataThread(); | 28 DetachUserDataThread(); |
| 30 setter_thread_checker_.DetachFromThread(); | 29 setter_thread_checker_.DetachFromThread(); |
| 31 } | 30 } |
| 32 | 31 |
| 33 } // namespace fileapi | 32 } // namespace fileapi |
| OLD | NEW |