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 "chrome/browser/chromeos/fileapi/file_system_backend.h" | 5 #include "chrome/browser/chromeos/fileapi/file_system_backend.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "chrome/browser/chromeos/fileapi/file_access_permissions.h" | 10 #include "chrome/browser/chromeos/fileapi/file_access_permissions.h" |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 url.type() == fileapi::kFileSystemTypeRestrictedNativeLocal || | 270 url.type() == fileapi::kFileSystemTypeRestrictedNativeLocal || |
271 url.type() == fileapi::kFileSystemTypeDrive || | 271 url.type() == fileapi::kFileSystemTypeDrive || |
272 url.type() == fileapi::kFileSystemTypeProvided); | 272 url.type() == fileapi::kFileSystemTypeProvided); |
273 return fileapi::FileSystemOperation::Create( | 273 return fileapi::FileSystemOperation::Create( |
274 url, context, | 274 url, context, |
275 make_scoped_ptr(new fileapi::FileSystemOperationContext(context))); | 275 make_scoped_ptr(new fileapi::FileSystemOperationContext(context))); |
276 } | 276 } |
277 | 277 |
278 bool FileSystemBackend::SupportsStreaming( | 278 bool FileSystemBackend::SupportsStreaming( |
279 const fileapi::FileSystemURL& url) const { | 279 const fileapi::FileSystemURL& url) const { |
280 return url.type() == fileapi::kFileSystemTypeDrive; | 280 return url.type() == fileapi::kFileSystemTypeDrive || |
| 281 url.type() == fileapi::kFileSystemTypeProvided; |
281 } | 282 } |
282 | 283 |
283 scoped_ptr<webkit_blob::FileStreamReader> | 284 scoped_ptr<webkit_blob::FileStreamReader> |
284 FileSystemBackend::CreateFileStreamReader( | 285 FileSystemBackend::CreateFileStreamReader( |
285 const fileapi::FileSystemURL& url, | 286 const fileapi::FileSystemURL& url, |
286 int64 offset, | 287 int64 offset, |
287 const base::Time& expected_modification_time, | 288 const base::Time& expected_modification_time, |
288 fileapi::FileSystemContext* context) const { | 289 fileapi::FileSystemContext* context) const { |
289 DCHECK(url.is_valid()); | 290 DCHECK(url.is_valid()); |
290 | 291 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 } | 346 } |
346 | 347 |
347 bool FileSystemBackend::GetVirtualPath( | 348 bool FileSystemBackend::GetVirtualPath( |
348 const base::FilePath& filesystem_path, | 349 const base::FilePath& filesystem_path, |
349 base::FilePath* virtual_path) { | 350 base::FilePath* virtual_path) { |
350 return mount_points_->GetVirtualPath(filesystem_path, virtual_path) || | 351 return mount_points_->GetVirtualPath(filesystem_path, virtual_path) || |
351 system_mount_points_->GetVirtualPath(filesystem_path, virtual_path); | 352 system_mount_points_->GetVirtualPath(filesystem_path, virtual_path); |
352 } | 353 } |
353 | 354 |
354 } // namespace chromeos | 355 } // namespace chromeos |
OLD | NEW |