summaryrefslogtreecommitdiffstats
path: root/chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.cc')
-rw-r--r--chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.cc b/chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.cc
index b4f1a99..63d0bc8 100644
--- a/chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.cc
+++ b/chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.cc
@@ -627,15 +627,10 @@ void MTPDeviceDelegateImplLinux::ReadBytes(
const ErrorCallback& error_callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
DCHECK(!device_file_path.empty());
- base::Closure closure =
- base::Bind(&MTPDeviceDelegateImplLinux::ReadBytesInternal,
- weak_ptr_factory_.GetWeakPtr(),
- device_file_path,
- buf,
- offset,
- buf_len,
- success_callback,
- error_callback);
+ base::Closure closure = base::Bind(
+ &MTPDeviceDelegateImplLinux::ReadBytesInternal,
+ weak_ptr_factory_.GetWeakPtr(), device_file_path, base::RetainedRef(buf),
+ offset, buf_len, success_callback, error_callback);
EnsureInitAndRunTask(PendingTaskInfo(device_file_path,
content::BrowserThread::IO,
FROM_HERE,