Commit 1145b92c authored by Carlos Caballero's avatar Carlos Caballero Committed by Commit Bot

Deprecate content::BrowserThread::PostAfterStartupTask

BEST_EFFORT tasks will not run until after startup and only if there is no
critical work pending.

This patch should not change the current behaviour. Please double check
whether the task being posted via BrowserThread::PostAfterStartupTask
really cares about being run after startup or just wants to run after
any critical work was completed. If you are fine with it just running
after critical work has completed LGTM and keep on with your life. If
that is not the case let me know and please explain your reasoning in a
comment.

More details:
https://docs.google.com/document/d/1P8PV1qX2cOR2WRFD6v9CjygJkE_mftCtJ7BoqQHCKZI

This CL was uploaded by git cl split.

R=chrisha@chromium.org

Bug: 887407
Change-Id: I4d98da09939b86c31a04d8b82823f6a0f9b8f8f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1631286Reviewed-by: default avatarChris Hamilton <chrisha@chromium.org>
Commit-Queue: Carlos Caballero <carlscab@google.com>
Auto-Submit: Carlos Caballero <carlscab@google.com>
Cr-Commit-Position: refs/heads/master@{#664702}
parent 0f4535fe
......@@ -131,9 +131,9 @@ class TabManagerStatsCollector::SwapMetricsDelegate
TabManagerStatsCollector::TabManagerStatsCollector() : weak_factory_(this) {
SessionRestore::AddObserver(this);
// Post an after startup task that starts the periodic sampling of freezing
// and discarding stats.
content::BrowserThread::PostAfterStartupTask(
// Post BEST_EFFORT task (which will only run after startup is completed) that
// starts the periodic sampling of freezing and discarding stats.
content::BrowserThread::PostBestEffortTask(
FROM_HERE, base::SequencedTaskRunnerHandle::Get(),
base::BindOnce(&TabManagerStatsCollector::StartPeriodicSampling,
weak_factory_.GetWeakPtr()));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment