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

Unified Diff: media/cast/receiver/audio_decoder_unittest.cc

Issue 1905763002: Convert //media/cast from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « media/cast/receiver/audio_decoder.cc ('k') | media/cast/receiver/cast_receiver_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/receiver/audio_decoder_unittest.cc
diff --git a/media/cast/receiver/audio_decoder_unittest.cc b/media/cast/receiver/audio_decoder_unittest.cc
index afd1e8f2c5eda58d4aaf26204bee2b0b3d62a515..e72fe72ff8e5c97a5aa9f7110750f57db0feb74d 100644
--- a/media/cast/receiver/audio_decoder_unittest.cc
+++ b/media/cast/receiver/audio_decoder_unittest.cc
@@ -82,14 +82,13 @@ class AudioDecoderTest : public ::testing::TestWithParam<TestScenario> {
void FeedMoreAudio(const base::TimeDelta& duration,
int num_dropped_frames) {
// Prepare a simulated EncodedFrame to feed into the AudioDecoder.
- scoped_ptr<EncodedFrame> encoded_frame(
- new EncodedFrame());
+ std::unique_ptr<EncodedFrame> encoded_frame(new EncodedFrame());
encoded_frame->dependency = EncodedFrame::KEY;
encoded_frame->frame_id = last_frame_id_ + 1 + num_dropped_frames;
encoded_frame->referenced_frame_id = encoded_frame->frame_id;
last_frame_id_ = encoded_frame->frame_id;
- const scoped_ptr<AudioBus> audio_bus(
+ const std::unique_ptr<AudioBus> audio_bus(
audio_bus_factory_->NextAudioBus(duration));
// Encode |audio_bus| into |encoded_frame->data|.
@@ -149,7 +148,7 @@ class AudioDecoderTest : public ::testing::TestWithParam<TestScenario> {
private:
// Called by |audio_decoder_| to deliver each frame of decoded audio.
void OnDecodedFrame(bool should_be_continuous,
- scoped_ptr<AudioBus> audio_bus,
+ std::unique_ptr<AudioBus> audio_bus,
bool is_continuous) {
DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
@@ -185,11 +184,11 @@ class AudioDecoderTest : public ::testing::TestWithParam<TestScenario> {
}
const scoped_refptr<StandaloneCastEnvironment> cast_environment_;
- scoped_ptr<AudioDecoder> audio_decoder_;
- scoped_ptr<TestAudioBusFactory> audio_bus_factory_;
+ std::unique_ptr<AudioDecoder> audio_decoder_;
+ std::unique_ptr<TestAudioBusFactory> audio_bus_factory_;
uint32_t last_frame_id_;
bool seen_a_decoded_frame_;
- scoped_ptr<uint8_t[]> opus_encoder_memory_;
+ std::unique_ptr<uint8_t[]> opus_encoder_memory_;
base::Lock lock_;
base::ConditionVariable cond_;
« no previous file with comments | « media/cast/receiver/audio_decoder.cc ('k') | media/cast/receiver/cast_receiver_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698