Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3388)

Unified Diff: chrome/common/chrome_version_info.h

Issue 1257633002: Componentize VersionInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix OWNERS (copy from //chrome/OWNERS) Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/chrome_version_info.h
diff --git a/chrome/common/chrome_version_info.h b/chrome/common/chrome_version_info.h
index b6a15aa6b7ff63139d325a6cb3a64d4bae390091..ba05dfc61df9aca4c307958836b5b9898e898959 100644
--- a/chrome/common/chrome_version_info.h
+++ b/chrome/common/chrome_version_info.h
@@ -7,7 +7,7 @@
#include <string>
-#include "base/basictypes.h"
+#include "components/version_info/version_info.h"
namespace chrome {
@@ -15,37 +15,28 @@ namespace chrome {
// current running build of Chrome.
class VersionInfo {
brettw 2015/07/27 19:42:31 I think this class should be deleted, or maybe ren
sdefresne 2015/07/28 08:58:26 It makes sense. Created https://code.google.com/p/
public:
- // The possible channels for an installation, from most fun to most stable.
- enum Channel {
- CHANNEL_UNKNOWN = 0, // Probably blue
- CHANNEL_CANARY, // Yellow
- CHANNEL_DEV, // Technicolor
- CHANNEL_BETA, // Rainbow
- CHANNEL_STABLE // Full-spectrum
- };
-
VersionInfo();
~VersionInfo();
// E.g. "Chrome/a.b.c.d"
- std::string ProductNameAndVersionForUserAgent() const;
+ static std::string ProductNameAndVersionForUserAgent();
// E.g. "Chromium" or "Google Chrome".
- std::string Name() const;
+ static std::string Name();
// Version number, e.g. "6.0.490.1".
- std::string Version() const;
+ static std::string Version();
// The SVN revision of this release. E.g. "55800".
- std::string LastChange() const;
+ static std::string LastChange();
// Whether this is an "official" release of the current Version():
// whether knowing Version() is enough to completely determine what
// LastChange() is.
- bool IsOfficialBuild() const;
+ static bool IsOfficialBuild();
// OS type. E.g. "Windows", "Linux", "FreeBSD", ...
- std::string OSType() const;
+ static std::string OSType();
// Returns a human-readable modifier for the version string. For a branded
// build, this modifier is the channel ("canary", "dev", or "beta", but ""
@@ -63,7 +54,7 @@ class VersionInfo {
// CHANNEL_STABLE, CHANNEL_BETA, CHANNEL_DEV, or CHANNEL_CANARY. In unbranded
// builds, or in branded builds when the channel cannot be determined, this
// will be CHANNEL_UNKNOWN.
- static Channel GetChannel();
+ static version_info::Channel GetChannel();
// Returns a string equivalent of the channel, independent of whether it is a
// branded build or not and without any additional modifiers.
@@ -75,7 +66,7 @@ class VersionInfo {
#endif
// Returns a version string to be displayed in "About Chromium" dialog.
- std::string CreateVersionString() const;
+ static std::string CreateVersionString();
private:
DISALLOW_COPY_AND_ASSIGN(VersionInfo);

Powered by Google App Engine
This is Rietveld 408576698