From 94a3b22f21f441e3ec1299f9205e608907dba10c Mon Sep 17 00:00:00 2001 From: Henrique Nakashima <hnakashima@chromium.org> Date: Tue, 2 Jan 2024 20:29:45 +0000 Subject: [PATCH] [Android] De-localize "Developer Build" string in version_info This is a developer-only string and in other places it's not localized. Removing this dependency simplifies the code and allows it to be moved to //base without setting up localization in //base. Bug: 1442347 Change-Id: Ib755acea4f9830c95be565c4297cff63af846330 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5142266 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Ted Choc <tedchoc@chromium.org> Cr-Commit-Position: refs/heads/main@{#1242105} --- components/version_info/BUILD.gn | 6 +----- components/version_info/version_string.cc | 9 +-------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/components/version_info/BUILD.gn b/components/version_info/BUILD.gn index 950fdf765b964..817b82b6936d1 100644 --- a/components/version_info/BUILD.gn +++ b/components/version_info/BUILD.gn @@ -36,14 +36,10 @@ static_library("version_string") { "version_string.h", ] - deps = [ - ":version_info", - "//components/strings", - ] + deps = [ ":version_info" ] if (use_unofficial_version_number) { defines = [ "USE_UNOFFICIAL_VERSION_NUMBER" ] - deps += [ "//ui/base" ] } } diff --git a/components/version_info/version_string.cc b/components/version_info/version_string.cc index f55700ab5c38d..a1853980e483d 100644 --- a/components/version_info/version_string.cc +++ b/components/version_info/version_string.cc @@ -4,22 +4,15 @@ #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 += " (Developer Build "; current_version += GetLastChange(); current_version += " "; current_version += GetOSType();