summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmoss@google.com <mmoss@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-15 21:40:29 +0000
committermmoss@google.com <mmoss@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-15 21:40:29 +0000
commit01de0ce020b982f597ef6afe2b73cc2f275a7227 (patch)
tree810f92b3c468e6dc0aad3a09886c92b8c4bee06d
parent5ef3f544a256a572d90dd9aae0eba58a08667eef (diff)
downloadchromium_src-01de0ce020b982f597ef6afe2b73cc2f275a7227.zip
chromium_src-01de0ce020b982f597ef6afe2b73cc2f275a7227.tar.gz
chromium_src-01de0ce020b982f597ef6afe2b73cc2f275a7227.tar.bz2
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 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34609 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/cocoa/about_window_controller.mm4
-rw-r--r--chrome/browser/gtk/about_chrome_dialog.cc8
-rw-r--r--chrome/browser/resources/about_version.html2
-rwxr-xr-xchrome/browser/views/about_chrome_view.cc9
-rw-r--r--chrome/common/platform_util_linux.cc6
-rwxr-xr-xchrome/tools/build/linux/chrome-wrapper4
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 ae71983..77c3272 100644
--- a/chrome/browser/cocoa/about_window_controller.mm
+++ b/chrome/browser/cocoa/about_window_controller.mm
@@ -138,8 +138,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 0e8b79c..b73d878 100755
--- a/chrome/browser/views/about_chrome_view.cc
+++ b/chrome/browser/views/about_chrome_view.cc
@@ -136,15 +136,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 79990a5..eb991ef 100644
--- a/chrome/common/platform_util_linux.cc
+++ b/chrome/common/platform_util_linux.cc
@@ -90,11 +90,7 @@ void SimpleErrorBox(gfx::NativeWindow parent,
/* 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" "$@"