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

Unified Diff: cc/tiles/tile_manager_unittest.cc

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: cc/tiles/tile_manager_unittest.cc
diff --git a/cc/tiles/tile_manager_unittest.cc b/cc/tiles/tile_manager_unittest.cc
index 5a849477951755fe2526856e19628f50b31b89e3..81cf2c14f4ac2af9b45865d33cdd68b3576e86af 100644
--- a/cc/tiles/tile_manager_unittest.cc
+++ b/cc/tiles/tile_manager_unittest.cc
@@ -5,6 +5,8 @@
#include <stddef.h>
#include <stdint.h>
+#include <utility>
+
#include "base/bind.h"
#include "base/callback.h"
#include "base/memory/ptr_util.h"
@@ -55,18 +57,18 @@ namespace {
class SynchronousSimpleTaskRunner : public base::TestSimpleTaskRunner {
public:
bool PostDelayedTask(const tracked_objects::Location& from_here,
- const base::Closure& task,
+ base::Closure task,
base::TimeDelta delay) override {
- TestSimpleTaskRunner::PostDelayedTask(from_here, task, delay);
+ TestSimpleTaskRunner::PostDelayedTask(from_here, std::move(task), delay);
if (run_tasks_synchronously_)
RunUntilIdle();
return true;
}
bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
- const base::Closure& task,
+ base::Closure task,
base::TimeDelta delay) override {
- return PostDelayedTask(from_here, task, delay);
+ return PostDelayedTask(from_here, std::move(task), delay);
}
void set_run_tasks_synchronously(bool run_tasks_synchronously) {

Powered by Google App Engine
This is Rietveld 408576698