Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Unified Diff: components/version_info/version_string.cc

Issue 2879703002: WebView: Add channel info for UMA (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/version_info/version_string.cc
diff --git a/components/version_info/version_string.cc b/components/version_info/version_string.cc
new file mode 100644
index 0000000000000000000000000000000000000000..c1e9dcda509916a99c5c8db2c569e50eaae3be62
--- /dev/null
+++ b/components/version_info/version_string.cc
@@ -0,0 +1,33 @@
+// Copyright 2017 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.
+
+#include "components/version_info/version_string.h"
+
+#include "components/strings/grit/components_strings.h"
+#include "components/version_info/version_info.h"
+
+#if defined(USE_UNOFFICIAL_VERSION_NUMBER)
+#include "ui/base/l10n/l10n_util.h" // nogncheck
+#endif // USE_UNOFFICIAL_VERSION_NUMBER
+
+namespace version_info {
+
+std::string GetVersionStringWithModifier(const std::string& modifier) {
+ std::string current_version;
+ current_version += GetVersionNumber();
+#if defined(USE_UNOFFICIAL_VERSION_NUMBER)
+ current_version += " (";
+ current_version += l10n_util::GetStringUTF8(IDS_VERSION_UI_UNOFFICIAL);
+ current_version += " ";
+ current_version += GetLastChange();
+ current_version += " ";
+ current_version += GetOSType();
+ current_version += ")";
+#endif // USE_UNOFFICIAL_VERSION_NUMBER
+ if (!modifier.empty())
+ current_version += " " + modifier;
+ return current_version;
+}
+
+} // namespace version_info
« no previous file with comments | « components/version_info/version_string.h ('k') | ios/chrome/browser/metrics/ios_chrome_metrics_service_client.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698