chromium/chrome/enterprise_companion/test/test_crashpad_embedder.cc

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

#include "base/at_exit.h"
#include "base/check.h"
#include "base/command_line.h"
#include "base/logging.h"
#include "build/build_config.h"
#include "chrome/enterprise_companion/crash_client.h"
#include "chrome/enterprise_companion/enterprise_companion.h"

#if BUILDFLAG(IS_WIN)
#include <windows.h>
#endif

namespace enterprise_companion {
namespace {
constexpr char kCrashDatabaseSwitch[] =;

int TestCrashpadEmbedderMain(int argc, const char* const* argv) {}

}  // namespace

}  // namespace enterprise_companion

#if BUILDFLAG(IS_POSIX)
int main(int argc, const char* argv[]) {}
#elif BUILDFLAG(IS_WIN)
int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prev, wchar_t*, int) {
  // `argc` and `argv` are ignored by `base::CommandLine` for Windows. Instead,
  // the implementation parses `GetCommandLineW()` directly.
  return enterprise_companion::TestCrashpadEmbedderMain(0, nullptr);
}
#endif