Commit 993c5261 authored by Xida Chen's avatar Xida Chen Committed by Chromium LUCI CQ

[Code health] Convert ReadBytesSuccessCallback to OnceCallback

This is a code health CL, no behaviour change is expected.

Bug: 1152278
Change-Id: Ic4a28f6b32b30427c8a5da2f72e1c3a55c85595a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2597639Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Commit-Queue: Xida Chen <xidachen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#838231}
parent ff427b06
...@@ -240,16 +240,15 @@ void WriteDataIntoSnapshotFileOnUIThread( ...@@ -240,16 +240,15 @@ void WriteDataIntoSnapshotFileOnUIThread(
// |storage_name| specifies the name of the storage device. // |storage_name| specifies the name of the storage device.
// |read_only| specifies the mode of the storage device. // |read_only| specifies the mode of the storage device.
// |request| is a struct containing details about the byte read request. // |request| is a struct containing details about the byte read request.
void ReadBytesOnUIThread( void ReadBytesOnUIThread(const std::string& storage_name,
const std::string& storage_name, const bool read_only,
const bool read_only, MTPDeviceAsyncDelegate::ReadBytesRequest request) {
const MTPDeviceAsyncDelegate::ReadBytesRequest& request) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
MTPDeviceTaskHelper* task_helper = MTPDeviceTaskHelper* task_helper =
GetDeviceTaskHelperForStorage(storage_name, read_only); GetDeviceTaskHelperForStorage(storage_name, read_only);
if (!task_helper) if (!task_helper)
return; return;
task_helper->ReadBytes(request); task_helper->ReadBytes(std::move(request));
} }
// Renames |object_id| to |new_name|. // Renames |object_id| to |new_name|.
...@@ -644,14 +643,14 @@ void MTPDeviceDelegateImplLinux::ReadBytes( ...@@ -644,14 +643,14 @@ void MTPDeviceDelegateImplLinux::ReadBytes(
const scoped_refptr<net::IOBuffer>& buf, const scoped_refptr<net::IOBuffer>& buf,
int64_t offset, int64_t offset,
int buf_len, int buf_len,
const ReadBytesSuccessCallback& success_callback, ReadBytesSuccessCallback success_callback,
const ErrorCallback& error_callback) { const ErrorCallback& error_callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO); DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
DCHECK(!device_file_path.empty()); DCHECK(!device_file_path.empty());
base::OnceClosure closure = base::BindOnce( base::OnceClosure closure = base::BindOnce(
&MTPDeviceDelegateImplLinux::ReadBytesInternal, &MTPDeviceDelegateImplLinux::ReadBytesInternal,
weak_ptr_factory_.GetWeakPtr(), device_file_path, base::RetainedRef(buf), weak_ptr_factory_.GetWeakPtr(), device_file_path, base::RetainedRef(buf),
offset, buf_len, success_callback, error_callback); offset, buf_len, std::move(success_callback), error_callback);
EnsureInitAndRunTask(PendingTaskInfo(device_file_path, EnsureInitAndRunTask(PendingTaskInfo(device_file_path,
content::BrowserThread::IO, FROM_HERE, content::BrowserThread::IO, FROM_HERE,
std::move(closure))); std::move(closure)));
...@@ -1009,7 +1008,7 @@ void MTPDeviceDelegateImplLinux::ReadBytesInternal( ...@@ -1009,7 +1008,7 @@ void MTPDeviceDelegateImplLinux::ReadBytesInternal(
net::IOBuffer* buf, net::IOBuffer* buf,
int64_t offset, int64_t offset,
int buf_len, int buf_len,
const ReadBytesSuccessCallback& success_callback, ReadBytesSuccessCallback success_callback,
const ErrorCallback& error_callback) { const ErrorCallback& error_callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO); DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
...@@ -1017,14 +1016,15 @@ void MTPDeviceDelegateImplLinux::ReadBytesInternal( ...@@ -1017,14 +1016,15 @@ void MTPDeviceDelegateImplLinux::ReadBytesInternal(
if (file_id) { if (file_id) {
ReadBytesRequest request( ReadBytesRequest request(
*file_id, buf, offset, buf_len, *file_id, buf, offset, buf_len,
base::Bind(&MTPDeviceDelegateImplLinux::OnDidReadBytes, base::BindOnce(&MTPDeviceDelegateImplLinux::OnDidReadBytes,
weak_ptr_factory_.GetWeakPtr(), success_callback), weak_ptr_factory_.GetWeakPtr(),
std::move(success_callback)),
base::BindRepeating(&MTPDeviceDelegateImplLinux::HandleDeviceFileError, base::BindRepeating(&MTPDeviceDelegateImplLinux::HandleDeviceFileError,
weak_ptr_factory_.GetWeakPtr(), error_callback, weak_ptr_factory_.GetWeakPtr(), error_callback,
*file_id)); *file_id));
base::OnceClosure closure = base::BindOnce( base::OnceClosure closure = base::BindOnce(
&ReadBytesOnUIThread, storage_name_, read_only_, request); &ReadBytesOnUIThread, storage_name_, read_only_, std::move(request));
EnsureInitAndRunTask(PendingTaskInfo(base::FilePath(), EnsureInitAndRunTask(PendingTaskInfo(base::FilePath(),
content::BrowserThread::UI, FROM_HERE, content::BrowserThread::UI, FROM_HERE,
std::move(closure))); std::move(closure)));
...@@ -1635,10 +1635,11 @@ void MTPDeviceDelegateImplLinux::OnWriteDataIntoSnapshotFileError( ...@@ -1635,10 +1635,11 @@ void MTPDeviceDelegateImplLinux::OnWriteDataIntoSnapshotFileError(
} }
void MTPDeviceDelegateImplLinux::OnDidReadBytes( void MTPDeviceDelegateImplLinux::OnDidReadBytes(
const ReadBytesSuccessCallback& success_callback, ReadBytesSuccessCallback success_callback,
const base::File::Info& file_info, int bytes_read) { const base::File::Info& file_info,
int bytes_read) {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO); DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
success_callback.Run(file_info, bytes_read); std::move(success_callback).Run(file_info, bytes_read);
PendingRequestDone(); PendingRequestDone();
} }
......
...@@ -104,7 +104,7 @@ class MTPDeviceDelegateImplLinux : public MTPDeviceAsyncDelegate { ...@@ -104,7 +104,7 @@ class MTPDeviceDelegateImplLinux : public MTPDeviceAsyncDelegate {
const scoped_refptr<net::IOBuffer>& buf, const scoped_refptr<net::IOBuffer>& buf,
int64_t offset, int64_t offset,
int buf_len, int buf_len,
const ReadBytesSuccessCallback& success_callback, ReadBytesSuccessCallback success_callback,
const ErrorCallback& error_callback) override; const ErrorCallback& error_callback) override;
bool IsReadOnly() const override; bool IsReadOnly() const override;
void CopyFileLocal( void CopyFileLocal(
...@@ -166,7 +166,7 @@ class MTPDeviceDelegateImplLinux : public MTPDeviceAsyncDelegate { ...@@ -166,7 +166,7 @@ class MTPDeviceDelegateImplLinux : public MTPDeviceAsyncDelegate {
net::IOBuffer* buf, net::IOBuffer* buf,
int64_t offset, int64_t offset,
int buf_len, int buf_len,
const ReadBytesSuccessCallback& success_callback, ReadBytesSuccessCallback success_callback,
const ErrorCallback& error_callback); const ErrorCallback& error_callback);
void MoveFileLocalInternal( void MoveFileLocalInternal(
const base::FilePath& source_file_path, const base::FilePath& source_file_path,
...@@ -377,8 +377,9 @@ class MTPDeviceDelegateImplLinux : public MTPDeviceAsyncDelegate { ...@@ -377,8 +377,9 @@ class MTPDeviceDelegateImplLinux : public MTPDeviceAsyncDelegate {
// //
// |success_callback| is invoked to notify the caller about the read bytes. // |success_callback| is invoked to notify the caller about the read bytes.
// |bytes_read| is the number of bytes read. // |bytes_read| is the number of bytes read.
void OnDidReadBytes(const ReadBytesSuccessCallback& success_callback, void OnDidReadBytes(ReadBytesSuccessCallback success_callback,
const base::File::Info& file_info, int bytes_read); const base::File::Info& file_info,
int bytes_read);
// Called when FillFileCache() succeeds. // Called when FillFileCache() succeeds.
void OnDidFillFileCache(const base::FilePath& path, void OnDidFillFileCache(const base::FilePath& path,
......
...@@ -181,7 +181,7 @@ void MTPDeviceTaskHelper::WriteDataIntoSnapshotFile( ...@@ -181,7 +181,7 @@ void MTPDeviceTaskHelper::WriteDataIntoSnapshotFile(
} }
void MTPDeviceTaskHelper::ReadBytes( void MTPDeviceTaskHelper::ReadBytes(
const MTPDeviceAsyncDelegate::ReadBytesRequest& request) { MTPDeviceAsyncDelegate::ReadBytesRequest request) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (device_handle_.empty()) { if (device_handle_.empty()) {
return HandleDeviceError(request.error_callback, return HandleDeviceError(request.error_callback,
...@@ -192,7 +192,7 @@ void MTPDeviceTaskHelper::ReadBytes( ...@@ -192,7 +192,7 @@ void MTPDeviceTaskHelper::ReadBytes(
GetMediaTransferProtocolManager()->GetFileInfo( GetMediaTransferProtocolManager()->GetFileInfo(
device_handle_, file_ids, device_handle_, file_ids,
base::BindOnce(&MTPDeviceTaskHelper::OnGetFileInfoToReadBytes, base::BindOnce(&MTPDeviceTaskHelper::OnGetFileInfoToReadBytes,
weak_ptr_factory_.GetWeakPtr(), request)); weak_ptr_factory_.GetWeakPtr(), std::move(request)));
} }
void MTPDeviceTaskHelper::RenameObject( void MTPDeviceTaskHelper::RenameObject(
...@@ -393,7 +393,7 @@ void MTPDeviceTaskHelper::OnCheckedDirectoryEmpty( ...@@ -393,7 +393,7 @@ void MTPDeviceTaskHelper::OnCheckedDirectoryEmpty(
} }
void MTPDeviceTaskHelper::OnGetFileInfoToReadBytes( void MTPDeviceTaskHelper::OnGetFileInfoToReadBytes(
const MTPDeviceAsyncDelegate::ReadBytesRequest& request, MTPDeviceAsyncDelegate::ReadBytesRequest request,
std::vector<device::mojom::MtpFileEntryPtr> entries, std::vector<device::mojom::MtpFileEntryPtr> entries,
bool error) { bool error) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
...@@ -418,7 +418,8 @@ void MTPDeviceTaskHelper::OnGetFileInfoToReadBytes( ...@@ -418,7 +418,8 @@ void MTPDeviceTaskHelper::OnGetFileInfoToReadBytes(
} }
if (request.offset == file_info.size) { if (request.offset == file_info.size) {
content::GetIOThreadTaskRunner({})->PostTask( content::GetIOThreadTaskRunner({})->PostTask(
FROM_HERE, base::BindOnce(request.success_callback, file_info, 0u)); FROM_HERE,
base::BindOnce(std::move(request.success_callback), file_info, 0u));
return; return;
} }
...@@ -430,11 +431,12 @@ void MTPDeviceTaskHelper::OnGetFileInfoToReadBytes( ...@@ -430,11 +431,12 @@ void MTPDeviceTaskHelper::OnGetFileInfoToReadBytes(
device_handle_, request.file_id, device_handle_, request.file_id,
base::checked_cast<uint32_t>(request.offset), bytes_to_read, base::checked_cast<uint32_t>(request.offset), bytes_to_read,
base::BindOnce(&MTPDeviceTaskHelper::OnDidReadBytes, base::BindOnce(&MTPDeviceTaskHelper::OnDidReadBytes,
weak_ptr_factory_.GetWeakPtr(), request, file_info)); weak_ptr_factory_.GetWeakPtr(), std::move(request),
file_info));
} }
void MTPDeviceTaskHelper::OnDidReadBytes( void MTPDeviceTaskHelper::OnDidReadBytes(
const MTPDeviceAsyncDelegate::ReadBytesRequest& request, MTPDeviceAsyncDelegate::ReadBytesRequest request,
const base::File::Info& file_info, const base::File::Info& file_info,
const std::string& data, const std::string& data,
bool error) const { bool error) const {
...@@ -448,8 +450,8 @@ void MTPDeviceTaskHelper::OnDidReadBytes( ...@@ -448,8 +450,8 @@ void MTPDeviceTaskHelper::OnDidReadBytes(
std::copy(data.begin(), data.end(), request.buf->data()); std::copy(data.begin(), data.end(), request.buf->data());
content::GetIOThreadTaskRunner({})->PostTask( content::GetIOThreadTaskRunner({})->PostTask(
FROM_HERE, FROM_HERE, base::BindOnce(std::move(request.success_callback), file_info,
base::BindOnce(request.success_callback, file_info, data.length())); data.length()));
} }
void MTPDeviceTaskHelper::OnRenameObject( void MTPDeviceTaskHelper::OnRenameObject(
......
...@@ -138,7 +138,7 @@ class MTPDeviceTaskHelper { ...@@ -138,7 +138,7 @@ class MTPDeviceTaskHelper {
// |request| contains details about the byte request including the file path, // |request| contains details about the byte request including the file path,
// byte range, and the callbacks. The callbacks specified within |request| are // byte range, and the callbacks. The callbacks specified within |request| are
// called on the IO thread to notify the caller about success or failure. // called on the IO thread to notify the caller about success or failure.
void ReadBytes(const MTPDeviceAsyncDelegate::ReadBytesRequest& request); void ReadBytes(MTPDeviceAsyncDelegate::ReadBytesRequest request);
// Forwards RenameObject request to the MediaTransferProtocolManager. // Forwards RenameObject request to the MediaTransferProtocolManager.
void RenameObject(const uint32_t object_id, void RenameObject(const uint32_t object_id,
...@@ -242,7 +242,7 @@ class MTPDeviceTaskHelper { ...@@ -242,7 +242,7 @@ class MTPDeviceTaskHelper {
// Intermediate step to finish a ReadBytes request. // Intermediate step to finish a ReadBytes request.
void OnGetFileInfoToReadBytes( void OnGetFileInfoToReadBytes(
const MTPDeviceAsyncDelegate::ReadBytesRequest& request, MTPDeviceAsyncDelegate::ReadBytesRequest request,
std::vector<device::mojom::MtpFileEntryPtr> entries, std::vector<device::mojom::MtpFileEntryPtr> entries,
bool error); bool error);
...@@ -255,11 +255,10 @@ class MTPDeviceTaskHelper { ...@@ -255,11 +255,10 @@ class MTPDeviceTaskHelper {
// If there is an error, |error| is set to true, the buffer within |request| // If there is an error, |error| is set to true, the buffer within |request|
// is untouched, and the error callback within |request| is invoked on the // is untouched, and the error callback within |request| is invoked on the
// IO thread to notify the caller. // IO thread to notify the caller.
void OnDidReadBytes( void OnDidReadBytes(MTPDeviceAsyncDelegate::ReadBytesRequest request,
const MTPDeviceAsyncDelegate::ReadBytesRequest& request, const base::File::Info& file_info,
const base::File::Info& file_info, const std::string& data,
const std::string& data, bool error) const;
bool error) const;
// Called when RenameObject completes. // Called when RenameObject completes.
void OnRenameObject(const RenameObjectSuccessCallback& success_callback, void OnRenameObject(const RenameObjectSuccessCallback& success_callback,
......
...@@ -11,16 +11,22 @@ MTPDeviceAsyncDelegate::ReadBytesRequest::ReadBytesRequest( ...@@ -11,16 +11,22 @@ MTPDeviceAsyncDelegate::ReadBytesRequest::ReadBytesRequest(
net::IOBuffer* buf, net::IOBuffer* buf,
int64_t offset, int64_t offset,
int buf_len, int buf_len,
const ReadBytesSuccessCallback& success_callback, ReadBytesSuccessCallback success_callback,
const ErrorCallback& error_callback) const ErrorCallback& error_callback)
: file_id(file_id), : file_id(file_id),
buf(buf), buf(buf),
offset(offset), offset(offset),
buf_len(buf_len), buf_len(buf_len),
success_callback(success_callback), success_callback(std::move(success_callback)),
error_callback(error_callback) {} error_callback(error_callback) {}
MTPDeviceAsyncDelegate::ReadBytesRequest::ReadBytesRequest( MTPDeviceAsyncDelegate::ReadBytesRequest::ReadBytesRequest(
const ReadBytesRequest& other) = default; ReadBytesRequest&& other)
: file_id(other.file_id),
buf(other.buf),
offset(other.offset),
buf_len(other.buf_len),
success_callback(std::move(other.success_callback)),
error_callback(other.error_callback) {}
MTPDeviceAsyncDelegate::ReadBytesRequest::~ReadBytesRequest() {} MTPDeviceAsyncDelegate::ReadBytesRequest::~ReadBytesRequest() {}
...@@ -54,18 +54,18 @@ class MTPDeviceAsyncDelegate { ...@@ -54,18 +54,18 @@ class MTPDeviceAsyncDelegate {
CreateSnapshotFileSuccessCallback; CreateSnapshotFileSuccessCallback;
// A callback to be called when ReadBytes method call succeeds. // A callback to be called when ReadBytes method call succeeds.
typedef base::Callback< typedef base::OnceCallback<void(const base::File::Info& file_info,
void(const base::File::Info& file_info, int bytes_read)>
int bytes_read)> ReadBytesSuccessCallback; ReadBytesSuccessCallback;
struct ReadBytesRequest { struct ReadBytesRequest {
ReadBytesRequest(uint32_t file_id, ReadBytesRequest(uint32_t file_id,
net::IOBuffer* buf, net::IOBuffer* buf,
int64_t offset, int64_t offset,
int buf_len, int buf_len,
const ReadBytesSuccessCallback& success_callback, ReadBytesSuccessCallback success_callback,
const ErrorCallback& error_callback); const ErrorCallback& error_callback);
ReadBytesRequest(const ReadBytesRequest& other); ReadBytesRequest(ReadBytesRequest&& other);
~ReadBytesRequest(); ~ReadBytesRequest();
uint32_t file_id; uint32_t file_id;
...@@ -142,7 +142,7 @@ class MTPDeviceAsyncDelegate { ...@@ -142,7 +142,7 @@ class MTPDeviceAsyncDelegate {
const scoped_refptr<net::IOBuffer>& buf, const scoped_refptr<net::IOBuffer>& buf,
int64_t offset, int64_t offset,
int buf_len, int buf_len,
const ReadBytesSuccessCallback& success_callback, ReadBytesSuccessCallback success_callback,
const ErrorCallback& error_callback) = 0; const ErrorCallback& error_callback) = 0;
// Returns true if storage is opened for read only. // Returns true if storage is opened for read only.
......
...@@ -64,17 +64,17 @@ int MTPFileStreamReader::Read(net::IOBuffer* buf, ...@@ -64,17 +64,17 @@ int MTPFileStreamReader::Read(net::IOBuffer* buf,
header_buf_len = net::kMaxBytesToSniff; header_buf_len = net::kMaxBytesToSniff;
} }
ReadBytes( ReadBytes(url_, header_buf.get(), 0, header_buf_len,
url_, header_buf.get(), 0, header_buf_len, base::BindOnce(&MTPFileStreamReader::FinishValidateMediaHeader,
base::Bind(&MTPFileStreamReader::FinishValidateMediaHeader, weak_factory_.GetWeakPtr(),
weak_factory_.GetWeakPtr(), base::RetainedRef(header_buf), base::RetainedRef(header_buf),
base::RetainedRef(buf), buf_len)); base::RetainedRef(buf), buf_len));
return net::ERR_IO_PENDING; return net::ERR_IO_PENDING;
} }
ReadBytes( ReadBytes(url_, buf, current_offset_, buf_len,
url_, buf, current_offset_, buf_len, base::BindOnce(&MTPFileStreamReader::FinishRead,
base::Bind(&MTPFileStreamReader::FinishRead, weak_factory_.GetWeakPtr())); weak_factory_.GetWeakPtr()));
return net::ERR_IO_PENDING; return net::ERR_IO_PENDING;
} }
...@@ -123,9 +123,9 @@ void MTPFileStreamReader::FinishValidateMediaHeader( ...@@ -123,9 +123,9 @@ void MTPFileStreamReader::FinishValidateMediaHeader(
// Header buffer isn't the same as the original read buffer. Make a separate // Header buffer isn't the same as the original read buffer. Make a separate
// request for that. // request for that.
ReadBytes( ReadBytes(url_, buf, current_offset_, buf_len,
url_, buf, current_offset_, buf_len, base::BindOnce(&MTPFileStreamReader::FinishRead,
base::Bind(&MTPFileStreamReader::FinishRead, weak_factory_.GetWeakPtr())); weak_factory_.GetWeakPtr()));
} }
void MTPFileStreamReader::FinishRead(const base::File::Info& file_info, void MTPFileStreamReader::FinishRead(const base::File::Info& file_info,
...@@ -169,7 +169,7 @@ void MTPFileStreamReader::ReadBytes( ...@@ -169,7 +169,7 @@ void MTPFileStreamReader::ReadBytes(
const scoped_refptr<net::IOBuffer>& buf, const scoped_refptr<net::IOBuffer>& buf,
int64_t offset, int64_t offset,
int buf_len, int buf_len,
const MTPDeviceAsyncDelegate::ReadBytesSuccessCallback& success_callback) { MTPDeviceAsyncDelegate::ReadBytesSuccessCallback success_callback) {
MTPDeviceAsyncDelegate* delegate = MTPDeviceAsyncDelegate* delegate =
MTPDeviceMapService::GetInstance()->GetMTPDeviceAsyncDelegate(url); MTPDeviceMapService::GetInstance()->GetMTPDeviceAsyncDelegate(url);
if (!delegate) { if (!delegate) {
...@@ -178,7 +178,7 @@ void MTPFileStreamReader::ReadBytes( ...@@ -178,7 +178,7 @@ void MTPFileStreamReader::ReadBytes(
} }
delegate->ReadBytes( delegate->ReadBytes(
url.path(), buf, offset, buf_len, success_callback, url.path(), buf, offset, buf_len, std::move(success_callback),
base::BindRepeating( base::BindRepeating(
&MTPFileStreamReader::CallReadCallbackwithPlatformFileError, &MTPFileStreamReader::CallReadCallbackwithPlatformFileError,
weak_factory_.GetWeakPtr())); weak_factory_.GetWeakPtr()));
......
...@@ -57,7 +57,7 @@ class MTPFileStreamReader : public storage::FileStreamReader { ...@@ -57,7 +57,7 @@ class MTPFileStreamReader : public storage::FileStreamReader {
const scoped_refptr<net::IOBuffer>& buf, const scoped_refptr<net::IOBuffer>& buf,
int64_t offset, int64_t offset,
int buf_len, int buf_len,
const MTPDeviceAsyncDelegate::ReadBytesSuccessCallback& success_callback); MTPDeviceAsyncDelegate::ReadBytesSuccessCallback success_callback);
scoped_refptr<storage::FileSystemContext> file_system_context_; scoped_refptr<storage::FileSystemContext> file_system_context_;
storage::FileSystemURL url_; storage::FileSystemURL url_;
......
...@@ -61,7 +61,7 @@ class MTPDeviceDelegateImplMac : public MTPDeviceAsyncDelegate { ...@@ -61,7 +61,7 @@ class MTPDeviceDelegateImplMac : public MTPDeviceAsyncDelegate {
const scoped_refptr<net::IOBuffer>& buf, const scoped_refptr<net::IOBuffer>& buf,
int64_t offset, int64_t offset,
int buf_len, int buf_len,
const ReadBytesSuccessCallback& success_callback, ReadBytesSuccessCallback success_callback,
const ErrorCallback& error_callback) override; const ErrorCallback& error_callback) override;
bool IsReadOnly() const override; bool IsReadOnly() const override;
void CopyFileLocal( void CopyFileLocal(
......
...@@ -215,7 +215,7 @@ void MTPDeviceDelegateImplMac::ReadBytes( ...@@ -215,7 +215,7 @@ void MTPDeviceDelegateImplMac::ReadBytes(
const scoped_refptr<net::IOBuffer>& buf, const scoped_refptr<net::IOBuffer>& buf,
int64_t offset, int64_t offset,
int buf_len, int buf_len,
const ReadBytesSuccessCallback& success_callback, ReadBytesSuccessCallback success_callback,
const ErrorCallback& error_callback) { const ErrorCallback& error_callback) {
NOTREACHED(); NOTREACHED();
} }
......
...@@ -446,7 +446,7 @@ void MTPDeviceDelegateImplWin::ReadBytes( ...@@ -446,7 +446,7 @@ void MTPDeviceDelegateImplWin::ReadBytes(
const scoped_refptr<net::IOBuffer>& buf, const scoped_refptr<net::IOBuffer>& buf,
int64_t offset, int64_t offset,
int buf_len, int buf_len,
const ReadBytesSuccessCallback& success_callback, ReadBytesSuccessCallback success_callback,
const ErrorCallback& error_callback) { const ErrorCallback& error_callback) {
NOTREACHED(); NOTREACHED();
} }
......
...@@ -117,7 +117,7 @@ class MTPDeviceDelegateImplWin : public MTPDeviceAsyncDelegate { ...@@ -117,7 +117,7 @@ class MTPDeviceDelegateImplWin : public MTPDeviceAsyncDelegate {
const scoped_refptr<net::IOBuffer>& buf, const scoped_refptr<net::IOBuffer>& buf,
int64_t offset, int64_t offset,
int buf_len, int buf_len,
const ReadBytesSuccessCallback& success_callback, ReadBytesSuccessCallback success_callback,
const ErrorCallback& error_callback) override; const ErrorCallback& error_callback) override;
bool IsReadOnly() const override; bool IsReadOnly() const override;
void CopyFileLocal( void CopyFileLocal(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment