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

Unified Diff: media/filters/chunk_demuxer_factory.cc

Issue 9015015: Take advantage of the new Pass() machinery on scoped_ptr{,_malloc}. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 11 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/chunk_demuxer_factory.h ('k') | media/filters/dummy_demuxer_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/chunk_demuxer_factory.cc
diff --git a/media/filters/chunk_demuxer_factory.cc b/media/filters/chunk_demuxer_factory.cc
index 0f6920f711dc906326cddefdcfd47edebf0cd524..97d6aaa355a73f391da9989edaf6f7cc1b9b5294 100644
--- a/media/filters/chunk_demuxer_factory.cc
+++ b/media/filters/chunk_demuxer_factory.cc
@@ -19,11 +19,12 @@ static void InitDone(MessageLoop* message_loop,
message_loop->PostTask(FROM_HERE, base::Bind(cb, status, demuxer));
}
-ChunkDemuxerFactory::ChunkDemuxerFactory(const std::string& url,
- DemuxerFactory* delegate_factory,
- ChunkDemuxerClient* client)
+ChunkDemuxerFactory::ChunkDemuxerFactory(
+ const std::string& url,
+ scoped_ptr<DemuxerFactory> delegate_factory,
+ ChunkDemuxerClient* client)
: url_(url),
- delegate_factory_(delegate_factory),
+ delegate_factory_(delegate_factory.Pass()),
client_(client) {
DCHECK(delegate_factory_.get());
}
@@ -45,8 +46,9 @@ void ChunkDemuxerFactory::Build(const std::string& url,
demuxer->Init(base::Bind(&InitDone, MessageLoop::current(), cb, demuxer));
}
-DemuxerFactory* ChunkDemuxerFactory::Clone() const {
- return new ChunkDemuxerFactory(url_, delegate_factory_->Clone(), client_);
+scoped_ptr<DemuxerFactory> ChunkDemuxerFactory::Clone() const {
+ return scoped_ptr<DemuxerFactory>(new ChunkDemuxerFactory(
+ url_, delegate_factory_->Clone().Pass(), client_));
}
} // namespace media
« no previous file with comments | « media/filters/chunk_demuxer_factory.h ('k') | media/filters/dummy_demuxer_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698