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

Unified Diff: remoting/protocol/audio_writer.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/protocol/audio_writer.h ('k') | remoting/protocol/authenticator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/audio_writer.cc
diff --git a/remoting/protocol/audio_writer.cc b/remoting/protocol/audio_writer.cc
index be40f91717e51f159457dd8bd8926384a1cbb452..bee848595e1d8b6b5b1daf06e09776bed8956e02 100644
--- a/remoting/protocol/audio_writer.cc
+++ b/remoting/protocol/audio_writer.cc
@@ -5,6 +5,7 @@
#include "remoting/protocol/audio_writer.h"
#include "base/bind.h"
+#include "base/memory/ptr_util.h"
#include "net/socket/stream_socket.h"
#include "remoting/base/compound_buffer.h"
#include "remoting/base/constants.h"
@@ -19,19 +20,19 @@ namespace protocol {
AudioWriter::AudioWriter() : ChannelDispatcherBase(kAudioChannelName) {}
AudioWriter::~AudioWriter() {}
-void AudioWriter::ProcessAudioPacket(scoped_ptr<AudioPacket> packet,
+void AudioWriter::ProcessAudioPacket(std::unique_ptr<AudioPacket> packet,
const base::Closure& done) {
message_pipe()->Send(packet.get(), done);
}
// static
-scoped_ptr<AudioWriter> AudioWriter::Create(const SessionConfig& config) {
+std::unique_ptr<AudioWriter> AudioWriter::Create(const SessionConfig& config) {
if (!config.is_audio_enabled())
return nullptr;
- return make_scoped_ptr(new AudioWriter());
+ return base::WrapUnique(new AudioWriter());
}
-void AudioWriter::OnIncomingMessage(scoped_ptr<CompoundBuffer> message) {
+void AudioWriter::OnIncomingMessage(std::unique_ptr<CompoundBuffer> message) {
LOG(ERROR) << "Received unexpected message on the audio channel.";
}
« no previous file with comments | « remoting/protocol/audio_writer.h ('k') | remoting/protocol/authenticator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698