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

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

Issue 1551503002: Convert Pass()→std::move() in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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_read_file_worker.cc
diff --git a/chrome/browser/media_galleries/linux/mtp_read_file_worker.cc b/chrome/browser/media_galleries/linux/mtp_read_file_worker.cc
index 4d554f33876d7f9287895b776e0593d69d1a6d7d..bfd478050d6e233a0f27f134ebcde7a5b4ad96a3 100644
--- a/chrome/browser/media_galleries/linux/mtp_read_file_worker.cc
+++ b/chrome/browser/media_galleries/linux/mtp_read_file_worker.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/media_galleries/linux/mtp_read_file_worker.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
@@ -83,7 +85,7 @@ void MTPReadFileWorker::OnDidReadDataChunkFromDeviceFile(
snapshot_file_details->set_error_occurred(
error || (data.size() != snapshot_file_details->BytesToRead()));
if (snapshot_file_details->error_occurred()) {
- OnDidWriteIntoSnapshotFile(snapshot_file_details.Pass());
+ OnDidWriteIntoSnapshotFile(std::move(snapshot_file_details));
return;
}
@@ -108,13 +110,13 @@ void MTPReadFileWorker::OnDidWriteDataChunkIntoSnapshotFile(
DCHECK(snapshot_file_details.get());
if (snapshot_file_details->AddBytesWritten(bytes_written)) {
if (!snapshot_file_details->IsSnapshotFileWriteComplete()) {
- ReadDataChunkFromDeviceFile(snapshot_file_details.Pass());
+ ReadDataChunkFromDeviceFile(std::move(snapshot_file_details));
return;
}
} else {
snapshot_file_details->set_error_occurred(true);
}
- OnDidWriteIntoSnapshotFile(snapshot_file_details.Pass());
+ OnDidWriteIntoSnapshotFile(std::move(snapshot_file_details));
}
void MTPReadFileWorker::OnDidWriteIntoSnapshotFile(

Powered by Google App Engine
This is Rietveld 408576698