| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 125 |
| 126 bool SandboxFileSystemBackend::HasInplaceCopyImplementation( | 126 bool SandboxFileSystemBackend::HasInplaceCopyImplementation( |
| 127 fileapi::FileSystemType type) const { | 127 fileapi::FileSystemType type) const { |
| 128 return true; | 128 return true; |
| 129 } | 129 } |
| 130 | 130 |
| 131 scoped_ptr<webkit_blob::FileStreamReader> | 131 scoped_ptr<webkit_blob::FileStreamReader> |
| 132 SandboxFileSystemBackend::CreateFileStreamReader( | 132 SandboxFileSystemBackend::CreateFileStreamReader( |
| 133 const FileSystemURL& url, | 133 const FileSystemURL& url, |
| 134 int64 offset, | 134 int64 offset, |
| 135 int64 length, |
| 135 const base::Time& expected_modification_time, | 136 const base::Time& expected_modification_time, |
| 136 FileSystemContext* context) const { | 137 FileSystemContext* context) const { |
| 137 DCHECK(CanHandleType(url.type())); | 138 DCHECK(CanHandleType(url.type())); |
| 138 DCHECK(delegate_); | 139 DCHECK(delegate_); |
| 139 return delegate_->CreateFileStreamReader( | 140 return delegate_->CreateFileStreamReader( |
| 140 url, offset, expected_modification_time, context); | 141 url, offset, expected_modification_time, context); |
| 141 } | 142 } |
| 142 | 143 |
| 143 scoped_ptr<fileapi::FileStreamWriter> | 144 scoped_ptr<fileapi::FileStreamWriter> |
| 144 SandboxFileSystemBackend::CreateFileStreamWriter( | 145 SandboxFileSystemBackend::CreateFileStreamWriter( |
| 145 const FileSystemURL& url, | 146 const FileSystemURL& url, |
| 146 int64 offset, | 147 int64 offset, |
| 147 FileSystemContext* context) const { | 148 FileSystemContext* context) const { |
| 148 DCHECK(CanHandleType(url.type())); | 149 DCHECK(CanHandleType(url.type())); |
| 149 DCHECK(delegate_); | 150 DCHECK(delegate_); |
| 150 return delegate_->CreateFileStreamWriter(url, offset, context, url.type()); | 151 return delegate_->CreateFileStreamWriter(url, offset, context, url.type()); |
| 151 } | 152 } |
| 152 | 153 |
| 153 FileSystemQuotaUtil* SandboxFileSystemBackend::GetQuotaUtil() { | 154 FileSystemQuotaUtil* SandboxFileSystemBackend::GetQuotaUtil() { |
| 154 return delegate_; | 155 return delegate_; |
| 155 } | 156 } |
| 156 | 157 |
| 157 SandboxFileSystemBackendDelegate::OriginEnumerator* | 158 SandboxFileSystemBackendDelegate::OriginEnumerator* |
| 158 SandboxFileSystemBackend::CreateOriginEnumerator() { | 159 SandboxFileSystemBackend::CreateOriginEnumerator() { |
| 159 DCHECK(delegate_); | 160 DCHECK(delegate_); |
| 160 return delegate_->CreateOriginEnumerator(); | 161 return delegate_->CreateOriginEnumerator(); |
| 161 } | 162 } |
| 162 | 163 |
| 163 } // namespace fileapi | 164 } // namespace fileapi |
| OLD | NEW |