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

Unified Diff: media/filters/video_frame_stream_unittest.cc

Issue 14217008: Remove reference counting from media::DemuxerStream and friends. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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/filters/video_frame_stream.cc ('k') | media/filters/video_renderer_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/video_frame_stream_unittest.cc
diff --git a/media/filters/video_frame_stream_unittest.cc b/media/filters/video_frame_stream_unittest.cc
index f97f2d4607e44d4ef543715d9481cb4d6210ebf7..e70c624b0959cdfd0de059377bc1486e20079e70 100644
--- a/media/filters/video_frame_stream_unittest.cc
+++ b/media/filters/video_frame_stream_unittest.cc
@@ -38,11 +38,11 @@ class VideoFrameStreamTest : public testing::TestWithParam<bool> {
ScopedVector<VideoDecoder> decoders;
decoders.push_back(decoder_);
- video_frame_stream_ = new VideoFrameStream(
+ video_frame_stream_.reset(new VideoFrameStream(
message_loop_.message_loop_proxy(),
decoders.Pass(),
base::Bind(&VideoFrameStreamTest::SetDecryptorReadyCallback,
- base::Unretained(this)));
+ base::Unretained(this))));
VideoDecoderConfig video_config(
kCodecVP8, VIDEO_CODEC_PROFILE_UNKNOWN, kVideoFormat,
@@ -88,7 +88,7 @@ class VideoFrameStreamTest : public testing::TestWithParam<bool> {
EXPECT_CALL(*decoder_, Initialize(_, _, _))
.WillOnce(SaveArg<1>(&decoder_init_cb_));
video_frame_stream_->Initialize(
- demuxer_stream_,
+ demuxer_stream_.get(),
base::Bind(&VideoFrameStreamTest::OnStatistics, base::Unretained(this)),
base::Bind(&VideoFrameStreamTest::OnInitialized,
base::Unretained(this)));
@@ -188,8 +188,8 @@ class VideoFrameStreamTest : public testing::TestWithParam<bool> {
private:
base::MessageLoop message_loop_;
- scoped_refptr<VideoFrameStream> video_frame_stream_;
- scoped_refptr<StrictMock<MockDemuxerStream> > demuxer_stream_;
+ scoped_ptr<VideoFrameStream> video_frame_stream_;
+ scoped_ptr<StrictMock<MockDemuxerStream> > demuxer_stream_;
// Use NiceMock since we don't care about most of calls on the decryptor, e.g.
// RegisterNewKeyCB().
scoped_ptr<NiceMock<MockDecryptor> > decryptor_;
« no previous file with comments | « media/filters/video_frame_stream.cc ('k') | media/filters/video_renderer_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698