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

Unified Diff: chromeos/tpm/tpm_token_info_getter_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_unittest.cc ('k') | components/history/core/browser/history_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/tpm/tpm_token_info_getter_unittest.cc
diff --git a/chromeos/tpm/tpm_token_info_getter_unittest.cc b/chromeos/tpm/tpm_token_info_getter_unittest.cc
index 6e6a9d977fbf59631257897f504fb26871873322..db58ad617a4c790074c4cd68112f4f300cd2a74c 100644
--- a/chromeos/tpm/tpm_token_info_getter_unittest.cc
+++ b/chromeos/tpm/tpm_token_info_getter_unittest.cc
@@ -5,6 +5,7 @@
#include <stdint.h>
#include <string>
+#include <utility>
#include <vector>
#include "base/bind.h"
@@ -60,10 +61,10 @@ class FakeTaskRunner : public base::TaskRunner {
// base::TaskRunner overrides:
bool PostDelayedTask(const tracked_objects::Location& from_here,
- const base::Closure& task,
+ base::Closure task,
base::TimeDelta delay) override {
delays_->push_back(delay.InMilliseconds());
- base::ThreadTaskRunnerHandle::Get()->PostTask(from_here, task);
+ base::ThreadTaskRunnerHandle::Get()->PostTask(from_here, std::move(task));
return true;
}
bool RunsTasksOnCurrentThread() const override { return true; }
« no previous file with comments | « chromeos/dbus/blocking_method_caller_unittest.cc ('k') | components/history/core/browser/history_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698