#include "base/tracing/perfetto_task_runner.h"
#include <memory>
#include <utility>
#include "base/auto_reset.h"
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/notreached.h"
#include "base/task/common/checked_lock_impl.h"
#include "base/task/common/scoped_defer_task_posting.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/thread_pool.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/tracing/tracing_tls.h"
#include "build/build_config.h"
#include "base/debug/stack_trace.h"
namespace base {
namespace tracing {
PerfettoTaskRunner::PerfettoTaskRunner(
scoped_refptr<base::SequencedTaskRunner> task_runner)
: … { … }
PerfettoTaskRunner::~PerfettoTaskRunner() { … }
void PerfettoTaskRunner::PostTask(std::function<void()> task) { … }
void PerfettoTaskRunner::PostDelayedTask(std::function<void()> task,
uint32_t delay_ms) { … }
bool PerfettoTaskRunner::RunsTasksOnCurrentThread() const { … }
void PerfettoTaskRunner::AddFileDescriptorWatch(
perfetto::base::PlatformHandle fd,
std::function<void()> callback) { … }
void PerfettoTaskRunner::RemoveFileDescriptorWatch(
perfetto::base::PlatformHandle fd) { … }
void PerfettoTaskRunner::ResetTaskRunnerForTesting(
scoped_refptr<base::SequencedTaskRunner> task_runner) { … }
scoped_refptr<base::SequencedTaskRunner>
PerfettoTaskRunner::GetOrCreateTaskRunner() { … }
#if (BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_NACL)) || BUILDFLAG(IS_FUCHSIA)
PerfettoTaskRunner::FDControllerAndCallback::FDControllerAndCallback() =
default;
PerfettoTaskRunner::FDControllerAndCallback::~FDControllerAndCallback() =
default;
#endif
}
}