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

Unified Diff: media/base/bind_to_current_loop.cc

Issue 1082113004: BindToCurrentLoop should delete callback on original thread Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Alternative impl, with scoped_ptr<Callback, DeleteOnCurrentLoop>* Created 5 years, 8 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.cc
diff --git a/media/base/bind_to_current_loop.cc b/media/base/bind_to_current_loop.cc
new file mode 100644
index 0000000000000000000000000000000000000000..792363bd30c11a60086a60a36b985e79a4c63683
--- /dev/null
+++ b/media/base/bind_to_current_loop.cc
@@ -0,0 +1,16 @@
+// Copyright (c) 2015 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.
+
+#include "media/base/bind_to_current_loop.h"
+
+#include "base/message_loop/message_loop.h"
+
+namespace media {
+
+DeleteOnCurrentLoop::DeleteOnCurrentLoop()
+ : origin_loop_(base::MessageLoop::current()->task_runner()) {}
+
+DeleteOnCurrentLoop::~DeleteOnCurrentLoop() {}
+
+} // namespace media

Powered by Google App Engine
This is Rietveld 408576698