| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/scoped_mtp_device_map_entry.h" | 5 #include "chrome/browser/media_galleries/scoped_mtp_device_map_entry.h" |
| 6 | 6 |
| 7 #include "chrome/browser/media_galleries/fileapi/mtp_device_file_system_config.h
" | 7 #include "chrome/browser/media_galleries/fileapi/mtp_device_file_system_config.h
" |
| 8 | 8 |
| 9 #if defined(SUPPORT_MTP_DEVICE_FILESYSTEM) | 9 #if defined(SUPPORT_MTP_DEVICE_FILESYSTEM) |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/threading/sequenced_worker_pool.h" | 11 #include "base/threading/sequenced_worker_pool.h" |
| 12 #include "chrome/browser/media_galleries/fileapi/mtp_device_map_service.h" | 12 #include "chrome/browser/media_galleries/fileapi/mtp_device_map_service.h" |
| 13 #include "chrome/browser/media_galleries/mtp_device_delegate_impl.h" | 13 #include "chrome/browser/media_galleries/mtp_device_delegate_impl.h" |
| 14 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
| 15 #include "webkit/fileapi/file_system_task_runners.h" | 15 #include "webkit/browser/fileapi/file_system_task_runners.h" |
| 16 | 16 |
| 17 #endif | 17 #endif |
| 18 | 18 |
| 19 namespace chrome { | 19 namespace chrome { |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 #if defined(SUPPORT_MTP_DEVICE_FILESYSTEM) | 23 #if defined(SUPPORT_MTP_DEVICE_FILESYSTEM) |
| 24 bool IsMediaTaskRunnerThread() { | 24 bool IsMediaTaskRunnerThread() { |
| 25 base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool(); | 25 base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool(); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 void ScopedMTPDeviceMapEntry::OnMTPDeviceAsyncDelegateCreated( | 85 void ScopedMTPDeviceMapEntry::OnMTPDeviceAsyncDelegateCreated( |
| 86 MTPDeviceAsyncDelegate* delegate) { | 86 MTPDeviceAsyncDelegate* delegate) { |
| 87 #if defined(SUPPORT_MTP_DEVICE_FILESYSTEM) | 87 #if defined(SUPPORT_MTP_DEVICE_FILESYSTEM) |
| 88 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); | 88 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); |
| 89 MTPDeviceMapService::GetInstance()->AddAsyncDelegate( | 89 MTPDeviceMapService::GetInstance()->AddAsyncDelegate( |
| 90 device_location_, delegate); | 90 device_location_, delegate); |
| 91 #endif | 91 #endif |
| 92 } | 92 } |
| 93 | 93 |
| 94 } // namespace chrome | 94 } // namespace chrome |
| OLD | NEW |