Chromium Code Reviews| Index: components/version_info/version_info.h |
| diff --git a/components/version_info/version_info.h b/components/version_info/version_info.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..88bb89688950cf94a391d04ac385e48ed29e3ffc |
| --- /dev/null |
| +++ b/components/version_info/version_info.h |
| @@ -0,0 +1,54 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_VERSION_INFO_VERSION_INFO_H_ |
| +#define COMPONENTS_VERSION_INFO_VERSION_INFO_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/macros.h" |
| + |
| +namespace version_info { |
| + |
| +// The possible channels for an installation, from most fun to most stable. |
| +enum Channel { |
| + CHANNEL_UNKNOWN = 0, // Probably blue |
|
brettw
2015/07/27 19:42:32
These comments copied from the old file seem prett
sdefresne
2015/07/28 08:58:26
Done.
|
| + CHANNEL_CANARY, // Yellow |
| + CHANNEL_DEV, // Technicolor |
| + CHANNEL_BETA, // Rainbow |
| + CHANNEL_STABLE // Full-spectrum |
| +}; |
| + |
| +// Returns the product name and version information for UserAgent header, |
| +// e.g. "Chrome/a.b.c.d". |
| +std::string GetProductNameAndVersionForUserAgent(); |
| + |
| +// Returns the product name, e.g. "Chromium" or "Google Chrome". |
| +std::string GetProductName(); |
| + |
| +// Returns the version number, e.g. "6.0.490.1". |
| +std::string GetVersionNumber(); |
| + |
| +// Returns a version control specific identifier of this release. |
| +std::string GetLastChange(); |
| + |
| +// Returns whether this is an "official" release of the current version, i.e. |
| +// whether kwnowing GetVersionNumber() is enough to completely determine what |
| +// GetLastChange() is. |
| +bool IsOfficialBuild(); |
| + |
| +// Returns the OS type, e.g. "Windows", "Linux", "FreeBDS", ... |
| +std::string GetOSType(); |
| + |
| +// Returns a string equivalent of |channel|, indenpendent of whether the build |
| +// is branded or not and without any additional modifiers. |
| +std::string GetChannelString(Channel channel); |
| + |
| +// Returns a version string to be displayed in "About Chromium" dialog, with |
| +// an extra |modifier| which may be empty. |
|
brettw
2015/07/27 19:42:32
Can you clarify what "modifier" means in this cont
sdefresne
2015/07/28 08:58:26
Done. Is this better?
|
| +std::string GetVersionStringWithModifier(const std::string& modifier); |
| + |
| +} // namespace version_info |
| + |
| +#endif // COMPONENTS_VERSION_INFO_VERSION_INFO_H_ |