summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-10 17:53:22 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-10 17:53:22 +0000
commitac0ef670231fee52f26c98a6a4410eb983e88907 (patch)
tree72510ff357da17034c9c4bd4bd380be0161034b8 /chrome/common
parentcf81d2d225d0288a91d4ae0d7e284c1b668623d4 (diff)
downloadchromium_src-ac0ef670231fee52f26c98a6a4410eb983e88907.zip
chromium_src-ac0ef670231fee52f26c98a6a4410eb983e88907.tar.gz
chromium_src-ac0ef670231fee52f26c98a6a4410eb983e88907.tar.bz2
Add more information to about:version and "About Chromium" dialog
- Add the information of an executable full-path, a profile path and an OS to about:version - Add the information of a build type and an OS to "About Chromium" dialog BUG=18679,37186 TEST=Observe that about:version and "About Chromium" dialog display enough information Patch by Kentaro Hara <haraken@google.com>. Review URL: http://codereview.chromium.org/6894037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84808 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/chrome_version_info.cc23
-rw-r--r--chrome/common/chrome_version_info.h3
2 files changed, 25 insertions, 1 deletions
diff --git a/chrome/common/chrome_version_info.cc b/chrome/common/chrome_version_info.cc
index ec1012c..19e16d9 100644
--- a/chrome/common/chrome_version_info.cc
+++ b/chrome/common/chrome_version_info.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -7,6 +7,7 @@
#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"
@@ -87,4 +88,24 @@ bool VersionInfo::IsOfficialBuild() const {
#endif
+std::string VersionInfo::OSType() const {
+#if defined(OS_WIN)
+ return "Windows";
+#elif defined(OS_MACOSX)
+ return "Mac OS";
+#elif defined(OS_CHROMEOS)
+ return l10n_util::GetStringUTF16(IDS_PRODUCT_OS_NAME);
+#elif defined(OS_LINUX)
+ return "Linux";
+#elif defined(OS_FREEBSD)
+ return "FreeBSD";
+#elif defined(OS_OPENBSD)
+ return "OpenBSD";
+#elif defined(OS_SOLARIS)
+ return "Solaris";
+#else
+ return "Unknown";
+#endif
+}
+
} // namespace chrome
diff --git a/chrome/common/chrome_version_info.h b/chrome/common/chrome_version_info.h
index 2c9cf52..6d509ca 100644
--- a/chrome/common/chrome_version_info.h
+++ b/chrome/common/chrome_version_info.h
@@ -37,6 +37,9 @@ class VersionInfo {
// The SVN revision of this release. E.g. "55800".
std::string LastChange() const;
+ // OS type. E.g. "Windows", "Linux", "FreeBSD", ...
+ std::string OSType() const;
+
// Whether this is an "official" release of the current Version():
// whether knowing Version() is enough to completely determine what
// LastChange() is.