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

Unified Diff: chrome/browser/after_startup_task_utils.cc

Issue 2637843002: Migrate base::TaskRunner from Closure to OnceClosure (Closed)
Patch Set: rebase without dcheck_in_ref_count 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.cc
diff --git a/chrome/browser/after_startup_task_utils.cc b/chrome/browser/after_startup_task_utils.cc
index e024a945968ccb901ceabca657df8747f36288c3..a437fc7809baf78d4789818f14e0a4d54c54c4c3 100644
--- a/chrome/browser/after_startup_task_utils.cc
+++ b/chrome/browser/after_startup_task_utils.cc
@@ -34,13 +34,13 @@ namespace {
struct AfterStartupTask {
AfterStartupTask(const tracked_objects::Location& from_here,
const scoped_refptr<base::TaskRunner>& task_runner,
- base::Closure task)
+ base::OnceClosure task)
: from_here(from_here), task_runner(task_runner), task(std::move(task)) {}
~AfterStartupTask() {}
const tracked_objects::Location from_here;
const scoped_refptr<base::TaskRunner> task_runner;
- base::Closure task;
+ base::OnceClosure task;
};
// The flag may be read on any thread, but must only be set on the UI thread.
@@ -202,7 +202,7 @@ AfterStartupTaskUtils::Runner::~Runner() = default;
bool AfterStartupTaskUtils::Runner::PostDelayedTask(
const tracked_objects::Location& from_here,
- base::Closure task,
+ base::OnceClosure task,
base::TimeDelta delay) {
DCHECK(delay.is_zero());
AfterStartupTaskUtils::PostTask(from_here, destination_runner_,
@@ -222,7 +222,7 @@ void AfterStartupTaskUtils::StartMonitoringStartup() {
void AfterStartupTaskUtils::PostTask(
const tracked_objects::Location& from_here,
const scoped_refptr<base::TaskRunner>& destination_runner,
- base::Closure task) {
+ base::OnceClosure task) {
if (IsBrowserStartupComplete()) {
destination_runner->PostTask(from_here, std::move(task));
return;

Powered by Google App Engine
This is Rietveld 408576698