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

Side by Side Diff: media/base/filter_collection.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/base/filter_collection.h ('k') | media/base/filter_factories.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/base/filter_collection.h" 5 #include "media/base/filter_collection.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace media { 9 namespace media {
10 10
11 FilterCollection::FilterCollection() {} 11 FilterCollection::FilterCollection() {}
12 12
13 FilterCollection::~FilterCollection() {} 13 FilterCollection::~FilterCollection() {}
14 14
15 void FilterCollection::SetDemuxerFactory(DemuxerFactory* factory) { 15 void FilterCollection::SetDemuxerFactory(scoped_ptr<DemuxerFactory> factory) {
16 DCHECK(factory); 16 DCHECK(factory.get());
17 demuxer_factory_.reset(factory); 17 demuxer_factory_ = factory.Pass();
18 } 18 }
19 19
20 DemuxerFactory* FilterCollection::GetDemuxerFactory() { 20 DemuxerFactory* FilterCollection::GetDemuxerFactory() {
21 return demuxer_factory_.get(); 21 return demuxer_factory_.get();
22 } 22 }
23 23
24 void FilterCollection::AddVideoDecoder(VideoDecoder* filter) { 24 void FilterCollection::AddVideoDecoder(VideoDecoder* filter) {
25 AddFilter(VIDEO_DECODER, filter); 25 AddFilter(VIDEO_DECODER, filter);
26 } 26 }
27 27
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 ++it; 88 ++it;
89 } 89 }
90 90
91 if (it != filters_.end()) { 91 if (it != filters_.end()) {
92 *filter_out = it->second.get(); 92 *filter_out = it->second.get();
93 filters_.erase(it); 93 filters_.erase(it);
94 } 94 }
95 } 95 }
96 96
97 } // namespace media 97 } // namespace media
OLDNEW
« no previous file with comments | « media/base/filter_collection.h ('k') | media/base/filter_factories.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698