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

Unified Diff: chromeos/dbus/blocking_method_caller_unittest.cc

Issue 2726523002: Pass Callback to TaskRunner by value and consume it on invocation (1) (Closed)
Patch Set: erase Closure* 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
« no previous file with comments | « chromeos/dbus/blocking_method_caller.h ('k') | chromeos/tpm/tpm_token_info_getter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/blocking_method_caller_unittest.cc
diff --git a/chromeos/dbus/blocking_method_caller_unittest.cc b/chromeos/dbus/blocking_method_caller_unittest.cc
index 7a6e23c90d3f3bdc79d216354f1bcdcda18fd8da..24588c9078fcdc027c04cb56eae75cc6418c89e3 100644
--- a/chromeos/dbus/blocking_method_caller_unittest.cc
+++ b/chromeos/dbus/blocking_method_caller_unittest.cc
@@ -6,6 +6,7 @@
#include <memory>
+#include "base/callback.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/task_runner.h"
@@ -27,9 +28,9 @@ namespace {
class FakeTaskRunner : public base::TaskRunner {
public:
bool PostDelayedTask(const tracked_objects::Location& from_here,
- const base::Closure& task,
+ base::Closure task,
base::TimeDelta delay) override {
- task.Run();
+ std::move(task).Run();
return true;
}
bool RunsTasksOnCurrentThread() const override { return true; }
« no previous file with comments | « chromeos/dbus/blocking_method_caller.h ('k') | chromeos/tpm/tpm_token_info_getter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698