Chromium Code Reviews| OLD | NEW | 
|---|---|
| (Empty) | |
| 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. | |
| 4 | |
| 5 #ifndef COMPONENTS_VERSION_INFO_VERSION_INFO_H_ | |
| 6 #define COMPONENTS_VERSION_INFO_VERSION_INFO_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 | |
| 12 namespace version_info { | |
| 13 | |
| 14 // The possible channels for an installation, from most fun to most stable. | |
| 15 enum Channel { | |
| 
 
dzhioev (left Google)
2015/07/28 18:33:49
I suggest to replace this enum with a strongly typ
 
 | |
| 16 CHANNEL_UNKNOWN = 0, | |
| 17 CHANNEL_CANARY, | |
| 18 CHANNEL_DEV, | |
| 19 CHANNEL_BETA, | |
| 20 CHANNEL_STABLE, | |
| 21 }; | |
| 22 | |
| 23 // Returns the product name and version information for UserAgent header, | |
| 24 // e.g. "Chrome/a.b.c.d". | |
| 25 std::string GetProductNameAndVersionForUserAgent(); | |
| 26 | |
| 27 // Returns the product name, e.g. "Chromium" or "Google Chrome". | |
| 28 std::string GetProductName(); | |
| 29 | |
| 30 // Returns the version number, e.g. "6.0.490.1". | |
| 31 std::string GetVersionNumber(); | |
| 32 | |
| 33 // Returns a version control specific identifier of this release. | |
| 34 std::string GetLastChange(); | |
| 35 | |
| 36 // Returns whether this is an "official" release of the current version, i.e. | |
| 37 // whether kwnowing GetVersionNumber() is enough to completely determine what | |
| 38 // GetLastChange() is. | |
| 39 bool IsOfficialBuild(); | |
| 40 | |
| 41 // Returns the OS type, e.g. "Windows", "Linux", "FreeBDS", ... | |
| 42 std::string GetOSType(); | |
| 43 | |
| 44 // Returns a string equivalent of |channel|, indenpendent of whether the build | |
| 45 // is branded or not and without any additional modifiers. | |
| 46 std::string GetChannelString(Channel channel); | |
| 47 | |
| 48 // Returns a version string to be displayed in "About Chromium" dialog. | |
| 49 // |modifier| is a string representation of the channel with system specific | |
| 50 // information, e.g. "dev SyzyASan". It is appended to the returned version | |
| 51 // information if non-empty. | |
| 52 std::string GetVersionStringWithModifier(const std::string& modifier); | |
| 53 | |
| 54 } // namespace version_info | |
| 55 | |
| 56 #endif // COMPONENTS_VERSION_INFO_VERSION_INFO_H_ | |
| OLD | NEW |