chromium/base/version_info/version_info.h

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

#ifndef BASE_VERSION_INFO_VERSION_INFO_H_
#define BASE_VERSION_INFO_VERSION_INFO_H_

#include <string>
#include <string_view>

#include "base/sanitizer_buildflags.h"
#include "base/version_info/channel.h"
#include "base/version_info/version_info_values.h"
#include "build/branding_buildflags.h"
#include "build/build_config.h"

namespace base {
class Version;
}

namespace version_info {

// Returns the product name, e.g. "Chromium" or "Google Chrome".
constexpr std::string_view GetProductName() {}

// Returns the version number, e.g. "6.0.490.1".
constexpr std::string_view GetVersionNumber() {}

// Returns the major component (aka the milestone) of the version as an int,
// e.g. 6 when the version is "6.0.490.1".
int GetMajorVersionNumberAsInt();

// Like GetMajorVersionNumberAsInt(), but returns a string.
std::string GetMajorVersionNumber();

// Returns the result of GetVersionNumber() as a base::Version.
const base::Version& GetVersion();

// Returns a version control specific identifier of this release.
constexpr std::string_view GetLastChange() {}

// Returns whether this is an "official" release of the current version, i.e.
// whether knowing GetVersionNumber() is enough to completely determine what
// GetLastChange() is.
constexpr bool IsOfficialBuild() {}

// Returns the OS type, e.g. "Windows", "Linux", "FreeBSD", ...
constexpr std::string_view GetOSType() {}

// Returns a list of sanitizers enabled in this build.
constexpr std::string_view GetSanitizerList() {}

}  // namespace version_info

#endif  // BASE_VERSION_INFO_VERSION_INFO_H_