| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/media_galleries/fileapi/media_file_system_backend.h" | 5 #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 type == storage::kFileSystemTypeItunes || | 325 type == storage::kFileSystemTypeItunes || |
| 326 type == storage::kFileSystemTypePicasa || | 326 type == storage::kFileSystemTypePicasa || |
| 327 type == storage::kFileSystemTypeIphoto); | 327 type == storage::kFileSystemTypeIphoto); |
| 328 return true; | 328 return true; |
| 329 } | 329 } |
| 330 | 330 |
| 331 scoped_ptr<storage::FileStreamReader> | 331 scoped_ptr<storage::FileStreamReader> |
| 332 MediaFileSystemBackend::CreateFileStreamReader( | 332 MediaFileSystemBackend::CreateFileStreamReader( |
| 333 const FileSystemURL& url, | 333 const FileSystemURL& url, |
| 334 int64 offset, | 334 int64 offset, |
| 335 int64 max_bytes_to_read, |
| 335 const base::Time& expected_modification_time, | 336 const base::Time& expected_modification_time, |
| 336 FileSystemContext* context) const { | 337 FileSystemContext* context) const { |
| 337 if (url.type() == storage::kFileSystemTypeDeviceMedia) { | 338 if (url.type() == storage::kFileSystemTypeDeviceMedia) { |
| 338 DCHECK(device_media_async_file_util_); | 339 DCHECK(device_media_async_file_util_); |
| 339 scoped_ptr<storage::FileStreamReader> reader = | 340 scoped_ptr<storage::FileStreamReader> reader = |
| 340 device_media_async_file_util_->GetFileStreamReader( | 341 device_media_async_file_util_->GetFileStreamReader( |
| 341 url, offset, expected_modification_time, context); | 342 url, offset, expected_modification_time, context); |
| 342 DCHECK(reader); | 343 DCHECK(reader); |
| 343 return reader.Pass(); | 344 return reader.Pass(); |
| 344 } | 345 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 361 context->default_file_task_runner(), | 362 context->default_file_task_runner(), |
| 362 url.path(), | 363 url.path(), |
| 363 offset, | 364 offset, |
| 364 storage::FileStreamWriter::OPEN_EXISTING_FILE)); | 365 storage::FileStreamWriter::OPEN_EXISTING_FILE)); |
| 365 } | 366 } |
| 366 | 367 |
| 367 storage::FileSystemQuotaUtil* MediaFileSystemBackend::GetQuotaUtil() { | 368 storage::FileSystemQuotaUtil* MediaFileSystemBackend::GetQuotaUtil() { |
| 368 // No quota support. | 369 // No quota support. |
| 369 return NULL; | 370 return NULL; |
| 370 } | 371 } |
| OLD | NEW |