From a857f82b4e4ba90c61729652221d06a4e0041ad0 Mon Sep 17 00:00:00 2001 From: Emerick Rogul Date: Mon, 8 Dec 2025 10:23:17 -0500 Subject: [PATCH] [cr144] `CHROME_ARCHIVE_PATH` removed from `UnPackConsumer` metrics enumeration Change of enumeration verified with installer team. Chromium changes: https://chromium.googlesource.com/chromium/src/+/0cf89805957b558d1c118d65c9cbc03ea2ec8646 commit 0cf89805957b558d1c118d65c9cbc03ea2ec8646 Author: Greg Thompson Date: Tue Oct 28 06:39:34 2025 -0700 [installer] Clean up dead metrics Remove LZMA metrics that are no longer recorded. Also mark others as never expiring since they are general installer-health metrics and update ownership. OBSOLETE_HISTOGRAM[Setup.Install.LzmaUnPackStatus_SetupExePatch]=All recording removed in r1522199. OBSOLETE_HISTOGRAM[Setup.Install.LzmaUnPackStatus_ChromeArchivePatch]=All recording removed in r1522199. Fixed: 455573360 Change-Id: I7f7f3d8ac99d4b735ae6308f408a245d6474c585 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7088112 Reviewed-by: Joshua Pawlicki Commit-Queue: Joshua Pawlicki Auto-Submit: Greg Thompson Cr-Commit-Position: refs/heads/main@{#1536616} --- chromium_src/chrome/installer/setup/setup_main.cc | 2 +- chromium_src/chrome/installer/setup/unpack_archive.cc | 2 +- installer/setup/archive_patch_helper_unittest.cc | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/chromium_src/chrome/installer/setup/setup_main.cc b/chromium_src/chrome/installer/setup/setup_main.cc index 653430e6f06..afbd5e4a692 100644 --- a/chromium_src/chrome/installer/setup/setup_main.cc +++ b/chromium_src/chrome/installer/setup/setup_main.cc @@ -65,7 +65,7 @@ bool BraveHandleNonInstallCmdLineOptions( cmd_line.GetSwitchValuePath(installer::switches::kNewSetupExe)); if (installer::ArchivePatchHelper::UncompressAndPatch( new_setup_exe.DirName(), compressed_archive, setup_exe, new_setup_exe, - installer::UnPackConsumer::SETUP_EXE_PATCH)) { + installer::UnPackConsumer::UNCOMPRESSED_CHROME_ARCHIVE)) { status = installer::NEW_VERSION_UPDATED; } diff --git a/chromium_src/chrome/installer/setup/unpack_archive.cc b/chromium_src/chrome/installer/setup/unpack_archive.cc index 46e6ce5c77f..319a1a12ba3 100644 --- a/chromium_src/chrome/installer/setup/unpack_archive.cc +++ b/chromium_src/chrome/installer/setup/unpack_archive.cc @@ -187,7 +187,7 @@ base::expected UnpackChromeArchive( CreateChromeArchiveHelper( setup_exe, install_archive, installer_state, unpack_path, (previous_version.IsValid() - ? UnPackConsumer::CHROME_ARCHIVE_PATCH + ? UnPackConsumer::UNCOMPRESSED_CHROME_ARCHIVE : UnPackConsumer::COMPRESSED_CHROME_ARCHIVE))); if (archive_helper) { VLOG(1) << "Installing Chrome from compressed archive " diff --git a/installer/setup/archive_patch_helper_unittest.cc b/installer/setup/archive_patch_helper_unittest.cc index 51480b93202..391113b4c40 100644 --- a/installer/setup/archive_patch_helper_unittest.cc +++ b/installer/setup/archive_patch_helper_unittest.cc @@ -51,7 +51,7 @@ TEST_F(ArchivePatchHelperTest, ZucchiniPatching) { base::FilePath dest = test_dir_.GetPath().AppendASCII("archive2.7z"); installer::ArchivePatchHelper archive_helper( test_dir_.GetPath(), base::FilePath(), src, dest, - installer::UnPackConsumer::SETUP_EXE_PATCH); + installer::UnPackConsumer::UNCOMPRESSED_CHROME_ARCHIVE); archive_helper.set_last_uncompressed_file(patch); EXPECT_TRUE(archive_helper.ZucchiniEnsemblePatch()); base::FilePath base = data_dir_.AppendASCII("archive2.7z"); @@ -64,7 +64,7 @@ TEST_F(ArchivePatchHelperTest, InvalidDiff_MisalignedCblen) { base::FilePath dest = test_dir_.GetPath().AppendASCII("bin.new"); installer::ArchivePatchHelper archive_helper( test_dir_.GetPath(), base::FilePath(), src, dest, - installer::UnPackConsumer::SETUP_EXE_PATCH); + installer::UnPackConsumer::UNCOMPRESSED_CHROME_ARCHIVE); archive_helper.set_last_uncompressed_file(patch); // Should fail, but not crash. EXPECT_FALSE(archive_helper.BinaryPatch()); @@ -76,7 +76,7 @@ TEST_F(ArchivePatchHelperTest, InvalidDiff_NegativeSeek) { base::FilePath dest = test_dir_.GetPath().AppendASCII("bin.new"); installer::ArchivePatchHelper archive_helper( test_dir_.GetPath(), base::FilePath(), src, dest, - installer::UnPackConsumer::SETUP_EXE_PATCH); + installer::UnPackConsumer::UNCOMPRESSED_CHROME_ARCHIVE); archive_helper.set_last_uncompressed_file(patch); // Should fail, but not crash. EXPECT_FALSE(archive_helper.BinaryPatch());