Updater: Mac: Embed Chromium Updater in Chrome, behind Finch.

This effectively replaces compile-time switches with run-time switches.

It also renames the privileged helper binary and sets up signing for it.

This also fixes a compilation failure in a unit test that was broken a
long time ago and not run. Unfortunately, the test does not pass at ToT
even with the compile fix and so it is disabled to be handled in a
later CL.

Although it now has no effect, I didn't actually remove the
enable_chromium_updater buildflag, since it is still set in some builder
configs, and I'd like to transition it into enable_updater.

This causes a 6-12% increase in Chrome's DMG size.

Fixed: 1370532
Change-Id: I8f9498db4ffebaef36235d096beb7ee6adba6e21
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3931764
Reviewed-by: Robert Sesek <[email protected]>
Reviewed-by: Sorin Jianu <[email protected]>
Reviewed-by: Hans Wennborg <[email protected]>
Reviewed-by: Greg Thompson <[email protected]>
Commit-Queue: Joshua Pawlicki <[email protected]>
Reviewed-by: Rebekah Potter <[email protected]>
Reviewed-by: Xiaoling Bao <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1062198}
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 006a1b8..0570500 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -94,7 +94,6 @@
   header = "buildflags.h"
   flags = [
     "USE_MINIKIN_HYPHENATION=$use_minikin_hyphenation",
-    "ENABLE_CHROMIUM_UPDATER=$enable_chromium_updater",
     "USE_THIN_LTO=$use_thin_lto",
   ]
 
@@ -6234,6 +6233,8 @@
       "mac/initial_prefs.mm",
       "mac/install_from_dmg.h",
       "mac/install_from_dmg.mm",
+      "mac/install_updater.h",
+      "mac/install_updater.mm",
       "mac/key_window_notifier.cc",
       "mac/key_window_notifier.h",
       "mac/mac_startup_profiler.cc",
@@ -6322,13 +6323,6 @@
       "UserNotifications.framework",  # macOS 10.14
     ]
     public_deps += [ "//chrome/browser/mac:keystone_glue" ]
-
-    if (enable_chromium_updater) {
-      sources += [
-        "mac/install_updater.h",
-        "mac/install_updater.mm",
-      ]
-    }
   }
 
   if (is_win || is_linux || is_android || is_chromeos) {
@@ -6618,13 +6612,10 @@
     ]
 
     deps += [
+      "//chrome/browser/updater:browser_updater_client",
       "//chrome/common/notifications",
       "//chrome/updater:browser_sources",
     ]
-
-    if (enable_chromium_updater) {
-      deps += [ "//chrome/browser/updater:browser_updater_client" ]
-    }
   } else {
     # On other platforms, use the generic implementation.
     sources += [ "hang_monitor/hang_crash_dump.cc" ]