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

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

Issue 2371783002: Remove stl_util's deletion functions from media/. (Closed)
Patch Set: wolenetz 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
« no previous file with comments | « media/base/text_renderer.cc ('k') | media/cdm/aes_decryptor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/test/end2end_unittest.cc
diff --git a/media/cast/test/end2end_unittest.cc b/media/cast/test/end2end_unittest.cc
index 06b40a599136c97b950dc12eae25eaa8ed705741..7d9994bc96fb8c930059329530dd662cbcc08bd2 100644
--- a/media/cast/test/end2end_unittest.cc
+++ b/media/cast/test/end2end_unittest.cc
@@ -257,7 +257,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,
@@ -273,8 +273,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);
@@ -304,7 +304,6 @@ class TestReceiverAudioCallback
protected:
virtual ~TestReceiverAudioCallback() {
- base::STLDeleteElements(&expected_frames_);
}
private:
@@ -312,7 +311,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_;
};
« no previous file with comments | « media/base/text_renderer.cc ('k') | media/cdm/aes_decryptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698