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_MACOSX) | |
93 return "Mac OS"; | |
94 #elif defined(OS_NACL) | |
95 return "Native Client"; | |
Evan Martin
2011/04/22 22:36:41
I don't think this actually counts as an OS here.
| |
96 #elif defined(OS_LINUX) | |
97 return "Linux"; | |
98 #elif defined(OS_WIN) | |
99 return "Windows"; | |
Evan Martin
2011/04/22 22:36:41
Can you put this one first? (We usually do Win/Ma
| |
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 #elif defined(OS_CHROMEOS) | |
107 return l10n_util::GetStringUTF16(IDS_PRODUCT_OS_NAME); | |
108 #else | |
109 return "Unknown"; | |
110 #endif | |
111 } | |
112 | |
90 } // namespace chrome | 113 } // namespace chrome |
OLD | NEW |