From 4ad0f1b813abea86c2075c18382ea8bc7f3a1331 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 15 May 2026 00:40:53 +0000 Subject: [PATCH] Fix Windows install branding constants Agent-Logs-Url: https://github.com/lrq3000/BrowserOS/sessions/aca7c90e-815e-41b0-b423-616b591ae881 Co-authored-by: lrq3000 <1118942+lrq3000@users.noreply.github.com> --- .../install_static/chromium_install_modes.h | 7 ++++-- .../tests/test_install_modes_patch.py | 23 +++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 packages/browseros/tests/test_install_modes_patch.py diff --git a/packages/browseros/chromium_patches/chrome/install_static/chromium_install_modes.h b/packages/browseros/chromium_patches/chrome/install_static/chromium_install_modes.h index 91603fef1..8c1e5791e 100644 --- a/packages/browseros/chromium_patches/chrome/install_static/chromium_install_modes.h +++ b/packages/browseros/chromium_patches/chrome/install_static/chromium_install_modes.h @@ -2,7 +2,9 @@ diff --git a/chrome/install_static/chromium_install_modes.h b/chrome/install_sta index ee62888f89705..7ec72d302bc4b 100644 --- a/chrome/install_static/chromium_install_modes.h +++ b/chrome/install_static/chromium_install_modes.h -@@ -21,7 +21,7 @@ inline constexpr wchar_t kCompanyPathName[] = L""; +@@ -21,9 +21,9 @@ inline constexpr wchar_t kCompanyPathName[] = L""; +-inline constexpr wchar_t kCompanyPathName[] = L""; ++inline constexpr wchar_t kCompanyPathName[] = L"BrowserOS"; // The brand-specific product name to be included as a component of the install // and user data directory paths. @@ -10,7 +12,8 @@ index ee62888f89705..7ec72d302bc4b 100644 +inline constexpr wchar_t kProductPathName[] = L"BrowserOS"; // The brand-specific safe browsing client name. - inline constexpr char kSafeBrowsingName[] = "chromium"; +-inline constexpr char kSafeBrowsingName[] = "chromium"; ++inline constexpr char kSafeBrowsingName[] = "browseros"; @@ -44,48 +44,49 @@ inline constexpr auto kInstallModes = std::to_array({ L"", // Empty install_suffix for the primary install mode. .logo_suffix = L"", // No logo suffix for the primary install mode. diff --git a/packages/browseros/tests/test_install_modes_patch.py b/packages/browseros/tests/test_install_modes_patch.py new file mode 100644 index 000000000..63241cdec --- /dev/null +++ b/packages/browseros/tests/test_install_modes_patch.py @@ -0,0 +1,23 @@ +import unittest +from pathlib import Path + + +PATCH_PATH = ( + Path(__file__).resolve().parents[1] + / "chromium_patches" + / "chrome" + / "install_static" + / "chromium_install_modes.h" +) + + +class InstallModesPatchTest(unittest.TestCase): + def test_install_identity_is_browseros(self) -> None: + content = PATCH_PATH.read_text(encoding="utf-8") + self.assertIn('kCompanyPathName[] = L"BrowserOS"', content) + self.assertIn('kProductPathName[] = L"BrowserOS"', content) + self.assertIn('kSafeBrowsingName[] = "browseros"', content) + + +if __name__ == "__main__": + unittest.main()