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

Unified Diff: media/base/callback_util.h

Issue 10830146: Replace RunInSeries() and RunInParallel() with CallbackSeries helper class. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: boom Created 8 years, 4 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 | « no previous file | media/base/callback_util.cc » ('j') | media/base/serial_runner.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/callback_util.h
diff --git a/media/base/callback_util.h b/media/base/callback_util.h
deleted file mode 100644
index d831191c88b3ae162a6ddc5b7113fd41fe707ce2..0000000000000000000000000000000000000000
--- a/media/base/callback_util.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MEDIA_BASE_CALLBACK_UTIL_H_
-#define MEDIA_BASE_CALLBACK_UTIL_H_
-
-#include <queue>
-
-#include "base/callback.h"
-#include "base/memory/scoped_ptr.h"
-#include "media/base/pipeline_status.h"
-
-namespace media {
-
-typedef base::Callback<void(const base::Closure&)> ClosureFunc;
-typedef base::Callback<void(const PipelineStatusCB&)> PipelineStatusCBFunc;
-
-// Executes the closures in FIFO order, executing |done_cb| when the last
-// closure has completed running.
-//
-// All closures (including |done_cb|) are executed on same thread as the
-// calling thread.
-void RunInSeries(scoped_ptr<std::queue<ClosureFunc> > closures,
- const base::Closure& done_cb);
-
-// Executes the closures in FIFO order, executing |done_cb| when the last
-// closure has completed running, reporting the final status code.
-//
-// Closures will stop being executed if a previous closure in the series
-// returned an error status and |done_cb| will be executed prematurely.
-//
-// All closures (including |done_cb|) are executed on same thread as the
-// calling thread.
-void RunInSeriesWithStatus(
- scoped_ptr<std::queue<PipelineStatusCBFunc> > status_cbs,
- const PipelineStatusCB& done_cb);
-
-// Executes the closures in parallel, executing |done_cb| when all closures have
-// completed running.
-//
-// No attempt is made to parallelize execution of the closures. In other words,
-// this method will run all closures in FIFO order if said closures execute
-// synchronously on the same call stack.
-//
-// All closures (including |done_cb|) are executed on same thread as the
-// calling thread.
-void RunInParallel(scoped_ptr<std::queue<ClosureFunc> > closures,
- const base::Closure& done_cb);
-
-} // namespace media
-
-#endif // MEDIA_BASE_CALLBACK_UTIL_H_
« no previous file with comments | « no previous file | media/base/callback_util.cc » ('j') | media/base/serial_runner.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698