| 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/sandbox_file_system_backend.h" | 5 #include "webkit/browser/fileapi/sandbox_file_system_backend.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 bool SandboxFileSystemBackend::HasInplaceCopyImplementation( | 129 bool SandboxFileSystemBackend::HasInplaceCopyImplementation( |
| 130 storage::FileSystemType type) const { | 130 storage::FileSystemType type) const { |
| 131 return true; | 131 return true; |
| 132 } | 132 } |
| 133 | 133 |
| 134 scoped_ptr<storage::FileStreamReader> | 134 scoped_ptr<storage::FileStreamReader> |
| 135 SandboxFileSystemBackend::CreateFileStreamReader( | 135 SandboxFileSystemBackend::CreateFileStreamReader( |
| 136 const FileSystemURL& url, | 136 const FileSystemURL& url, |
| 137 int64 offset, | 137 int64 offset, |
| 138 int64 max_bytes_to_read, |
| 138 const base::Time& expected_modification_time, | 139 const base::Time& expected_modification_time, |
| 139 FileSystemContext* context) const { | 140 FileSystemContext* context) const { |
| 140 DCHECK(CanHandleType(url.type())); | 141 DCHECK(CanHandleType(url.type())); |
| 141 DCHECK(delegate_); | 142 DCHECK(delegate_); |
| 142 return delegate_->CreateFileStreamReader( | 143 return delegate_->CreateFileStreamReader( |
| 143 url, offset, expected_modification_time, context); | 144 url, offset, expected_modification_time, context); |
| 144 } | 145 } |
| 145 | 146 |
| 146 scoped_ptr<storage::FileStreamWriter> | 147 scoped_ptr<storage::FileStreamWriter> |
| 147 SandboxFileSystemBackend::CreateFileStreamWriter( | 148 SandboxFileSystemBackend::CreateFileStreamWriter( |
| 148 const FileSystemURL& url, | 149 const FileSystemURL& url, |
| 149 int64 offset, | 150 int64 offset, |
| 150 FileSystemContext* context) const { | 151 FileSystemContext* context) const { |
| 151 DCHECK(CanHandleType(url.type())); | 152 DCHECK(CanHandleType(url.type())); |
| 152 DCHECK(delegate_); | 153 DCHECK(delegate_); |
| 153 return delegate_->CreateFileStreamWriter(url, offset, context, url.type()); | 154 return delegate_->CreateFileStreamWriter(url, offset, context, url.type()); |
| 154 } | 155 } |
| 155 | 156 |
| 156 FileSystemQuotaUtil* SandboxFileSystemBackend::GetQuotaUtil() { | 157 FileSystemQuotaUtil* SandboxFileSystemBackend::GetQuotaUtil() { |
| 157 return delegate_; | 158 return delegate_; |
| 158 } | 159 } |
| 159 | 160 |
| 160 SandboxFileSystemBackendDelegate::OriginEnumerator* | 161 SandboxFileSystemBackendDelegate::OriginEnumerator* |
| 161 SandboxFileSystemBackend::CreateOriginEnumerator() { | 162 SandboxFileSystemBackend::CreateOriginEnumerator() { |
| 162 DCHECK(delegate_); | 163 DCHECK(delegate_); |
| 163 return delegate_->CreateOriginEnumerator(); | 164 return delegate_->CreateOriginEnumerator(); |
| 164 } | 165 } |
| 165 | 166 |
| 166 } // namespace storage | 167 } // namespace storage |
| OLD | NEW |