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

Unified Diff: media/base/callback.cc

Issue 3814013: FBTF: Monster ctor patch after changing heuristics in clang plugin. (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: More add file fail Created 10 years, 2 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/callback.h ('k') | media/media.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/callback.cc
diff --git a/media/base/callback.cc b/media/base/callback.cc
new file mode 100644
index 0000000000000000000000000000000000000000..1e2b400ad7e8c96e9766e342628b5344d3ac75b9
--- /dev/null
+++ b/media/base/callback.cc
@@ -0,0 +1,27 @@
+// Copyright (c) 2010 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/callback.h"
+
+namespace media {
+
+AutoTaskRunner::~AutoTaskRunner() {
+ if (task_.get()) {
+ task_->Run();
+ }
+}
+
+Callback0::Type* TaskToCallbackAdapter::NewCallback(Task* task) {
+ return new TaskToCallbackAdapter(task);
+}
+
+TaskToCallbackAdapter::~TaskToCallbackAdapter() {}
+
+void TaskToCallbackAdapter::RunWithParams(const Tuple0& params) {
+ task_->Run();
+}
+
+TaskToCallbackAdapter::TaskToCallbackAdapter(Task* task) : task_(task) {}
+
+} // namespace media
« no previous file with comments | « media/base/callback.h ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698