diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-06 02:39:12 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-06 02:39:12 +0000 |
commit | 713b3cc40bc2bb48ff756f9adebe4b06561f8e88 (patch) | |
tree | 6e58764b74c05f5175819678ccf2ce58f7faa90c /chrome/browser | |
parent | 9086da6d34fb1630cc6bf282323f2b55ba41932a (diff) | |
download | chromium_src-713b3cc40bc2bb48ff756f9adebe4b06561f8e88.zip chromium_src-713b3cc40bc2bb48ff756f9adebe4b06561f8e88.tar.gz chromium_src-713b3cc40bc2bb48ff756f9adebe4b06561f8e88.tar.bz2 |
Branded stable channel builds should not display any text after the version
number in the About window or about:version.
The existing code assumed that KSChannelID would be set to "stable" on the
stable channel, but this is incorrect. On the stable channel, KSChannelID is
not set at all.
Originally, the code was correct, but it broke in r36375.
BUG=43357
TEST=1. Check the About window in a stable-channel build. It should show the
version number without being adorned by the word "unknown" or any
other text.
2. In the same stable-channel builds, visit about:version. The Google
Chrome line should show something like 5.0.375.29 (Official Build
46008) without the word "unknown" or any other text.
Review URL: http://codereview.chromium.org/1990002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46541 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/platform_util_mac.mm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/platform_util_mac.mm b/chrome/browser/platform_util_mac.mm index 43d9582..745b9f5 100644 --- a/chrome/browser/platform_util_mac.mm +++ b/chrome/browser/platform_util_mac.mm @@ -71,8 +71,13 @@ string16 GetVersionStringModifier() { #if defined(GOOGLE_CHROME_BUILD) NSBundle* bundle = mac_util::MainAppBundle(); NSString* channel = [bundle objectForInfoDictionaryKey:@"KSChannelID"]; + // Only ever return "", "unknown", "beta" or "dev" in a branded build. - if ([channel isEqual:@"stable"]) { + if (![bundle objectForInfoDictionaryKey:@"KSProductID"]) { + // This build is not Keystone-enabled, it can't have a channel. + channel = @"unknown"; + } else if (!channel || [channel isEqual:@"stable"]) { + // For the stable channel, KSChannelID is not set. channel = @""; } else if ([channel isEqual:@"beta"] || [channel isEqual:@"dev"]) { // do nothing. |