1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_VERSION_INFO_VERSION_INFO_H_
6 #define COMPONENTS_VERSION_INFO_VERSION_INFO_H_
10 namespace version_info
{
12 // The possible channels for an installation, from most fun to most stable.
13 enum class Channel
{ UNKNOWN
= 0, CANARY
, DEV
, BETA
, STABLE
};
15 // Returns the product name and version information for UserAgent header,
16 // e.g. "Chrome/a.b.c.d".
17 std::string
GetProductNameAndVersionForUserAgent();
19 // Returns the product name, e.g. "Chromium" or "Google Chrome".
20 std::string
GetProductName();
22 // Returns the version number, e.g. "6.0.490.1".
23 std::string
GetVersionNumber();
25 // Returns a version control specific identifier of this release.
26 std::string
GetLastChange();
28 // Returns whether this is an "official" release of the current version, i.e.
29 // whether kwnowing GetVersionNumber() is enough to completely determine what
30 // GetLastChange() is.
31 bool IsOfficialBuild();
33 // Returns the OS type, e.g. "Windows", "Linux", "FreeBDS", ...
34 std::string
GetOSType();
36 // Returns a string equivalent of |channel|, indenpendent of whether the build
37 // is branded or not and without any additional modifiers.
38 std::string
GetChannelString(Channel channel
);
40 // Returns a version string to be displayed in "About Chromium" dialog.
41 // |modifier| is a string representation of the channel with system specific
42 // information, e.g. "dev SyzyASan". It is appended to the returned version
43 // information if non-empty.
44 std::string
GetVersionStringWithModifier(const std::string
& modifier
);
46 } // namespace version_info
48 #endif // COMPONENTS_VERSION_INFO_VERSION_INFO_H_