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

Unified Diff: remoting/client/audio_player_unittest.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/client/audio_player.cc ('k') | remoting/client/chromoting_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/audio_player_unittest.cc
diff --git a/remoting/client/audio_player_unittest.cc b/remoting/client/audio_player_unittest.cc
index 1bfb86f3836348907809416bfc0e644496274869..8ab50d4d26f461b2d1af8bfa261b91e6d7cfdd11 100644
--- a/remoting/client/audio_player_unittest.cc
+++ b/remoting/client/audio_player_unittest.cc
@@ -6,8 +6,9 @@
#include <stdint.h>
+#include <memory>
+
#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
@@ -82,13 +83,14 @@ class AudioPlayerTest : public ::testing::Test {
return static_cast<int>(audio_->bytes_consumed_);
}
- scoped_ptr<AudioPlayer> audio_;
- scoped_ptr<char[]> buffer_;
+ std::unique_ptr<AudioPlayer> audio_;
+ std::unique_ptr<char[]> buffer_;
};
-scoped_ptr<AudioPacket> CreatePacketWithSamplingRate(
- AudioPacket::SamplingRate rate, int samples) {
- scoped_ptr<AudioPacket> packet(new AudioPacket());
+std::unique_ptr<AudioPacket> CreatePacketWithSamplingRate(
+ AudioPacket::SamplingRate rate,
+ int samples) {
+ std::unique_ptr<AudioPacket> packet(new AudioPacket());
packet->set_encoding(AudioPacket::ENCODING_RAW);
packet->set_sampling_rate(rate);
packet->set_bytes_per_sample(AudioPacket::BYTES_PER_SAMPLE_2);
@@ -102,12 +104,12 @@ scoped_ptr<AudioPacket> CreatePacketWithSamplingRate(
return packet;
}
-scoped_ptr<AudioPacket> CreatePacket44100Hz(int samples) {
+std::unique_ptr<AudioPacket> CreatePacket44100Hz(int samples) {
return CreatePacketWithSamplingRate(AudioPacket::SAMPLING_RATE_44100,
samples);
}
-scoped_ptr<AudioPacket> CreatePacket48000Hz(int samples) {
+std::unique_ptr<AudioPacket> CreatePacket48000Hz(int samples) {
return CreatePacketWithSamplingRate(AudioPacket::SAMPLING_RATE_48000,
samples);
}
« no previous file with comments | « remoting/client/audio_player.cc ('k') | remoting/client/chromoting_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698