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" |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/message_loop/message_loop_proxy.h" | |
14 #include "base/sequenced_task_runner.h" | 13 #include "base/sequenced_task_runner.h" |
15 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
16 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
17 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
| 17 #include "base/thread_task_runner_handle.h" |
18 #include "base/threading/sequenced_worker_pool.h" | 18 #include "base/threading/sequenced_worker_pool.h" |
19 #include "chrome/browser/browser_process.h" | 19 #include "chrome/browser/browser_process.h" |
20 #include "chrome/browser/extensions/extension_service.h" | 20 #include "chrome/browser/extensions/extension_service.h" |
21 #include "chrome/browser/media_galleries/fileapi/device_media_async_file_util.h" | 21 #include "chrome/browser/media_galleries/fileapi/device_media_async_file_util.h" |
22 #include "chrome/browser/media_galleries/fileapi/media_file_validator_factory.h" | 22 #include "chrome/browser/media_galleries/fileapi/media_file_validator_factory.h" |
23 #include "chrome/browser/media_galleries/fileapi/media_path_filter.h" | 23 #include "chrome/browser/media_galleries/fileapi/media_path_filter.h" |
24 #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h" | 24 #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h" |
25 #include "chrome/browser/media_galleries/media_file_system_registry.h" | 25 #include "chrome/browser/media_galleries/media_file_system_registry.h" |
26 #include "chrome/browser/profiles/profile.h" | 26 #include "chrome/browser/profiles/profile.h" |
27 #include "content/public/browser/browser_thread.h" | 27 #include "content/public/browser/browser_thread.h" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 } | 232 } |
233 | 233 |
234 void MediaFileSystemBackend::Initialize(storage::FileSystemContext* context) { | 234 void MediaFileSystemBackend::Initialize(storage::FileSystemContext* context) { |
235 } | 235 } |
236 | 236 |
237 void MediaFileSystemBackend::ResolveURL( | 237 void MediaFileSystemBackend::ResolveURL( |
238 const FileSystemURL& url, | 238 const FileSystemURL& url, |
239 storage::OpenFileSystemMode mode, | 239 storage::OpenFileSystemMode mode, |
240 const OpenFileSystemCallback& callback) { | 240 const OpenFileSystemCallback& callback) { |
241 // We never allow opening a new FileSystem via usual ResolveURL. | 241 // We never allow opening a new FileSystem via usual ResolveURL. |
242 base::MessageLoopProxy::current()->PostTask( | 242 base::ThreadTaskRunnerHandle::Get()->PostTask( |
243 FROM_HERE, | 243 FROM_HERE, |
244 base::Bind(callback, | 244 base::Bind(callback, |
245 GURL(), | 245 GURL(), |
246 std::string(), | 246 std::string(), |
247 base::File::FILE_ERROR_SECURITY)); | 247 base::File::FILE_ERROR_SECURITY)); |
248 } | 248 } |
249 | 249 |
250 storage::AsyncFileUtil* MediaFileSystemBackend::GetAsyncFileUtil( | 250 storage::AsyncFileUtil* MediaFileSystemBackend::GetAsyncFileUtil( |
251 storage::FileSystemType type) { | 251 storage::FileSystemType type) { |
252 switch (type) { | 252 switch (type) { |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 | 377 |
378 const storage::ChangeObserverList* MediaFileSystemBackend::GetChangeObservers( | 378 const storage::ChangeObserverList* MediaFileSystemBackend::GetChangeObservers( |
379 storage::FileSystemType type) const { | 379 storage::FileSystemType type) const { |
380 return NULL; | 380 return NULL; |
381 } | 381 } |
382 | 382 |
383 const storage::AccessObserverList* MediaFileSystemBackend::GetAccessObservers( | 383 const storage::AccessObserverList* MediaFileSystemBackend::GetAccessObservers( |
384 storage::FileSystemType type) const { | 384 storage::FileSystemType type) const { |
385 return NULL; | 385 return NULL; |
386 } | 386 } |
OLD | NEW |