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

Unified Diff: media/filters/video_frame_stream_unittest.cc

Issue 13813016: Remove reference counting from media::Demuxer and friends. (Closed) Base URL: http://git.chromium.org/chromium/src.git@vd_scoped
Patch Set: 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
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 7c58b6eb7897fcba7da455e2e3442020567a4950..903efd97b3a72766f85007f0aa2acd92253d1956 100644
--- a/media/filters/video_frame_stream_unittest.cc
+++ b/media/filters/video_frame_stream_unittest.cc
@@ -41,11 +41,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))));
EXPECT_CALL(*demuxer_stream_, type())
.WillRepeatedly(Return(DemuxerStream::VIDEO));
@@ -90,7 +90,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)));
@@ -184,9 +184,9 @@ class VideoFrameStreamTest : public testing::TestWithParam<bool> {
private:
MessageLoop message_loop_;
- scoped_refptr<VideoFrameStream> video_frame_stream_;
+ scoped_ptr<VideoFrameStream> video_frame_stream_;
VideoDecoderConfig video_config_;
- scoped_refptr<StrictMock<MockDemuxerStream> > demuxer_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_;

Powered by Google App Engine
This is Rietveld 408576698