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

Unified Diff: content/browser/renderer_host/media/audio_input_renderer_host.cc

Issue 1545243002: Convert Pass()→std::move() in //content/browser (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: content/browser/renderer_host/media/audio_input_renderer_host.cc
diff --git a/content/browser/renderer_host/media/audio_input_renderer_host.cc b/content/browser/renderer_host/media/audio_input_renderer_host.cc
index bfbb182c2ba7d8ca0ca65872d00c1275634464e0..e338f0b2a89f22e974c56829e7e704639b8ac0a8 100644
--- a/content/browser/renderer_host/media/audio_input_renderer_host.cc
+++ b/content/browser/renderer_host/media/audio_input_renderer_host.cc
@@ -4,6 +4,8 @@
#include "content/browser/renderer_host/media/audio_input_renderer_host.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/files/file.h"
#include "base/memory/ref_counted.h"
@@ -54,7 +56,7 @@ base::File CreateDebugRecordingFile(base::FilePath file_path) {
PLOG_IF(ERROR, !recording_file.IsValid())
<< "Could not open debug recording file, error="
<< recording_file.error_details();
- return recording_file.Pass();
+ return recording_file;
}
void CloseFile(base::File file) {
@@ -585,10 +587,9 @@ void AudioInputRendererHost::DeleteEntry(AudioEntry* entry) {
#if defined(ENABLE_WEBRTC)
if (entry->input_debug_writer.get()) {
BrowserThread::PostTask(
- BrowserThread::FILE,
- FROM_HERE,
+ BrowserThread::FILE, FROM_HERE,
base::Bind(&DeleteInputDebugWriterOnFileThread,
- base::Passed(entry->input_debug_writer.Pass())));
+ base::Passed(std::move(entry->input_debug_writer))));
}
#endif
@@ -700,15 +701,11 @@ void AudioInputRendererHost::DoEnableDebugRecording(
return;
AudioEntry* entry = LookupById(stream_id);
if (!entry) {
- BrowserThread::PostTask(
- BrowserThread::FILE,
- FROM_HERE,
- base::Bind(
- &CloseFile,
- Passed(file.Pass())));
+ BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
+ base::Bind(&CloseFile, Passed(std::move(file))));
return;
}
- entry->input_debug_writer.reset(new AudioInputDebugWriter(file.Pass()));
+ entry->input_debug_writer.reset(new AudioInputDebugWriter(std::move(file)));
entry->controller->EnableDebugRecording(entry->input_debug_writer.get());
}
@@ -723,10 +720,9 @@ void AudioInputRendererHost::DeleteDebugWriter(int stream_id) {
if (entry->input_debug_writer.get()) {
BrowserThread::PostTask(
- BrowserThread::FILE,
- FROM_HERE,
+ BrowserThread::FILE, FROM_HERE,
base::Bind(&DeleteInputDebugWriterOnFileThread,
- base::Passed(entry->input_debug_writer.Pass())));
+ base::Passed(std::move(entry->input_debug_writer))));
}
}
#endif // defined(ENABLE_WEBRTC)

Powered by Google App Engine
This is Rietveld 408576698