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

Unified Diff: media/base/pipeline_impl.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/base/pipeline_impl.h ('k') | media/base/pipeline_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/pipeline_impl.cc
diff --git a/media/base/pipeline_impl.cc b/media/base/pipeline_impl.cc
index 5ea444c4384e06254cf1e4d32a1bb61c3204d2a7..178d0109f9964f2430a9cea17bf9fe9b8e320574 100644
--- a/media/base/pipeline_impl.cc
+++ b/media/base/pipeline_impl.cc
@@ -98,11 +98,10 @@ void PipelineImpl::Init(const PipelineStatusCB& ended_callback,
}
// Creates the PipelineInternal and calls it's start method.
-bool PipelineImpl::Start(FilterCollection* collection,
+bool PipelineImpl::Start(scoped_ptr<FilterCollection> collection,
const std::string& url,
const PipelineStatusCB& start_callback) {
base::AutoLock auto_lock(lock_);
- scoped_ptr<FilterCollection> filter_collection(collection);
if (running_) {
VLOG(1) << "Media pipeline is already running";
@@ -118,7 +117,7 @@ bool PipelineImpl::Start(FilterCollection* collection,
message_loop_->PostTask(
FROM_HERE,
base::Bind(&PipelineImpl::StartTask, this,
- filter_collection.release(),
+ base::Passed(&collection),
url,
start_callback));
return true;
@@ -626,12 +625,12 @@ void PipelineImpl::OnUpdateStatistics(const PipelineStatistics& stats) {
media_log_->QueueStatisticsUpdatedEvent(statistics_);
}
-void PipelineImpl::StartTask(FilterCollection* filter_collection,
+void PipelineImpl::StartTask(scoped_ptr<FilterCollection> filter_collection,
const std::string& url,
const PipelineStatusCB& start_callback) {
DCHECK_EQ(MessageLoop::current(), message_loop_);
DCHECK_EQ(kCreated, state_);
- filter_collection_.reset(filter_collection);
+ filter_collection_ = filter_collection.Pass();
url_ = url;
seek_callback_ = start_callback;
« no previous file with comments | « media/base/pipeline_impl.h ('k') | media/base/pipeline_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698