Chromium Code Reviews| 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..e1e020628c95f5f429980f148fc182a147b46b25 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_LINUX) |
| + return "Linux"; |
| +#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); |
|
Evan Martin
2011/04/27 18:00:23
I believe OS_LINUX is true when OS_CHROMEOS is tru
|
| +#else |
| + return "Unknown"; |
| +#endif |
| +} |
| + |
| } // namespace chrome |