Commit 0ef95c51 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=finnur@chromium.org

Bug: 887407
Change-Id: I539b49ee3a87ffa73c43add69c4a6006de490918
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1632161
Auto-Submit: Carlos Caballero <carlscab@google.com>
Reviewed-by: default avatarFinnur Thorarinsson <finnur@chromium.org>
Commit-Queue: Finnur Thorarinsson <finnur@chromium.org>
Cr-Commit-Position: refs/heads/master@{#663782}
parent 6e636a2e
......@@ -15,6 +15,7 @@
#include "base/metrics/histogram_macros.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/post_task.h"
#include "base/task/task_traits.h"
#include "chrome/browser/content_settings/cookie_settings_factory.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/manifest_handlers/app_launch_info.h"
......@@ -70,9 +71,8 @@ void LogHostedAppUnlimitedStorageUsage(
// We only have to query for kStorageTypePersistent data usage, because apps
// cannot ask for any more temporary storage, according to
// https://developers.google.com/chrome/whitepapers/storage.
BrowserThread::PostAfterStartupTask(
FROM_HERE,
base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::IO}),
base::PostTaskWithTraits(
FROM_HERE, {BrowserThread::IO, base::TaskPriority::BEST_EFFORT},
base::BindOnce(&storage::QuotaManager::GetUsageAndQuotaForWebApps,
partition->GetQuotaManager(),
url::Origin::Create(launch_url),
......
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