#include "content/browser/scheduler/browser_task_queues.h"
#include <array>
#include <cstdint>
#include <iterator>
#include "base/check.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/scoped_refptr.h"
#include "base/task/sequence_manager/sequence_manager.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"
#include "content/browser/scheduler/browser_task_priority.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/content_features.h"
namespace content {
namespace {
BASE_FEATURE(…);
BrowserTaskPriority;
QueueName;
InsertFencePosition;
QueueEnabledVoter;
QueueName GetControlTaskQueueName(BrowserThread::ID thread_id) { … }
QueueName GetRunAllPendingTaskQueueName(BrowserThread::ID thread_id) { … }
QueueName GetUITaskQueueName(BrowserTaskQueues::QueueType queue_type) { … }
QueueName GetIOTaskQueueName(BrowserTaskQueues::QueueType queue_type) { … }
QueueName GetTaskQueueName(BrowserThread::ID thread_id,
BrowserTaskQueues::QueueType queue_type) { … }
}
BrowserTaskQueues::QueueData::QueueData() = default;
BrowserTaskQueues::QueueData::~QueueData() = default;
BrowserTaskQueues::QueueData::QueueData(BrowserTaskQueues::QueueData&& other) =
default;
BrowserTaskQueues::Handle::~Handle() = default;
BrowserTaskQueues::Handle::Handle(BrowserTaskQueues* outer)
: … { … }
void BrowserTaskQueues::Handle::OnStartupComplete() { … }
void BrowserTaskQueues::Handle::EnableAllExceptBestEffortQueues() { … }
void BrowserTaskQueues::Handle::ScheduleRunAllPendingTasksForTesting(
base::OnceClosure on_pending_task_ran) { … }
BrowserTaskQueues::BrowserTaskQueues(
BrowserThread::ID thread_id,
base::sequence_manager::SequenceManager* sequence_manager) { … }
BrowserTaskQueues::~BrowserTaskQueues() { … }
std::array<scoped_refptr<base::SingleThreadTaskRunner>,
BrowserTaskQueues::kNumQueueTypes>
BrowserTaskQueues::CreateBrowserTaskRunners() const { … }
std::array<std::unique_ptr<QueueEnabledVoter>,
BrowserTaskQueues::kNumQueueTypes>
BrowserTaskQueues::CreateQueueEnabledVoters() const { … }
void BrowserTaskQueues::OnStartupComplete() { … }
void BrowserTaskQueues::EnableAllExceptBestEffortQueues() { … }
void BrowserTaskQueues::StartRunAllPendingTasksForTesting(
base::ScopedClosureRunner on_pending_task_ran) { … }
void BrowserTaskQueues::EndRunAllPendingTasksForTesting(
base::ScopedClosureRunner on_pending_task_ran) { … }
}