#include "base/task/single_thread_task_runner.h"
#include <memory>
#include <utility>
#include "base/check.h"
#include "base/check_op.h"
#include "base/compiler_specific.h"
#include "base/dcheck_is_on.h"
#include "base/functional/bind.h"
#include "base/lazy_instance.h"
#include "base/run_loop.h"
#include "third_party/abseil-cpp/absl/base/attributes.h"
namespace base {
namespace {
ABSL_CONST_INIT thread_local SingleThreadTaskRunner::CurrentDefaultHandle*
current_default_handle = …;
SingleThreadTaskRunner::CurrentDefaultHandle* GetCurrentDefaultHandle() { … }
}
bool SingleThreadTaskRunner::BelongsToCurrentThread() const { … }
const scoped_refptr<SingleThreadTaskRunner>&
SingleThreadTaskRunner::GetCurrentDefault() { … }
bool SingleThreadTaskRunner::HasCurrentDefault() { … }
SingleThreadTaskRunner::CurrentDefaultHandle::CurrentDefaultHandle(
scoped_refptr<SingleThreadTaskRunner> task_runner)
: … { … }
SingleThreadTaskRunner::CurrentDefaultHandle::~CurrentDefaultHandle() { … }
SingleThreadTaskRunner::CurrentDefaultHandle::CurrentDefaultHandle(
scoped_refptr<SingleThreadTaskRunner> task_runner,
MayAlreadyExist)
: … { … }
SingleThreadTaskRunner::CurrentHandleOverrideForTesting::
CurrentHandleOverrideForTesting(
scoped_refptr<SingleThreadTaskRunner> overriding_task_runner)
: … { … }
SingleThreadTaskRunner::CurrentHandleOverrideForTesting::
~CurrentHandleOverrideForTesting() = default;
}