Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Unified Diff: chrome/common/chrome_version_info.cc

Issue 7104106: Unify the version string to be displayed on "About Chromium" dialog. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Change [\s\S]* to .* with re.DOTALL option Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/chrome_version_info.cc
diff --git a/chrome/common/chrome_version_info.cc b/chrome/common/chrome_version_info.cc
index c5a7a4311b97e23e736303ad642b9082a92ad0df..201ceedbeaffeca45814a344bfa25f7d153c81ac 100644
--- a/chrome/common/chrome_version_info.cc
+++ b/chrome/common/chrome_version_info.cc
@@ -7,10 +7,12 @@
#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 "chrome/browser/platform_util.h"
#include "grit/chromium_strings.h"
+#include "grit/generated_resources.h"
+#include "ui/base/l10n/l10n_util.h"
namespace chrome {
@@ -89,6 +91,28 @@ bool VersionInfo::IsOfficialBuild() const {
#endif
+std::string VersionInfo::CreateVersionString() const {
+ std::string current_version = "";
+ if (is_valid()) {
+ current_version += Version();
+#if !defined(GOOGLE_CHROME_BUILD)
+ current_version += " (";
+ current_version += l10n_util::GetStringUTF8(
+ IsOfficialBuild() ?
+ IDS_ABOUT_VERSION_OFFICIAL : IDS_ABOUT_VERSION_UNOFFICIAL);
+ current_version += " ";
+ current_version += OSType();
+ current_version += " ";
+ current_version += LastChange();
+ current_version += ")";
+#endif
+ std::string modifier = platform_util::GetVersionStringModifier();
+ if (!modifier.empty())
+ current_version += " " + modifier;
+ }
+ return current_version;
+}
+
std::string VersionInfo::OSType() const {
#if defined(OS_WIN)
return "Windows";

Powered by Google App Engine
This is Rietveld 408576698