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

Unified Diff: media/cast/test/end2end_unittest.cc

Issue 2371783002: Remove stl_util's deletion functions from media/. (Closed)
Patch Set: just the count Created 4 years, 3 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
Index: media/cast/test/end2end_unittest.cc
diff --git a/media/cast/test/end2end_unittest.cc b/media/cast/test/end2end_unittest.cc
index 287ef8d7de331abdc243a11e76e2d1106d64827b..fc980bd891328e1bdd0cda082a59cf9e98b4a39b 100644
--- a/media/cast/test/end2end_unittest.cc
+++ b/media/cast/test/end2end_unittest.cc
@@ -256,7 +256,7 @@ class TestReceiverAudioCallback
AudioBus::Create(audio_bus.channels(), audio_bus.frames());
audio_bus.CopyTo(expected_audio_frame->audio_bus.get());
expected_audio_frame->playout_time = playout_time;
- expected_frames_.push_back(expected_audio_frame.release());
+ expected_frames_.push_back(std::move(expected_audio_frame));
}
void IgnoreAudioFrame(std::unique_ptr<AudioBus> audio_bus,
@@ -272,8 +272,8 @@ class TestReceiverAudioCallback
ASSERT_TRUE(audio_bus);
ASSERT_FALSE(expected_frames_.empty());
- const std::unique_ptr<ExpectedAudioFrame> expected_audio_frame(
- expected_frames_.front());
+ const std::unique_ptr<ExpectedAudioFrame> expected_audio_frame =
+ std::move(expected_frames_.front());
expected_frames_.pop_front();
EXPECT_EQ(audio_bus->channels(), kAudioChannels);
@@ -303,7 +303,6 @@ class TestReceiverAudioCallback
protected:
virtual ~TestReceiverAudioCallback() {
- base::STLDeleteElements(&expected_frames_);
}
private:
@@ -311,7 +310,7 @@ class TestReceiverAudioCallback
int num_called_;
int expected_sampling_frequency_;
- std::list<ExpectedAudioFrame*> expected_frames_;
+ std::list<std::unique_ptr<ExpectedAudioFrame>> expected_frames_;
base::TimeTicks last_playout_time_;
};

Powered by Google App Engine
This is Rietveld 408576698