chromium/chrome/common/chrome_result_codes.h

// 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.

#ifndef CHROME_COMMON_CHROME_RESULT_CODES_H_
#define CHROME_COMMON_CHROME_RESULT_CODES_H_

#include "build/chromeos_buildflags.h"
#include "content/public/common/result_codes.h"

#if BUILDFLAG(IS_CHROMEOS_LACROS)
#include "chromeos/startup/startup.h"  // nogncheck
#endif

namespace chrome {

// IMPORTANT: This needs to stay in sync with <enum name="CrashExitCodes"> and
// <enum name="WindowsExitCode"> in tools/metrics/histograms/enums.xml. So do
// not remove any entries, and always append entries to the bottom just above
// RESULT_CODE_CHROME_LAST_CODE.

enum ResultCode {};

#if BUILDFLAG(IS_CHROMEOS_LACROS)
// Defined in chromeos/startup/startup.h.
static_assert(chromeos::RESULT_CODE_INVALID_POST_LOGIN_PARAMS ==
              RESULT_CODE_INVALID_POST_LOGIN_PARAMS);
#endif

static_assert;

// Returns true if the result code should be treated as a normal exit code i.e.
// content::RESULT_CODE_NORMAL_EXIT.
bool IsNormalResultCode(ResultCode code);

}  // namespace chrome

#endif  // CHROME_COMMON_CHROME_RESULT_CODES_H_