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

Unified Diff: remoting/host/audio_capturer_linux.cc

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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
« no previous file with comments | « remoting/host/audio_capturer.h ('k') | remoting/host/audio_capturer_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/audio_capturer_linux.cc
diff --git a/remoting/host/audio_capturer_linux.cc b/remoting/host/audio_capturer_linux.cc
index dea720adad5cef8bb82f44b939f26fb3bb5d5acc..bce9b6abfe28a06cce8ec4488e4a71ee1f761633 100644
--- a/remoting/host/audio_capturer_linux.cc
+++ b/remoting/host/audio_capturer_linux.cc
@@ -5,11 +5,13 @@
#include "remoting/host/audio_capturer_linux.h"
#include <stdint.h>
+
#include <utility>
#include "base/files/file_path.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "remoting/proto/audio.pb.h"
namespace remoting {
@@ -61,7 +63,7 @@ void AudioCapturerLinux::OnDataRead(
return;
}
- scoped_ptr<AudioPacket> packet(new AudioPacket());
+ std::unique_ptr<AudioPacket> packet(new AudioPacket());
packet->add_data(data->data());
packet->set_encoding(AudioPacket::ENCODING_RAW);
packet->set_sampling_rate(AudioPipeReader::kSamplingRate);
@@ -74,12 +76,12 @@ bool AudioCapturer::IsSupported() {
return g_pulseaudio_pipe_sink_reader.Get().get() != nullptr;
}
-scoped_ptr<AudioCapturer> AudioCapturer::Create() {
+std::unique_ptr<AudioCapturer> AudioCapturer::Create() {
scoped_refptr<AudioPipeReader> reader =
g_pulseaudio_pipe_sink_reader.Get();
if (!reader.get())
return nullptr;
- return make_scoped_ptr(new AudioCapturerLinux(reader));
+ return base::WrapUnique(new AudioCapturerLinux(reader));
}
} // namespace remoting
« no previous file with comments | « remoting/host/audio_capturer.h ('k') | remoting/host/audio_capturer_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698