Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1999)

Unified Diff: chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.cc

Issue 518743002: Media gallery fixups for scoped_refptr<T> operator T* removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add callback typedef Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.cc
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 2cc3f19b39666fd38fe9e4ac623bf6b7670d31d7..b1cd91c59e85b22ebcf1fb10cdbc323495c7d5be 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
@@ -410,7 +410,9 @@ bool MTPDeviceDelegateImplLinux::IsStreaming() {
void MTPDeviceDelegateImplLinux::ReadBytes(
const base::FilePath& device_file_path,
- net::IOBuffer* buf, int64 offset, int buf_len,
+ const scoped_refptr<net::IOBuffer>& buf,
+ int64 offset,
+ int buf_len,
const ReadBytesSuccessCallback& success_callback,
const ErrorCallback& error_callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
@@ -419,7 +421,7 @@ void MTPDeviceDelegateImplLinux::ReadBytes(
base::Bind(&MTPDeviceDelegateImplLinux::ReadBytesInternal,
weak_ptr_factory_.GetWeakPtr(),
device_file_path,
- make_scoped_refptr(buf),
+ buf,
offset,
buf_len,
success_callback,

Powered by Google App Engine
This is Rietveld 408576698