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