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

Unified Diff: chrome/browser/chromeos/login/users/fake_chrome_user_manager.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: chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc
diff --git a/chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc b/chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc
index 645140d3de57e593e1972d3fd73a4d4d274983a9..45ec6e441182d76b3ea36c9ae51b57b7d9d15785 100644
--- a/chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc
+++ b/chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc
@@ -6,6 +6,8 @@
#include <set>
+#include "base/callback.h"
+#include "base/callback_helpers.h"
#include "base/command_line.h"
#include "base/memory/ptr_util.h"
#include "base/sys_info.h"
@@ -36,9 +38,9 @@ class FakeTaskRunner : public base::TaskRunner {
private:
// base::TaskRunner overrides.
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();
sky 2017/03/22 17:34:11 ?
return true;
}
bool RunsTasksOnCurrentThread() const override { return true; }

Powered by Google App Engine
This is Rietveld 408576698