| 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 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 type == fileapi::kFileSystemTypeItunes || | 320 type == fileapi::kFileSystemTypeItunes || |
| 321 type == fileapi::kFileSystemTypePicasa || | 321 type == fileapi::kFileSystemTypePicasa || |
| 322 type == fileapi::kFileSystemTypeIphoto); | 322 type == fileapi::kFileSystemTypeIphoto); |
| 323 return true; | 323 return true; |
| 324 } | 324 } |
| 325 | 325 |
| 326 scoped_ptr<webkit_blob::FileStreamReader> | 326 scoped_ptr<webkit_blob::FileStreamReader> |
| 327 MediaFileSystemBackend::CreateFileStreamReader( | 327 MediaFileSystemBackend::CreateFileStreamReader( |
| 328 const FileSystemURL& url, | 328 const FileSystemURL& url, |
| 329 int64 offset, | 329 int64 offset, |
| 330 int64 length, |
| 330 const base::Time& expected_modification_time, | 331 const base::Time& expected_modification_time, |
| 331 FileSystemContext* context) const { | 332 FileSystemContext* context) const { |
| 332 if (url.type() == fileapi::kFileSystemTypeDeviceMedia) { | 333 if (url.type() == fileapi::kFileSystemTypeDeviceMedia) { |
| 333 DCHECK(device_media_async_file_util_); | 334 DCHECK(device_media_async_file_util_); |
| 334 scoped_ptr<webkit_blob::FileStreamReader> reader = | 335 scoped_ptr<webkit_blob::FileStreamReader> reader = |
| 335 device_media_async_file_util_->GetFileStreamReader( | 336 device_media_async_file_util_->GetFileStreamReader( |
| 336 url, offset, expected_modification_time, context); | 337 url, offset, expected_modification_time, context); |
| 337 DCHECK(reader); | 338 DCHECK(reader); |
| 338 return reader.Pass(); | 339 return reader.Pass(); |
| 339 } | 340 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 355 url.path(), | 356 url.path(), |
| 356 offset, | 357 offset, |
| 357 fileapi::FileStreamWriter::OPEN_EXISTING_FILE)); | 358 fileapi::FileStreamWriter::OPEN_EXISTING_FILE)); |
| 358 } | 359 } |
| 359 | 360 |
| 360 fileapi::FileSystemQuotaUtil* | 361 fileapi::FileSystemQuotaUtil* |
| 361 MediaFileSystemBackend::GetQuotaUtil() { | 362 MediaFileSystemBackend::GetQuotaUtil() { |
| 362 // No quota support. | 363 // No quota support. |
| 363 return NULL; | 364 return NULL; |
| 364 } | 365 } |
| OLD | NEW |