This source file includes following definitions.
- GetVersionStringModifier
- GetChannel
- SetChannel
#include "chrome/common/chrome_version_info.h"
namespace chrome {
static VersionInfo::Channel chromeos_channel = VersionInfo::CHANNEL_UNKNOWN;
std::string VersionInfo::GetVersionStringModifier() {
#if defined(GOOGLE_CHROME_BUILD)
switch (chromeos_channel) {
case CHANNEL_STABLE:
return "";
case CHANNEL_BETA:
return "beta";
case CHANNEL_DEV:
return "dev";
case CHANNEL_CANARY:
return "canary";
default:
return "unknown";
}
#endif
return std::string();
}
VersionInfo::Channel VersionInfo::GetChannel() {
return chromeos_channel;
}
void VersionInfo::SetChannel(const std::string& channel) {
#if defined(GOOGLE_CHROME_BUILD)
if (channel == "stable-channel") {
chromeos_channel = CHANNEL_STABLE;
} else if (channel == "beta-channel") {
chromeos_channel = CHANNEL_BETA;
} else if (channel == "dev-channel") {
chromeos_channel = CHANNEL_DEV;
} else if (channel == "canary-channel") {
chromeos_channel = CHANNEL_CANARY;
}
#endif
}
}