diff options
author | laforge@chromium.org <laforge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-17 22:39:58 +0000 |
---|---|---|
committer | laforge@chromium.org <laforge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-17 22:39:58 +0000 |
commit | 0689ef99d83246d598b30dcc2676b48185ebb9e4 (patch) | |
tree | 0ce0895a19ea853e96e2a2750eec7b8ef7fb2402 | |
parent | 9e664d82c0a533cd7c08b100d62095a5af9aaaef (diff) | |
download | chromium_src-0689ef99d83246d598b30dcc2676b48185ebb9e4.zip chromium_src-0689ef99d83246d598b30dcc2676b48185ebb9e4.tar.gz chromium_src-0689ef99d83246d598b30dcc2676b48185ebb9e4.tar.bz2 |
Merge 34609 - Support custom Linux version strings (e.g. release channel, downstream vendor name, etc.).
Also reformat the Mac/Win version strings as per comments in
http://codereview.chromium.org/506007.
Review URL: http://codereview.chromium.org/506016
TBR=mmoss@google.com
Review URL: http://codereview.chromium.org/502062
git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@34887 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/cocoa/about_window_controller.mm | 4 | ||||
-rw-r--r-- | chrome/browser/gtk/about_chrome_dialog.cc | 8 | ||||
-rw-r--r-- | chrome/browser/resources/about_version.html | 2 | ||||
-rwxr-xr-x | chrome/browser/views/about_chrome_view.cc | 9 | ||||
-rw-r--r-- | chrome/common/platform_util_linux.cc | 6 | ||||
-rwxr-xr-x | chrome/tools/build/linux/chrome-wrapper | 4 |
6 files changed, 19 insertions, 14 deletions
diff --git a/chrome/browser/cocoa/about_window_controller.mm b/chrome/browser/cocoa/about_window_controller.mm index 643fd99..4b9d902 100644 --- a/chrome/browser/cocoa/about_window_controller.mm +++ b/chrome/browser/cocoa/about_window_controller.mm @@ -141,8 +141,8 @@ static BOOL recentShownUserActionFailedStatus = NO; // is built on Windows too. NSString* svnRevision = [bundle objectForInfoDictionaryKey:@"SVNRevision"]; NSString* version = - [NSString stringWithFormat:@"%@%@ (%@)", - chromeVersion, versionModifier, svnRevision]; + [NSString stringWithFormat:@"%@ (%@)%@", + chromeVersion, svnRevision, versionModifier]; [version_ setStringValue:version]; diff --git a/chrome/browser/gtk/about_chrome_dialog.cc b/chrome/browser/gtk/about_chrome_dialog.cc index d840d9e..34195e8 100644 --- a/chrome/browser/gtk/about_chrome_dialog.cc +++ b/chrome/browser/gtk/about_chrome_dialog.cc @@ -17,6 +17,7 @@ #include "chrome/browser/profile.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/gtk_util.h" +#include "chrome/common/platform_util.h" #include "chrome/common/url_constants.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" @@ -105,11 +106,14 @@ void ShowAboutDialogForProfile(GtkWindow* parent, Profile* profile) { scoped_ptr<FileVersionInfo> version_info( FileVersionInfo::CreateFileVersionInfoForCurrentModule()); std::wstring current_version = version_info->file_version(); -#if !defined(GOOGLE_CHROME_BUILD) current_version += L" ("; current_version += version_info->last_change(); current_version += L")"; -#endif + string16 version_modifier = platform_util::GetVersionStringModifier(); + if (version_modifier.length()) { + current_version += L" "; + current_version += UTF16ToWide(version_modifier); + } // Build the dialog. GtkWidget* dialog = gtk_dialog_new_with_buttons( diff --git a/chrome/browser/resources/about_version.html b/chrome/browser/resources/about_version.html index dc87c24..cdc5235 100644 --- a/chrome/browser/resources/about_version.html +++ b/chrome/browser/resources/about_version.html @@ -74,7 +74,7 @@ about:version template page <td class="version" id="os_version"><span i18n-content="os_version"></span></td> </tr> <tr><td class="label" valign="top" id="name" i18n-content="name"></td> - <td class="version" id="version"><span i18n-content="version"></span> <span i18n-content="version_modifier"></span> (<span i18n-content="official"></span> <span i18n-content="cl"></span>)</td> + <td class="version" id="version"><span i18n-content="version"></span> (<span i18n-content="official"></span> <span i18n-content="cl"></span>) <span i18n-content="version_modifier"></span></td> </tr> <tr><td class="label" valign="top">WebKit</td> <td class="version" id="webkit_version" i18n-content="webkit_version"></td> diff --git a/chrome/browser/views/about_chrome_view.cc b/chrome/browser/views/about_chrome_view.cc index 44d2517..e26ca2d 100755 --- a/chrome/browser/views/about_chrome_view.cc +++ b/chrome/browser/views/about_chrome_view.cc @@ -127,15 +127,16 @@ void AboutChromeView::Init() { return; } + current_version_ = version_info->file_version(); + current_version_ += L" ("; + current_version_ += version_info->last_change(); + current_version_ += L")"; + string16 version_modifier = platform_util::GetVersionStringModifier(); if (version_modifier.length()) { current_version_ += L" "; current_version_ += UTF16ToWide(version_modifier); } - current_version_ = version_info->file_version(); - current_version_ += L" ("; - current_version_ += version_info->last_change(); - current_version_ += L")"; // Views we will add to the *parent* of this dialog, since it will display // next to the buttons which we don't draw ourselves. diff --git a/chrome/common/platform_util_linux.cc b/chrome/common/platform_util_linux.cc index dd6cc71..b79e163 100644 --- a/chrome/common/platform_util_linux.cc +++ b/chrome/common/platform_util_linux.cc @@ -77,11 +77,7 @@ bool IsVisible(gfx::NativeView view) { /* Warning: this may be either Linux or ChromeOS */ string16 GetVersionStringModifier() { -#if defined(GOOGLE_CHROME_BUILD) - return EmptyString16(); /* TODO(jrg,mmoss) */ -#else - return EmptyString16(); -#endif + return ASCIIToUTF16(getenv("CHROME_VERSION_EXTRA")); } } // namespace platform_util diff --git a/chrome/tools/build/linux/chrome-wrapper b/chrome/tools/build/linux/chrome-wrapper index ba6c304b..12ca820 100755 --- a/chrome/tools/build/linux/chrome-wrapper +++ b/chrome/tools/build/linux/chrome-wrapper @@ -62,6 +62,10 @@ esac # Always use our ffmpeg and other shared libs. export LD_LIBRARY_PATH="$HERE:$HERE/lib:$HERE/lib.target:$LD_LIBRARY_PATH" +# Custom version string for this release. This can be used to add a downstream +# vendor string or release channel information. +export CHROME_VERSION_EXTRA="custom" + exists_desktop_file || generate_desktop_file exec "$HERE/chrome" "$@" |