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: chromecast/base/bind_to_task_runner.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: chromecast/base/bind_to_task_runner.h
diff --git a/chromecast/base/bind_to_task_runner.h b/chromecast/base/bind_to_task_runner.h
index 8923429e91f499e93b6820e397d1829162397419..0724094344ae510bf0b4765ff969b89aab7ace48 100644
--- a/chromecast/base/bind_to_task_runner.h
+++ b/chromecast/base/bind_to_task_runner.h
@@ -57,6 +57,14 @@ base::internal::PassedWrapper<ScopedVector<T>> TrampolineForward(
template <typename Sig>
struct BindToTaskRunnerTrampoline;
+template <>
+struct BindToTaskRunnerTrampoline<void()> {
+ static void Run(const scoped_refptr<base::TaskRunner>& task_runner,
+ const base::Closure& cb) {
+ task_runner->PostTask(FROM_HERE, cb);
+ }
+};
+
template <typename... Args>
struct BindToTaskRunnerTrampoline<void(Args...)> {
static void Run(const scoped_refptr<base::TaskRunner>& task_runner,
« no previous file with comments | « chrome/browser/tracing/chrome_tracing_delegate_browsertest.cc ('k') | chromeos/attestation/attestation_flow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698