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

Unified Diff: chrome/browser/media_galleries/fileapi/safe_audio_video_checker.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/fileapi/safe_audio_video_checker.cc
diff --git a/chrome/browser/media_galleries/fileapi/safe_audio_video_checker.cc b/chrome/browser/media_galleries/fileapi/safe_audio_video_checker.cc
index cf33f399c8232600ad7517d77352f99950072353..abcfde21b0ff5e59904d99fd0853ab23e935c8f8 100644
--- a/chrome/browser/media_galleries/fileapi/safe_audio_video_checker.cc
+++ b/chrome/browser/media_galleries/fileapi/safe_audio_video_checker.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/media_galleries/fileapi/safe_audio_video_checker.h"
#include <stdint.h>
+#include <utility>
#include "base/bind.h"
#include "base/callback.h"
@@ -26,7 +27,7 @@
SafeAudioVideoChecker::SafeAudioVideoChecker(
base::File file,
const storage::CopyOrMoveFileValidator::ResultCallback& callback)
- : state_(INITIAL_STATE), file_(file.Pass()), callback_(callback) {
+ : state_(INITIAL_STATE), file_(std::move(file)), callback_(callback) {
DCHECK(!callback.is_null());
}
@@ -59,9 +60,8 @@ void SafeAudioVideoChecker::OnProcessStarted() {
if (utility_process_host_->GetData().handle == base::kNullProcessHandle)
DLOG(ERROR) << "Child process handle is null";
- IPC::PlatformFileForTransit file_for_transit =
- IPC::TakeFileHandleForProcess(file_.Pass(),
- utility_process_host_->GetData().handle);
+ IPC::PlatformFileForTransit file_for_transit = IPC::TakeFileHandleForProcess(
+ std::move(file_), utility_process_host_->GetData().handle);
if (file_for_transit == IPC::InvalidPlatformFileForTransit()) {
OnCheckingFinished(false /* valid? */);
return;

Powered by Google App Engine
This is Rietveld 408576698