diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-25 17:52:52 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-25 17:52:52 +0000 |
commit | bca64fb4641e61af1149a1cc9368262e013a8f5f (patch) | |
tree | 2bdb5835cf6b73a381cfb93158e33b320a0a5cf6 /chrome/browser/platform_util.h | |
parent | 35d484be8c276bb174ba82eaf7dc7f32e9f9c2c8 (diff) | |
download | chromium_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.h')
-rw-r--r-- | chrome/browser/platform_util.h | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/chrome/browser/platform_util.h b/chrome/browser/platform_util.h index 41fa0ed..2cc4c1b 100644 --- a/chrome/browser/platform_util.h +++ b/chrome/browser/platform_util.h @@ -6,6 +6,8 @@ #define CHROME_BROWSER_PLATFORM_UTIL_H_ #pragma once +#include <string> + #include "base/string16.h" #include "ui/gfx/native_widget_types.h" @@ -14,6 +16,15 @@ class GURL; namespace platform_util { +// 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 +}; + // Show the given file in a file manager. If possible, select the file. void ShowItemInFolder(const FilePath& full_path); @@ -55,11 +66,24 @@ bool SimpleYesNoBox(gfx::NativeWindow parent, const string16& title, const string16& message); -// Return a human readable modifier for the version string. For a -// branded Chrome (not Chromium), this modifier is the channel (dev, -// beta, but "" for stable). +// Returns a human-readable modifier for the version string. For a branded +// build, this modifier is the channel ("canary", "dev", or "beta", but "" +// for stable). On Windows, this may be modified with additional information +// after a hyphen. For multi-user installations, it will return "canary-m", +// "dev-m", "beta-m", and for a stable channel multi-user installation, "m". +// In branded builds, when the channel cannot be determined, "unknown" will +// be returned. In unbranded builds, the modifier is usually an empty string +// (""), although on Linux, it may vary in certain distributions. +// GetVersionStringModifier() is intended to be used for display purposes. +// To simply test the channel, use GetChannel(). std::string GetVersionStringModifier(); +// Returns the channel for the installation. In branded builds, this will be +// 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. +Channel GetChannel(); + // Returns true if the running browser can be set as the default browser. bool CanSetAsDefaultBrowser(); |