chromium/content/browser/browser_thread_impl.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/342213636): Remove this and spanify to fix the errors.
#pragma allow_unsafe_buffers
#endif

#include "content/browser/browser_thread_impl.h"

#include <string>
#include <utility>

#include "base/atomicops.h"
#include "base/check_op.h"
#include "base/compiler_specific.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/no_destructor.h"
#include "base/notreached.h"
#include "base/sequence_checker.h"
#include "base/task/current_thread.h"
#include "base/task/single_thread_task_runner.h"
#include "base/threading/platform_thread.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "content/browser/scheduler/browser_task_executor.h"
#include "content/public/browser/content_browser_client.h"

namespace content {

namespace {

// State of a given BrowserThread::ID in chronological order throughout the
// browser process' lifetime.
enum BrowserThreadState {};

struct BrowserThreadGlobals {};

BrowserThreadGlobals& GetBrowserThreadGlobals() {}

}  // namespace

scoped_refptr<base::SingleThreadTaskRunner> GetUIThreadTaskRunner(
    const BrowserTaskTraits& traits) {}

scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner(
    const BrowserTaskTraits& traits) {}

BrowserThreadImpl::BrowserThreadImpl(
    ID identifier,
    scoped_refptr<base::SingleThreadTaskRunner> task_runner)
    :{}

BrowserThreadImpl::~BrowserThreadImpl() {}

// static
void BrowserThreadImpl::ResetGlobalsForTesting(BrowserThread::ID identifier) {}

// static
const char* BrowserThreadImpl::GetThreadName(BrowserThread::ID thread) {}

// static
bool BrowserThread::IsThreadInitialized(ID identifier) {}

// static
bool BrowserThread::CurrentlyOn(ID identifier) {}

// static
std::string BrowserThread::GetCurrentlyOnErrorMessage(ID expected) {}

// static
bool BrowserThread::GetCurrentThreadIdentifier(ID* identifier) {}

// static
scoped_refptr<base::SingleThreadTaskRunner>
BrowserThread::GetTaskRunnerForThread(ID identifier) {}

// static
void BrowserThread::RunAllPendingTasksOnThreadForTesting(ID identifier) {}

// static
void BrowserThread::PostBestEffortTask(
    const base::Location& from_here,
    scoped_refptr<base::TaskRunner> task_runner,
    base::OnceClosure task) {}

namespace internal {

bool BrowserThreadChecker::CalledOnValidBrowserThread(
    BrowserThread::ID thread_identifier) const {}

const BrowserThreadChecker& GetBrowserThreadChecker(
    BrowserThread::ID thread_identifier) {}

ScopedValidateBrowserThreadChecker::ScopedValidateBrowserThreadChecker(
    BrowserThread::ID thread_identifier,
    base::NotFatalUntil fatal_milestone) {}

ScopedValidateBrowserThreadChecker::~ScopedValidateBrowserThreadChecker() =
    default;

#if DCHECK_IS_ON()
ScopedValidateBrowserThreadDebugChecker::
    ScopedValidateBrowserThreadDebugChecker(
        BrowserThread::ID thread_identifier) {}
#endif  // DCHECK_IS_ON()

}  // namespace internal

}  // namespace content