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

Unified Diff: chrome/browser/after_startup_task_utils.h

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/after_startup_task_utils.h
diff --git a/chrome/browser/after_startup_task_utils.h b/chrome/browser/after_startup_task_utils.h
index 19751300b3abf48445d6dd419d82925bec56e030..dbd9b63c40efb7d71067716ed7058544b62d9e99 100644
--- a/chrome/browser/after_startup_task_utils.h
+++ b/chrome/browser/after_startup_task_utils.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_AFTER_STARTUP_TASK_UTILS_H_
#include "base/bind.h"
+#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/task_runner.h"
@@ -25,7 +26,7 @@ class AfterStartupTaskUtils {
// Overrides from base::TaskRunner:
bool PostDelayedTask(const tracked_objects::Location& from_here,
- const base::Closure& task,
+ base::Closure task,
base::TimeDelta delay) override;
bool RunsTasksOnCurrentThread() const override;
@@ -46,7 +47,7 @@ class AfterStartupTaskUtils {
static void PostTask(
const tracked_objects::Location& from_here,
const scoped_refptr<base::TaskRunner>& destination_runner,
- const base::Closure& task);
+ base::Closure task);
// Returns true if browser startup is complete. Only use this on a one-off
// basis; If you need to poll this function constantly, use the above

Powered by Google App Engine
This is Rietveld 408576698