From d87dae2f56e7a32444dfc8750c4c560becf7548a Mon Sep 17 00:00:00 2001 From: "jrg@chromium.org" Date: Tue, 15 Dec 2009 19:46:26 +0000 Subject: Move channel (beta,dev,stable) determination code to a common location. Add channel info to about:version. Linux about box work not done. Linux channel determination code still a stub. BUG=30444 How to verify: - on both Mac and Win, with a branded build: - confirm the About Box and about:version have channel info after the version number. Channel for PC comes from the registry so it'll be the channel of your official install, not this build. Channel for Mac comes from the Info.plist so it WILL be from the current version; stable if undefined. Review URL: http://codereview.chromium.org/506007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34583 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/cocoa/about_window_controller.mm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'chrome/browser/cocoa/about_window_controller.mm') diff --git a/chrome/browser/cocoa/about_window_controller.mm b/chrome/browser/cocoa/about_window_controller.mm index 47631a6..ae71983 100644 --- a/chrome/browser/cocoa/about_window_controller.mm +++ b/chrome/browser/cocoa/about_window_controller.mm @@ -14,6 +14,7 @@ #import "chrome/browser/cocoa/background_tile_view.h" #import "chrome/browser/cocoa/keystone_glue.h" #include "chrome/browser/cocoa/restart_browser.h" +#include "chrome/common/platform_util.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" @@ -127,19 +128,18 @@ static BOOL recentShownUserActionFailedStatus = NO; NSString* chromeVersion = [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; -#if defined(GOOGLE_CHROME_BUILD) - NSString* version = chromeVersion; - NSString* channel = [bundle objectForInfoDictionaryKey:@"KSChannelID"]; - if (!channel) - channel = @"stable"; - version = [NSString stringWithFormat:@"%@ %@", version, channel]; -#else // GOOGLE_CHROME_BUILD + NSString* versionModifier = @""; + string16 modifier = platform_util::GetVersionStringModifier(); + if (modifier.length()) + versionModifier = [NSString stringWithFormat:@" %@", + base::SysUTF16ToNSString(modifier)]; + // The format string is not localized, but this is how the displayed version // is built on Windows too. NSString* svnRevision = [bundle objectForInfoDictionaryKey:@"SVNRevision"]; NSString* version = - [NSString stringWithFormat:@"%@ (%@)", chromeVersion, svnRevision]; -#endif // GOOGLE_CHROME_BUILD + [NSString stringWithFormat:@"%@%@ (%@)", + chromeVersion, versionModifier, svnRevision]; [version_ setStringValue:version]; -- cgit v1.1