Commit f57ac37d 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=isherman@chromium.org

Bug: 887407
Change-Id: Ifa246b5010783a683b041675dcd5422783bac3c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1631703Reviewed-by: default avatarTarun Bansal <tbansal@chromium.org>
Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
Commit-Queue: Ilya Sherman <isherman@chromium.org>
Auto-Submit: Carlos Caballero <carlscab@google.com>
Cr-Commit-Position: refs/heads/master@{#664371}
parent bbcefe48
......@@ -42,12 +42,11 @@ void NetworkQualityEstimatorProviderImpl::PostReplyOnNetworkQualityChanged(
}
#ifdef OS_ANDROID
// TODO(tbansal): https://crbug.com/898304: Tasks posted via
// content::BrowserThread::PostAfterStartupTask may take up to ~20 seconds to
// execute. Figure out a way to call
// TODO(tbansal): https://crbug.com/898304: Tasks posted at BEST_EFFORT
// may take up to ~20 seconds to execute. Figure out a way to call
// g_browser_process->network_quality_tracker earlier rather than waiting for
// content::BrowserThread::PostAfterStartupTask.
content::BrowserThread::PostAfterStartupTask(
// BEST_EFFORT to run (which happens sometime after startup is completed)
content::BrowserThread::PostBestEffortTask(
FROM_HERE, base::SequencedTaskRunnerHandle::Get(),
base::BindOnce(&NetworkQualityEstimatorProviderImpl::
AddEffectiveConnectionTypeObserverNow,
......
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