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

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: Rebase Created 4 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
« no previous file with comments | « media/base/bind_to_current_loop.h ('k') | media/base/bind_to_current_loop_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..cf5c41dd57089e94a008785eb9b4cf72d630e387
--- /dev/null
+++ b/media/base/bind_to_current_loop.cc
@@ -0,0 +1,25 @@
+// 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/thread_task_runner_handle.h"
+
+namespace media {
+
+namespace internal {
+
+DeleteOnLoop::DeleteOnLoop(scoped_refptr<base::SingleThreadTaskRunner> loop)
+ : loop_(loop) {}
+
+DeleteOnLoop::~DeleteOnLoop() {}
+
+} // namespace internal
+
+DeleteOnCurrentLoop::DeleteOnCurrentLoop()
+ : internal::DeleteOnLoop(base::ThreadTaskRunnerHandle::Get()) {}
+
+DeleteOnCurrentLoop::~DeleteOnCurrentLoop() {}
+
+} // namespace media
« no previous file with comments | « media/base/bind_to_current_loop.h ('k') | media/base/bind_to_current_loop_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698