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

Unified Diff: base/test/null_task_runner.h

Issue 2726523002: Pass Callback to TaskRunner by value and consume it on invocation (1) (Closed)
Patch Set: s/base::ResetAndReturn/std::move/ Created 3 years, 9 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: base/test/null_task_runner.h
diff --git a/base/test/null_task_runner.h b/base/test/null_task_runner.h
index f1eac45afd844758f953752632a4184b2f329c71..a47e7b288c0666c1448e3edc029f24a567e6d814 100644
--- a/base/test/null_task_runner.h
+++ b/base/test/null_task_runner.h
@@ -5,6 +5,7 @@
#ifndef BASE_TEST_NULL_TASK_RUNNER_H_
#define BASE_TEST_NULL_TASK_RUNNER_H_
+#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/single_thread_task_runner.h"
@@ -19,10 +20,10 @@ class NullTaskRunner : public base::SingleThreadTaskRunner {
NullTaskRunner();
bool PostDelayedTask(const tracked_objects::Location& from_here,
- const base::Closure& task,
+ base::Closure task,
base::TimeDelta delay) override;
bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
- const base::Closure& task,
+ base::Closure task,
base::TimeDelta delay) override;
// Always returns true to avoid triggering DCHECKs.
bool RunsTasksOnCurrentThread() const override;

Powered by Google App Engine
This is Rietveld 408576698