| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "storage/browser/fileapi/file_system_operation_impl.h" | 5 #include "storage/browser/fileapi/file_system_operation_impl.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 FileSystemOperationImpl::FileSystemOperationImpl( | 377 FileSystemOperationImpl::FileSystemOperationImpl( |
| 378 const FileSystemURL& url, | 378 const FileSystemURL& url, |
| 379 FileSystemContext* file_system_context, | 379 FileSystemContext* file_system_context, |
| 380 std::unique_ptr<FileSystemOperationContext> operation_context) | 380 std::unique_ptr<FileSystemOperationContext> operation_context) |
| 381 : file_system_context_(file_system_context), | 381 : file_system_context_(file_system_context), |
| 382 operation_context_(std::move(operation_context)), | 382 operation_context_(std::move(operation_context)), |
| 383 async_file_util_(NULL), | 383 async_file_util_(NULL), |
| 384 pending_operation_(kOperationNone), | 384 pending_operation_(kOperationNone), |
| 385 weak_factory_(this) { | 385 weak_factory_(this) { |
| 386 DCHECK(operation_context_.get()); | 386 DCHECK(operation_context_.get()); |
| 387 operation_context_->DetachUserDataThread(); | 387 operation_context_->DetachFromSequence(); |
| 388 async_file_util_ = file_system_context_->GetAsyncFileUtil(url.type()); | 388 async_file_util_ = file_system_context_->GetAsyncFileUtil(url.type()); |
| 389 DCHECK(async_file_util_); | 389 DCHECK(async_file_util_); |
| 390 } | 390 } |
| 391 | 391 |
| 392 void FileSystemOperationImpl::GetUsageAndQuotaThenRunTask( | 392 void FileSystemOperationImpl::GetUsageAndQuotaThenRunTask( |
| 393 const FileSystemURL& url, | 393 const FileSystemURL& url, |
| 394 const base::Closure& task, | 394 const base::Closure& task, |
| 395 const base::Closure& error_callback) { | 395 const base::Closure& error_callback) { |
| 396 storage::QuotaManagerProxy* quota_manager_proxy = | 396 storage::QuotaManagerProxy* quota_manager_proxy = |
| 397 file_system_context()->quota_manager_proxy(); | 397 file_system_context()->quota_manager_proxy(); |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 } | 594 } |
| 595 | 595 |
| 596 bool FileSystemOperationImpl::SetPendingOperationType(OperationType type) { | 596 bool FileSystemOperationImpl::SetPendingOperationType(OperationType type) { |
| 597 if (pending_operation_ != kOperationNone) | 597 if (pending_operation_ != kOperationNone) |
| 598 return false; | 598 return false; |
| 599 pending_operation_ = type; | 599 pending_operation_ = type; |
| 600 return true; | 600 return true; |
| 601 } | 601 } |
| 602 | 602 |
| 603 } // namespace storage | 603 } // namespace storage |
| OLD | NEW |