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_writer_delegate.h" | 5 #include "webkit/fileapi/file_writer_delegate.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/file_util_proxy.h" | 9 #include "base/file_util_proxy.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "base/threading/thread_restrictions.h" | 11 #include "base/threading/thread_restrictions.h" |
12 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
13 #include "webkit/fileapi/file_system_context.h" | 13 #include "webkit/fileapi/file_system_context.h" |
14 #include "webkit/fileapi/file_system_operation.h" | 14 #include "webkit/fileapi/file_system_operation.h" |
15 #include "webkit/fileapi/file_system_operation_context.h" | 15 #include "webkit/fileapi/file_system_operation_context.h" |
16 #include "webkit/fileapi/file_system_path_manager.h" | |
17 #include "webkit/fileapi/file_system_quota_util.h" | 16 #include "webkit/fileapi/file_system_quota_util.h" |
18 #include "webkit/fileapi/quota_file_util.h" | 17 #include "webkit/fileapi/quota_file_util.h" |
19 | 18 |
20 namespace fileapi { | 19 namespace fileapi { |
21 | 20 |
22 static const int kReadBufSize = 32768; | 21 static const int kReadBufSize = 32768; |
23 | 22 |
24 namespace { | 23 namespace { |
25 | 24 |
26 typedef base::Callback<void(base::PlatformFileError /* error code */, | 25 typedef base::Callback<void(base::PlatformFileError /* error code */, |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 | 317 |
319 FileSystemQuotaUtil* FileWriterDelegate::quota_util() const { | 318 FileSystemQuotaUtil* FileWriterDelegate::quota_util() const { |
320 DCHECK(file_system_operation_); | 319 DCHECK(file_system_operation_); |
321 DCHECK(file_system_operation_->file_system_context()); | 320 DCHECK(file_system_operation_->file_system_context()); |
322 DCHECK(file_system_operation_->file_system_operation_context()); | 321 DCHECK(file_system_operation_->file_system_operation_context()); |
323 return file_system_operation_->file_system_context()->GetQuotaUtil( | 322 return file_system_operation_->file_system_context()->GetQuotaUtil( |
324 file_system_operation_context()->src_type()); | 323 file_system_operation_context()->src_type()); |
325 } | 324 } |
326 | 325 |
327 } // namespace fileapi | 326 } // namespace fileapi |
OLD | NEW |