| OLD | NEW |
| 1 // Copyright (c) 2011 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 "base/threading/thread_restrictions.h" | 10 #include "base/threading/thread_restrictions.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 } | 85 } |
| 86 | 86 |
| 87 bool VersionInfo::IsOfficialBuild() const { | 87 bool VersionInfo::IsOfficialBuild() const { |
| 88 return OFFICIAL_BUILD; | 88 return OFFICIAL_BUILD; |
| 89 } | 89 } |
| 90 | 90 |
| 91 #endif | 91 #endif |
| 92 | 92 |
| 93 std::string VersionInfo::CreateVersionString() const { | 93 std::string VersionInfo::CreateVersionString() const { |
| 94 std::string current_version; | 94 std::string current_version; |
| 95 #if !defined(NACL_WIN64) | |
| 96 if (is_valid()) { | 95 if (is_valid()) { |
| 97 current_version += Version(); | 96 current_version += Version(); |
| 98 #if !defined(GOOGLE_CHROME_BUILD) | 97 #if !defined(GOOGLE_CHROME_BUILD) |
| 99 current_version += " ("; | 98 current_version += " ("; |
| 100 current_version += l10n_util::GetStringUTF8(IDS_ABOUT_VERSION_UNOFFICIAL); | 99 current_version += l10n_util::GetStringUTF8(IDS_ABOUT_VERSION_UNOFFICIAL); |
| 101 current_version += " "; | 100 current_version += " "; |
| 102 current_version += LastChange(); | 101 current_version += LastChange(); |
| 103 current_version += " "; | 102 current_version += " "; |
| 104 current_version += OSType(); | 103 current_version += OSType(); |
| 105 current_version += ")"; | 104 current_version += ")"; |
| 106 #endif | 105 #endif |
| 107 std::string modifier = GetVersionStringModifier(); | 106 std::string modifier = GetVersionStringModifier(); |
| 108 if (!modifier.empty()) | 107 if (!modifier.empty()) |
| 109 current_version += " " + modifier; | 108 current_version += " " + modifier; |
| 110 } | 109 } |
| 111 #endif // !defined(NACL_WIN64) | |
| 112 return current_version; | 110 return current_version; |
| 113 } | 111 } |
| 114 | 112 |
| 115 std::string VersionInfo::OSType() const { | 113 std::string VersionInfo::OSType() const { |
| 116 #if defined(OS_WIN) | 114 #if defined(OS_WIN) |
| 117 return "Windows"; | 115 return "Windows"; |
| 118 #elif defined(OS_MACOSX) | 116 #elif defined(OS_MACOSX) |
| 119 return "Mac OS X"; | 117 return "Mac OS X"; |
| 120 #elif defined(OS_CHROMEOS) | 118 #elif defined(OS_CHROMEOS) |
| 121 return UTF16ToASCII(l10n_util::GetStringUTF16(IDS_PRODUCT_OS_NAME)); | 119 return UTF16ToASCII(l10n_util::GetStringUTF16(IDS_PRODUCT_OS_NAME)); |
| 122 #elif defined(OS_LINUX) | 120 #elif defined(OS_LINUX) |
| 123 return "Linux"; | 121 return "Linux"; |
| 124 #elif defined(OS_FREEBSD) | 122 #elif defined(OS_FREEBSD) |
| 125 return "FreeBSD"; | 123 return "FreeBSD"; |
| 126 #elif defined(OS_OPENBSD) | 124 #elif defined(OS_OPENBSD) |
| 127 return "OpenBSD"; | 125 return "OpenBSD"; |
| 128 #elif defined(OS_SOLARIS) | 126 #elif defined(OS_SOLARIS) |
| 129 return "Solaris"; | 127 return "Solaris"; |
| 130 #else | 128 #else |
| 131 return "Unknown"; | 129 return "Unknown"; |
| 132 #endif | 130 #endif |
| 133 } | 131 } |
| 134 | 132 |
| 135 } // namespace chrome | 133 } // namespace chrome |
| OLD | NEW |