OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/common/chrome_version_info.h" | 5 #include "chrome/common/chrome_version_info.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/file_version_info.h" | 8 #include "base/file_version_info.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "ui/base/l10n/l10n_util.h" |
10 #include "base/threading/thread_restrictions.h" | 11 #include "base/threading/thread_restrictions.h" |
11 #include "build/build_config.h" | 12 #include "build/build_config.h" |
12 | 13 |
13 namespace chrome { | 14 namespace chrome { |
14 | 15 |
15 #if defined(OS_WIN) || defined(OS_MACOSX) | 16 #if defined(OS_WIN) || defined(OS_MACOSX) |
16 // On Windows and Mac, we get the Chrome version info by querying | 17 // On Windows and Mac, we get the Chrome version info by querying |
17 // FileVersionInfo for the current module. | 18 // FileVersionInfo for the current module. |
18 | 19 |
19 VersionInfo::VersionInfo() { | 20 VersionInfo::VersionInfo() { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 std::string VersionInfo::LastChange() const { | 81 std::string VersionInfo::LastChange() const { |
81 return LAST_CHANGE; | 82 return LAST_CHANGE; |
82 } | 83 } |
83 | 84 |
84 bool VersionInfo::IsOfficialBuild() const { | 85 bool VersionInfo::IsOfficialBuild() const { |
85 return OFFICIAL_BUILD; | 86 return OFFICIAL_BUILD; |
86 } | 87 } |
87 | 88 |
88 #endif | 89 #endif |
89 | 90 |
| 91 std::string VersionInfo::OSType() const { |
| 92 #if defined(OS_WIN) |
| 93 return "Windows"; |
| 94 #elif defined(OS_MACOSX) |
| 95 return "Mac OS"; |
| 96 #elif defined(OS_CHROMEOS) |
| 97 return l10n_util::GetStringUTF16(IDS_PRODUCT_OS_NAME); |
| 98 #elif defined(OS_LINUX) |
| 99 return "Linux"; |
| 100 #elif defined(OS_FREEBSD) |
| 101 return "FreeBSD"; |
| 102 #elif defined(OS_OPENBSD) |
| 103 return "OpenBSD"; |
| 104 #elif defined(OS_SOLARIS) |
| 105 return "Solaris"; |
| 106 #else |
| 107 return "Unknown"; |
| 108 #endif |
| 109 } |
| 110 |
90 } // namespace chrome | 111 } // namespace chrome |
OLD | NEW |