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 <vector> |
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" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/message_loop/message_loop_proxy.h" | 12 #include "base/message_loop/message_loop_proxy.h" |
13 #include "base/sequenced_task_runner.h" | 13 #include "base/sequenced_task_runner.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
17 #include "base/threading/sequenced_worker_pool.h" | 17 #include "base/threading/sequenced_worker_pool.h" |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 type == storage::kFileSystemTypeItunes || | 319 type == storage::kFileSystemTypeItunes || |
320 type == storage::kFileSystemTypePicasa || | 320 type == storage::kFileSystemTypePicasa || |
321 type == storage::kFileSystemTypeIphoto); | 321 type == storage::kFileSystemTypeIphoto); |
322 return true; | 322 return true; |
323 } | 323 } |
324 | 324 |
325 scoped_ptr<storage::FileStreamReader> | 325 scoped_ptr<storage::FileStreamReader> |
326 MediaFileSystemBackend::CreateFileStreamReader( | 326 MediaFileSystemBackend::CreateFileStreamReader( |
327 const FileSystemURL& url, | 327 const FileSystemURL& url, |
328 int64 offset, | 328 int64 offset, |
| 329 int64 length, |
329 const base::Time& expected_modification_time, | 330 const base::Time& expected_modification_time, |
330 FileSystemContext* context) const { | 331 FileSystemContext* context) const { |
331 if (url.type() == storage::kFileSystemTypeDeviceMedia) { | 332 if (url.type() == storage::kFileSystemTypeDeviceMedia) { |
332 DCHECK(device_media_async_file_util_); | 333 DCHECK(device_media_async_file_util_); |
333 scoped_ptr<storage::FileStreamReader> reader = | 334 scoped_ptr<storage::FileStreamReader> reader = |
334 device_media_async_file_util_->GetFileStreamReader( | 335 device_media_async_file_util_->GetFileStreamReader( |
335 url, offset, expected_modification_time, context); | 336 url, offset, expected_modification_time, context); |
336 DCHECK(reader); | 337 DCHECK(reader); |
337 return reader.Pass(); | 338 return reader.Pass(); |
338 } | 339 } |
(...skipping 16 matching lines...) Expand all Loading... |
355 context->default_file_task_runner(), | 356 context->default_file_task_runner(), |
356 url.path(), | 357 url.path(), |
357 offset, | 358 offset, |
358 storage::FileStreamWriter::OPEN_EXISTING_FILE)); | 359 storage::FileStreamWriter::OPEN_EXISTING_FILE)); |
359 } | 360 } |
360 | 361 |
361 storage::FileSystemQuotaUtil* MediaFileSystemBackend::GetQuotaUtil() { | 362 storage::FileSystemQuotaUtil* MediaFileSystemBackend::GetQuotaUtil() { |
362 // No quota support. | 363 // No quota support. |
363 return NULL; | 364 return NULL; |
364 } | 365 } |
OLD | NEW |