#include "base/task/sequence_manager/sequence_manager.h"
#include <utility>
namespace base {
namespace sequence_manager {
namespace {
#if BUILDFLAG(ENABLE_BASE_TRACING)
perfetto::protos::pbzero::SequenceManagerTask::Priority
DefaultTaskPriorityToProto(TaskQueue::QueuePriority priority) { … }
#endif
void CheckPriorities(TaskQueue::QueuePriority priority_count,
TaskQueue::QueuePriority default_priority) { … }
}
SequenceManager::MetricRecordingSettings::MetricRecordingSettings(
double task_thread_time_sampling_rate)
: … { … }
SequenceManager::PrioritySettings
SequenceManager::PrioritySettings::CreateDefault() { … }
SequenceManager::PrioritySettings::PrioritySettings(
TaskQueue::QueuePriority priority_count,
TaskQueue::QueuePriority default_priority)
#if DCHECK_IS_ON()
: … { … }
#else
: priority_count_(priority_count), default_priority_(default_priority) {
CheckPriorities(priority_count, default_priority);
}
#endif
#if DCHECK_IS_ON()
SequenceManager::PrioritySettings::PrioritySettings(
TaskQueue::QueuePriority priority_count,
TaskQueue::QueuePriority default_priority,
std::vector<TimeDelta> per_priority_cross_thread_task_delay,
std::vector<TimeDelta> per_priority_same_thread_task_delay)
: … { … }
#endif
#if BUILDFLAG(ENABLE_BASE_TRACING)
perfetto::protos::pbzero::SequenceManagerTask::Priority
SequenceManager::PrioritySettings::TaskPriorityToProto(
TaskQueue::QueuePriority priority) const { … }
#endif
SequenceManager::PrioritySettings::~PrioritySettings() = default;
SequenceManager::PrioritySettings::PrioritySettings(
PrioritySettings&&) noexcept = default;
SequenceManager::PrioritySettings& SequenceManager::PrioritySettings::operator=(
PrioritySettings&&) = default;
SequenceManager::Settings::Settings() = default;
SequenceManager::Settings::Settings(Settings&& move_from) noexcept = default;
SequenceManager::Settings::~Settings() = default;
SequenceManager::Settings::Builder::Builder() = default;
SequenceManager::Settings::Builder::~Builder() = default;
SequenceManager::Settings::Builder&
SequenceManager::Settings::Builder::SetMessagePumpType(
MessagePumpType message_loop_type_val) { … }
SequenceManager::Settings::Builder&
SequenceManager::Settings::Builder::SetRandomisedSamplingEnabled(
bool randomised_sampling_enabled_val) { … }
SequenceManager::Settings::Builder&
SequenceManager::Settings::Builder::SetTickClock(const TickClock* clock_val) { … }
SequenceManager::Settings::Builder&
SequenceManager::Settings::Builder::SetAddQueueTimeToTasks(
bool add_queue_time_to_tasks_val) { … }
SequenceManager::Settings::Builder&
SequenceManager::Settings::Builder::SetCanRunTasksByBatches(
bool can_run_tasks_by_batches_val) { … }
SequenceManager::Settings::Builder&
SequenceManager::Settings::Builder::SetPrioritySettings(
SequenceManager::PrioritySettings settings) { … }
#if DCHECK_IS_ON()
SequenceManager::Settings::Builder&
SequenceManager::Settings::Builder::SetRandomTaskSelectionSeed(
uint64_t random_task_selection_seed_val) { … }
SequenceManager::Settings::Builder&
SequenceManager::Settings::Builder::SetTaskLogging(
TaskLogging task_execution_logging_val) { … }
SequenceManager::Settings::Builder&
SequenceManager::Settings::Builder::SetLogPostTask(bool log_post_task_val) { … }
SequenceManager::Settings::Builder&
SequenceManager::Settings::Builder::SetLogTaskDelayExpiry(
bool log_task_delay_expiry_val) { … }
#endif
SequenceManager::Settings SequenceManager::Settings::Builder::Build() { … }
}
}