summaryrefslogtreecommitdiffstats
path: root/chrome/browser/platform_util_mac.mm
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-25 17:52:52 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-25 17:52:52 +0000
commitbca64fb4641e61af1149a1cc9368262e013a8f5f (patch)
tree2bdb5835cf6b73a381cfb93158e33b320a0a5cf6 /chrome/browser/platform_util_mac.mm
parent35d484be8c276bb174ba82eaf7dc7f32e9f9c2c8 (diff)
downloadchromium_src-bca64fb4641e61af1149a1cc9368262e013a8f5f.zip
chromium_src-bca64fb4641e61af1149a1cc9368262e013a8f5f.tar.gz
chromium_src-bca64fb4641e61af1149a1cc9368262e013a8f5f.tar.bz2
Fix users of platform_util::GetVersionStringModifier that really only care
about the channel name to use the new platform_util::GetInstallationChannel. GetVersionStringModifier should only be used for display purposes. Use GetInstallationChannel to determine the channel name for comparisons. Fix the upgrade detector to treat the canary channel the same way that it treats the dev channel, using a shorter notification interval. BUG=79814 TEST=none Review URL: http://codereview.chromium.org/6899034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82888 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/platform_util_mac.mm')
-rw-r--r--chrome/browser/platform_util_mac.mm19
1 files changed, 18 insertions, 1 deletions
diff --git a/chrome/browser/platform_util_mac.mm b/chrome/browser/platform_util_mac.mm
index 9a61775..d579106 100644
--- a/chrome/browser/platform_util_mac.mm
+++ b/chrome/browser/platform_util_mac.mm
@@ -209,8 +209,25 @@ std::string GetVersionStringModifier() {
#endif
}
+Channel GetChannel() {
+#if defined(GOOGLE_CHROME_BUILD)
+ std::string channel = GetVersionStringModifier();
+ if (channel.empty()) {
+ return CHANNEL_STABLE;
+ } else if (channel == "beta") {
+ return CHANNEL_BETA;
+ } else if (channel == "dev") {
+ return CHANNEL_DEV;
+ } else if (channel == "canary") {
+ return CHANNEL_CANARY;
+ }
+#endif
+
+ return CHANNEL_UNKNOWN;
+}
+
bool CanSetAsDefaultBrowser() {
- return GetVersionStringModifier().compare("canary") != 0;
+ return GetChannel() != CHANNEL_CANARY;
}
} // namespace platform_util