| 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 <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/numerics/safe_conversions.h" | 10 #include "base/numerics/safe_conversions.h" |
| 11 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
| 12 #include "chrome/browser/media_galleries/linux/mtp_device_object_enumerator.h" | 12 #include "chrome/browser/media_galleries/linux/mtp_device_object_enumerator.h" |
| 13 #include "chrome/browser/media_galleries/linux/mtp_read_file_worker.h" | 13 #include "chrome/browser/media_galleries/linux/mtp_read_file_worker.h" |
| 14 #include "chrome/browser/media_galleries/linux/snapshot_file_details.h" | 14 #include "chrome/browser/media_galleries/linux/snapshot_file_details.h" |
| 15 #include "components/storage_monitor/storage_monitor.h" | 15 #include "components/storage_monitor/storage_monitor.h" |
| 16 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
| 17 #include "device/media_transfer_protocol/media_transfer_protocol_manager.h" | 17 #include "device/media_transfer_protocol/media_transfer_protocol_manager.h" |
| 18 #include "net/base/io_buffer.h" | 18 #include "net/base/io_buffer.h" |
| 19 #include "storage/browser/fileapi/async_file_util.h" |
| 19 #include "storage/common/fileapi/file_system_util.h" | 20 #include "storage/common/fileapi/file_system_util.h" |
| 20 #include "third_party/cros_system_api/dbus/service_constants.h" | 21 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 21 #include "webkit/browser/fileapi/async_file_util.h" | |
| 22 | 22 |
| 23 using storage_monitor::StorageMonitor; | 23 using storage_monitor::StorageMonitor; |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 | 26 |
| 27 // Does nothing. | 27 // Does nothing. |
| 28 // This method is used to handle the results of | 28 // This method is used to handle the results of |
| 29 // MediaTransferProtocolManager::CloseStorage method call. | 29 // MediaTransferProtocolManager::CloseStorage method call. |
| 30 void DoNothing(bool error) { | 30 void DoNothing(bool error) { |
| 31 } | 31 } |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 } | 267 } |
| 268 | 268 |
| 269 void MTPDeviceTaskHelper::HandleDeviceError( | 269 void MTPDeviceTaskHelper::HandleDeviceError( |
| 270 const ErrorCallback& error_callback, | 270 const ErrorCallback& error_callback, |
| 271 base::File::Error error) const { | 271 base::File::Error error) const { |
| 272 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 272 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 273 content::BrowserThread::PostTask(content::BrowserThread::IO, | 273 content::BrowserThread::PostTask(content::BrowserThread::IO, |
| 274 FROM_HERE, | 274 FROM_HERE, |
| 275 base::Bind(error_callback, error)); | 275 base::Bind(error_callback, error)); |
| 276 } | 276 } |
| OLD | NEW |