#include "chrome/browser/after_startup_task_utils.h"
#include "base/containers/circular_deque.h"
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/no_destructor.h"
#include "base/process/process.h"
#include "base/synchronization/atomic_flag.h"
#include "base/task/sequenced_task_runner.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/ui/browser_finder.h"
#include "components/performance_manager/public/graph/graph.h"
#include "components/performance_manager/public/graph/page_node.h"
#include "components/performance_manager/public/performance_manager.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "chrome/browser/ash/login/ui/login_display_host.h"
#endif
#if BUILDFLAG(IS_CHROMEOS_LACROS)
#include "chromeos/startup/browser_params_proxy.h"
#endif
BrowserThread;
namespace {
PerformanceManager;
struct AfterStartupTask { … };
base::AtomicFlag& GetStartupCompleteFlag() { … }
base::circular_deque<AfterStartupTask*>& GetAfterStartupTasks() { … }
bool IsBrowserStartupComplete() { … }
void RunTask(std::unique_ptr<AfterStartupTask> queued_task) { … }
void ScheduleTask(std::unique_ptr<AfterStartupTask> queued_task) { … }
void QueueTask(std::unique_ptr<AfterStartupTask> queued_task) { … }
void SetBrowserStartupIsComplete() { … }
class StartupObserver
: public performance_manager::GraphOwned,
public performance_manager::PageNode::ObserverDefaultImpl { … };
void StartupObserver::Start() { … }
}
void AfterStartupTaskUtils::StartMonitoringStartup() { … }
void AfterStartupTaskUtils::PostTask(
const base::Location& from_here,
const scoped_refptr<base::SequencedTaskRunner>& destination_runner,
base::OnceClosure task) { … }
void AfterStartupTaskUtils::SetBrowserStartupIsCompleteForTesting() { … }
void AfterStartupTaskUtils::SetBrowserStartupIsComplete() { … }
bool AfterStartupTaskUtils::IsBrowserStartupComplete() { … }
void AfterStartupTaskUtils::UnsafeResetForTesting() { … }