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

Unified Diff: media/base/bind_to_current_loop.h

Issue 2352853002: Disallow redundant Bind calls. (Closed)
Patch Set: static_assert message tweak Created 4 years, 3 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/base/bind_to_current_loop.h
diff --git a/media/base/bind_to_current_loop.h b/media/base/bind_to_current_loop.h
index de22be242bce328b37b3072b0a512b6669d2178c..b4dbb2d3dbeb1ea4d2d7a04037bd592f630bdfde 100644
--- a/media/base/bind_to_current_loop.h
+++ b/media/base/bind_to_current_loop.h
@@ -49,6 +49,15 @@ base::internal::PassedWrapper<ScopedVector<T> > TrampolineForward(
// returning void and taking zero or more arguments.
template <typename Sig> struct TrampolineHelper;
+template <>
+struct TrampolineHelper<void()> {
+ static void Run(
+ const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
+ const base::Closure& cb) {
+ task_runner->PostTask(FROM_HERE, cb);
+ }
+};
+
template <typename... Args>
struct TrampolineHelper<void(Args...)> {
static void Run(
« no previous file with comments | « media/audio/android/audio_manager_android.cc ('k') | remoting/host/host_change_notification_listener_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698