OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/linux/mtp_device_task_helper.h" | 5 #include "chrome/browser/media_galleries/linux/mtp_device_task_helper.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/media_galleries/linux/mtp_device_object_enumerator.h" | 8 #include "chrome/browser/media_galleries/linux/mtp_device_object_enumerator.h" |
9 #include "chrome/browser/media_galleries/linux/mtp_read_file_worker.h" | 9 #include "chrome/browser/media_galleries/linux/mtp_read_file_worker.h" |
10 #include "chrome/browser/media_galleries/linux/snapshot_file_details.h" | 10 #include "chrome/browser/media_galleries/linux/snapshot_file_details.h" |
11 #include "chrome/browser/storage_monitor/storage_monitor.h" | 11 #include "chrome/browser/storage_monitor/storage_monitor.h" |
12 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
13 #include "device/media_transfer_protocol/media_transfer_protocol_manager.h" | 13 #include "device/media_transfer_protocol/media_transfer_protocol_manager.h" |
14 #include "third_party/cros_system_api/dbus/service_constants.h" | 14 #include "third_party/cros_system_api/dbus/service_constants.h" |
15 #include "webkit/browser/fileapi/async_file_util.h" | 15 #include "webkit/browser/fileapi/async_file_util.h" |
16 #include "webkit/common/fileapi/file_system_util.h" | 16 #include "webkit/common/fileapi/file_system_util.h" |
17 | 17 |
18 namespace chrome { | |
19 | |
20 namespace { | 18 namespace { |
21 | 19 |
22 // Does nothing. | 20 // Does nothing. |
23 // This method is used to handle the results of | 21 // This method is used to handle the results of |
24 // MediaTransferProtocolManager::CloseStorage method call. | 22 // MediaTransferProtocolManager::CloseStorage method call. |
25 void DoNothing(bool error) { | 23 void DoNothing(bool error) { |
26 } | 24 } |
27 | 25 |
28 device::MediaTransferProtocolManager* GetMediaTransferProtocolManager() { | 26 device::MediaTransferProtocolManager* GetMediaTransferProtocolManager() { |
29 return StorageMonitor::GetInstance()->media_transfer_protocol_manager(); | 27 return StorageMonitor::GetInstance()->media_transfer_protocol_manager(); |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 } | 173 } |
176 | 174 |
177 void MTPDeviceTaskHelper::HandleDeviceError( | 175 void MTPDeviceTaskHelper::HandleDeviceError( |
178 const ErrorCallback& error_callback, | 176 const ErrorCallback& error_callback, |
179 base::PlatformFileError error) const { | 177 base::PlatformFileError error) const { |
180 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 178 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
181 content::BrowserThread::PostTask(content::BrowserThread::IO, | 179 content::BrowserThread::PostTask(content::BrowserThread::IO, |
182 FROM_HERE, | 180 FROM_HERE, |
183 base::Bind(error_callback, error)); | 181 base::Bind(error_callback, error)); |
184 } | 182 } |
185 | |
186 } // namespace chrome | |
OLD | NEW |