OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "components/version_info/version_string.h" |
| 6 |
| 7 #include "components/strings/grit/components_strings.h" |
| 8 #include "components/version_info/version_info.h" |
| 9 |
| 10 #if defined(USE_UNOFFICIAL_VERSION_NUMBER) |
| 11 #include "ui/base/l10n/l10n_util.h" // nogncheck |
| 12 #endif // USE_UNOFFICIAL_VERSION_NUMBER |
| 13 |
| 14 namespace version_info { |
| 15 |
| 16 std::string GetVersionStringWithModifier(const std::string& modifier) { |
| 17 std::string current_version; |
| 18 current_version += GetVersionNumber(); |
| 19 #if defined(USE_UNOFFICIAL_VERSION_NUMBER) |
| 20 current_version += " ("; |
| 21 current_version += l10n_util::GetStringUTF8(IDS_VERSION_UI_UNOFFICIAL); |
| 22 current_version += " "; |
| 23 current_version += GetLastChange(); |
| 24 current_version += " "; |
| 25 current_version += GetOSType(); |
| 26 current_version += ")"; |
| 27 #endif // USE_UNOFFICIAL_VERSION_NUMBER |
| 28 if (!modifier.empty()) |
| 29 current_version += " " + modifier; |
| 30 return current_version; |
| 31 } |
| 32 |
| 33 } // namespace version_info |
OLD | NEW |