Commit 0d5d2c31 authored by Carlos Caballero's avatar Carlos Caballero Committed by Commit Bot

Remove content::BrowserThread::PostAfterStartupTask

It is no longer used, and you should be posting tasks with BEST_EFFORT
priority instead.

Bug: 887407
Change-Id: I3792d648a5a9702ccdf08859b7bf65b58c5dbafe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1645215
Auto-Submit: Carlos Caballero <carlscab@google.com>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#666241}
parent 98a3095b
...@@ -162,15 +162,6 @@ const char* BrowserThreadImpl::GetThreadName(BrowserThread::ID thread) { ...@@ -162,15 +162,6 @@ const char* BrowserThreadImpl::GetThreadName(BrowserThread::ID thread) {
return "Unknown Thread"; return "Unknown Thread";
} }
// static
void BrowserThread::PostAfterStartupTask(
const base::Location& from_here,
const scoped_refptr<base::TaskRunner>& task_runner,
base::OnceClosure task) {
GetContentClient()->browser()->PostAfterStartupTask(from_here, task_runner,
std::move(task));
}
// static // static
bool BrowserThread::IsThreadInitialized(ID identifier) { bool BrowserThread::IsThreadInitialized(ID identifier) {
DCHECK_GE(identifier, 0); DCHECK_GE(identifier, 0);
......
...@@ -93,29 +93,6 @@ class CONTENT_EXPORT BrowserThread { ...@@ -93,29 +93,6 @@ class CONTENT_EXPORT BrowserThread {
->ReleaseSoon(from_here, std::move(object)); ->ReleaseSoon(from_here, std::move(object));
} }
// For use with scheduling non-critical tasks for execution after startup.
// The order or execution of tasks posted here is unspecified even when
// posting to a SequencedTaskRunner and tasks are not guaranteed to be run
// prior to browser shutdown.
// When called after the browser startup is complete, will post |task|
// to |task_runner| immediately.
// Note: see related ContentBrowserClient::PostAfterStartupTask.
//
// TODO(crbug.com/887407): Replace callsites with PostTaskWithTraits and
// appropriate traits (TBD).
//
// DEPRECATED(carlscab): This method is deprecated and will go away soon,
// consider posting the task with priority BEST_EFFORT. For example:
// base::PostTaskWithTraits(
// FROM_HERE, {content::BrowserThread::UI, base::TaskPriority::BEST_EFFORT},
// base::BindOnce(...));
// Or if you need to run in a special TaskRunner by using the
// PostBestEffortTask function below
static void PostAfterStartupTask(
const base::Location& from_here,
const scoped_refptr<base::TaskRunner>& task_runner,
base::OnceClosure task);
// Posts a |task| to run at BEST_EFFORT priority using an arbitrary // Posts a |task| to run at BEST_EFFORT priority using an arbitrary
// |task_runner| for which we do not control the priority // |task_runner| for which we do not control the priority
// //
......
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