diff options
author | haraken@google.com <haraken@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-23 03:33:46 +0000 |
---|---|---|
committer | haraken@google.com <haraken@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-23 03:33:46 +0000 |
commit | c7ccb1fe2a01cea59980f2cb73cca36f0b67d909 (patch) | |
tree | 5b3be9fef344b0333bd68654ed3de8345c07ae8b /chrome/common/chrome_version_info.cc | |
parent | defa0f0d8da19c43e18356fffbcd9426f7b213b6 (diff) | |
download | chromium_src-c7ccb1fe2a01cea59980f2cb73cca36f0b67d909.zip chromium_src-c7ccb1fe2a01cea59980f2cb73cca36f0b67d909.tar.gz chromium_src-c7ccb1fe2a01cea59980f2cb73cca36f0b67d909.tar.bz2 |
Unify the version string to be displayed on "About Chromium" dialog. (1/6)
We decided to split the changes of issue 7104106 (http://codereview.chromium.org/7104106/) into the following steps. This is the first step of them:
(1) Add CreateVersionString() to chrome_version_info.*, update the GTK+ code to use it. (reviewer: erg, tony)
(2) Update the mac code to use CreateVersionString(). Update About.xib. (reviewer: mark)
(3) Update the views code to use CreateVersionString(). This can happen at the same time as (2). (reviewer: davemoore, tony)
(4) Update version.bat to use lastchange.py. (reviewer: evan)
(5) Update tweak_info_plist to use lastchange.py. This can happen at the same time as (4). (reviewer: mark)
(6) Make changes to lastchange.py and webkit_version.py. (reviewer: evan)
BUG=37186
TEST=Observe that "About Chromium" dialog shows the version string like "14.0.787.0 (Developer Build 88242 Linux)" on Linux.
Review URL: http://codereview.chromium.org/7468027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93774 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/chrome_version_info.cc')
-rw-r--r-- | chrome/common/chrome_version_info.cc | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/chrome/common/chrome_version_info.cc b/chrome/common/chrome_version_info.cc index c5a7a43..22cf916 100644 --- a/chrome/common/chrome_version_info.cc +++ b/chrome/common/chrome_version_info.cc @@ -7,10 +7,11 @@ #include "base/basictypes.h" #include "base/file_version_info.h" #include "base/string_util.h" -#include "ui/base/l10n/l10n_util.h" #include "base/threading/thread_restrictions.h" #include "build/build_config.h" #include "grit/chromium_strings.h" +#include "grit/generated_resources.h" +#include "ui/base/l10n/l10n_util.h" namespace chrome { @@ -89,6 +90,28 @@ bool VersionInfo::IsOfficialBuild() const { #endif +std::string VersionInfo::CreateVersionString() const { + std::string current_version; +#if !defined(NACL_WIN64) + if (is_valid()) { + current_version += Version(); +#if !defined(GOOGLE_CHROME_BUILD) + current_version += " ("; + current_version += l10n_util::GetStringUTF8(IDS_ABOUT_VERSION_UNOFFICIAL); + current_version += " "; + current_version += LastChange(); + current_version += " "; + current_version += OSType(); + current_version += ")"; +#endif + std::string modifier = GetVersionStringModifier(); + if (!modifier.empty()) + current_version += " " + modifier; + } +#endif // !defined(NACL_WIN64) + return current_version; +} + std::string VersionInfo::OSType() const { #if defined(OS_WIN) return "Windows"; |