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

Unified Diff: chrome/browser/chromeos/login/users/mock_user_manager.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
Index: chrome/browser/chromeos/login/users/mock_user_manager.cc
diff --git a/chrome/browser/chromeos/login/users/mock_user_manager.cc b/chrome/browser/chromeos/login/users/mock_user_manager.cc
index 828db9f833daca8c6fcf888bc879544ed31e6194..26812e0a690d993a7bbc7a6c65a29d953142792a 100644
--- a/chrome/browser/chromeos/login/users/mock_user_manager.cc
+++ b/chrome/browser/chromeos/login/users/mock_user_manager.cc
@@ -13,9 +13,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 | « chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc ('k') | chrome/browser/memory/tab_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698