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

Unified Diff: chrome/common/chrome_version_info.cc

Issue 6894037: Add more information to about:version and "About Chromium" dialog (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 8 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 ec1012c4deee0811adfd544cebfa5e713ce070ef..c12843de1209bd96a6f62d46ee00125e60b39e9b 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,26 @@ bool VersionInfo::IsOfficialBuild() const {
#endif
+std::string VersionInfo::OSType() const {
+#if defined(OS_MACOSX)
+ return "Mac OS";
+#elif defined(OS_NACL)
+ return "Native Client";
Evan Martin 2011/04/22 22:36:41 I don't think this actually counts as an OS here.
+#elif defined(OS_LINUX)
+ return "Linux";
+#elif defined(OS_WIN)
+ return "Windows";
Evan Martin 2011/04/22 22:36:41 Can you put this one first? (We usually do Win/Ma
+#elif defined(OS_FREEBSD)
+ return "FreeBSD";
+#elif defined(OS_OPENBSD)
+ return "OpenBSD";
+#elif defined(OS_SOLARIS)
+ return "Solaris";
+#elif defined(OS_CHROMEOS)
+ return l10n_util::GetStringUTF16(IDS_PRODUCT_OS_NAME);
+#else
+ return "Unknown";
+#endif
+}
+
} // namespace chrome
« chrome/browser/browser_about_handler.cc ('K') | « chrome/common/chrome_version_info.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698