chromium/chrome/browser/after_startup_task_utils.cc

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

#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  // BUILDFLAG(IS_CHROMEOS_LACROS)

BrowserThread;

namespace {

PerformanceManager;

struct AfterStartupTask {};

// The flag may be read on any thread, but must only be set on the UI thread.
base::AtomicFlag& GetStartupCompleteFlag() {}

// The queue may only be accessed on the UI thread.
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() {}

// Observes the first visible page load and sets the startup complete
// flag accordingly. Ownership is passed to the Performance Manager
// after creation.
class StartupObserver
    : public performance_manager::GraphOwned,
      public performance_manager::PageNode::ObserverDefaultImpl {};

// static
void StartupObserver::Start() {}

}  // namespace

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() {}