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/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: 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 729bea718c6f39cd996d1138ebd4823a88356d69..973d32aeaf52479ea974cc0a273fdc800dd75fa4 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)));
@@ -190,9 +190,9 @@ class VideoFrameStreamTest : public testing::TestWithParam<bool> {
private:
MessageLoop message_loop_;
- scoped_refptr<VideoFrameStream> video_frame_stream_;
+ scoped_ptr<VideoFrameStream> video_frame_stream_;
xhwang 2013/04/23 16:41:37 These members used to be scoped_refptr because we
scherkus (not reviewing) 2013/04/23 18:43:40 Yeah acolwell@ and I discussed this in the previou
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