#include "chrome/updater/updater.h"
#include <iterator>
#include "base/at_exit.h"
#include "base/check.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/logging.h"
#include "base/process/memory.h"
#include "base/process/process_handle.h"
#include "base/ranges/algorithm.h"
#include "base/strings/stringprintf.h"
#include "base/system/sys_info.h"
#include "base/task/single_thread_task_executor.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/threading/platform_thread.h"
#include "build/build_config.h"
#include "chrome/updater/app/app.h"
#include "chrome/updater/app/app_install.h"
#include "chrome/updater/app/app_net_worker.h"
#include "chrome/updater/app/app_recover.h"
#include "chrome/updater/app/app_server.h"
#include "chrome/updater/app/app_uninstall.h"
#include "chrome/updater/app/app_uninstall_self.h"
#include "chrome/updater/app/app_update.h"
#include "chrome/updater/app/app_wake.h"
#include "chrome/updater/app/app_wakeall.h"
#include "chrome/updater/configurator.h"
#include "chrome/updater/constants.h"
#include "chrome/updater/crash_client.h"
#include "chrome/updater/crash_reporter.h"
#include "chrome/updater/update_usage_stats_task.h"
#include "chrome/updater/updater_scope.h"
#include "chrome/updater/updater_version.h"
#include "chrome/updater/util/util.h"
#include "components/crash/core/common/crash_key.h"
#include "components/crash/core/common/crash_keys.h"
#include "third_party/crashpad/crashpad/client/crash_report_database.h"
#include "third_party/crashpad/crashpad/client/settings.h"
#if BUILDFLAG(IS_POSIX)
#include "chrome/updater/ipc/ipc_support.h"
#endif
#if BUILDFLAG(IS_WIN)
#include "base/debug/alias.h"
#include "base/win/process_startup_helper.h"
#include "base/win/scoped_com_initializer.h"
#include "base/win/windows_version.h"
#include "chrome/updater/app/server/win/service_main.h"
#include "chrome/updater/util/win_util.h"
#endif
namespace updater {
namespace {
void ReinitializeLoggingAfterCrashHandler(UpdaterScope updater_scope) { … }
void InitializeCrashKeys(const base::CommandLine& command_line) { … }
void InitializeCrashReporting(UpdaterScope updater_scope) { … }
int HandleUpdaterCommands(UpdaterScope updater_scope,
const base::CommandLine* command_line) { … }
const char* GetUpdaterCommand(const base::CommandLine* command_line) { … }
constexpr const char* BuildFlavor() { … }
constexpr const char* BuildArch() { … }
std::string OperatingSystemVersion() { … }
base::CommandLine::StringType GetCommandLineString() { … }
void EnableLoggingByDefault() { … }
}
int UpdaterMain(int argc, const char* const* argv) { … }
}