From 4a486209f43af17d5cccce2af8e372f5ac87563d Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 25 Nov 2024 15:40:35 +0800 Subject: [PATCH] test cr-jumbo [skip ci] --- big-pkgs.list | 1 + tur/chromium-jumbo/0000-patches-desc | 13 + .../0001-reland-jumbo-build.patch | 5203 +++++++++ .../0002-reland-jumbo-build-2.patch | 9934 +++++++++++++++++ ...03-compiler-remove-unsupported-flags.patch | 16 + .../0004-compiler-use-android-target.patch | 24 + .../0005-compiler-warnings.patch | 14 + ...-build-remove-xorg-from-build-deps-2.patch | 13 + tur/chromium-jumbo/0007-ubuntu-2404.patch | 133 + .../0008-ldpreload-libffi7.patch | 23 + .../0101-jumbo-service-name-conflict.patch | 126 + .../0102-jumbo-views-namespace.patch | 153 + .../0103-jumbo-views-namespace.patch | 43 + .../0104-jumbo-browser-name-conflict.patch | 572 + .../0105-jumbo-browser-name-conflict.patch | 1342 +++ .../0106-jumbo-browser-namespace.patch | 23 + .../0107-jumbo-browser-name-conflict.patch | 43 + .../0108-jumbo-browser-namespace.patch | 21 + .../0109-jumbo-common-namespace.patch | 38 + .../0110-jumbo-extensions-name-conflict.patch | 30 + .../0111-jumbo-browser-name-conflict.patch | 235 + .../0112-jumbo-content-namespace.patch | 21 + .../0113-jumbo-encoding-name-conflict.patch | 74 + .../0114-jumbo-renderer-namespace.patch | 21 + .../0115-jumbo-sender-name-conflict.patch | 95 + .../0201-jumbo-v8-add-namespace.patch | 38 + .../0202-jumbo-v8-add-friend-class.patch | 79 + .../0203-jumbo-v8-name-conflict.patch | 54 + .../0204-jumbo-v8-name-conflict.patch | 46 + .../0205-jumbo-v8-name-conflict.patch | 75 + .../0301-jumbo-blink-name-conflict.patch | 128 + .../0302-jumbo-blink-namespace.patch | 58 + .../0303-jumbo-blink-name-conflict.patch | 49 + .../1001-chromium-disable-sandbox.patch | 95 + .../1002-chromium-disable-shm.patch | 11 + .../1003-chromium-fix-type-for-inotify.patch | 11 + ...-headless-disable-sandbox-by-default.patch | 14 + .../1005-chromium-impl-dns.patch | 92 + .../1006-chromium-impl-scoped-file.patch | 40 + .../1007-chromium-impl-sysinfo.patch | 104 + .../1008-chromium-no-futimes.patch | 11 + .../1009-chromium-no-glibc-version.patch | 15 + ...romium-no-priority-inheritance-locks.patch | 11 + .../1011-chromium-no-set-process-title.patch | 11 + .../1012-chromium-redefine-termios2.patch | 11 + ...m-crypt-fix-dynamic-loaded-libraries.patch | 14 + ...rors-when-allocator-shim-is-disabled.patch | 21 + ...ium-gtk-fix-dynamic-loaded-libraries.patch | 50 + .../1016-chromium-ozone-wayland-memfd.patch | 14 + ...ium-x11-fix-dynamic-loaded-libraries.patch | 28 + .../1501-v8-fix-compress-pointer-offset.patch | 11 + .../1502-v8-reimpl-page-allocator.patch | 13 + .../1503-v8-fix-trap-handler.patch | 26 + .../1601-angle-fix-atomic.patch | 13 + .../1602-angle-fix-specialization.patch | 38 + .../1603-angle-no-android-jni.patch | 11 + .../1701-swiftshader-no-spawn.patch | 11 + ...tshader-fix-dynamic-loaded-libraries.patch | 40 + .../1703-swiftshader-no-android.patch | 406 + .../2001-weston-memfd_create.patch | 14 + ...-weston-fix-dynamic-loaded-libraries.patch | 14 + .../2003-wayland-memfd_create.patch | 14 + .../2004-breakpad-no-elf_prstatus.patch | 18 + .../2005-crashpad-fill-elf.patch | 18 + .../2006-crashpad-no-getdtablesize.patch | 11 + .../2007-crashpad-no-memfd.patch | 22 + .../2008-crashpad-no-spawn.patch | 28 + .../2009-cpuinfo-android-arm.patch | 13 + .../2010-dav1d-no-get-affinity.patch | 11 + ...11-dawn-fix-dynamic-loaded-libraries.patch | 23 + .../2012-dawn-no-android-jni.patch | 22 + .../2013-minigbm-no-android-log.patch | 20 + .../2014-perfetto-no-android-jni.patch | 11 + .../2015-perfetto-no-pthread_getname_np.patch | 20 + ...6-unity-fix-dynamic-loaded-libraries.patch | 11 + .../2017-vk-layers-no-android-log.patch | 64 + .../2018-unrar-no-lutimes.patch | 14 + .../2019-tflite-no-atrace.patch | 20 + tur/chromium-jumbo/2101-mix-no-execinfo.patch | 69 + .../2102-mix-egl-fix-include.patch | 47 + ...x-pulse-fix-dynamic-loaded-libraries.patch | 29 + .../6001-revert-blink-v8-cxx20.patch | 725 ++ .../6002-revert-blink-v8-cxx20-2.patch | 146 + .../6003-revert-rust-qr-scanner.patch | 169 + .../6004-undo-internal-alloc.patch | 582 + .../6101-fix-missing-include-buildflags.patch | 12 + .../7001-use-std_to_address-from-libcxx.patch | 29 + .../8001-iwyu-blink-include-bitset-2.patch | 11 + ...play_color_management-include-string.patch | 10 + .../8003-iwyu-gfx-include-bitset.patch | 11 + ...terial_color_utilities-include-cmath.patch | 10 + .../8005-iwyu-webauthn-variant.patch | 10 + ...ment_data_iterator-use-std_nullptr_t.patch | 11 + tur/chromium-jumbo/build.sh | 371 + tur/chromium-jumbo/chromium-launcher.sh.in | 41 + tur/chromium-jumbo/google-api-keys.base64enc | 10 + .../libstdcxx3-10-lwg3545.diff | 163 + .../libstdcxx3-10-optional-struct.diff | 42 + .../toolchain-template/host-toolchain.gn.in | 18 + .../toolchain-template/v8-toolchain.gn.in | 15 + 100 files changed, 22759 insertions(+) create mode 100644 tur/chromium-jumbo/0000-patches-desc create mode 100644 tur/chromium-jumbo/0001-reland-jumbo-build.patch create mode 100644 tur/chromium-jumbo/0002-reland-jumbo-build-2.patch create mode 100644 tur/chromium-jumbo/0003-compiler-remove-unsupported-flags.patch create mode 100644 tur/chromium-jumbo/0004-compiler-use-android-target.patch create mode 100644 tur/chromium-jumbo/0005-compiler-warnings.patch create mode 100644 tur/chromium-jumbo/0006-build-remove-xorg-from-build-deps-2.patch create mode 100644 tur/chromium-jumbo/0007-ubuntu-2404.patch create mode 100644 tur/chromium-jumbo/0008-ldpreload-libffi7.patch create mode 100644 tur/chromium-jumbo/0101-jumbo-service-name-conflict.patch create mode 100644 tur/chromium-jumbo/0102-jumbo-views-namespace.patch create mode 100644 tur/chromium-jumbo/0103-jumbo-views-namespace.patch create mode 100644 tur/chromium-jumbo/0104-jumbo-browser-name-conflict.patch create mode 100644 tur/chromium-jumbo/0105-jumbo-browser-name-conflict.patch create mode 100644 tur/chromium-jumbo/0106-jumbo-browser-namespace.patch create mode 100644 tur/chromium-jumbo/0107-jumbo-browser-name-conflict.patch create mode 100644 tur/chromium-jumbo/0108-jumbo-browser-namespace.patch create mode 100644 tur/chromium-jumbo/0109-jumbo-common-namespace.patch create mode 100644 tur/chromium-jumbo/0110-jumbo-extensions-name-conflict.patch create mode 100644 tur/chromium-jumbo/0111-jumbo-browser-name-conflict.patch create mode 100644 tur/chromium-jumbo/0112-jumbo-content-namespace.patch create mode 100644 tur/chromium-jumbo/0113-jumbo-encoding-name-conflict.patch create mode 100644 tur/chromium-jumbo/0114-jumbo-renderer-namespace.patch create mode 100644 tur/chromium-jumbo/0115-jumbo-sender-name-conflict.patch create mode 100644 tur/chromium-jumbo/0201-jumbo-v8-add-namespace.patch create mode 100644 tur/chromium-jumbo/0202-jumbo-v8-add-friend-class.patch create mode 100644 tur/chromium-jumbo/0203-jumbo-v8-name-conflict.patch create mode 100644 tur/chromium-jumbo/0204-jumbo-v8-name-conflict.patch create mode 100644 tur/chromium-jumbo/0205-jumbo-v8-name-conflict.patch create mode 100644 tur/chromium-jumbo/0301-jumbo-blink-name-conflict.patch create mode 100644 tur/chromium-jumbo/0302-jumbo-blink-namespace.patch create mode 100644 tur/chromium-jumbo/0303-jumbo-blink-name-conflict.patch create mode 100644 tur/chromium-jumbo/1001-chromium-disable-sandbox.patch create mode 100644 tur/chromium-jumbo/1002-chromium-disable-shm.patch create mode 100644 tur/chromium-jumbo/1003-chromium-fix-type-for-inotify.patch create mode 100644 tur/chromium-jumbo/1004-chromium-headless-disable-sandbox-by-default.patch create mode 100644 tur/chromium-jumbo/1005-chromium-impl-dns.patch create mode 100644 tur/chromium-jumbo/1006-chromium-impl-scoped-file.patch create mode 100644 tur/chromium-jumbo/1007-chromium-impl-sysinfo.patch create mode 100644 tur/chromium-jumbo/1008-chromium-no-futimes.patch create mode 100644 tur/chromium-jumbo/1009-chromium-no-glibc-version.patch create mode 100644 tur/chromium-jumbo/1010-chromium-no-priority-inheritance-locks.patch create mode 100644 tur/chromium-jumbo/1011-chromium-no-set-process-title.patch create mode 100644 tur/chromium-jumbo/1012-chromium-redefine-termios2.patch create mode 100644 tur/chromium-jumbo/1013-chromium-crypt-fix-dynamic-loaded-libraries.patch create mode 100644 tur/chromium-jumbo/1014-chromium-fix-compile-errors-when-allocator-shim-is-disabled.patch create mode 100644 tur/chromium-jumbo/1015-chromium-gtk-fix-dynamic-loaded-libraries.patch create mode 100644 tur/chromium-jumbo/1016-chromium-ozone-wayland-memfd.patch create mode 100644 tur/chromium-jumbo/1017-chromium-x11-fix-dynamic-loaded-libraries.patch create mode 100644 tur/chromium-jumbo/1501-v8-fix-compress-pointer-offset.patch create mode 100644 tur/chromium-jumbo/1502-v8-reimpl-page-allocator.patch create mode 100644 tur/chromium-jumbo/1503-v8-fix-trap-handler.patch create mode 100644 tur/chromium-jumbo/1601-angle-fix-atomic.patch create mode 100644 tur/chromium-jumbo/1602-angle-fix-specialization.patch create mode 100644 tur/chromium-jumbo/1603-angle-no-android-jni.patch create mode 100644 tur/chromium-jumbo/1701-swiftshader-no-spawn.patch create mode 100644 tur/chromium-jumbo/1702-swiftshader-fix-dynamic-loaded-libraries.patch create mode 100644 tur/chromium-jumbo/1703-swiftshader-no-android.patch create mode 100644 tur/chromium-jumbo/2001-weston-memfd_create.patch create mode 100644 tur/chromium-jumbo/2002-weston-fix-dynamic-loaded-libraries.patch create mode 100644 tur/chromium-jumbo/2003-wayland-memfd_create.patch create mode 100644 tur/chromium-jumbo/2004-breakpad-no-elf_prstatus.patch create mode 100644 tur/chromium-jumbo/2005-crashpad-fill-elf.patch create mode 100644 tur/chromium-jumbo/2006-crashpad-no-getdtablesize.patch create mode 100644 tur/chromium-jumbo/2007-crashpad-no-memfd.patch create mode 100644 tur/chromium-jumbo/2008-crashpad-no-spawn.patch create mode 100644 tur/chromium-jumbo/2009-cpuinfo-android-arm.patch create mode 100644 tur/chromium-jumbo/2010-dav1d-no-get-affinity.patch create mode 100644 tur/chromium-jumbo/2011-dawn-fix-dynamic-loaded-libraries.patch create mode 100644 tur/chromium-jumbo/2012-dawn-no-android-jni.patch create mode 100644 tur/chromium-jumbo/2013-minigbm-no-android-log.patch create mode 100644 tur/chromium-jumbo/2014-perfetto-no-android-jni.patch create mode 100644 tur/chromium-jumbo/2015-perfetto-no-pthread_getname_np.patch create mode 100644 tur/chromium-jumbo/2016-unity-fix-dynamic-loaded-libraries.patch create mode 100644 tur/chromium-jumbo/2017-vk-layers-no-android-log.patch create mode 100644 tur/chromium-jumbo/2018-unrar-no-lutimes.patch create mode 100644 tur/chromium-jumbo/2019-tflite-no-atrace.patch create mode 100644 tur/chromium-jumbo/2101-mix-no-execinfo.patch create mode 100644 tur/chromium-jumbo/2102-mix-egl-fix-include.patch create mode 100644 tur/chromium-jumbo/2103-mix-pulse-fix-dynamic-loaded-libraries.patch create mode 100644 tur/chromium-jumbo/6001-revert-blink-v8-cxx20.patch create mode 100644 tur/chromium-jumbo/6002-revert-blink-v8-cxx20-2.patch create mode 100644 tur/chromium-jumbo/6003-revert-rust-qr-scanner.patch create mode 100644 tur/chromium-jumbo/6004-undo-internal-alloc.patch create mode 100644 tur/chromium-jumbo/6101-fix-missing-include-buildflags.patch create mode 100644 tur/chromium-jumbo/7001-use-std_to_address-from-libcxx.patch create mode 100644 tur/chromium-jumbo/8001-iwyu-blink-include-bitset-2.patch create mode 100644 tur/chromium-jumbo/8002-iwyu-display_color_management-include-string.patch create mode 100644 tur/chromium-jumbo/8003-iwyu-gfx-include-bitset.patch create mode 100644 tur/chromium-jumbo/8004-iwyu-material_color_utilities-include-cmath.patch create mode 100644 tur/chromium-jumbo/8005-iwyu-webauthn-variant.patch create mode 100644 tur/chromium-jumbo/8006-blink-fragment_data_iterator-use-std_nullptr_t.patch create mode 100644 tur/chromium-jumbo/build.sh create mode 100644 tur/chromium-jumbo/chromium-launcher.sh.in create mode 100644 tur/chromium-jumbo/google-api-keys.base64enc create mode 100644 tur/chromium-jumbo/sysroot-patches/libstdcxx3-10-lwg3545.diff create mode 100644 tur/chromium-jumbo/sysroot-patches/libstdcxx3-10-optional-struct.diff create mode 100644 tur/chromium-jumbo/toolchain-template/host-toolchain.gn.in create mode 100644 tur/chromium-jumbo/toolchain-template/v8-toolchain.gn.in diff --git a/big-pkgs.list b/big-pkgs.list index 2baf066cb..2d3fdecef 100644 --- a/big-pkgs.list +++ b/big-pkgs.list @@ -1,4 +1,5 @@ chromium +chromium-jumbo code-server code-oss electron-headers-.* diff --git a/tur/chromium-jumbo/0000-patches-desc b/tur/chromium-jumbo/0000-patches-desc new file mode 100644 index 000000000..292ca1ba8 --- /dev/null +++ b/tur/chromium-jumbo/0000-patches-desc @@ -0,0 +1,13 @@ +Patches 0001-0999 are reserved for the building system of chromium. + +Patches 1001-2999 are reserved to make chromium work properly on Termux. + +1001-1499 are reserved for chromium (base, content, etc.). +1501-1599 are reserved for angle, blink, swiftshader and v8. +2001-2999 are reserved for other 3rd-party libraries and mixed patches. + +Patches 6001-6999 are reserved for some patches that cherry-picks or reverts a commit. + +Patches 7001-7999 are reserved for some patches related to compiler features or bugs. + +Patches 8001-8999 are reserved for some patches that adds missing includes or namespaces. diff --git a/tur/chromium-jumbo/0001-reland-jumbo-build.patch b/tur/chromium-jumbo/0001-reland-jumbo-build.patch new file mode 100644 index 000000000..1290b0939 --- /dev/null +++ b/tur/chromium-jumbo/0001-reland-jumbo-build.patch @@ -0,0 +1,5203 @@ +https://github.com/qt/qtwebengine-chromium/commit/43dc7fedb57b33606eaf535503ca6967178cff5d + +diff --git a/ash/keyboard/ui/BUILD.gn b/ash/keyboard/ui/BUILD.gn +index 113c6c81f0..e99f151b18 100644 +--- a/ash/keyboard/ui/BUILD.gn ++++ b/ash/keyboard/ui/BUILD.gn +@@ -3,6 +3,7 @@ + # found in the LICENSE file. + + import("//build/config/chromeos/ui_mode.gni") ++import("//build/config/jumbo.gni") + import("//mojo/public/tools/bindings/mojom.gni") + import("//testing/test.gni") + import("//third_party/google_input_tools/closure.gni") +@@ -11,7 +12,7 @@ import("//tools/grit/grit_rule.gni") + + assert(is_chromeos_ash) + +-component("ui") { ++jumbo_component("ui") { + sources = [ + "container_behavior.cc", + "container_behavior.h", +diff --git a/base/BUILD.gn b/base/BUILD.gn +index c00c41bc2c..779a4f0b0e 100644 +--- a/base/BUILD.gn ++++ b/base/BUILD.gn +@@ -30,6 +30,7 @@ import("//build/config/compiler/compiler.gni") + import("//build/config/cronet/config.gni") + import("//build/config/dcheck_always_on.gni") + import("//build/config/ios/config.gni") ++import("//build/config/jumbo.gni") + import("//build/config/logging.gni") + import("//build/config/nacl/config.gni") + import("//build/config/profiling/profiling.gni") +@@ -206,7 +207,7 @@ buildflag_header("message_pump_buildflags") { + # base compilation units to be linked in where they wouldn't have otherwise. + # This does not include test code (test support and anything in the test + # directory) which should use source_set as is recommended for GN targets). +-component("base") { ++jumbo_component("base") { + sources = [ + "allocator/allocator_check.cc", + "allocator/allocator_check.h", +diff --git a/build/config/jumbo.gni b/build/config/jumbo.gni +new file mode 100644 +index 0000000000..dd8972423e +--- /dev/null ++++ b/build/config/jumbo.gni +@@ -0,0 +1,296 @@ ++# 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. ++ ++import("//build/config/nacl/config.gni") # To see if jumbo should be turned off ++import("//build/toolchain/goma.gni") ++ ++declare_args() { ++ # If true, use a jumbo build (files compiled together) to speed up ++ # compilation. ++ use_jumbo_build = false ++ ++ # A list of build targets to exclude from jumbo builds, for optimal ++ # round trip time when frequently changing a set of cpp files. The ++ # targets can be just the short name (in which case it matches any ++ # target with that name), a directory prefixed with the root ++ # specifier //, or a full build target label. ++ # ++ # Example: ++ # These would all exclude the "browser" target in a file ++ # content/browser/BUILD.gn, and potentially more. ++ # ++ # jumbo_build_excluded = [ "browser" ] ++ # jumbo_build_excluded = [ "//content/browser" ] ++ # jumbo_build_excluded = [ "//content/browser:browser" ] ++ jumbo_build_excluded = [] ++ ++ # How many files to group on average. Smaller numbers give more ++ # parallellism, higher numbers give less total CPU usage. Higher ++ # numbers also give longer single-file recompilation times. ++ # ++ # Recommendations: ++ # Higher numbers than 100 does not reduce wall clock compile times ++ # even for 4 cores or less so no reason to go higher than 100. ++ # Going from 50 to 100 with a 4 core CPU saves about 3% CPU time and ++ # 3% wall clock time in a tree with blink, v8 and content ++ # jumbofied. At the same time it increases the compile time for the ++ # largest jumbo chunks by 10-20% and reduces the chance to use all ++ # available CPU cores. So set the default to 50 to balance between ++ # high and low-core build performance. -1 means do the default which ++ # varies depending on whether goma is enabled. ++ jumbo_file_merge_limit = -1 ++} ++ ++# Normal builds benefit from lots of jumbification ++jumbo_file_merge_default = 50 ++ ++# Goma builds benefit from more parallelism ++jumbo_file_merge_goma = 8 ++ ++# Use one of the targets jumbo_source_set, jumbo_static_library, or ++# jumbo_component to generate a target which merges sources if possible to ++# compile much faster. ++# ++# Special values. ++# ++# target_type ++# The kind of target to build. For example the string ++# "static_library". ++# ++# always_build_jumbo ++# If set and set to true, then use jumbo compile even when it is ++# globally disabled. Otherwise it has no effect. ++# ++# never_build_jumbo ++# If set and set to true, then do not jumbo compile even if it is ++# globally enabled. Otherwise it has no effect. ++# ++# jumbo_excluded_sources ++# If set to a list of files, those files will not be merged with ++# the rest. This can be necessary if merging the files causes ++# compilation issues and fixing the issues is impractical. ++template("internal_jumbo_target") { ++ use_jumbo_build_for_target = use_jumbo_build ++ if (defined(invoker.always_build_jumbo) && invoker.always_build_jumbo) { ++ use_jumbo_build_for_target = true ++ } ++ if (defined(invoker.never_build_jumbo) && invoker.never_build_jumbo) { ++ use_jumbo_build_for_target = false ++ } ++ if (is_nacl_irt || is_nacl_nonsfi) { ++ # The code is barely compatible with the nacl toolchain anymore and we ++ # don't want to stress it further with jumbo compilation units. ++ use_jumbo_build_for_target = false ++ } ++ ++ foreach(excluded_target, jumbo_build_excluded) { ++ if (excluded_target == target_name || ++ excluded_target == get_label_info(":" + target_name, "dir") || ++ excluded_target == ++ get_label_info(":" + target_name, "label_no_toolchain")) { ++ use_jumbo_build_for_target = false ++ } ++ } ++ ++ excluded_sources = [] ++ if (defined(invoker.jumbo_excluded_sources)) { ++ excluded_sources = invoker.jumbo_excluded_sources ++ } ++ ++ if (defined(invoker.sources)) { ++ invoker_sources = invoker.sources ++ } else { ++ invoker_sources = [] ++ } ++ ++ gen_target_dir = invoker.target_gen_dir ++ ++ not_needed([ "gen_target_dir" ]) # Prevent "unused variable". ++ ++ if (use_jumbo_build_for_target) { ++ jumbo_files = [] ++ ++ # Split the sources list into chunks that are not excessively large ++ current_file_index = 0 ++ next_chunk_start = 0 ++ next_chunk_number = 1 ++ merge_limit = jumbo_file_merge_limit ++ if (merge_limit == -1) { ++ if (use_goma) { ++ merge_limit = jumbo_file_merge_goma ++ } else { ++ merge_limit = jumbo_file_merge_default ++ } ++ } ++ has_c_file = false ++ has_objective_c_file = false ++ sources_in_jumbo_files = [] ++ assert(merge_limit > 0) ++ foreach(source_file, invoker_sources) { ++ source_ext = get_path_info(source_file, "extension") ++ is_source_file = true ++ if (source_ext == "c") { ++ has_c_file = true ++ } else if (source_ext == "mm") { ++ has_objective_c_file = true ++ } else if (source_ext == "cc" || source_ext == "cpp") { ++ if (current_file_index == next_chunk_start) { ++ jumbo_files += [ "$gen_target_dir/" + target_name + "_jumbo_" + ++ next_chunk_number + ".cc" ] ++ next_chunk_number += 1 ++ next_chunk_start += merge_limit ++ } ++ current_file_index += 1 ++ } else { ++ is_source_file = false ++ } ++ if (is_source_file) { ++ sources_in_jumbo_files += [ source_file ] ++ } ++ } ++ ++ if (jumbo_files == [] || current_file_index == 1) { ++ # Empty sources list or a sources list with only header files or ++ # at most one non-header file. ++ use_jumbo_build_for_target = false ++ not_needed([ ++ "sources_in_jumbo_files", ++ "current_file_index", ++ "next_chunk_start", ++ "next_chunk_number", ++ ]) ++ } ++ ++ if (has_c_file) { ++ jumbo_files += [ "$gen_target_dir/" + target_name + "_jumbo_c.c" ] ++ } ++ if (has_objective_c_file) { ++ jumbo_files += [ "$gen_target_dir/" + target_name + "_jumbo_mm.mm" ] ++ } ++ } ++ ++ if (use_jumbo_build_for_target) { ++ merge_action_name = target_name + "__jumbo_merge" ++ sources_in_jumbo_files -= excluded_sources ++ ++ # Create an action that calls a script that merges all the source files. ++ action(merge_action_name) { ++ script = "//build/config/merge_for_jumbo.py" ++ response_file_contents = ++ rebase_path(sources_in_jumbo_files, root_build_dir) ++ outputs = jumbo_files ++ args = [ "--outputs" ] + rebase_path(outputs, root_build_dir) + ++ [ "--file-list={{response_file_name}}" ] ++ ++ # For the "gn analyze" step to work, gn needs to know about the ++ # original source files. They can't be in |sources| because then ++ # they will be compiled, so they have to be somewhere else where ++ # gn analyze looks. One alternative is the |data| list but that ++ # will affect test packaging with known bad effects on ++ # distributed testing. Putting them in this action's input list ++ # is the least bad place. ++ inputs = [] ++ foreach(f, invoker_sources - excluded_sources) { ++ # Avoid generated files and non non-source files. ++ in_source_tree = string_replace(rebase_path(f), ++ rebase_path(root_out_dir), ++ "dummy") == rebase_path(f) ++ is_source_file = get_path_info(f, "extension") == "cc" || ++ get_path_info(f, "extension") == "cpp" || ++ get_path_info(f, "extension") == "c" || ++ get_path_info(f, "extension") == "mm" ++ if (in_source_tree && is_source_file) { ++ inputs += [ f ] ++ } ++ } ++ } ++ } else { ++ # If the list subtraction triggers a gn error, ++ # jumbo_excluded_sources lists a file that is not in sources. ++ sources_after_exclusion = invoker_sources - excluded_sources ++ not_needed([ "sources_after_exclusion" ]) ++ } ++ ++ target_type = invoker.target_type ++ ++ # Perform the actual operation, either on the original sources or ++ # the sources post-jumbo merging. ++ target(target_type, target_name) { ++ deps = [] ++ if (defined(invoker.deps)) { ++ deps += invoker.deps ++ } ++ ++ # Take everything else not handled above from the invoker. ++ variables_to_not_forward = [ "deps" ] ++ if (use_jumbo_build_for_target) { ++ deps += [ ":" + merge_action_name ] ++ variables_to_not_forward += [ "sources" ] ++ assert(jumbo_files != []) ++ sources = invoker_sources - sources_in_jumbo_files + jumbo_files ++ ++ # Change include_dirs to make sure that the jumbo file can find its ++ # #included files. ++ variables_to_not_forward += [ "include_dirs" ] ++ include_dirs = [] ++ if (defined(invoker.include_dirs)) { ++ include_dirs = invoker.include_dirs ++ } ++ include_dirs += [ root_build_dir ] ++ } ++ forward_variables_from(invoker, "*", variables_to_not_forward) ++ } ++} ++ ++# See documentation above by "internal_jumbo_target". ++template("jumbo_source_set") { ++ internal_jumbo_target(target_name) { ++ target_type = "source_set" ++ forward_variables_from(invoker, "*") ++ } ++} ++ ++set_defaults("jumbo_source_set") { ++ # This sets the default list of configs when the jumbo_source_set target ++ # is defined. The default_compiler_configs comes from BUILDCONFIG.gn and ++ # is the list normally applied to static libraries and source sets. ++ configs = default_compiler_configs ++} ++ ++# See documentation above by "internal_jumbo_target". ++template("jumbo_static_library") { ++ internal_jumbo_target(target_name) { ++ target_type = "static_library" ++ forward_variables_from(invoker, "*") ++ } ++} ++ ++set_defaults("jumbo_static_library") { ++ # This sets the default list of configs when the jumbo_static_library target ++ # is defined. The default_compiler_configs comes from BUILDCONFIG.gn and ++ # is the list normally applied to static libraries and source sets. ++ configs = default_compiler_configs ++} ++ ++# See documentation above by "internal_jumbo_target". ++template("jumbo_component") { ++ internal_jumbo_target(target_name) { ++ target_type = "component" ++ forward_variables_from(invoker, "*") ++ } ++} ++ ++set_defaults("jumbo_component") { ++ # This sets the default list of configs when the jumbo_component ++ # target is defined. This code is a clone of set_defaults for the ++ # ordinary "component" template. ++ if (is_component_build) { ++ configs = default_shared_library_configs ++ if (is_android) { ++ configs -= [ "//build/config/android:hide_all_but_jni_onload" ] ++ } ++ } else { ++ configs = default_compiler_configs ++ } ++} +diff --git a/build/config/merge_for_jumbo.py b/build/config/merge_for_jumbo.py +new file mode 100755 +index 0000000000..6d037a80eb +--- /dev/null ++++ b/build/config/merge_for_jumbo.py +@@ -0,0 +1,145 @@ ++#!/usr/bin/env python ++# ++# Copyright 2016 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. ++ ++"""This script creates a "jumbo" file which merges all incoming files ++for compiling. ++ ++""" ++ ++from __future__ import print_function ++from __future__ import unicode_literals ++ ++import argparse ++import hashlib ++import io ++import os ++ ++def cut_ranges(boundaries): ++ # Given an increasing sequence of boundary indices, generate a sequence of ++ # non-overlapping ranges. The total range is inclusive of the first index ++ # and exclusive of the last index from the given sequence. ++ for start, stop in zip(boundaries, boundaries[1:]): ++ yield range(start, stop) ++ ++ ++def generate_chunk_stops(inputs, output_count, smart_merge=True): ++ # Note: In the comments below, unique numeric labels are assigned to files. ++ # Consider them as the sorted rank of the hash of each file path. ++ # Simple jumbo chunking generates uniformly sized chunks with the ceiling of: ++ # (output_index + 1) * input_count / output_count ++ input_count = len(inputs) ++ stops = [((i + 1) * input_count + output_count - 1) // output_count ++ for i in range(output_count)] ++ # This is disruptive at times because file insertions and removals can ++ # invalidate many chunks as all files are offset by one. ++ # For example, say we have 12 files in 4 uniformly sized chunks: ++ # 9, 4, 0; 7, 1, 11; 5, 10, 2; 6, 3, 8 ++ # If we delete the first file we get: ++ # 4, 0, 7; 1, 11, 5; 10, 2, 6; 3, 8 ++ # All of the chunks have new sets of inputs. ++ ++ # With path-aware chunking, we start with the uniformly sized chunks: ++ # 9, 4, 0; 7, 1, 11; 5, 10, 2; 6, 3, 8 ++ # First we find the smallest rank in each of the chunks. Their indices are ++ # stored in the |centers| list and in this example the ranks would be: ++ # 0, 1, 2, 3 ++ # Then we find the largest rank between the centers. Their indices are stored ++ # in the |stops| list and in this example the ranks would be: ++ # 7, 11, 6 ++ # These files mark the boundaries between chunks and these boundary files are ++ # often maintained even as files are added or deleted. ++ # In this example, 7, 11, and 6 are the first files in each chunk: ++ # 9, 4, 0; 7, 1; 11, 5, 10, 2; 6, 3, 8 ++ # If we delete the first file and repeat the process we get: ++ # 4, 0; 7, 1; 11, 5, 10, 2; 6, 3, 8 ++ # Only the first chunk has a new set of inputs. ++ if smart_merge: ++ # Starting with the simple chunks, every file is assigned a rank. ++ # This requires a hash function that is stable across runs. ++ hasher = lambda n: hashlib.md5(inputs[n].encode()).hexdigest() ++ # In each chunk there is a key file with lowest rank; mark them. ++ # Note that they will not easily change. ++ centers = [min(indices, key=hasher) for indices in cut_ranges([0] + stops)] ++ # Between each pair of key files there is a file with highest rank. ++ # Mark these to be used as border files. They also will not easily change. ++ # Forget the inital chunks and create new chunks by splitting the list at ++ # every border file. ++ stops = [max(indices, key=hasher) for indices in cut_ranges(centers)] ++ stops.append(input_count) ++ return stops ++ ++ ++def write_jumbo_files(inputs, outputs, written_input_set, written_output_set): ++ chunk_stops = generate_chunk_stops(inputs, len(outputs)) ++ ++ written_inputs = 0 ++ for output_index, output_file in enumerate(outputs): ++ written_output_set.add(output_file) ++ if os.path.isfile(output_file): ++ with open(output_file, "r") as current: ++ current_jumbo_file = current.read() ++ else: ++ current_jumbo_file = None ++ ++ out = io.StringIO() ++ out.write("/* This is a Jumbo file. Don't edit. */\n\n") ++ out.write("/* Generated with merge_for_jumbo.py. */\n\n") ++ input_limit = chunk_stops[output_index] ++ while written_inputs < input_limit: ++ filename = inputs[written_inputs] ++ written_inputs += 1 ++ out.write("#include \"%s\"\n" % filename) ++ written_input_set.add(filename) ++ new_jumbo_file = out.getvalue() ++ out.close() ++ ++ if new_jumbo_file != current_jumbo_file: ++ with open(output_file, "w") as out: ++ out.write(new_jumbo_file) ++ ++ ++def main(): ++ parser = argparse.ArgumentParser() ++ parser.add_argument("--outputs", nargs="+", required=True, ++ help='List of output files to split input into') ++ parser.add_argument("--file-list", required=True) ++ parser.add_argument("--verbose", action="store_true") ++ args = parser.parse_args() ++ ++ lines = [] ++ # If written with gn |write_file| each file is on its own line. ++ with open(args.file_list) as file_list_file: ++ lines = [line.strip() for line in file_list_file if line.strip()] ++ # If written with gn |response_file_contents| the files are space separated. ++ all_inputs = [] ++ for line in lines: ++ all_inputs.extend(line.split()) ++ ++ written_output_set = set() # Just for double checking ++ written_input_set = set() # Just for double checking ++ for language_ext in (".cc", ".c", ".mm",): ++ if language_ext == ".cc": ++ ext_pattern = (".cc", ".cpp") ++ else: ++ ext_pattern = tuple([language_ext]) ++ ++ outputs = [x for x in args.outputs if x.endswith(ext_pattern)] ++ inputs = [x for x in all_inputs if x.endswith(ext_pattern)] ++ ++ if not outputs: ++ assert not inputs ++ continue ++ ++ write_jumbo_files(inputs, outputs, written_input_set, written_output_set) ++ ++ assert set(args.outputs) == written_output_set, "Did not fill all outputs" ++ assert set(all_inputs) == written_input_set, "Did not use all inputs" ++ if args.verbose: ++ print("Generated %s (%d files) based on %s" % ( ++ str(args.outputs), len(written_input_set), args.file_list)) ++ ++if __name__ == "__main__": ++ main() +diff --git a/cc/cc.gni b/cc/cc.gni +index 090420c902..6b0e76bf21 100644 +--- a/cc/cc.gni ++++ b/cc/cc.gni +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//testing/test.gni") + + cc_remove_configs = [] +@@ -16,7 +17,7 @@ if (!is_debug) { + } + + template("cc_component") { +- component(target_name) { ++ jumbo_component(target_name) { + forward_variables_from(invoker, "*", [ "configs" ]) + if (defined(invoker.configs)) { + configs += invoker.configs +@@ -27,7 +28,7 @@ template("cc_component") { + } + + template("cc_test_static_library") { +- static_library(target_name) { ++ jumbo_static_library(target_name) { + forward_variables_from(invoker, "*", [ "configs" ]) + if (defined(invoker.configs)) { + configs += invoker.configs +diff --git a/components/autofill/content/browser/BUILD.gn b/components/autofill/content/browser/BUILD.gn +index 224314c71c..60582616c3 100644 +--- a/components/autofill/content/browser/BUILD.gn ++++ b/components/autofill/content/browser/BUILD.gn +@@ -2,9 +2,10 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//third_party/protobuf/proto_library.gni") + +-static_library("browser") { ++jumbo_static_library("browser") { + sources = [ + "autofill_log_router_factory.cc", + "autofill_log_router_factory.h", +diff --git a/components/autofill/content/renderer/BUILD.gn b/components/autofill/content/renderer/BUILD.gn +index 45c7282948..e4813b9dea 100644 +--- a/components/autofill/content/renderer/BUILD.gn ++++ b/components/autofill/content/renderer/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-static_library("renderer") { ++import("//build/config/jumbo.gni") ++ ++jumbo_static_library("renderer") { + sources = [ + "a11y_utils.cc", + "a11y_utils.h", +@@ -62,7 +64,7 @@ static_library("renderer") { + configs += [ "//build/config/compiler:wexit_time_destructors" ] + } + +-static_library("test_support") { ++jumbo_static_library("test_support") { + testonly = true + sources = [ + "autofill_agent_test_api.h", +diff --git a/components/autofill/core/browser/BUILD.gn b/components/autofill/core/browser/BUILD.gn +index 92fcc2dda3..d3001f3be2 100644 +--- a/components/autofill/core/browser/BUILD.gn ++++ b/components/autofill/core/browser/BUILD.gn +@@ -5,6 +5,7 @@ + import("//build/buildflag_header.gni") + import("//build/config/chrome_build.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//chrome/version.gni") + import("//components/optimization_guide/features.gni") + import("//testing/libfuzzer/fuzzer_test.gni") +@@ -58,7 +59,7 @@ action("regex_patterns_inl_h") { + rebase_path(outputs, root_build_dir) + } + +-static_library("browser") { ++jumbo_static_library("browser") { + sources = [ + "address_normalization_manager.cc", + "address_normalization_manager.h", +@@ -771,7 +772,7 @@ static_library("browser") { + } + } + +-static_library("legal_message_line") { ++jumbo_static_library("legal_message_line") { + sources = [ + "payments/legal_message_line.cc", + "payments/legal_message_line.h", +@@ -785,7 +786,7 @@ static_library("legal_message_line") { + configs += [ "//build/config/compiler:wexit_time_destructors" ] + } + +-static_library("test_support") { ++jumbo_static_library("test_support") { + testonly = true + sources = [ + "autofill_form_test_utils.cc", +diff --git a/components/autofill/core/common/BUILD.gn b/components/autofill/core/common/BUILD.gn +index c2137e8aa3..d44b57cde8 100644 +--- a/components/autofill/core/common/BUILD.gn ++++ b/components/autofill/core/common/BUILD.gn +@@ -1,10 +1,10 @@ + # Copyright 2014 The Chromium Authors + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. +- ++import("//build/config/jumbo.gni") + import("//testing/libfuzzer/fuzzer_test.gni") + +-static_library("common") { ++jumbo_static_library("common") { + sources = [ + "aliases.h", + "autocomplete_parsing_util.cc", +diff --git a/components/cdm/browser/BUILD.gn b/components/cdm/browser/BUILD.gn +index 4cc9a95834..3ce6e402f6 100644 +--- a/components/cdm/browser/BUILD.gn ++++ b/components/cdm/browser/BUILD.gn +@@ -2,10 +2,11 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//media/media_options.gni") + + if (enable_media_drm_storage) { +- source_set("browser") { ++ jumbo_source_set("browser") { + sources = [ + "media_drm_storage_impl.cc", + "media_drm_storage_impl.h", +@@ -27,7 +28,7 @@ if (enable_media_drm_storage) { + ] + } + +- source_set("unit_tests") { ++ jumbo_source_set("unit_tests") { + testonly = true + sources = [ "media_drm_storage_impl_unittest.cc" ] + deps = [ +diff --git a/components/cdm/common/BUILD.gn b/components/cdm/common/BUILD.gn +index 1b9a1787a1..819c0a63db 100644 +--- a/components/cdm/common/BUILD.gn ++++ b/components/cdm/common/BUILD.gn +@@ -1,10 +1,11 @@ + # Copyright 2014 The Chromium Authors + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. ++import("//build/config/jumbo.gni") + + import("//third_party/widevine/cdm/widevine.gni") + +-static_library("common") { ++jumbo_static_library("common") { + sources = [] + + deps = [ +diff --git a/components/cdm/renderer/BUILD.gn b/components/cdm/renderer/BUILD.gn +index 10ebce2eee..f87733ef61 100644 +--- a/components/cdm/renderer/BUILD.gn ++++ b/components/cdm/renderer/BUILD.gn +@@ -2,9 +2,10 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//third_party/widevine/cdm/widevine.gni") + +-static_library("renderer") { ++jumbo_static_library("renderer") { + sources = [ + "external_clear_key_key_system_info.cc", + "external_clear_key_key_system_info.h", +diff --git a/components/content_settings/core/browser/BUILD.gn b/components/content_settings/core/browser/BUILD.gn +index f32f340805..041eeb326e 100644 +--- a/components/content_settings/core/browser/BUILD.gn ++++ b/components/content_settings/core/browser/BUILD.gn +@@ -3,9 +3,10 @@ + # found in the LICENSE file. + + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//ppapi/buildflags/buildflags.gni") + +-static_library("browser") { ++jumbo_static_library("browser") { + sources = [ + "content_settings_default_provider.cc", + "content_settings_default_provider.h", +@@ -91,7 +92,7 @@ static_library("browser") { + configs += [ "//build/config/compiler:wexit_time_destructors" ] + } + +-source_set("unit_tests") { ++jumbo_source_set("unit_tests") { + testonly = true + sources = [ + "content_settings_partitioned_origin_value_map_unittest.cc", +diff --git a/components/content_settings/core/common/BUILD.gn b/components/content_settings/core/common/BUILD.gn +index 0792cb0974..ac41ae4912 100644 +--- a/components/content_settings/core/common/BUILD.gn ++++ b/components/content_settings/core/common/BUILD.gn +@@ -3,10 +3,11 @@ + # found in the LICENSE file. + + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//mojo/public/tools/bindings/mojom.gni") + import("//testing/libfuzzer/fuzzer_test.gni") + +-static_library("common") { ++jumbo_static_library("common") { + sources = [ + "content_settings.cc", + "content_settings.h", +@@ -58,7 +59,7 @@ static_library("common") { + ] + } + +-source_set("unit_tests") { ++jumbo_source_set("unit_tests") { + testonly = true + sources = [ + "content_settings_constraints_unittest.cc", +diff --git a/components/content_settings/core/test/BUILD.gn b/components/content_settings/core/test/BUILD.gn +index 56bef89ec9..adfa5131d6 100644 +--- a/components/content_settings/core/test/BUILD.gn ++++ b/components/content_settings/core/test/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-static_library("test_support") { ++import("//build/config/jumbo.gni") ++ ++jumbo_static_library("test_support") { + testonly = true + sources = [ + "content_settings_mock_provider.cc", +diff --git a/components/domain_reliability/BUILD.gn b/components/domain_reliability/BUILD.gn +index 1e61419d65..8d53a1c71a 100644 +--- a/components/domain_reliability/BUILD.gn ++++ b/components/domain_reliability/BUILD.gn +@@ -2,6 +2,8 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") ++ + action("bake_in_configs") { + visibility = [ ":*" ] + script = "bake_in_configs.py" +@@ -43,7 +45,7 @@ action("bake_in_configs") { + ] + } + +-component("domain_reliability") { ++jumbo_component("domain_reliability") { + sources = [ + "baked_in_configs.h", + "beacon.cc", +@@ -86,7 +88,7 @@ component("domain_reliability") { + ] + } + +-source_set("unit_tests") { ++jumbo_source_set("unit_tests") { + testonly = true + sources = [ + "config_unittest.cc", +diff --git a/components/feature_engagement/internal/BUILD.gn b/components/feature_engagement/internal/BUILD.gn +index 4084241bc7..396ba1e636 100644 +--- a/components/feature_engagement/internal/BUILD.gn ++++ b/components/feature_engagement/internal/BUILD.gn +@@ -2,13 +2,15 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") ++ + if (is_android) { + import("//build/config/android/config.gni") + import("//build/config/android/rules.gni") + import("//third_party/jni_zero/jni_zero.gni") + } + +-static_library("internal") { ++jumbo_static_library("internal") { + visibility = [ + ":*", + "//components/feature_engagement", +@@ -94,7 +96,7 @@ static_library("internal") { + } + } + +-source_set("unit_tests") { ++jumbo_source_set("unit_tests") { + testonly = true + + visibility = [ "//components/feature_engagement:unit_tests" ] +diff --git a/components/feature_engagement/internal/test/BUILD.gn b/components/feature_engagement/internal/test/BUILD.gn +index eb975dc8f5..9421d1719a 100644 +--- a/components/feature_engagement/internal/test/BUILD.gn ++++ b/components/feature_engagement/internal/test/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-source_set("test_support") { ++import("//build/config/jumbo.gni") ++ ++jumbo_source_set("test_support") { + testonly = true + + visibility = [ "//components/feature_engagement/internal:unit_tests" ] +diff --git a/components/feature_engagement/public/BUILD.gn b/components/feature_engagement/public/BUILD.gn +index f69e21a704..838050bdd7 100644 +--- a/components/feature_engagement/public/BUILD.gn ++++ b/components/feature_engagement/public/BUILD.gn +@@ -2,6 +2,8 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") ++ + if (is_chromeos) { + import("//build/config/chromeos/ui_mode.gni") + } +@@ -12,7 +14,7 @@ if (is_android) { + import("//third_party/jni_zero/jni_zero.gni") + } + +-source_set("public") { ++jumbo_source_set("public") { + sources = [ + "configuration.cc", + "configuration.h", +@@ -80,7 +82,7 @@ source_set("public") { + } + } + +-source_set("unit_tests") { ++jumbo_source_set("unit_tests") { + testonly = true + + visibility = [ "//components/feature_engagement:unit_tests" ] +diff --git a/components/lookalikes/core/BUILD.gn b/components/lookalikes/core/BUILD.gn +index e5db19da6f..0a0d27c5cd 100644 +--- a/components/lookalikes/core/BUILD.gn ++++ b/components/lookalikes/core/BUILD.gn +@@ -2,10 +2,11 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//testing/libfuzzer/fuzzer_test.gni") + import("//third_party/protobuf/proto_library.gni") + +-static_library("core") { ++jumbo_static_library("core") { + sources = [ + "lookalike_url_ui_util.cc", + "lookalike_url_ui_util.h", +@@ -33,7 +34,7 @@ static_library("core") { + ] + } + +-static_library("safety_tips") { ++jumbo_static_library("safety_tips") { + sources = [ + "safety_tip_test_utils.cc", + "safety_tip_test_utils.h", +@@ -49,7 +50,7 @@ static_library("safety_tips") { + ] + } + +-source_set("unit_tests") { ++jumbo_source_set("unit_tests") { + testonly = true + sources = [ + "lookalike_url_util_unittest.cc", +diff --git a/components/media_router/common/providers/cast/certificate/BUILD.gn b/components/media_router/common/providers/cast/certificate/BUILD.gn +index 85dfa2f704..af8fe5d395 100644 +--- a/components/media_router/common/providers/cast/certificate/BUILD.gn ++++ b/components/media_router/common/providers/cast/certificate/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//third_party/openscreen/src/build/config/cast.gni") + + config("developer_certificate_config") { +@@ -11,7 +12,7 @@ config("developer_certificate_config") { + } + } + +-source_set("certificate_reader") { ++jumbo_source_set("certificate_reader") { + sources = [ + "cast_cert_reader.cc", + "cast_cert_reader.h", +@@ -32,7 +33,7 @@ source_set("certificate_roots") { + configs += [ "//build/config/compiler:wexit_time_destructors" ] + } + +-static_library("certificate") { ++jumbo_static_library("certificate") { + sources = [ + "cast_cert_printer.cc", + "cast_cert_printer.h", +@@ -61,7 +62,7 @@ static_library("certificate") { + ] + } + +-source_set("openscreen_certificate_verifier") { ++jumbo_source_set("openscreen_certificate_verifier") { + sources = [ + "net_parsed_certificate.cc", + "net_parsed_certificate.h", +@@ -77,7 +78,7 @@ source_set("openscreen_certificate_verifier") { + configs += [ "//build/config/compiler:wexit_time_destructors" ] + } + +-static_library("test_support") { ++jumbo_static_library("test_support") { + testonly = true + sources = [ + "cast_cert_test_helpers.cc", +@@ -93,7 +94,7 @@ static_library("test_support") { + ] + } + +-source_set("unit_tests") { ++jumbo_source_set("unit_tests") { + testonly = true + sources = [ + "cast_cert_validator_unittest.cc", +diff --git a/components/metrics/BUILD.gn b/components/metrics/BUILD.gn +index 8f547a120d..5bdc91344d 100644 +--- a/components/metrics/BUILD.gn ++++ b/components/metrics/BUILD.gn +@@ -5,6 +5,7 @@ + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/cronet/config.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//testing/test.gni") + + if (is_android) { +@@ -95,7 +96,7 @@ source_set("metrics_pref_names") { + } + + if (!is_cronet_build || is_ios) { +- static_library("metrics") { ++ jumbo_static_library("metrics") { + sources = [ + "android_metrics_helper.cc", + "android_metrics_helper.h", +@@ -297,7 +298,7 @@ if (!is_cronet_build || is_ios) { + } + } + +- static_library("test_support") { ++ jumvo_static_library("test_support") { + testonly = true + sources = [ + "test/test_enabled_state_provider.cc", +diff --git a/components/omnibox/browser/BUILD.gn b/components/omnibox/browser/BUILD.gn +index 44e8cc4556..446703be57 100644 +--- a/components/omnibox/browser/BUILD.gn ++++ b/components/omnibox/browser/BUILD.gn +@@ -4,6 +4,7 @@ + + import("//build/buildflag_header.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//components/optimization_guide/features.gni") + import("//components/vector_icons/vector_icons.gni") +@@ -129,7 +130,7 @@ static_library("vector_icons") { + ] + } + +-static_library("browser") { ++jumbo_static_library("browser") { + sources = [ + "actions/omnibox_action.cc", + "actions/omnibox_action.h", +@@ -668,7 +669,7 @@ if (is_android) { + } + } + +-static_library("test_support") { ++jumbo_static_library("test_support") { + testonly = true + sources = [ + "fake_autocomplete_provider.cc", +diff --git a/components/password_manager/content/browser/BUILD.gn b/components/password_manager/content/browser/BUILD.gn +index 3d1d16b149..37ad74e4ee 100644 +--- a/components/password_manager/content/browser/BUILD.gn ++++ b/components/password_manager/content/browser/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-static_library("browser") { ++import("//build/config/jumbo.gni") ++ ++jumbo_static_library("browser") { + sources = [ + "bad_message.cc", + "bad_message.h", +diff --git a/components/password_manager/core/browser/BUILD.gn b/components/password_manager/core/browser/BUILD.gn +index 31bc716ffc..8dfd2a46ed 100644 +--- a/components/password_manager/core/browser/BUILD.gn ++++ b/components/password_manager/core/browser/BUILD.gn +@@ -4,6 +4,7 @@ + + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//third_party/libprotobuf-mutator/fuzzable_proto_library.gni") + + if (is_android) { +@@ -17,7 +18,7 @@ config("password_reuse_detection_config") { + } + } + +-source_set("sql_builder") { ++jumbo_source_set("sql_builder") { + sources = [ + "sql_table_builder.cc", + "sql_table_builder.h", +@@ -29,7 +30,7 @@ source_set("sql_builder") { + configs += [ "//build/config/compiler:wexit_time_destructors" ] + } + +-static_library("browser") { ++jumbo_static_library("browser") { + sources = [ + "browser_save_password_progress_logger.cc", + "browser_save_password_progress_logger.h", +@@ -305,7 +306,7 @@ if (is_android) { + } + } + +-static_library("password_hash_data") { ++jumbo_static_library("password_hash_data") { + sources = [ + "password_hash_data.cc", + "password_hash_data.h", +@@ -333,7 +334,7 @@ static_library("hash_password_manager") { + configs += [ "//build/config/compiler:wexit_time_destructors" ] + } + +-static_library("test_support") { ++jumbo_static_library("test_support") { + testonly = true + sources = [ + "fake_form_fetcher.cc", +diff --git a/components/password_manager/core/browser/leak_detection/BUILD.gn b/components/password_manager/core/browser/leak_detection/BUILD.gn +index 1ca4cf2a0d..fc4295b163 100644 +--- a/components/password_manager/core/browser/leak_detection/BUILD.gn ++++ b/components/password_manager/core/browser/leak_detection/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//third_party/libprotobuf-mutator/fuzzable_proto_library.gni") + + fuzzable_proto_library("proto") { +@@ -25,7 +26,7 @@ source_set("leak_detection_interface_headers") { + configs += [ "//build/config/compiler:wexit_time_destructors" ] + } + +-source_set("leak_detection") { ++jumbo_source_set("leak_detection") { + sources = [ + "bulk_leak_check_impl.cc", + "bulk_leak_check_impl.h", +@@ -72,7 +73,7 @@ source_set("leak_detection") { + configs += [ "//build/config/compiler:wexit_time_destructors" ] + } + +-source_set("test_support") { ++jumbo_source_set("test_support") { + testonly = true + sources = [ + "mock_bulk_leak_check_service.cc", +@@ -93,7 +94,7 @@ source_set("test_support") { + ] + } + +-source_set("unit_tests") { ++jumbo_source_set("unit_tests") { + testonly = true + sources = [ + "bulk_leak_check_impl_unittest.cc", +diff --git a/components/password_manager/core/common/BUILD.gn b/components/password_manager/core/common/BUILD.gn +index 0017d7d70d..cb82da3e9f 100644 +--- a/components/password_manager/core/common/BUILD.gn ++++ b/components/password_manager/core/common/BUILD.gn +@@ -5,8 +5,9 @@ + if (is_android) { + import("//build/config/android/rules.gni") + } ++import("//build/config/jumbo.gni") + +-static_library("common") { ++jumbo_static_library("common") { + sources = [ + "credential_manager_types.cc", + "credential_manager_types.h", +diff --git a/components/payments/content/BUILD.gn b/components/payments/content/BUILD.gn +index 4ecdebbc94..0be26f927b 100644 +--- a/components/payments/content/BUILD.gn ++++ b/components/payments/content/BUILD.gn +@@ -3,8 +3,9 @@ + # found in the LICENSE file. + + import("//build/config/chromeos/ui_mode.gni") ++import("//build/config/jumbo.gni") + +-static_library("content") { ++jumbo_static_library("content") { + sources = [ + "android_app_communication.cc", + "android_app_communication.h", +@@ -142,7 +143,7 @@ static_library("content") { + } + + # Files used by content and utility. +-static_library("content_common") { ++jumbo_static_library("content_common") { + sources = [ + "web_app_manifest.cc", + "web_app_manifest.h", +@@ -154,7 +155,7 @@ static_library("content_common") { + ] + } + +-static_library("utils") { ++jumbo_static_library("utils") { + sources = [ + "developer_console_logger.cc", + "developer_console_logger.h", +@@ -201,7 +202,7 @@ static_library("utils") { + ] + } + +-static_library("test_support") { ++jumbo_static_library("test_support") { + testonly = true + sources = [ + "mock_payment_manifest_web_data_service.cc", +@@ -218,7 +219,7 @@ static_library("test_support") { + ] + } + +-source_set("unit_tests") { ++jumbo_source_set("unit_tests") { + testonly = true + sources = [ + "android_app_communication_test_support.h", +diff --git a/components/payments/content/icon/BUILD.gn b/components/payments/content/icon/BUILD.gn +index 517b3dd3da..a9b2aba727 100644 +--- a/components/payments/content/icon/BUILD.gn ++++ b/components/payments/content/icon/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-static_library("icon") { ++import("//build/config/jumbo.gni") ++ ++jumbo_static_library("icon") { + sources = [ + "icon_size.cc", + "icon_size.h", +diff --git a/components/payments/core/BUILD.gn b/components/payments/core/BUILD.gn +index 86324a683b..52281b94b2 100644 +--- a/components/payments/core/BUILD.gn ++++ b/components/payments/core/BUILD.gn +@@ -3,8 +3,9 @@ + # found in the LICENSE file. + + import("//build/config/chromeos/ui_mode.gni") ++import("//build/config/jumbo.gni") + +-static_library("core") { ++jumbo_static_library("core") { + sources = [ + "android_app_description.cc", + "android_app_description.h", +@@ -105,7 +106,7 @@ static_library("core") { + ] + } + +-static_library("error_strings") { ++jumbo_static_library("error_strings") { + sources = [ + "error_strings.cc", + "error_strings.h", +@@ -121,14 +122,14 @@ static_library("error_strings") { + } + } + +-static_library("method_strings") { ++jumbo_static_library("method_strings") { + sources = [ + "method_strings.cc", + "method_strings.h", + ] + } + +-static_library("test_support") { ++jumbo_static_library("test_support") { + testonly = true + sources = [ + "const_csp_checker.cc", +@@ -156,7 +157,7 @@ static_library("test_support") { + ] + } + +-source_set("unit_tests") { ++jumbo_source_set("unit_tests") { + testonly = true + sources = [ + "android_app_description_tools_unittest.cc", +diff --git a/components/performance_manager/execution_context_priority/frame_capturing_media_stream_voter.cc b/components/performance_manager/execution_context_priority/frame_capturing_media_stream_voter.cc +index 1ff2355790..cbc0eb647c 100644 +--- a/components/performance_manager/execution_context_priority/frame_capturing_media_stream_voter.cc ++++ b/components/performance_manager/execution_context_priority/frame_capturing_media_stream_voter.cc +@@ -12,14 +12,14 @@ namespace performance_manager::execution_context_priority { + + namespace { + +-const execution_context::ExecutionContext* GetExecutionContext( ++const execution_context::ExecutionContext* GetExecutionContext_FCVSV( + const FrameNode* frame_node) { + return execution_context::ExecutionContext::From(frame_node); + } + + // Returns a vote with the appropriate priority depending on if the frame is + // capturing media. +-Vote GetVote(bool is_capturing_media_stream) { ++Vote GetVote_FCVSV(bool is_capturing_media_stream) { + base::TaskPriority priority = is_capturing_media_stream + ? base::TaskPriority::USER_BLOCKING + : base::TaskPriority::LOWEST; +@@ -44,19 +44,19 @@ void FrameCapturingMediaStreamVoter::SetVotingChannel( + + void FrameCapturingMediaStreamVoter::OnFrameNodeInitializing( + const FrameNode* frame_node) { +- const Vote vote = GetVote(frame_node->IsCapturingMediaStream()); +- voting_channel_.SubmitVote(GetExecutionContext(frame_node), vote); ++ const Vote vote = GetVote_FCVSV(frame_node->IsCapturingMediaStream()); ++ voting_channel_.SubmitVote(GetExecutionContext_FCVSV(frame_node), vote); + } + + void FrameCapturingMediaStreamVoter::OnFrameNodeTearingDown( + const FrameNode* frame_node) { +- voting_channel_.InvalidateVote(GetExecutionContext(frame_node)); ++ voting_channel_.InvalidateVote(GetExecutionContext_FCVSV(frame_node)); + } + + void FrameCapturingMediaStreamVoter::OnIsCapturingMediaStreamChanged( + const FrameNode* frame_node) { +- const Vote new_vote = GetVote(frame_node->IsCapturingMediaStream()); +- voting_channel_.ChangeVote(GetExecutionContext(frame_node), new_vote); ++ const Vote new_vote = GetVote_FCVSV(frame_node->IsCapturingMediaStream()); ++ voting_channel_.ChangeVote(GetExecutionContext_FCVSV(frame_node), new_vote); + } + + } // namespace performance_manager::execution_context_priority +diff --git a/components/policy/content/BUILD.gn b/components/policy/content/BUILD.gn +index 9aed722df2..8415b97c30 100644 +--- a/components/policy/content/BUILD.gn ++++ b/components/policy/content/BUILD.gn +@@ -3,11 +3,12 @@ + # found in the LICENSE file. + + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + + assert(use_blink, + "Policy Throttle should not be referenced on non-blink platforms") + +-source_set("safe_sites_navigation_throttle") { ++jumbo_source_set("safe_sites_navigation_throttle") { + sources = [ + "safe_search_service.cc", + "safe_search_service.h", +@@ -27,7 +28,7 @@ source_set("safe_sites_navigation_throttle") { + ] + } + +-source_set("content") { ++jumbo_source_set("content") { + sources = [ + "policy_blocklist_navigation_throttle.cc", + "policy_blocklist_navigation_throttle.h", +diff --git a/components/policy/core/browser/BUILD.gn b/components/policy/core/browser/BUILD.gn +index d78485bd0b..302ece0d7e 100644 +--- a/components/policy/core/browser/BUILD.gn ++++ b/components/policy/core/browser/BUILD.gn +@@ -4,6 +4,7 @@ + + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + + group("browser") { + if (is_component_build) { +@@ -13,7 +14,7 @@ group("browser") { + } + } + +-source_set("internal") { ++jumbo_source_set("internal") { + visibility = [ "//components/policy/*" ] + sources = [ + "boolean_disabling_policy_handler.cc", +@@ -115,7 +116,7 @@ source_set("internal") { + ] + } + +-static_library("test_support") { ++jumbo_static_library("test_support") { + testonly = true + sources = [ + "configuration_policy_pref_store_test.cc", +diff --git a/components/policy/core/common/BUILD.gn b/components/policy/core/common/BUILD.gn +index 8295399aff..2b0e927eb1 100644 +--- a/components/policy/core/common/BUILD.gn ++++ b/components/policy/core/common/BUILD.gn +@@ -4,6 +4,7 @@ + + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//testing/libfuzzer/fuzzer_test.gni") + + group("policy_namespace") { +@@ -18,7 +19,7 @@ group("common") { + } + } + +-source_set("policy_namespace_internal") { ++jumbo_source_set("policy_namespace_internal") { + visibility = [ "//components/policy/*" ] + + configs += [ "//components/policy:component_implementation" ] +@@ -30,7 +31,7 @@ source_set("policy_namespace_internal") { + ] + } + +-source_set("util") { ++jumbo_source_set("util") { + sources = [ + "cloud/cloud_policy_util.cc", + "cloud/cloud_policy_util.h", +@@ -60,7 +61,7 @@ source_set("util") { + } + } + +-source_set("internal") { ++jumbo_source_set("internal") { + visibility = [ "//components/policy/*" ] + + configs += [ "//components/policy:component_implementation" ] +@@ -399,7 +400,7 @@ source_set("internal") { + } + } + +-static_library("test_support") { ++jumbo_static_library("test_support") { + testonly = true + sources = [ + "cloud/mock_cloud_external_data_manager.cc", +diff --git a/components/safe_browsing/content/browser/BUILD.gn b/components/safe_browsing/content/browser/BUILD.gn +index a636c73d80..cafdb36ec6 100644 +--- a/components/safe_browsing/content/browser/BUILD.gn ++++ b/components/safe_browsing/content/browser/BUILD.gn +@@ -3,6 +3,7 @@ + # found in the LICENSE file. + + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//components/safe_browsing/buildflags.gni") + + # NOTE: This target is separated from :browser as +@@ -66,7 +67,7 @@ if (safe_browsing_mode > 0) { + } + } + +-source_set("browser") { ++jumbo_source_set("browser") { + sources = [ + "async_check_tracker.cc", + "async_check_tracker.h", +@@ -224,7 +225,7 @@ source_set("unit_tests") { + ] + } + +-source_set("client_side_detection_images_cache") { ++jumbo_source_set("client_side_detection_images_cache") { + sources = [ + "client_side_detection_feature_cache.cc", + "client_side_detection_feature_cache.h", +@@ -238,7 +239,7 @@ source_set("client_side_detection_images_cache") { + ] + } + +-source_set("client_side_detection_service") { ++jumbo_source_set("client_side_detection_service") { + sources = [ + "client_side_detection_service.cc", + "client_side_detection_service.h", +diff --git a/components/safe_browsing/core/browser/BUILD.gn b/components/safe_browsing/core/browser/BUILD.gn +index 03797a4340..7aee25400e 100644 +--- a/components/safe_browsing/core/browser/BUILD.gn ++++ b/components/safe_browsing/core/browser/BUILD.gn +@@ -3,8 +3,9 @@ + # found in the LICENSE file. + + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + +-source_set("browser") { ++jumbo_source_set("browser") { + sources = [ + "database_manager_mechanism.cc", + "database_manager_mechanism.h", +diff --git a/components/security_state/content/BUILD.gn b/components/security_state/content/BUILD.gn +index 0331f31f74..e79f5a83d0 100644 +--- a/components/security_state/content/BUILD.gn ++++ b/components/security_state/content/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-static_library("content") { ++import("//build/config/jumbo.gni") ++ ++jumbo_static_library("content") { + sources = [ + "content_utils.cc", + "content_utils.h", +diff --git a/components/security_state/core/BUILD.gn b/components/security_state/core/BUILD.gn +index 497dcf5126..1f69e4ad02 100644 +--- a/components/security_state/core/BUILD.gn ++++ b/components/security_state/core/BUILD.gn +@@ -2,12 +2,14 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") ++ + if (is_android) { + import("//build/config/android/config.gni") + import("//build/config/android/rules.gni") + } + +-static_library("core") { ++jumbo_static_library("core") { + sources = [ + "security_state.cc", + "security_state.h", +@@ -33,7 +35,7 @@ if (is_android) { + } + } + +-source_set("unit_tests") { ++jumbo_source_set("unit_tests") { + testonly = true + sources = [ "security_state_unittest.cc" ] + +diff --git a/components/sync/BUILD.gn b/components/sync/BUILD.gn +index ae7db1affb..e6ec73b0d7 100644 +--- a/components/sync/BUILD.gn ++++ b/components/sync/BUILD.gn +@@ -4,6 +4,7 @@ + + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//testing/test.gni") + + group("sync") { +diff --git a/components/sync/base/BUILD.gn b/components/sync/base/BUILD.gn +index 2ad18d63be..2203432646 100644 +--- a/components/sync/base/BUILD.gn ++++ b/components/sync/base/BUILD.gn +@@ -4,6 +4,7 @@ + + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + + declare_args() { + # Controls the product part of the user agent calculated in sync_util.cc. +@@ -18,7 +19,7 @@ source_set("features") { + deps = [ "//base" ] + } + +-static_library("base") { ++jumbo_static_library("base") { + sources = [ + "client_tag_hash.cc", + "client_tag_hash.h", +diff --git a/components/sync/protocol/BUILD.gn b/components/sync/protocol/BUILD.gn +index 4d5f622fe7..1c3fd5bb4b 100644 +--- a/components/sync/protocol/BUILD.gn ++++ b/components/sync/protocol/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//third_party/protobuf/proto_library.gni") + import("protocol_sources.gni") + +@@ -15,7 +16,7 @@ proto_library("protocol") { + # it being listed in public_deps of upper directories (even though it doesn't + # fit the definition of public_deps). Consider using a group() to expose this + # together with the "protocol" target and simplify things. +-static_library("util") { ++jumbo_static_library("util") { + sources = [ + "entity_data.cc", + "entity_data.h", +diff --git a/components/sync/service/BUILD.gn b/components/sync/service/BUILD.gn +index 34c93a9367..6476d5bdeb 100644 +--- a/components/sync/service/BUILD.gn ++++ b/components/sync/service/BUILD.gn +@@ -4,8 +4,9 @@ + + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + +-static_library("service") { ++jumbo_static_library("service") { + sources = [ + "active_devices_provider.h", + "backend_migrator.cc", +diff --git a/components/sync_device_info/BUILD.gn b/components/sync_device_info/BUILD.gn +index a5dd5cb4fa..b9ee683ef2 100644 +--- a/components/sync_device_info/BUILD.gn ++++ b/components/sync_device_info/BUILD.gn +@@ -4,12 +4,13 @@ + + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + if (is_android) { + import("//build/config/android/config.gni") + import("//build/config/android/rules.gni") + } + +-static_library("sync_device_info") { ++jumbo_static_library("sync_device_info") { + sources = [ + "device_count_metrics_provider.cc", + "device_count_metrics_provider.h", +diff --git a/components/sync_user_events/BUILD.gn b/components/sync_user_events/BUILD.gn +index 3470bc2b6a..02c216bd93 100644 +--- a/components/sync_user_events/BUILD.gn ++++ b/components/sync_user_events/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-static_library("sync_user_events") { ++import("//build/config/jumbo.gni") ++ ++jumbo_static_library("sync_user_events") { + sources = [ + "global_id_mapper.h", + "no_op_user_event_service.cc", +diff --git a/components/url_formatter/BUILD.gn b/components/url_formatter/BUILD.gn +index e4f508f7db..c48c0cbd18 100644 +--- a/components/url_formatter/BUILD.gn ++++ b/components/url_formatter/BUILD.gn +@@ -2,13 +2,14 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//testing/libfuzzer/fuzzer_test.gni") + + if (is_android) { + import("//build/config/android/rules.gni") + } + +-static_library("skeleton_generator") { ++jumbo_static_library("skeleton_generator") { + sources = [ + "spoof_checks/skeleton_generator.cc", + "spoof_checks/skeleton_generator.h", +@@ -19,7 +20,7 @@ static_library("skeleton_generator") { + ] + } + +-static_library("url_formatter") { ++jumbo_static_library("url_formatter") { + sources = [ + "elide_url.cc", + "elide_url.h", +@@ -67,7 +68,7 @@ if (is_android) { + } + } + +-source_set("unit_tests") { ++jumbo_source_set("unit_tests") { + testonly = true + sources = [ + "elide_url_unittest.cc", +diff --git a/components/viz/common/BUILD.gn b/components/viz/common/BUILD.gn +index 4fb0378822..cadb89baf8 100644 +--- a/components/viz/common/BUILD.gn ++++ b/components/viz/common/BUILD.gn +@@ -334,6 +334,8 @@ viz_component("common") { + } + + viz_source_set("unit_tests") { ++ # Not ready for jumbo compilation. Too much repeated test code. ++ never_build_jumbo = true + testonly = true + sources = [ + "display/overlay_strategy_unittest.cc", +diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn +index 5a5791600d..59c7ab0e69 100644 +--- a/components/viz/service/BUILD.gn ++++ b/components/viz/service/BUILD.gn +@@ -505,6 +505,8 @@ viz_component("service") { + } + + viz_source_set("unit_tests") { ++ # Not ready for jumbo compilation. Too much repeated test code. ++ never_build_jumbo = true + testonly = true + sources = [ + "debugger/viz_debugger_unittests/viz_debugger_internal.cc", +@@ -657,6 +659,8 @@ viz_source_set("unit_tests") { + } + + viz_source_set("perf_tests") { ++ # Not ready for jumbo compilation. Too much repeated test code. ++ never_build_jumbo = true + testonly = true + sources = [ + "display/bsp_tree_perftest.cc", +diff --git a/components/viz/viz.gni b/components/viz/viz.gni +index e837a64738..e2c02c959a 100644 +--- a/components/viz/viz.gni ++++ b/components/viz/viz.gni +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//gpu/vulkan/features.gni") + import("//skia/features.gni") + import("//testing/test.gni") +@@ -32,7 +33,7 @@ if (!is_debug) { + } + + template("viz_source_set") { +- source_set(target_name) { ++ jumbo_source_set(target_name) { + forward_variables_from(invoker, "*", [ "configs" ]) + if (defined(invoker.configs)) { + configs += invoker.configs +@@ -43,7 +44,7 @@ template("viz_source_set") { + } + + template("viz_component") { +- component(target_name) { ++ jumbo_component(target_name) { + forward_variables_from(invoker, "*", [ "configs" ]) + if (defined(invoker.configs)) { + configs += invoker.configs +@@ -54,7 +55,7 @@ template("viz_component") { + } + + template("viz_static_library") { +- static_library(target_name) { ++ jumbo_static_library(target_name) { + forward_variables_from(invoker, "*", [ "configs" ]) + if (defined(invoker.configs)) { + configs += invoker.configs +diff --git a/components/webauthn/content/browser/BUILD.gn b/components/webauthn/content/browser/BUILD.gn +index 5d17d9f9ab..f3e00ee818 100644 +--- a/components/webauthn/content/browser/BUILD.gn ++++ b/components/webauthn/content/browser/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-static_library("browser") { ++import("//build/config/jumbo.gni") ++ ++jumbo_static_library("browser") { + if (is_component_build) { + check_includes = false + } +diff --git a/components/wifi/BUILD.gn b/components/wifi/BUILD.gn +index c05f146af7..61361ec6f7 100644 +--- a/components/wifi/BUILD.gn ++++ b/components/wifi/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-component("wifi") { ++import("//build/config/jumbo.gni") ++ ++jumbo_component("wifi") { + sources = [ + "network_properties.cc", + "network_properties.h", +@@ -42,7 +44,7 @@ component("wifi") { + } + } + +-static_library("test_support") { ++jumbo_static_library("test_support") { + sources = [ + "fake_wifi_service.cc", + "fake_wifi_service.h", +diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn +index a460c6503d..6422a52f1f 100644 +--- a/content/browser/BUILD.gn ++++ b/content/browser/BUILD.gn +@@ -8,6 +8,7 @@ import("//build/config/chromeos/ui_mode.gni") + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/compiler/pgo/pgo.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//build/config/linux/pangocairo/pangocairo.gni") + import("//build/config/ozone.gni") + import("//build/config/ui.gni") +@@ -32,7 +33,7 @@ if (is_android) { + import("//third_party/jni_zero/jni_zero.gni") + } + +-source_set("browser") { ++jumbo_source_set("browser") { + # Only the public target should depend on this. All other targets (even + # internal content ones) should depend on the public one. + visibility = [ +diff --git a/content/gpu/BUILD.gn b/content/gpu/BUILD.gn +index 543ec73d41..f50f0a07a5 100644 +--- a/content/gpu/BUILD.gn ++++ b/content/gpu/BUILD.gn +@@ -4,6 +4,7 @@ + + import("//build/config/cast.gni") + import("//build/config/chromeos/ui_mode.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//gpu/vulkan/features.gni") + import("//media/media_options.gni") +@@ -20,9 +21,9 @@ group("gpu") { + } + + if (is_component_build) { +- link_target_type = "source_set" ++ link_target_type = "jumbo_source_set" + } else { +- link_target_type = "static_library" ++ link_target_type = "jumbo_static_library" + } + + target(link_target_type, "gpu_sources") { +diff --git a/content/public/browser/BUILD.gn b/content/public/browser/BUILD.gn +index 3104ec482a..478b1d273c 100644 +--- a/content/public/browser/BUILD.gn ++++ b/content/public/browser/BUILD.gn +@@ -3,6 +3,7 @@ + # found in the LICENSE file. + + import("//build/config/chromeos/ui_mode.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//content/common/features.gni") + import("//device/vr/buildflags/buildflags.gni") +@@ -24,7 +25,7 @@ group("browser") { + } + } + +-source_set("browser_sources") { ++jumbo_source_set("browser_sources") { + # External code should depend on via ":browser" above. + visibility = [ "//content/*" ] + sources = [ +diff --git a/content/public/child/BUILD.gn b/content/public/child/BUILD.gn +index 73fce2d993..2f298f5cda 100644 +--- a/content/public/child/BUILD.gn ++++ b/content/public/child/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//ppapi/buildflags/buildflags.gni") + + # See //content/BUILD.gn for how this works. +@@ -19,7 +20,7 @@ group("child") { + } + } + +-source_set("child_sources") { ++jumbo_source_set("child_sources") { + # External code should depend in via ":child" above. + visibility = [ "//content/*" ] + +diff --git a/content/public/common/BUILD.gn b/content/public/common/BUILD.gn +index 5694c8b8d0..1a8b48cb4d 100644 +--- a/content/public/common/BUILD.gn ++++ b/content/public/common/BUILD.gn +@@ -6,6 +6,7 @@ import("//build/buildflag_header.gni") + import("//build/config/cast.gni") + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//content/public/common/zygote/features.gni") + import("//media/media_options.gni") +@@ -147,7 +148,7 @@ component("main_function_params") { + configs += [ "//content:content_implementation" ] + } + +-source_set("common_sources") { ++jumbo_source_set("common_sources") { + # External code should depend on via ":common" above. + visibility = [ "//content/*" ] + +diff --git a/content/public/renderer/BUILD.gn b/content/public/renderer/BUILD.gn +index 5ad21ddc7e..2db660ffcb 100644 +--- a/content/public/renderer/BUILD.gn ++++ b/content/public/renderer/BUILD.gn +@@ -3,6 +3,7 @@ + # found in the LICENSE file. + + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//media/media_options.gni") + import("//ppapi/buildflags/buildflags.gni") + +@@ -16,9 +17,9 @@ group("renderer") { + } + + if (is_component_build) { +- link_target_type = "source_set" ++ link_target_type = "jumbo_source_set" + } else { +- link_target_type = "static_library" ++ link_target_type = "jumbo_static_library" + } + target(link_target_type, "renderer_sources") { + # External code should depend on via ":renderer" above. +diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn +index 8d978ba3c2..524d0dc895 100644 +--- a/content/renderer/BUILD.gn ++++ b/content/renderer/BUILD.gn +@@ -5,6 +5,7 @@ + import("//build/config/cast.gni") + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//content/common/features.gni") + import("//media/media_options.gni") +@@ -15,9 +16,9 @@ import("//third_party/webrtc/webrtc.gni") + import("//tools/ipc_fuzzer/ipc_fuzzer.gni") + + if (is_component_build) { +- link_target_type = "source_set" ++ link_target_type = "jumbo_source_set" + } else { +- link_target_type = "static_library" ++ link_target_type = "jumbo_static_library" + } + + target(link_target_type, "renderer") { +diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn +index 581d0df81d..f62f1d65e8 100644 +--- a/content/test/BUILD.gn ++++ b/content/test/BUILD.gn +@@ -7,6 +7,7 @@ import("//build/config/chrome_build.gni") + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/compiler/compiler.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//build/nocompile.gni") + import("//components/viz/common/debugger/viz_debugger.gni") +@@ -38,7 +39,7 @@ if (is_ios) { + + # Use a static library here because many test binaries depend on this but don't + # require many files from it. This makes linking more efficient. +-static_library("test_support") { ++jumbo_static_library("test_support") { + testonly = true + + # See comment at the top of //content/BUILD.gn for why this is disabled in +@@ -968,7 +969,7 @@ group("telemetry_gpu_integration_test_data") { + + # browsertest_support can be used by targets that run content_shell based + # browser tests. +-static_library("browsertest_support") { ++jumbo_static_library("browsertest_support") { + testonly = true + + # See comment at the top of //content/BUILD.gn for why this is disabled in +diff --git a/content/utility/BUILD.gn b/content/utility/BUILD.gn +index aa2ba552c1..d154477f51 100644 +--- a/content/utility/BUILD.gn ++++ b/content/utility/BUILD.gn +@@ -3,6 +3,7 @@ + # found in the LICENSE file. + + import("//build/config/chromeos/ui_mode.gni") ++import("//build/config/jumbo.gni") + import("//chromeos/ash/components/assistant/assistant.gni") + import("//components/services/screen_ai/buildflags/features.gni") + import("//device/vr/buildflags/buildflags.gni") +@@ -12,7 +13,7 @@ import("//mojo/public/tools/bindings/mojom.gni") + import("//printing/buildflags/buildflags.gni") + import("//services/accessibility/buildflags.gni") + +-source_set("utility") { ++jumbo_source_set("utility") { + # Only the public target should depend on this. All other targets (even + # internal content ones other than test) should depend on the public one. + visibility = [ +diff --git a/docs/clang_tidy.md b/docs/clang_tidy.md +index 76c73fde76..684a677f13 100644 +--- a/docs/clang_tidy.md ++++ b/docs/clang_tidy.md +@@ -265,6 +265,14 @@ Copy-Paste Friendly (though you'll still need to stub in the variables): + 'chrome/browser/.*' + ``` + ++\*It's not clear which, if any, `gn` flags outside of `use_jumbo_build` may ++cause issues for `clang-tidy`. I've had no problems building a component release ++build, both with and without goma. if you run into issues, let us know! ++||||||| fa98118a45f ++\*It's not clear which, if any, `gn` flags may cause issues for ++`clang-tidy`. I've had no problems building a component release build, ++both with and without goma. if you run into issues, let us know! ++ + Note that the source file regex must match how the build specified the file. + This means that on Windows, you must use (escaped) backslashes even from a bash + shell. +diff --git a/docs/clang_tool_refactoring.md b/docs/clang_tool_refactoring.md +index 451bc432f3..853a6307a2 100644 +--- a/docs/clang_tool_refactoring.md ++++ b/docs/clang_tool_refactoring.md +@@ -15,6 +15,8 @@ with a traditional find-and-replace regexp: + + ## Caveats + ++* Clang tools do not work with jumbo builds. ++ + * Invocations of a clang tool runs on on only one build config at a time. For + example, running the tool across a `target_os="win"` build won't update code + that is guarded by `OS_POSIX`. Performing a global refactoring will often +diff --git a/docs/linux/build_instructions.md b/docs/linux/build_instructions.md +index 0826243590..56571f76db 100644 +--- a/docs/linux/build_instructions.md ++++ b/docs/linux/build_instructions.md +@@ -239,6 +239,15 @@ can address them before the shutdown. + If you need to refer to the older instructions for using Goma, you can still + find them here: [Goma for Chromium contributors](https://chromium.googlesource.com/infra/goma/client/+/HEAD/doc/early-access-guide.md). + ++#### Jumbo/Unity builds ++ ++Jumbo builds merge many translation units ("source files") and compile them ++together. Since a large portion of Chromium's code is in shared header files, ++this dramatically reduces the total amount of work needed. Check out the ++[Jumbo / Unity builds](jumbo.md) for more information. ++ ++Enable jumbo builds by setting the GN arg `use_jumbo_build=true`. ++ + #### Disable NaCl + + By default, the build includes support for +diff --git a/docs/mac_build_instructions.md b/docs/mac_build_instructions.md +index 731b2dca1e..644f19717c 100644 +--- a/docs/mac_build_instructions.md ++++ b/docs/mac_build_instructions.md +@@ -154,6 +154,15 @@ in your args.gn to disable debug symbols altogether. This makes both full + rebuilds and linking faster (at the cost of not getting symbolized backtraces + in gdb). + ++#### Jumbo/Unity builds ++ ++Jumbo builds merge many translation units ("source files") and compile them ++together. Since a large portion of Chromium's code is in shared header files, ++this dramatically reduces the total amount of work needed. Check out the ++[Jumbo / Unity builds](jumbo.md) for more information. ++ ++Enable jumbo builds by setting the GN arg `use_jumbo_build=true`. ++ + #### Use Reclient + + In addition, Google employees should use Reclient, a distributed compilation system. +diff --git a/docs/windows_build_instructions.md b/docs/windows_build_instructions.md +index 3d06652c19..565091b9ba 100644 +--- a/docs/windows_build_instructions.md ++++ b/docs/windows_build_instructions.md +@@ -222,6 +222,7 @@ in the editor that appears when you create your output directory + (`gn args out\Default`) or on the gn gen command line + (`gn gen out\Default --args="is_component_build = true is_debug = true"`). + Some helpful settings to consider using include: ++* `use_jumbo_build = true` - [Jumbo/unity](jumbo.md) builds. + * `is_component_build = true` - this uses more, smaller DLLs, and may avoid + having to relink chrome.dll after every change. + * `enable_nacl = false` - this disables Native Client which is usually not +diff --git a/extensions/BUILD.gn b/extensions/BUILD.gn +index eacccd07a8..e46bc67e08 100644 +--- a/extensions/BUILD.gn ++++ b/extensions/BUILD.gn +@@ -3,6 +3,7 @@ + + import("//build/config/cast.gni") + import("//build/config/chromeos/ui_mode.gni") ++import("//build/config/jumbo.gni") + import("//extensions/buildflags/buildflags.gni") + import("//testing/test.gni") + import("//tools/grit/grit_rule.gni") +@@ -74,7 +75,7 @@ grit("extensions_renderer_resources") { + ] + } + +-static_library("test_support") { ++jumbo_static_library("test_support") { + testonly = true + sources = [ + "browser/api/declarative/test_rules_registry.cc", +diff --git a/extensions/browser/BUILD.gn b/extensions/browser/BUILD.gn +index 06febfed5e..315124c6d9 100644 +--- a/extensions/browser/BUILD.gn ++++ b/extensions/browser/BUILD.gn +@@ -4,6 +4,7 @@ + + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//extensions/buildflags/buildflags.gni") + import("//testing/libfuzzer/fuzzer_test.gni") + +@@ -75,7 +76,7 @@ source_set("core_keyed_service_factories") { + # nodes" and could be easily toggled on-and-off through dependencies for + # different platforms). + # See also https://crbug.com/883570. +-source_set("browser_sources") { ++jumbo_source_set("browser_sources") { + visibility = [ "./*" ] + + sources = [ +@@ -798,7 +799,7 @@ source_set("browser_tests") { + } + + # The set of sources that are needed for both browser and unit tests. +-source_set("test_support") { ++jumbo_source_set("test_support") { + testonly = true + sources = [ + "api/declarative_net_request/test_utils.cc", +diff --git a/extensions/common/BUILD.gn b/extensions/common/BUILD.gn +index 9b22d687f0..f25d861b3c 100644 +--- a/extensions/common/BUILD.gn ++++ b/extensions/common/BUILD.gn +@@ -4,6 +4,7 @@ + + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//components/nacl/features.gni") + import("//extensions/buildflags/buildflags.gni") + import("//mojo/public/tools/bindings/mojom.gni") +@@ -210,7 +211,7 @@ mojom("mojom") { + # This must be a static library because extensions common depends on + # GetTrustedICAPublicKey in extensions/browser which isn't always linked + # in. TODO(brettw): This reverse dependency should be fixed. +-static_library("common") { ++jumbo_static_library("common") { + sources = [ + "alias.h", + "api/bluetooth/bluetooth_manifest_data.cc", +diff --git a/extensions/renderer/BUILD.gn b/extensions/renderer/BUILD.gn +index cdcae77b85..41b1966381 100644 +--- a/extensions/renderer/BUILD.gn ++++ b/extensions/renderer/BUILD.gn +@@ -3,11 +3,12 @@ + # found in the LICENSE file. + + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//extensions/buildflags/buildflags.gni") + + assert(enable_extensions) + +-source_set("renderer") { ++jumbo_source_set("renderer") { + sources = [ + "activity_log_converter_strategy.cc", + "activity_log_converter_strategy.h", +@@ -283,7 +284,7 @@ source_set("renderer") { + deps += [ "//components/crash/core/common:crash_key" ] + } + +-static_library("unit_test_support") { ++jumbo_static_library("unit_test_support") { + # Sources that are shared between chrome-based renderer unit tests and + # top-level extensions renderer unit tests. + testonly = true +diff --git a/gpu/BUILD.gn b/gpu/BUILD.gn +index 2b2e27a747..cff6ab4159 100644 +--- a/gpu/BUILD.gn ++++ b/gpu/BUILD.gn +@@ -4,6 +4,7 @@ + + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/cronet/config.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//gpu/vulkan/features.gni") + import("//skia/features.gni") +@@ -165,7 +166,7 @@ if (!use_static_angle) { + } + } # if (!use_static_angle) + +-static_library("test_support") { ++jumbo_static_library("test_support") { + testonly = true + sources = [ + "command_buffer/client/client_test_helper.cc", +diff --git a/gpu/command_buffer/client/BUILD.gn b/gpu/command_buffer/client/BUILD.gn +index 3a05ee124c..f516b14548 100644 +--- a/gpu/command_buffer/client/BUILD.gn ++++ b/gpu/command_buffer/client/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//components/nacl/toolchain.gni") + import("//ui/gl/features.gni") + +@@ -53,7 +54,7 @@ group("webgpu") { + } + } + +-source_set("client_sources") { ++jumbo_source_set("client_sources") { + # External code should depend on this via //gpu/client above rather than + # depending on this directly or the component build will break. + visibility = [ "//gpu/*" ] +@@ -253,7 +254,7 @@ source_set("webgpu_interface") { + } + + # Library emulates GLES2 using command_buffers. +-component("gles2_implementation") { ++jumbo_component("gles2_implementation") { + sources = gles2_implementation_source_files + + defines = [ "GLES2_IMPL_IMPLEMENTATION" ] +@@ -356,7 +357,7 @@ source_set("webgpu_sources") { + } + + # Library emulates GLES2 using command_buffers. +-component("gles2_implementation_no_check") { ++jumbo_component("gles2_implementation_no_check") { + sources = gles2_implementation_source_files + + defines = [ +@@ -403,7 +404,7 @@ component("gles2_c_lib") { + + # Same as gles2_c_lib except with no parameter checking. Required for + # OpenGL ES 2.0 conformance tests. +-component("gles2_c_lib_nocheck") { ++jumbo_component("gles2_c_lib_nocheck") { + sources = gles2_c_lib_source_files + + defines = [ +diff --git a/gpu/command_buffer/common/BUILD.gn b/gpu/command_buffer/common/BUILD.gn +index e6199306ee..ff1d21ea27 100644 +--- a/gpu/command_buffer/common/BUILD.gn ++++ b/gpu/command_buffer/common/BUILD.gn +@@ -7,6 +7,7 @@ + # non-component build. This needs to match the GYP build which was likely an + # attempt to make larger components to help with loading. + ++import("//build/config/jumbo.gni") + import("//ui/gl/features.gni") + + group("common") { +@@ -47,7 +48,7 @@ group("webgpu") { + + # Minimal set of definitions which don't have GPU dependencies outside of this + # directory. +-source_set("common_base_sources") { ++jumbo_source_set("common_base_sources") { + visibility = [ "//gpu/*" ] + sources = [ + "command_buffer_id.h", +@@ -66,7 +67,7 @@ source_set("common_base_sources") { + configs += [ "//gpu:gpu_implementation" ] + } + +-source_set("common_sources") { ++jumbo_source_set("common_sources") { + visibility = [ "//gpu/*" ] + + sources = [ +diff --git a/gpu/command_buffer/service/BUILD.gn b/gpu/command_buffer/service/BUILD.gn +index 72eab27b6d..084a2f6fc5 100644 +--- a/gpu/command_buffer/service/BUILD.gn ++++ b/gpu/command_buffer/service/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//gpu/vulkan/features.gni") + import("//skia/features.gni") +@@ -26,9 +27,9 @@ group("gles2") { + } + + if (is_component_build) { +- link_target_type = "source_set" ++ link_target_type = "jumbo_source_set" + } else { +- link_target_type = "static_library" ++ link_target_type = "jumbo_static_library" + } + target(link_target_type, "service_sources") { + # External code should depend on this via //gpu/command_buffer/service above +@@ -649,7 +650,7 @@ proto_library("disk_cache_proto") { + } + + if (is_android) { +- static_library("android_texture_owner_test_support") { ++ jumbo_static_library("android_texture_owner_test_support") { + testonly = true + sources = [ + "mock_texture_owner.cc", +diff --git a/gpu/config/BUILD.gn b/gpu/config/BUILD.gn +index 4ff377cd8e..277227449f 100644 +--- a/gpu/config/BUILD.gn ++++ b/gpu/config/BUILD.gn +@@ -5,6 +5,7 @@ + import("//build/config/cast.gni") + import("//build/config/chrome_build.gni") + import("//build/config/chromeos/ui_mode.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//gpu/vulkan/features.gni") + import("//skia/features.gni") +@@ -124,7 +125,7 @@ source_set("webgpu_blocklist_impl") { + public_deps = [ "//third_party/dawn/include/dawn:headers" ] + } + +-source_set("config_sources") { ++jumbo_source_set("config_sources") { + # External code should depend on this via //gpu/config above rather than + # depending on this directly or the component build will break. + visibility = [ "//gpu/*" ] +diff --git a/gpu/ipc/service/BUILD.gn b/gpu/ipc/service/BUILD.gn +index e321b406a8..f3b0ecccad 100644 +--- a/gpu/ipc/service/BUILD.gn ++++ b/gpu/ipc/service/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//gpu/vulkan/features.gni") + import("//testing/test.gni") +@@ -14,7 +15,7 @@ declare_args() { + subpixel_font_rendering_disabled = false + } + +-component("service") { ++jumbo_component("service") { + output_name = "gpu_ipc_service" + sources = [ + "command_buffer_stub.cc", +diff --git a/media/base/BUILD.gn b/media/base/BUILD.gn +index ed52be8b0f..b5e5cefea6 100644 +--- a/media/base/BUILD.gn ++++ b/media/base/BUILD.gn +@@ -5,6 +5,7 @@ + import("//build/config/android/config.gni") + import("//build/config/arm.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//build/config/linux/pkg_config.gni") + import("//build/config/ozone.gni") + import("//build/config/ui.gni") +@@ -15,7 +16,7 @@ if (is_android) { + import("//build/config/android/rules.gni") + } + +-source_set("base") { ++jumbo_source_set("base") { + # Do not expand the visibility here without double-checking with OWNERS, this + # is a roll-up target which is part of the //media component. Most other DEPs + # should be using //media and not directly DEP this roll-up target. +diff --git a/media/base/android/BUILD.gn b/media/base/android/BUILD.gn +index 28af9b04cb..ce6482bfe0 100644 +--- a/media/base/android/BUILD.gn ++++ b/media/base/android/BUILD.gn +@@ -4,6 +4,7 @@ + + import("//build/config/android/config.gni") + import("//build/config/arm.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//media/media_options.gni") + +@@ -14,7 +15,7 @@ if (is_android) { + # This is bundled into //media, so all dependencies should be on //media. + # APK targets that depend on this indirectly, should also + # depend on :media_java to get the corresponding Java classes. +- source_set("android") { ++ jumbo_source_set("android") { + visibility = [ + "//media", + "//media/filters", +diff --git a/media/base/ipc/BUILD.gn b/media/base/ipc/BUILD.gn +index 6217873522..98da4b4751 100644 +--- a/media/base/ipc/BUILD.gn ++++ b/media/base/ipc/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-source_set("ipc") { ++import("//build/config/jumbo.gni") ++ ++jumbo_source_set("ipc") { + sources = [ + "media_param_traits.cc", + "media_param_traits.h", +diff --git a/media/base/mac/BUILD.gn b/media/base/mac/BUILD.gn +index 068aefecec..4c851aabf0 100644 +--- a/media/base/mac/BUILD.gn ++++ b/media/base/mac/BUILD.gn +@@ -2,9 +2,11 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") ++ + assert(is_apple) + +-source_set("mac") { ++jumbo_source_set("mac") { + # Note: This source_set is depended on only by //media. In the component + # build, if other component targets also depend on it, multiple copies of + # the ObjC classes declared in the files below will cause warnings at +diff --git a/media/base/win/BUILD.gn b/media/base/win/BUILD.gn +index 2d618307b7..ada8856b45 100644 +--- a/media/base/win/BUILD.gn ++++ b/media/base/win/BUILD.gn +@@ -2,6 +2,8 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") ++ + assert(is_win) + + config("delay_load_mf") { +@@ -13,7 +15,7 @@ config("delay_load_mf") { + ] + } + +-source_set("media_foundation_util") { ++jumbo_component("media_foundation_util") { + sources = [ + "dxgi_device_manager.cc", + "dxgi_device_manager.h", +diff --git a/media/capture/BUILD.gn b/media/capture/BUILD.gn +index 134b72f813..a3905a0f4d 100644 +--- a/media/capture/BUILD.gn ++++ b/media/capture/BUILD.gn +@@ -4,6 +4,7 @@ + + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//media/media_options.gni") + import("//testing/test.gni") +@@ -29,7 +30,7 @@ component("capture_switches") { + } + + # Things needed by //media/capture/mojom/video_capture_types.mojom. +-component("capture_base") { ++jumbo_component("capture_base") { + defines = [ "CAPTURE_IMPLEMENTATION" ] + sources = [ + "capture_export.h", +@@ -52,7 +53,7 @@ component("capture_base") { + } + + # Target which allows breakout of Android BUILD.gn files. +-source_set("capture_device_specific") { ++jumbo_source_set("capture_device_specific") { + visibility = [ + ":capture_lib", + "//media/capture/video/android", +@@ -113,7 +114,7 @@ source_set("capture_device_specific") { + ] + } + +-component("capture_lib") { ++jumbo_component("capture_lib") { + defines = [ "CAPTURE_IMPLEMENTATION" ] + sources = [ + "video/create_video_capture_device_factory.cc", +diff --git a/media/cast/BUILD.gn b/media/cast/BUILD.gn +index 0a56bc2da0..7ac27c9341 100644 +--- a/media/cast/BUILD.gn ++++ b/media/cast/BUILD.gn +@@ -5,6 +5,7 @@ + import("//build/config/android/config.gni") + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//testing/libfuzzer/fuzzer_test.gni") + import("//testing/test.gni") +@@ -18,7 +19,7 @@ proto_library("logging_proto") { + } + + # Common code shared by all cast components. +-source_set("common") { ++jumbo_source_set("common") { + sources = [ + "cast_callbacks.h", + "cast_config.cc", +@@ -79,7 +80,7 @@ source_set("common") { + ] + } + +-source_set("net") { ++jumbo_source_set("net") { + sources = [ + "net/cast_transport.h", + "net/cast_transport_config.cc", +@@ -131,7 +132,7 @@ source_set("net") { + public_deps = [ ":common" ] + } + +-source_set("encoding") { ++jumbo_source_set("encoding") { + sources = [ + "encoding/audio_encoder.cc", + "encoding/audio_encoder.h", +@@ -195,7 +196,7 @@ source_set("encoding") { + + # TODO(https://crbug.com/1327074): should be split into multiple source sets + # once the new Open Screen frame sender implementation is added. +-source_set("sender") { ++jumbo_source_set("sender") { + sources = [ + "cast_sender.h", + "cast_sender_impl.cc", +@@ -235,7 +236,7 @@ source_set("sender") { + } + } + +-source_set("test_receiver") { ++jumbo_source_set("test_receiver") { + testonly = true + sources = [ + "test/receiver/audio_decoder.cc", +diff --git a/media/filters/BUILD.gn b/media/filters/BUILD.gn +index ad4462a4f3..5c289dcfe6 100644 +--- a/media/filters/BUILD.gn ++++ b/media/filters/BUILD.gn +@@ -2,10 +2,11 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//media/gpu/args.gni") + import("//media/media_options.gni") + +-source_set("filters") { ++jumbo_source_set("filters") { + # Do not expand the visibility here without double-checking with OWNERS, this + # is a roll-up target which is part of the //media component. Most other DEPs + # should be using //media and not directly DEP this roll-up target. +diff --git a/media/media_options.gni b/media/media_options.gni +index e55171c4d1..b3036faa48 100644 +--- a/media/media_options.gni ++++ b/media/media_options.gni +@@ -7,6 +7,7 @@ import("//build/config/chrome_build.gni") + import("//build/config/chromeos/args.gni") + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//media/gpu/args.gni") + import("//testing/libfuzzer/fuzzer_test.gni") +@@ -103,7 +104,7 @@ declare_args() { + # Enable logging override, e.g. enable DVLOGs through level 2 at build time. + # On Cast devices, these are logged as INFO. + # When enabled on Fuchsia, these are logged as VLOGs. +- enable_logging_override = is_cast_media_device ++ enable_logging_override = !use_jumbo_build && is_cast_media_device + + enable_dav1d_decoder = use_blink + +@@ -182,6 +183,9 @@ assert(!enable_hevc_parser_and_hw_decoder || enable_platform_hevc, + assert(!enable_platform_dolby_vision || enable_platform_hevc, + "enable_platform_hevc required for enable_platform_dolby_vision") + ++# Logging override must not be enabled in jumbo builds. ++assert(!use_jumbo_build || !enable_logging_override) ++ + # Use another declare_args() to pick up possible overrides of |use_cras|. + declare_args() { + # Enables runtime selection of PulseAudio library. +diff --git a/media/mojo/clients/BUILD.gn b/media/mojo/clients/BUILD.gn +index 9d55594928..6287096c22 100644 +--- a/media/mojo/clients/BUILD.gn ++++ b/media/mojo/clients/BUILD.gn +@@ -2,8 +2,10 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") ++ + # Implementations of media C++ interfaces using corresponding mojo services. +-source_set("clients") { ++jumbo_source_set("clients") { + visibility = [ + "//chromecast/*", + +diff --git a/media/mojo/common/BUILD.gn b/media/mojo/common/BUILD.gn +index ae5303dc1d..30141f1420 100644 +--- a/media/mojo/common/BUILD.gn ++++ b/media/mojo/common/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-source_set("common") { ++import("//build/config/jumbo.gni") ++ ++jumbo_source_set("common") { + sources = [ + "audio_data_s16_converter.cc", + "audio_data_s16_converter.h", +diff --git a/media/mojo/services/BUILD.gn b/media/mojo/services/BUILD.gn +index f7eea73bf9..b0dc095fd0 100644 +--- a/media/mojo/services/BUILD.gn ++++ b/media/mojo/services/BUILD.gn +@@ -4,6 +4,7 @@ + + import("//build/config/cast.gni") + import("//build/config/chromeos/ui_mode.gni") ++import("//build/config/jumbo.gni") + import("//media/gpu/args.gni") + import("//media/media_options.gni") + import("//mojo/public/tools/fuzzers/mojolpm.gni") +@@ -12,7 +13,7 @@ import("//testing/test.gni") + enable_playback_events_recorder = + enable_cast_receiver && (is_fuchsia || is_android) + +-component("services") { ++jumbo_component("services") { + output_name = "media_mojo_services" + sources = [ + "deferred_destroy_unique_receiver_set.h", +diff --git a/mojo/public/tools/bindings/mojom.gni b/mojo/public/tools/bindings/mojom.gni +index 3f6e54e0a3..ff06adb348 100644 +--- a/mojo/public/tools/bindings/mojom.gni ++++ b/mojo/public/tools/bindings/mojom.gni +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//third_party/closure_compiler/closure_args.gni") + import("//third_party/closure_compiler/compile_js.gni") + import("//third_party/protobuf/proto_library.gni") +@@ -1013,7 +1014,7 @@ template("mojom") { + } + + shared_cpp_sources_target_name = "${target_name}_shared_cpp_sources" +- source_set(shared_cpp_sources_target_name) { ++ jumbo_source_set(shared_cpp_sources_target_name) { + if (defined(invoker.testonly)) { + testonly = invoker.testonly + } +@@ -1577,7 +1578,7 @@ template("mojom") { + sources_target_name = output_target_name + } + +- target(sources_target_type, sources_target_name) { ++ target("jumbo_" + sources_target_type, sources_target_name) { + if (defined(output_name_override)) { + output_name = output_name_override + } +diff --git a/ppapi/cpp/BUILD.gn b/ppapi/cpp/BUILD.gn +index c916c3a5c3..0e03f92ded 100644 +--- a/ppapi/cpp/BUILD.gn ++++ b/ppapi/cpp/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//ppapi/buildflags/buildflags.gni") + + if (is_nacl) { +@@ -13,7 +14,7 @@ assert(enable_ppapi) + if (is_nacl && is_nacl_glibc) { + cpp_target_type = "shared_library" + } else { +- cpp_target_type = "static_library" ++ cpp_target_type = "jumbo_static_library" + } + + # Link to this target to get the PPAPI C++ wrapper objects and plugin startup +@@ -54,7 +55,7 @@ target(cpp_target_type, "cpp") { + # Link to this target to get only the PPAPI C++ wrapper objects but not the + # plugin startup code. Some plugins need special startup code that they supply + # themselves. +-source_set("objects") { ++jumbo_source_set("objects") { + sources = [ + "array_output.cc", + "array_output.h", +diff --git a/ppapi/host/BUILD.gn b/ppapi/host/BUILD.gn +index 46c0f01597..acf4d9f466 100644 +--- a/ppapi/host/BUILD.gn ++++ b/ppapi/host/BUILD.gn +@@ -2,11 +2,12 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//ppapi/buildflags/buildflags.gni") + + assert(enable_ppapi) + +-component("host") { ++jumbo_component("host") { + output_name = "ppapi_host" + + sources = [ +diff --git a/ppapi/proxy/BUILD.gn b/ppapi/proxy/BUILD.gn +index 21cacd8675..882449ba0d 100644 +--- a/ppapi/proxy/BUILD.gn ++++ b/ppapi/proxy/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//build/config/nacl/config.gni") + import("//components/nacl/toolchain.gni") + import("//ppapi/buildflags/buildflags.gni") +@@ -12,9 +13,15 @@ config("proxy_implementation") { + defines = [ "PPAPI_PROXY_IMPLEMENTATION" ] + } + +-component("proxy") { ++jumbo_component("proxy") { + output_name = "ppapi_proxy" + ++ if (is_nacl) { ++ # The nacl toolchain has template related bugs that are triggered ++ # in jumbo builds. https://crbug.com/912152 ++ never_build_jumbo = true ++ } ++ + sources = [ + # Take some standalone files from the C++ wrapper allowing us to more + # easily make async callbacks in the proxy. We can't depend on the +@@ -327,7 +334,7 @@ source_set("ipc_sources") { + } + } + +-static_library("test_support") { ++jumbo_static_library("test_support") { + testonly = true + + sources = [ +diff --git a/ppapi/shared_impl/BUILD.gn b/ppapi/shared_impl/BUILD.gn +index 3b5c21ab0d..a202bb7a09 100644 +--- a/ppapi/shared_impl/BUILD.gn ++++ b/ppapi/shared_impl/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//build/config/nacl/config.gni") + import("//components/nacl/toolchain.gni") + import("//ppapi/buildflags/buildflags.gni") +@@ -42,12 +43,18 @@ source_set("headers") { + } + + # This contains the things that //ppapi/thunk needs. +-source_set("common") { ++jumbo_source_set("common") { + visibility = [ + ":*", + "//ppapi/thunk:*", + ] + ++ if (is_nacl) { ++ # The nacl toolchain has template related bugs that are triggered ++ # in jumbo builds. https://crbug.com/912152 ++ never_build_jumbo = true ++ } ++ + sources = [ + "array_var.cc", + "array_var.h", +diff --git a/services/cert_verifier/cert_net_url_loader/BUILD.gn b/services/cert_verifier/cert_net_url_loader/BUILD.gn +index ffc6bdc4ab..28ab85355d 100644 +--- a/services/cert_verifier/cert_net_url_loader/BUILD.gn ++++ b/services/cert_verifier/cert_net_url_loader/BUILD.gn +@@ -2,10 +2,11 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//crypto/features.gni") + import("//testing/test.gni") + +-component("cert_net_url_loader") { ++jumbo_component("cert_net_url_loader") { + sources = [ + "cert_net_fetcher_url_loader.cc", + "cert_net_fetcher_url_loader.h", +diff --git a/services/network/BUILD.gn b/services/network/BUILD.gn +index 8d64cfe8a1..f57ec6c561 100644 +--- a/services/network/BUILD.gn ++++ b/services/network/BUILD.gn +@@ -4,12 +4,13 @@ + + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//mojo/public/tools/bindings/mojom.gni") + import("//net/features.gni") + import("//services/network/public/cpp/features.gni") + import("//testing/libfuzzer/fuzzer_test.gni") + +-component("network_service") { ++jumbo_component("network_service") { + sources = [ + "ad_heuristic_cookie_overrides.cc", + "ad_heuristic_cookie_overrides.h", +@@ -592,7 +593,7 @@ source_set("tests") { + } + } + +-source_set("test_support") { ++jumbo_source_set("test_support") { + testonly = true + + sources = [ +diff --git a/services/network/public/cpp/BUILD.gn b/services/network/public/cpp/BUILD.gn +index 1a92cd1432..7fb4c40124 100644 +--- a/services/network/public/cpp/BUILD.gn ++++ b/services/network/public/cpp/BUILD.gn +@@ -3,6 +3,7 @@ + # found in the LICENSE file. + + import("//build/buildflag_header.gni") ++import("//build/config/jumbo.gni") + import("//mojo/public/tools/bindings/mojom.gni") + import("//net/features.gni") + import("//services/network/public/cpp/features.gni") +@@ -18,7 +19,7 @@ buildflag_header("buildflags") { + ] + } + +-component("crash_keys") { ++jumbo_component("crash_keys") { + sources = [ + "crash_keys.cc", + "crash_keys.h", +@@ -28,7 +29,7 @@ component("crash_keys") { + defines = [ "IS_NETWORK_CPP_CRASH_KEYS_IMPL" ] + } + +-component("cpp") { ++jumbo_component("cpp") { + output_name = "network_cpp" + + sources = [ +@@ -374,7 +375,7 @@ component("schemeful_site_mojom_support") { + + # This component is separate from cpp_base as it is a dependency of + # //services/network/public/mojom:cookies_mojom. +-component("first_party_sets_mojom_support") { ++jumbo_component("first_party_sets_mojom_support") { + sources = [ + "first_party_sets_mojom_traits.cc", + "first_party_sets_mojom_traits.h", +@@ -389,7 +390,7 @@ component("first_party_sets_mojom_support") { + defines = [ "IS_FIRST_PARTY_SETS_MOJOM_TRAITS_IMPL" ] + } + +-component("cpp_base") { ++jumbo_component("cpp_base") { + output_name = "network_cpp_base" + + sources = [ +diff --git a/storage/browser/BUILD.gn b/storage/browser/BUILD.gn +index 958d066b9c..a4a350ed4f 100644 +--- a/storage/browser/BUILD.gn ++++ b/storage/browser/BUILD.gn +@@ -1,10 +1,11 @@ + # Copyright 2014 The Chromium Authors + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. ++import("//build/config/jumbo.gni") + import("//mojo/public/tools/bindings/mojom.gni") + import("//testing/test.gni") + +-component("browser") { ++jumbo_component("browser") { + output_name = "storage_browser" + sources = [ + "blob/blob_builder_from_stream.cc", +@@ -362,7 +363,7 @@ source_set("unittests") { + ] + } + +-static_library("test_support") { ++jumbo_static_library("test_support") { + testonly = true + + sources = [ +diff --git a/third_party/blink/common/BUILD.gn b/third_party/blink/common/BUILD.gn +index 0017f407e1..4222ca2301 100644 +--- a/third_party/blink/common/BUILD.gn ++++ b/third_party/blink/common/BUILD.gn +@@ -3,6 +3,7 @@ + # found in the LICENSE file. + + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//build/config/rust.gni") + import("//testing/libfuzzer/fuzzer_test.gni") + import("//testing/test.gni") +@@ -123,7 +124,7 @@ config("blink_common_implementation") { + defines = [ "BLINK_COMMON_IMPLEMENTATION=1" ] + } + +-source_set("common") { ++jumbo_source_set("common") { + # No target should directly depend on this target since this is just the + # source set rather than the actual component that can be linked to. + # Dependencies instead should be to //third_party/blink/public/common:common. +@@ -398,7 +399,7 @@ test("blink_common_unittests") { + data_deps = [ ":common_unittests_data" ] + } + +-source_set("common_unittests_sources") { ++jumbo_source_set("common_unittests_sources") { + testonly = true + + sources = [ +diff --git a/third_party/blink/renderer/bindings/core/v8/BUILD.gn b/third_party/blink/renderer/bindings/core/v8/BUILD.gn +index ac163ed01b..d7f2434ce1 100644 +--- a/third_party/blink/renderer/bindings/core/v8/BUILD.gn ++++ b/third_party/blink/renderer/bindings/core/v8/BUILD.gn +@@ -30,7 +30,7 @@ blink_core_sources("v8") { + ] + } + +-source_set("testing") { ++jumbo_source_set("testing") { + testonly = true + + visibility = [] +diff --git a/third_party/blink/renderer/bindings/modules/v8/BUILD.gn b/third_party/blink/renderer/bindings/modules/v8/BUILD.gn +index 68250fe525..caae1cf983 100644 +--- a/third_party/blink/renderer/bindings/modules/v8/BUILD.gn ++++ b/third_party/blink/renderer/bindings/modules/v8/BUILD.gn +@@ -31,7 +31,7 @@ blink_modules_sources("v8") { + ] + } + +-source_set("testing") { ++jumbo_source_set("testing") { + testonly = true + + visibility = [] +diff --git a/third_party/blink/renderer/controller/BUILD.gn b/third_party/blink/renderer/controller/BUILD.gn +index ee83c6167e..419c8d103b 100644 +--- a/third_party/blink/renderer/controller/BUILD.gn ++++ b/third_party/blink/renderer/controller/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//testing/test.gni") + import("//third_party/blink/renderer/bindings/bindings.gni") +@@ -18,7 +19,7 @@ visibility = [ + "//third_party/blink/*", + ] + +-component("controller") { ++jumbo_component("controller") { + output_name = "blink_controller" + + deps = [ +@@ -195,7 +196,7 @@ test("blink_perf_tests") { + deps = [ ":blink_perf_tests_sources" ] + } + +-source_set("blink_perf_tests_sources") { ++jumbo_source_set("blink_perf_tests_sources") { + visibility = [] # Allow re-assignment of list. + visibility = [ "*" ] + testonly = true +@@ -243,7 +244,7 @@ source_set("blink_bindings_test_sources") { + ] + } + +-source_set("blink_unittests_sources") { ++jumbo_source_set("blink_unittests_sources") { + visibility = [] # Allow re-assignment of list. + visibility = [ "*" ] + testonly = true +diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn +index d6a3fe5c93..3fc03437c0 100644 +--- a/third_party/blink/renderer/core/BUILD.gn ++++ b/third_party/blink/renderer/core/BUILD.gn +@@ -460,7 +460,7 @@ blink_core_sources("core_hot") { + } + } + +-source_set("testing") { ++jumbo_source_set("testing") { + testonly = true + + configs += [ +@@ -1230,7 +1230,7 @@ if (is_component_build) { + core_generated_target_type = "static_library" + } + +-target(core_generated_target_type, "core_generated") { ++target("jumbo_" + core_generated_target_type, "core_generated") { + # Add all sources generated by the targets above. + sources = [] + foreach(current, targets_generating_sources) { +@@ -1324,7 +1324,7 @@ fuzzer_test("text_resource_decoder_fuzzer") { + ] + } + +-source_set("unit_tests") { ++jumbo_source_set("unit_tests") { + testonly = true + + # If you create a new subdirectory 'foo' that contains unit tests, list them in +@@ -1623,7 +1623,7 @@ group("gen_files_for_web_tests") { + ] + } + +-source_set("perf_tests") { ++jumbo_source_set("perf_tests") { + testonly = true + sources = [ + "css/parser/css_parser_fast_paths_perftest.cc", +@@ -1650,7 +1650,7 @@ source_set("perf_tests") { + ] + } + +-source_set("unit_test_support") { ++jumbo_source_set("unit_test_support") { + testonly = true + sources = [ + "css/css_test_helpers.cc", +diff --git a/third_party/blink/renderer/core/core.gni b/third_party/blink/renderer/core/core.gni +index c885691ed0..3d7826c905 100644 +--- a/third_party/blink/renderer/core/core.gni ++++ b/third_party/blink/renderer/core/core.gni +@@ -3,6 +3,7 @@ + # found in the LICENSE file. + + import("//build/config/chrome_build.gni") ++import("//build/config/jumbo.gni") + import("//third_party/blink/renderer/config.gni") + + blink_core_output_dir = "$root_gen_dir/third_party/blink/renderer/core" +@@ -53,9 +54,9 @@ core_config_add += blink_symbols_config + # Normal meaning if defined. If undefined, defaults to everything in core. + template("blink_core_sources") { + if (is_component_build) { +- target_type = "source_set" ++ target_type = "jumbo_source_set" + } else { +- target_type = "static_library" ++ target_type = "jumbo_static_library" + } + target(target_type, target_name) { + # The visibility will get overridden by forward_variables_from below if the +diff --git a/third_party/blink/renderer/core/inspector/BUILD.gn b/third_party/blink/renderer/core/inspector/BUILD.gn +index fbe8f2a4b4..91adecad46 100644 +--- a/third_party/blink/renderer/core/inspector/BUILD.gn ++++ b/third_party/blink/renderer/core/inspector/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//third_party/blink/renderer/bindings/bindings.gni") + import("//third_party/blink/renderer/core/core.gni") + import("//third_party/inspector_protocol/inspector_protocol.gni") +@@ -96,7 +97,7 @@ inspector_protocol_generate("protocol_sources") { + } + + # Compiles the sources generated above. +-source_set("generated") { ++jumbo_source_set("generated") { + sources = get_target_outputs(":protocol_sources") + + configs -= core_config_remove +diff --git a/third_party/blink/renderer/modules/BUILD.gn b/third_party/blink/renderer/modules/BUILD.gn +index b277878cae..4af8668dca 100644 +--- a/third_party/blink/renderer/modules/BUILD.gn ++++ b/third_party/blink/renderer/modules/BUILD.gn +@@ -24,7 +24,7 @@ config("modules_implementation") { + defines = [ "BLINK_MODULES_IMPLEMENTATION=1" ] + } + +-component("modules") { ++jumbo_component("modules") { + output_name = "blink_modules" + + visibility = [] # Allow re-assignment of list. +@@ -216,7 +216,7 @@ component("modules") { + configs += blink_symbols_config + } + +-source_set("modules_testing") { ++jumbo_source_set("modules_testing") { + testonly = true + + sources = [ +@@ -382,7 +382,7 @@ blink_modules_sources("modules_generated") { + } + } + +-source_set("unit_tests") { ++jumbo_source_set("unit_tests") { + testonly = true + + sources = [ +diff --git a/third_party/blink/renderer/modules/gamepad/BUILD.gn b/third_party/blink/renderer/modules/gamepad/BUILD.gn +index 572d8ce27f..8cd4a53f53 100644 +--- a/third_party/blink/renderer/modules/gamepad/BUILD.gn ++++ b/third_party/blink/renderer/modules/gamepad/BUILD.gn +@@ -39,7 +39,7 @@ blink_modules_sources("gamepad") { + ] + } + +-source_set("unit_tests") { ++jumbo_source_set("unit_tests") { + testonly = true + sources = [ "gamepad_comparisons_test.cc" ] + +diff --git a/third_party/blink/renderer/modules/hid/BUILD.gn b/third_party/blink/renderer/modules/hid/BUILD.gn +index df06706c32..2bec1cbfee 100644 +--- a/third_party/blink/renderer/modules/hid/BUILD.gn ++++ b/third_party/blink/renderer/modules/hid/BUILD.gn +@@ -17,7 +17,7 @@ blink_modules_sources("hid") { + ] + } + +-source_set("unit_tests") { ++jumbo_source_set("unit_tests") { + testonly = true + sources = [ "hid_device_test.cc" ] + +diff --git a/third_party/blink/renderer/modules/media/BUILD.gn b/third_party/blink/renderer/modules/media/BUILD.gn +index 1ab10aaaf6..c1aa2d8c3e 100644 +--- a/third_party/blink/renderer/modules/media/BUILD.gn ++++ b/third_party/blink/renderer/modules/media/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//third_party/blink/renderer/modules/modules.gni") + + blink_modules_sources("media") { +diff --git a/third_party/blink/renderer/modules/mediastream/BUILD.gn b/third_party/blink/renderer/modules/mediastream/BUILD.gn +index 36e2b5188a..5c753496ba 100644 +--- a/third_party/blink/renderer/modules/mediastream/BUILD.gn ++++ b/third_party/blink/renderer/modules/mediastream/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//third_party/blink/renderer/modules/modules.gni") + + blink_modules_sources("mediastream") { +@@ -136,7 +137,7 @@ blink_modules_sources("mediastream") { + public_deps = [ "//media/capture:capture_lib" ] + } + +-source_set("test_support") { ++jumbo_source_set("test_support") { + testonly = true + + sources = [ +diff --git a/third_party/blink/renderer/modules/modules.gni b/third_party/blink/renderer/modules/modules.gni +index 5b252edfd3..6f9aae8dd6 100644 +--- a/third_party/blink/renderer/modules/modules.gni ++++ b/third_party/blink/renderer/modules/modules.gni +@@ -7,6 +7,7 @@ + # This file is shared with all modules' BUILD files which shouldn't need access + # to the huge and slow lists of sources. If sharing is necessary, make a + # separate .gni. ++import("//build/config/jumbo.gni") + import("//third_party/blink/renderer/config.gni") + blink_modules_output_dir = "$root_gen_dir/third_party/blink/renderer/modules" + +@@ -25,7 +26,7 @@ template("blink_modules_sources") { + target_type = "static_library" + } + +- target(target_type, target_name) { ++ target("jumbo_" + target_type, target_name) { + # The visibility will get overridden by forward_variables_from below if the + # invoker defined it. + visibility = [ "//third_party/blink/renderer/modules/*" ] +diff --git a/third_party/blink/renderer/modules/peerconnection/BUILD.gn b/third_party/blink/renderer/modules/peerconnection/BUILD.gn +index 019498ae89..aed379a59f 100644 +--- a/third_party/blink/renderer/modules/peerconnection/BUILD.gn ++++ b/third_party/blink/renderer/modules/peerconnection/BUILD.gn +@@ -172,7 +172,7 @@ blink_modules_sources("peerconnection") { + [ "//third_party/blink/renderer/modules/mediastream" ] + } + +-source_set("test_support") { ++jumbo_source_set("test_support") { + testonly = true + + sources = [ +diff --git a/third_party/blink/renderer/modules/storage/BUILD.gn b/third_party/blink/renderer/modules/storage/BUILD.gn +index def668aa11..056722af5f 100644 +--- a/third_party/blink/renderer/modules/storage/BUILD.gn ++++ b/third_party/blink/renderer/modules/storage/BUILD.gn +@@ -27,7 +27,7 @@ blink_modules_sources("storage") { + ] + } + +-source_set("unit_tests") { ++jumbo_source_set("unit_tests") { + testonly = true + sources = [ + "cached_storage_area_test.cc", +diff --git a/third_party/blink/renderer/modules/webrtc/BUILD.gn b/third_party/blink/renderer/modules/webrtc/BUILD.gn +index f06918f31a..e87c5354b0 100644 +--- a/third_party/blink/renderer/modules/webrtc/BUILD.gn ++++ b/third_party/blink/renderer/modules/webrtc/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//third_party/blink/renderer/modules/modules.gni") + + blink_modules_sources("webrtc") { +diff --git a/third_party/blink/renderer/modules/webtransport/BUILD.gn b/third_party/blink/renderer/modules/webtransport/BUILD.gn +index e5865de824..70e678bee6 100644 +--- a/third_party/blink/renderer/modules/webtransport/BUILD.gn ++++ b/third_party/blink/renderer/modules/webtransport/BUILD.gn +@@ -25,7 +25,7 @@ blink_modules_sources("webtransport") { + ] + } + +-source_set("unit_tests") { ++jumbo_source_set("unit_tests") { + testonly = true + sources = [ + "bidirectional_stream_test.cc", +diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn +index 17889a08bc..7257742d5c 100644 +--- a/third_party/blink/renderer/platform/BUILD.gn ++++ b/third_party/blink/renderer/platform/BUILD.gn +@@ -7,6 +7,7 @@ import("//build/buildflag_header.gni") + import("//build/compiled_action.gni") + import("//build/config/compiler/compiler.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//build/nocompile.gni") + import("//media/media_options.gni") +@@ -307,7 +308,7 @@ source_set("image_headers") { + ] + } + +-component("platform") { ++jumbo_component("platform") { + visibility = [] # Allow re-assignment of list. + visibility = [ + "//third_party/blink/*", +@@ -1851,7 +1852,7 @@ component("platform") { + configs += blink_symbols_config + } + +-static_library("test_support") { ++jumbo_static_library("test_support") { + visibility += [ + "//third_party/blink/*", + "//tools/privacy_budget/font_indexer:*", +@@ -2035,7 +2036,7 @@ if (enable_nocompile_tests) { + } + } + +-source_set("blink_platform_unittests_sources") { ++jumbo_source_set("blink_platform_unittests_sources") { + visibility = [] # Allow re-assignment of list. + visibility = [ "*" ] + testonly = true +@@ -2505,7 +2506,7 @@ test("blink_fuzzer_unittests") { + + # This source set is used for fuzzers that need an environment similar to unit + # tests. +-source_set("blink_fuzzer_test_support") { ++jumbo_source_set("blink_fuzzer_test_support") { + testonly = true + visibility = [] # Allow re-assignment of list. + visibility = [ "*" ] +@@ -2712,7 +2713,7 @@ blink_text_codec_fuzzer("WINDOWS_1252") { + # NOTE: These are legacy unit tests and tests that require a Platform + # object. Do not add more unless the test requires a Platform object. + # These tests are a part of the blink_unittests binary. +-source_set("unit_tests") { ++jumbo_source_set("unit_tests") { + testonly = true + visibility = [] + visibility = [ "//third_party/blink/renderer/*" ] +diff --git a/third_party/blink/renderer/platform/blob/BUILD.gn b/third_party/blink/renderer/platform/blob/BUILD.gn +index 5a8ca53de8..55f8db7ec6 100644 +--- a/third_party/blink/renderer/platform/blob/BUILD.gn ++++ b/third_party/blink/renderer/platform/blob/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//third_party/blink/renderer/platform/platform.gni") + + # Intentionally depends on generator targets so to depend only on generated +@@ -10,7 +11,7 @@ import("//third_party/blink/renderer/platform/platform.gni") + # There is no tool to detect missing indirect generated header dependency today + # and this is easy to be broken when mojom files are updated to depend on + # another. +-source_set("generator") { ++jumbo_source_set("generator") { + public_deps = [ + "//third_party/blink/public/mojom:mojom_platform_blink_headers", + "//url/mojom:url_mojom_gurl_blink_headers", +@@ -39,7 +40,7 @@ blink_platform_sources("blob") { + ] + } + +-source_set("unit_tests") { ++jumbo_source_set("unit_tests") { + visibility = [ "//third_party/blink/renderer/platform:*" ] + testonly = true + +@@ -60,7 +61,7 @@ source_set("unit_tests") { + ] + } + +-source_set("test_support") { ++jumbo_source_set("test_support") { + # This target defines test files for platform:test_support that + # blink_platform_unittests and blink_unittests can use. + visibility = [ "//third_party/blink/renderer/platform:test_support" ] +diff --git a/third_party/blink/renderer/platform/heap/BUILD.gn b/third_party/blink/renderer/platform/heap/BUILD.gn +index c170705e88..1594860ec6 100644 +--- a/third_party/blink/renderer/platform/heap/BUILD.gn ++++ b/third_party/blink/renderer/platform/heap/BUILD.gn +@@ -4,6 +4,7 @@ + + import("//build/buildflag_header.gni") + import("//build/config/compiler/compiler.gni") ++import("//build/config/jumbo.gni") + import("//build/config/sanitizers/sanitizers.gni") + import("//testing/test.gni") + import("//third_party/blink/public/public_features.gni") +@@ -100,7 +101,7 @@ blink_platform_sources("heap") { + ] + } + +-source_set("test_support") { ++jumbo_source_set("test_support") { + testonly = true + + sources = [ +@@ -149,7 +150,7 @@ test("blink_heap_unittests") { + } + } + +-source_set("blink_heap_unittests_sources") { ++jumbo_source_set("blink_heap_unittests_sources") { + testonly = true + + sources = [ +diff --git a/third_party/blink/renderer/platform/instrumentation/BUILD.gn b/third_party/blink/renderer/platform/instrumentation/BUILD.gn +index 140993fe0e..3a3c4dc3ab 100644 +--- a/third_party/blink/renderer/platform/instrumentation/BUILD.gn ++++ b/third_party/blink/renderer/platform/instrumentation/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//third_party/blink/renderer/platform/platform.gni") + + blink_platform_sources("instrumentation") { +@@ -60,7 +61,7 @@ component("histogram") { + ] + } + +-source_set("unit_tests") { ++jumbo_source_set("unit_tests") { + testonly = true + + sources = [ +diff --git a/third_party/blink/renderer/platform/loader/BUILD.gn b/third_party/blink/renderer/platform/loader/BUILD.gn +index 3569fa1d5a..659fb23c8a 100644 +--- a/third_party/blink/renderer/platform/loader/BUILD.gn ++++ b/third_party/blink/renderer/platform/loader/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//third_party/blink/renderer/build/scripts/scripts.gni") + import("//third_party/blink/renderer/platform/platform.gni") + import("//third_party/blink/renderer/platform/platform_generated.gni") +@@ -203,7 +204,7 @@ blink_platform_sources("loader") { + [ "//third_party/blink/renderer/platform/network:network" ] + } + +-source_set("unit_tests") { ++jumbo_source_set("unit_tests") { + # This target defines test files for blink_platform_unittests and only the + # blink_platform_unittests target should depend on it. + visibility = [ "//third_party/blink/renderer/platform:*" ] +@@ -261,7 +262,7 @@ source_set("unit_tests") { + ] + } + +-source_set("test_support") { ++jumbo_source_set("test_support") { + # This target defines test files for platform:test_support that + # blink_platform_unittests and blink_unittests can use. + visibility = [ "//third_party/blink/renderer/platform:test_support" ] +diff --git a/third_party/blink/renderer/platform/network/BUILD.gn b/third_party/blink/renderer/platform/network/BUILD.gn +index 39b5619701..b80ac1a843 100644 +--- a/third_party/blink/renderer/platform/network/BUILD.gn ++++ b/third_party/blink/renderer/platform/network/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//third_party/blink/renderer/build/scripts/scripts.gni") + import("//third_party/blink/renderer/platform/platform.gni") + import("//third_party/blink/renderer/platform/platform_generated.gni") +@@ -74,7 +75,7 @@ blink_platform_sources("network") { + ] + } + +-source_set("unit_tests") { ++jumbo_source_set("unit_tests") { + visibility = [ "//third_party/blink/renderer/platform:*" ] + testonly = true + +@@ -103,7 +104,7 @@ source_set("unit_tests") { + public_deps = [ "//third_party/blink/renderer/platform:platform" ] + } + +-source_set("test_support") { ++jumbo_source_set("test_support") { + visibility = [ "//third_party/blink/renderer/platform:test_support" ] + testonly = true + +diff --git a/third_party/blink/renderer/platform/platform.gni b/third_party/blink/renderer/platform/platform.gni +index c90255bea5..d882b4945e 100644 +--- a/third_party/blink/renderer/platform/platform.gni ++++ b/third_party/blink/renderer/platform/platform.gni +@@ -2,6 +2,8 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") ++ + platform_config_add = [ + "//third_party/blink/renderer:config", + "//third_party/blink/renderer:inside_blink", +@@ -13,7 +15,7 @@ platform_config_add = [ + platform_config_remove = [] + + template("blink_platform_sources") { +- source_set(target_name) { ++ jumbo_source_set(target_name) { + # Only platform can directly depend on this. + # Any target outside platform should instead depend on platform. + visibility = [ "//third_party/blink/renderer/platform/*" ] +diff --git a/third_party/blink/renderer/platform/scheduler/BUILD.gn b/third_party/blink/renderer/platform/scheduler/BUILD.gn +index 3429134743..ff076b9f0c 100644 +--- a/third_party/blink/renderer/platform/scheduler/BUILD.gn ++++ b/third_party/blink/renderer/platform/scheduler/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//testing/libfuzzer/fuzzer_test.gni") + import("//third_party/blink/renderer/platform/platform.gni") + import("//third_party/protobuf/proto_library.gni") +@@ -194,7 +195,7 @@ blink_platform_sources("scheduler") { + ] + } + +-source_set("test_support") { ++jumbo_source_set("test_support") { + testonly = true + + sources = [ +@@ -227,7 +228,7 @@ source_set("test_support") { + configs += [ "//third_party/blink/renderer/platform:blink_platform_config" ] + } + +-source_set("unit_tests") { ++jumbo_source_set("unit_tests") { + testonly = true + + sources = [ +@@ -278,7 +279,7 @@ source_set("unit_tests") { + configs += [ "//third_party/blink/renderer/platform:blink_platform_config" ] + } + +-source_set("scheduler_fuzzer_tests") { ++jumbo_source_set("scheduler_fuzzer_tests") { + testonly = true + + sources = [] +diff --git a/third_party/blink/renderer/platform/wtf/BUILD.gn b/third_party/blink/renderer/platform/wtf/BUILD.gn +index dca40eb878..771a5005f1 100644 +--- a/third_party/blink/renderer/platform/wtf/BUILD.gn ++++ b/third_party/blink/renderer/platform/wtf/BUILD.gn +@@ -8,6 +8,7 @@ assert(use_blink) + + import("//build/buildflag_header.gni") + import("//build/config/compiler/compiler.gni") ++import("//build/config/jumbo.gni") + import("//testing/test.gni") + import("//third_party/blink/public/public_features.gni") + import("//third_party/blink/renderer/config.gni") +@@ -37,7 +38,7 @@ config("wtf_config") { + } + } + +-component("wtf") { ++jumbo_component("wtf") { + output_name = "blink_platform_wtf" + + sources = [ +@@ -284,7 +285,7 @@ test("wtf_unittests") { + deps = [ ":wtf_unittests_sources" ] + } + +-source_set("wtf_unittests_sources") { ++jumbo_source_set("wtf_unittests_sources") { + visibility = [] # Allow re-assignment of list. + visibility = [ "*" ] + testonly = true +diff --git a/third_party/inspector_protocol/BUILD.gn b/third_party/inspector_protocol/BUILD.gn +index 646e0cf929..6131bb2509 100644 +--- a/third_party/inspector_protocol/BUILD.gn ++++ b/third_party/inspector_protocol/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-component("crdtp") { ++import("//build/config/jumbo.gni") ++ ++jumbo_component("crdtp") { + sources = [ + "crdtp/cbor.cc", + "crdtp/cbor.h", +diff --git a/ui/accessibility/BUILD.gn b/ui/accessibility/BUILD.gn +index c3155c5f37..8e867e2732 100644 +--- a/ui/accessibility/BUILD.gn ++++ b/ui/accessibility/BUILD.gn +@@ -3,6 +3,7 @@ + # found in the LICENSE file. + + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//build/config/linux/pkg_config.gni") + import("//build/config/ui.gni") + import("//extensions/buildflags/buildflags.gni") +@@ -37,7 +38,7 @@ mojom_component("ax_enums_mojo") { + # included by Blink. The rule of thumb (for now) is that it's + # anything platform-neutral (no platform/ directory) that + # relates to a single accessibility node (no trees, etc.). +-component("ax_base") { ++jumbo_component("ax_base") { + defines = [ "AX_BASE_IMPLEMENTATION" ] + + sources = [ +@@ -137,7 +138,7 @@ group("accessibility") { + ] + } + +-component("accessibility_internal") { ++jumbo_component("accessibility_internal") { + defines = [ "AX_IMPLEMENTATION" ] + + sources = [ +diff --git a/ui/accessibility/platform/BUILD.gn b/ui/accessibility/platform/BUILD.gn +index 181b77f7ca..58d5b0b251 100644 +--- a/ui/accessibility/platform/BUILD.gn ++++ b/ui/accessibility/platform/BUILD.gn +@@ -3,6 +3,7 @@ + # found in the LICENSE file. + + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//build/config/linux/pkg_config.gni") + import("//build/config/ui.gni") + import("//extensions/buildflags/buildflags.gni") +diff --git a/ui/aura/BUILD.gn b/ui/aura/BUILD.gn +index 50ca856b9d..4d16abf837 100644 +--- a/ui/aura/BUILD.gn ++++ b/ui/aura/BUILD.gn +@@ -2,10 +2,11 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//testing/test.gni") + +-component("aura") { ++jumbo_component("aura") { + public = [ + "client/aura_constants.h", + "client/capture_client.h", +@@ -178,7 +179,7 @@ component("aura") { + } + } + +-static_library("test_support") { ++jumbo_static_library("test_support") { + testonly = true + sources = [ + "test/aura_test_base.cc", +diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn +index 1147a6e268..3ca4e89e13 100644 +--- a/ui/base/BUILD.gn ++++ b/ui/base/BUILD.gn +@@ -7,6 +7,7 @@ import("//build/config/chromeos/ui_mode.gni") + import("//build/config/compiler/compiler.gni") + import("//build/config/dcheck_always_on.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//build/config/linux/gtk/gtk.gni") + import("//build/config/linux/pangocairo/pangocairo.gni") + import("//build/config/locales.gni") +@@ -126,7 +127,7 @@ source_set("types") { + deps = [ "//build:chromeos_buildflags" ] + } + +-component("base") { ++jumbo_component("base") { + output_name = "ui_base" + + sources = [ +@@ -717,7 +718,7 @@ component("features") { + } + + if (is_win || is_mac || is_linux || is_chromeos) { +- static_library("pixel_diff_test_support") { ++ jumbo_static_library("pixel_diff_test_support") { + testonly = true + sources = [ + "test/skia_gold_matching_algorithm.cc", +@@ -760,7 +761,7 @@ if (use_blink) { + } + } + +-static_library("test_support") { ++jumbo_static_library("test_support") { + testonly = true + sources = [ + "data_transfer_policy/mock_data_transfer_policy_controller.cc", +diff --git a/ui/base/clipboard/BUILD.gn b/ui/base/clipboard/BUILD.gn +index 065e8adf78..6c1eb332ee 100644 +--- a/ui/base/clipboard/BUILD.gn ++++ b/ui/base/clipboard/BUILD.gn +@@ -5,10 +5,11 @@ + import("///build/config/ozone.gni") + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//testing/libfuzzer/fuzzer_test.gni") + +-component("clipboard_types") { ++jumbo_component("clipboard_types") { + output_name = "ui_base_clipboard_types" + sources = [ + "clipboard_buffer.h", +@@ -75,7 +76,7 @@ component("file_info") { + + # This is a source set because it needs to be included only on the Mac for the + # final executable, but needs to be included on any platform for the fuzzer. +-source_set("url_file_parser") { ++jumbo_source_set("url_file_parser") { + sources = [ + "url_file_parser.cc", + "url_file_parser.h", +@@ -84,7 +85,7 @@ source_set("url_file_parser") { + deps = [ "//base" ] + } + +-component("clipboard") { ++jumbo_component("clipboard") { + output_name = "ui_base_clipboard" + + sources = [ +@@ -194,7 +195,7 @@ component("clipboard") { + } + } + +-source_set("clipboard_test_support") { ++jumbo_source_set("clipboard_test_support") { + testonly = true + + if (use_blink) { +diff --git a/ui/base/ime/BUILD.gn b/ui/base/ime/BUILD.gn +index c4f67f14e9..26e3ce8c76 100644 +--- a/ui/base/ime/BUILD.gn ++++ b/ui/base/ime/BUILD.gn +@@ -3,6 +3,7 @@ + # found in the LICENSE file. + + import("//build/config/chromeos/ui_mode.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + + source_set("text_input_types") { +@@ -14,7 +15,7 @@ source_set("text_input_types") { + ] + } + +-component("ime_types") { ++jumbo_component("ime_types") { + output_name = "ui_base_ime_types" + sources = [ + "autocorrect_info.h", +@@ -56,7 +57,7 @@ component("ime_types") { + } + } + +-component("ime") { ++jumbo_component("ime") { + output_name = "ui_base_ime" + sources = [ + "constants.cc", +diff --git a/ui/base/ime/ash/BUILD.gn b/ui/base/ime/ash/BUILD.gn +index 71be05152e..97c859e6d9 100644 +--- a/ui/base/ime/ash/BUILD.gn ++++ b/ui/base/ime/ash/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//build/config/chromeos/ui_mode.gni") + + assert(is_chromeos_ash) +@@ -22,7 +23,7 @@ source_set("typing_session_manager") { + ] + } + +-component("ash") { ++jumbo_component("ash") { + output_name = "ui_base_ime_ash" + + sources = [ +diff --git a/ui/base/ime/fuchsia/BUILD.gn b/ui/base/ime/fuchsia/BUILD.gn +index f610fcc894..bb444074d6 100644 +--- a/ui/base/ime/fuchsia/BUILD.gn ++++ b/ui/base/ime/fuchsia/BUILD.gn +@@ -2,9 +2,11 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") ++ + assert(is_fuchsia) + +-component("fuchsia") { ++jumbo_component("fuchsia") { + output_name = "ui_base_ime_fuchsia" + + sources = [ +diff --git a/ui/base/ime/init/BUILD.gn b/ui/base/ime/init/BUILD.gn +index 1ff77334f0..9a56d96eb4 100644 +--- a/ui/base/ime/init/BUILD.gn ++++ b/ui/base/ime/init/BUILD.gn +@@ -3,9 +3,10 @@ + # found in the LICENSE file. + + import("//build/config/chromeos/ui_mode.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + +-component("init") { ++jumbo_component("init") { + output_name = "ui_base_ime_init" + + sources = [ +diff --git a/ui/base/ime/linux/BUILD.gn b/ui/base/ime/linux/BUILD.gn +index ec20ec866a..e9f1a18f94 100644 +--- a/ui/base/ime/linux/BUILD.gn ++++ b/ui/base/ime/linux/BUILD.gn +@@ -2,12 +2,13 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/linux/pangocairo/pangocairo.gni") + + assert(is_linux || is_chromeos_lacros) + +-component("linux") { ++jumbo_component("linux") { + output_name = "ui_base_ime_linux" + sources = [ + "fake_input_method_context.cc", +diff --git a/ui/base/ime/mac/BUILD.gn b/ui/base/ime/mac/BUILD.gn +index fc5cb85b07..8e50ead627 100644 +--- a/ui/base/ime/mac/BUILD.gn ++++ b/ui/base/ime/mac/BUILD.gn +@@ -2,9 +2,11 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") ++ + assert(is_mac) + +-component("mac") { ++jumbo_component("mac") { + output_name = "ui_base_ime_mac" + + sources = [ +diff --git a/ui/base/ime/win/BUILD.gn b/ui/base/ime/win/BUILD.gn +index 61d1e9b662..428e205bd0 100644 +--- a/ui/base/ime/win/BUILD.gn ++++ b/ui/base/ime/win/BUILD.gn +@@ -2,9 +2,11 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") ++ + assert(is_win) + +-component("win") { ++jumbo_component("win") { + output_name = "ui_base_ime_win" + sources = [ + "input_method_win_base.cc", +diff --git a/ui/base/prediction/BUILD.gn b/ui/base/prediction/BUILD.gn +index 2e653b3df7..dae3070134 100644 +--- a/ui/base/prediction/BUILD.gn ++++ b/ui/base/prediction/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-component("prediction") { ++import("//build/config/jumbo.gni") ++ ++jumbo_component("prediction") { + sources = [ + "empty_filter.cc", + "empty_filter.h", +diff --git a/ui/base/x/BUILD.gn b/ui/base/x/BUILD.gn +index 5f88f00d2d..5f9af7e3cc 100644 +--- a/ui/base/x/BUILD.gn ++++ b/ui/base/x/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//build/config/linux/gtk/gtk.gni") + import("//build/config/ozone.gni") + import("//build/config/ui.gni") +@@ -9,7 +10,7 @@ import("//testing/libfuzzer/fuzzer_test.gni") + + assert(ozone_platform_x11) + +-component("x") { ++jumbo_component("x") { + output_name = "ui_base_x" + + sources = [ +diff --git a/ui/color/BUILD.gn b/ui/color/BUILD.gn +index b5bc1e1f05..22f496e123 100644 +--- a/ui/color/BUILD.gn ++++ b/ui/color/BUILD.gn +@@ -4,13 +4,14 @@ + + import("//build/buildflag_header.gni") + import("//build/config/chromeos/ui_mode.gni") ++import("//build/config/jumbo.gni") + import("//mojo/public/tools/bindings/mojom.gni") + import("//testing/test.gni") + import("//ui/base/ui_features.gni") + + assert(use_blink, "Not supported without use_blink") + +-source_set("color_headers") { ++jumbo_source_set("color_headers") { + sources = [ + "color_id.h", + "color_id_macros.inc", +@@ -32,7 +33,7 @@ source_set("color_headers") { + } + + # Keep the deps on this target to a minimum so that chromeos/crosapi can depend on it. +-component("color_provider_key") { ++jumbo_component("color_provider_key") { + sources = [ + "color_provider_key.cc", + "color_provider_key.h", +@@ -48,7 +49,7 @@ component("color_provider_key") { + ] + } + +-component("color") { ++jumbo_component("color") { + sources = [ + "color_metrics.cc", + "color_mixer.cc", +@@ -139,7 +140,7 @@ if (is_win) { + } + } + +-component("mixers") { ++jumbo_component("mixers") { + sources = [ + "color_mixers.cc", + "color_mixers.h", +diff --git a/ui/compositor/BUILD.gn b/ui/compositor/BUILD.gn +index 1d26297d38..16945a93da 100644 +--- a/ui/compositor/BUILD.gn ++++ b/ui/compositor/BUILD.gn +@@ -2,10 +2,11 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//testing/test.gni") + +-component("compositor") { ++jumbo_component("compositor") { + sources = [ + "animation_throughput_reporter.cc", + "animation_throughput_reporter.h", +@@ -122,7 +123,7 @@ component("compositor") { + } + } + +-static_library("test_support") { ++jumbo_static_library("test_support") { + testonly = true + sources = [ + "test/animation_throughput_reporter_test_base.cc", +diff --git a/ui/display/BUILD.gn b/ui/display/BUILD.gn +index 4711b70e17..cd2a659c77 100644 +--- a/ui/display/BUILD.gn ++++ b/ui/display/BUILD.gn +@@ -3,6 +3,7 @@ + # found in the LICENSE file. + + import("//build/config/chromeos/ui_mode.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//testing/test.gni") + +@@ -20,7 +21,7 @@ component("display_features") { + ] + } + +-component("display") { ++jumbo_component("display") { + sources = [ + "display.cc", + "display.h", +@@ -169,7 +170,7 @@ if (is_chromeos_ash) { + } + } + +-static_library("test_support") { ++jumbo_static_library("test_support") { + testonly = true + sources = [ + "test/display_matchers.cc", +diff --git a/ui/display/manager/BUILD.gn b/ui/display/manager/BUILD.gn +index 1dd366d9d2..708aafe669 100644 +--- a/ui/display/manager/BUILD.gn ++++ b/ui/display/manager/BUILD.gn +@@ -3,11 +3,12 @@ + # found in the LICENSE file. + + import("//build/config/chromeos/ui_mode.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + + assert(is_chromeos_ash || is_castos || is_cast_android) + +-component("manager") { ++jumbo_component("manager") { + sources = [ + "display_manager_export.h", + "managed_display_info.cc", +diff --git a/ui/display/types/BUILD.gn b/ui/display/types/BUILD.gn +index 0f5a3f588b..e38a9690e1 100644 +--- a/ui/display/types/BUILD.gn ++++ b/ui/display/types/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-component("types") { ++import("//build/config/jumbo.gni") ++ ++jumbo_component("types") { + output_name = "display_types" + sources = [ + "display_color_management.cc", +diff --git a/ui/display/util/BUILD.gn b/ui/display/util/BUILD.gn +index 61227c26fe..3da28ffa33 100644 +--- a/ui/display/util/BUILD.gn ++++ b/ui/display/util/BUILD.gn +@@ -3,10 +3,11 @@ + # found in the LICENSE file. + + import("//build/config/chromeos/ui_mode.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//testing/libfuzzer/fuzzer_test.gni") + +-component("util") { ++jumbo_component("util") { + output_name = "display_util" + sources = [ + "display_util.cc", +diff --git a/ui/events/BUILD.gn b/ui/events/BUILD.gn +index 3482f47bea..9a3045bdd5 100644 +--- a/ui/events/BUILD.gn ++++ b/ui/events/BUILD.gn +@@ -3,6 +3,7 @@ + # found in the LICENSE file. + + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ozone.gni") + import("//build/config/ui.gni") + import("//testing/test.gni") +@@ -17,7 +18,7 @@ if (is_ios) { + import("//ios/build/config.gni") + } + +-static_library("dom_keycode_converter") { ++jumbo_static_library("dom_keycode_converter") { + public = [ + "keycodes/dom/dom_code.h", + "keycodes/dom/dom_codes_array.h", +@@ -95,7 +96,7 @@ source_set("platform_event") { + public_deps = [ "//base" ] + } + +-component("events_base") { ++jumbo_component("events_base") { + sources = [ + "base_event_utils.cc", + "base_event_utils.h", +@@ -197,7 +198,7 @@ component("events_base") { + } + } + +-component("events") { ++jumbo_component("events") { + public = [ + "cocoa/cocoa_event_utils.h", + "event.h", +@@ -396,7 +397,7 @@ component("events") { + } + } + +-component("keyboard_hook") { ++jumbo_component("keyboard_hook") { + public = [ "keyboard_hook.h" ] + + defines = [ "IS_KEYBOARD_HOOK_IMPL" ] +@@ -450,7 +451,7 @@ component("keyboard_hook") { + } + } + +-component("gesture_detection") { ++jumbo_component("gesture_detection") { + sources = [ + "gesture_detection/filtered_gesture_provider.cc", + "gesture_detection/filtered_gesture_provider.h", +@@ -510,7 +511,7 @@ component("gesture_detection") { + } + } + +-component("velocity_tracker") { ++jumbo_component("velocity_tracker") { + sources = [ + "velocity_tracker/bitset_32.h", + "velocity_tracker/motion_event.cc", +@@ -535,7 +536,7 @@ component("velocity_tracker") { + ] + } + +-static_library("test_support") { ++jumbo_static_library("test_support") { + sources = [ + "test/event_generator.cc", + "test/event_generator.h", +diff --git a/ui/events/blink/BUILD.gn b/ui/events/blink/BUILD.gn +index d707bb6e0c..8b4d97f467 100644 +--- a/ui/events/blink/BUILD.gn ++++ b/ui/events/blink/BUILD.gn +@@ -2,9 +2,10 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + +-component("blink_features") { ++jumbo_component("blink_features") { + defines = [ "IS_BLINK_FEATURES_IMPL" ] + + sources = [ +@@ -15,7 +16,7 @@ component("blink_features") { + deps = [ "//base" ] + } + +-source_set("blink") { ++jumbo_source_set("blink") { + sources = [ + "blink_event_util.cc", + "blink_event_util.h", +diff --git a/ui/events/devices/BUILD.gn b/ui/events/devices/BUILD.gn +index 3ef7bbeb5e..e5d0576659 100644 +--- a/ui/events/devices/BUILD.gn ++++ b/ui/events/devices/BUILD.gn +@@ -2,13 +2,15 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") ++ + if (is_android) { + import("//build/config/android/config.gni") + import("//build/config/android/rules.gni") + import("//third_party/jni_zero/jni_zero.gni") + } + +-component("devices") { ++jumbo_component("devices") { + sources = [ + "device_data_manager.cc", + "device_data_manager.h", +diff --git a/ui/events/devices/x11/BUILD.gn b/ui/events/devices/x11/BUILD.gn +index ab1766bf27..02674d175f 100644 +--- a/ui/events/devices/x11/BUILD.gn ++++ b/ui/events/devices/x11/BUILD.gn +@@ -2,12 +2,13 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//build/config/ozone.gni") + import("//build/config/ui.gni") + + assert(ozone_platform_x11) + +-component("x11") { ++jumbo_component("x11") { + output_name = "events_devices_x11" + + sources = [ +diff --git a/ui/events/ipc/BUILD.gn b/ui/events/ipc/BUILD.gn +index 5e2744b86c..ff529c38eb 100644 +--- a/ui/events/ipc/BUILD.gn ++++ b/ui/events/ipc/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-component("ipc") { ++import("//build/config/jumbo.gni") ++ ++jumbo_component("ipc") { + output_name = "ui_events_ipc" + + sources = [ +diff --git a/ui/events/keycodes/BUILD.gn b/ui/events/keycodes/BUILD.gn +index 9cdd599f0d..5760020969 100644 +--- a/ui/events/keycodes/BUILD.gn ++++ b/ui/events/keycodes/BUILD.gn +@@ -2,11 +2,12 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//build/config/ozone.gni") + import("//build/config/ui.gni") + import("//ui/base/ui_features.gni") + +-source_set("xkb") { ++jumbo_source_set("xkb") { + sources = [ + "keyboard_code_conversion_xkb.cc", + "keyboard_code_conversion_xkb.h", +@@ -27,7 +28,7 @@ source_set("xkb") { + } + + if (ozone_platform_x11) { +- component("x11") { ++ jumbo_component("x11") { + output_name = "keycodes_x11" + + sources = [ +diff --git a/ui/events/platform/BUILD.gn b/ui/events/platform/BUILD.gn +index 1b54f4b46f..1b6b162b06 100644 +--- a/ui/events/platform/BUILD.gn ++++ b/ui/events/platform/BUILD.gn +@@ -2,9 +2,10 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + +-component("platform") { ++jumbo_component("platform") { + sources = [ + # Allow this target to include events_export.h without depending on the + # events target (which would be circular). +diff --git a/ui/events/platform/x11/BUILD.gn b/ui/events/platform/x11/BUILD.gn +index 630c207d54..c3338effbe 100644 +--- a/ui/events/platform/x11/BUILD.gn ++++ b/ui/events/platform/x11/BUILD.gn +@@ -3,12 +3,13 @@ + # found in the LICENSE file. + + import("//build/config/chromeos/ui_mode.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ozone.gni") + import("//build/config/ui.gni") + + assert(ozone_platform_x11) + +-component("x11") { ++jumbo_component("x11") { + output_name = "x11_events_platform" + + sources = [ +diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn +index 3702eefa91..66ff21b578 100644 +--- a/ui/gfx/BUILD.gn ++++ b/ui/gfx/BUILD.gn +@@ -3,6 +3,7 @@ + # found in the LICENSE file. + + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ozone.gni") + import("//build/config/ui.gni") + import("//device/vr/buildflags/buildflags.gni") +@@ -29,7 +30,7 @@ source_set("gfx_export") { + } + + # Used for color generation at build time without importing all the gfx. +-component("color_utils") { ++jumbo_component("color_utils") { + sources = [ + "color_palette.h", + "color_utils.cc", +@@ -44,7 +45,7 @@ component("color_utils") { + ] + } + +-component("gfx_skia") { ++jumbo_component("gfx_skia") { + sources = [ + "gfx_skia_export.h", + "skia_util.cc", +@@ -69,7 +70,7 @@ if (is_win) { + } + } + +-component("gfx") { ++jumbo_component("gfx") { + sources = [ + "break_list.h", + "color_analysis.cc", +@@ -448,7 +449,7 @@ component("gfx") { + } + } + +-component("color_space") { ++jumbo_component("color_space") { + sources = [ + "color_conversion_sk_filter_cache.cc", + "color_conversion_sk_filter_cache.h", +@@ -594,7 +595,7 @@ group("memory_buffer") { + } + + # Cannot be a static_library in component builds due to exported functions +-source_set("memory_buffer_sources") { ++jumbo_source_set("memory_buffer_sources") { + visibility = [ ":*" ] # Depend on through ":memory_buffer". + + # TODO(brettw) refactor this so these sources are in a coherent directory +@@ -695,7 +696,7 @@ source_set("memory_buffer_sources") { + } + + # TODO(ccameron): This can be moved into a separate source_set. +-component("gfx_switches") { ++jumbo_component("gfx_switches") { + sources = [ + "switches.cc", + "switches.h", +@@ -707,7 +708,7 @@ component("gfx_switches") { + deps = [ "//base" ] + } + +-static_library("test_support") { ++jumbo_static_library("test_support") { + testonly = true + sources = [ + "animation/animation_test_api.cc", +diff --git a/ui/gfx/animation/BUILD.gn b/ui/gfx/animation/BUILD.gn +index 9dabaaca3d..151a609949 100644 +--- a/ui/gfx/animation/BUILD.gn ++++ b/ui/gfx/animation/BUILD.gn +@@ -3,6 +3,7 @@ + # found in the LICENSE file. + + import("//build/config/chromeos/ui_mode.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + + if (is_android) { +@@ -10,7 +11,7 @@ if (is_android) { + import("//build/config/android/rules.gni") + } + +-component("animation") { ++jumbo_component("animation") { + sources = [ + "animation.cc", + "animation.h", +diff --git a/ui/gfx/codec/BUILD.gn b/ui/gfx/codec/BUILD.gn +index 34ea362ac8..4ab4c22f3d 100644 +--- a/ui/gfx/codec/BUILD.gn ++++ b/ui/gfx/codec/BUILD.gn +@@ -3,9 +3,10 @@ + # found in the LICENSE file. + + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + +-component("codec") { ++jumbo_component("codec") { + sources = [ + "codec_export.h", + "jpeg_codec.cc", +diff --git a/ui/gfx/geometry/BUILD.gn b/ui/gfx/geometry/BUILD.gn +index 4f7421497a..4ac63c24d2 100644 +--- a/ui/gfx/geometry/BUILD.gn ++++ b/ui/gfx/geometry/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-component("geometry") { ++import("//build/config/jumbo.gni") ++ ++jumbo_component("geometry") { + sources = [ + "../gfx_export.h", + "angle_conversions.h", +diff --git a/ui/gfx/ipc/BUILD.gn b/ui/gfx/ipc/BUILD.gn +index 83f5cd0b14..44f4ad493c 100644 +--- a/ui/gfx/ipc/BUILD.gn ++++ b/ui/gfx/ipc/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-component("ipc") { ++import("//build/config/jumbo.gni") ++ ++jumbo_component("ipc") { + output_name = "gfx_ipc" + + sources = [ +diff --git a/ui/gfx/ipc/buffer_types/BUILD.gn b/ui/gfx/ipc/buffer_types/BUILD.gn +index 550b4f0ed6..957f9d9e66 100644 +--- a/ui/gfx/ipc/buffer_types/BUILD.gn ++++ b/ui/gfx/ipc/buffer_types/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-component("buffer_types") { ++import("//build/config/jumbo.gni") ++ ++jumbo_component("buffer_types") { + output_name = "gfx_ipc_buffer_types" + + sources = [ +diff --git a/ui/gfx/ipc/color/BUILD.gn b/ui/gfx/ipc/color/BUILD.gn +index 38a069456f..9bbf354122 100644 +--- a/ui/gfx/ipc/color/BUILD.gn ++++ b/ui/gfx/ipc/color/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-component("color") { ++import("//build/config/jumbo.gni") ++ ++jumbo_component("color") { + output_name = "gfx_ipc_color" + + sources = [ +diff --git a/ui/gfx/ipc/geometry/BUILD.gn b/ui/gfx/ipc/geometry/BUILD.gn +index 4d0a150406..bd24a217e1 100644 +--- a/ui/gfx/ipc/geometry/BUILD.gn ++++ b/ui/gfx/ipc/geometry/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-component("geometry") { ++import("//build/config/jumbo.gni") ++ ++jumbo_component("geometry") { + output_name = "gfx_ipc_geometry" + + sources = [ +diff --git a/ui/gfx/ipc/skia/BUILD.gn b/ui/gfx/ipc/skia/BUILD.gn +index b96b1c7548..d6178dcba4 100644 +--- a/ui/gfx/ipc/skia/BUILD.gn ++++ b/ui/gfx/ipc/skia/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-component("skia") { ++import("//build/config/jumbo.gni") ++ ++jumbo_component("skia") { + output_name = "gfx_ipc_skia" + + sources = [ +diff --git a/ui/gfx/range/BUILD.gn b/ui/gfx/range/BUILD.gn +index aa17a97454..e1c9b52f1e 100644 +--- a/ui/gfx/range/BUILD.gn ++++ b/ui/gfx/range/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-component("range") { ++import("//build/config/jumbo.gni") ++ ++jumbo_component("range") { + sources = [ + "gfx_range_export.h", + "range.cc", +diff --git a/ui/gfx/x/BUILD.gn b/ui/gfx/x/BUILD.gn +index 19a858a8fd..8e62fd4989 100644 +--- a/ui/gfx/x/BUILD.gn ++++ b/ui/gfx/x/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//build/config/ozone.gni") + import("//build/config/ui.gni") + import("//tools/generate_library_loader/generate_library_loader.gni") +@@ -150,7 +151,7 @@ source_set("build_xprotos") { + ] + } + +-component("x") { ++jumbo_component("x") { + output_name = "gfx_x11" + + sources = [ +diff --git a/ui/gl/BUILD.gn b/ui/gl/BUILD.gn +index debd258f40..9766f2bc72 100644 +--- a/ui/gl/BUILD.gn ++++ b/ui/gl/BUILD.gn +@@ -6,6 +6,7 @@ import("//build/buildflag_header.gni") + import("//build/config/cast.gni") + import("//build/config/chrome_build.gni") + import("//build/config/chromeos/ui_mode.gni") ++import("//build/config/jumbo.gni") + import("//build/config/linux/pkg_config.gni") + import("//build/config/ozone.gni") + import("//build/config/ui.gni") +@@ -46,7 +47,7 @@ config("gl_config") { + } + } + +-component("gl") { ++jumbo_component("gl") { + output_name = "gl_wrapper" # Avoid colliding with OS X"s libGL.dylib. + + sources = [ +@@ -441,7 +442,7 @@ if (is_mac) { + } + } + +-static_library("gl_unittest_utils") { ++jumbo_static_library("gl_unittest_utils") { + testonly = true + sources = [ + "egl_bindings_autogen_mock.cc", +@@ -467,7 +468,7 @@ static_library("gl_unittest_utils") { + ] + } + +-static_library("test_support") { ++jumbo_static_library("test_support") { + testonly = true + sources = [ + "test/gl_surface_test_support.cc", +diff --git a/ui/gl/init/BUILD.gn b/ui/gl/init/BUILD.gn +index 33d87dacc5..f8fd6c7171 100644 +--- a/ui/gl/init/BUILD.gn ++++ b/ui/gl/init/BUILD.gn +@@ -2,10 +2,11 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//ui/gl/features.gni") + +-component("init") { ++jumbo_component("init") { + output_name = "gl_init" + + public = [ +diff --git a/ui/gtk/BUILD.gn b/ui/gtk/BUILD.gn +index 24f3289316..c547f43ebf 100644 +--- a/ui/gtk/BUILD.gn ++++ b/ui/gtk/BUILD.gn +@@ -4,6 +4,7 @@ + + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//build/config/linux/gtk/gtk.gni") + import("//build/config/linux/pkg_config.gni") + import("//build/config/ozone.gni") +@@ -68,10 +69,9 @@ generate_stubs("gtk_stubs") { + logging_include = "ui/gtk/log_noop.h" + } + +-component("gtk") { ++jumbo_component("gtk") { + visibility = [ "//ui/linux:linux_ui_factory" ] + public = [ "gtk_ui_factory.h" ] +- + sources = [ + "gtk_color_mixers.cc", + "gtk_color_mixers.h", +diff --git a/ui/latency/BUILD.gn b/ui/latency/BUILD.gn +index 290ff8f52f..f2142aab00 100644 +--- a/ui/latency/BUILD.gn ++++ b/ui/latency/BUILD.gn +@@ -3,6 +3,7 @@ + # found in the LICENSE file. + + import("//build/buildflag_header.gni") ++import("//build/config/jumbo.gni") + import("//testing/test.gni") + + declare_args() { +@@ -16,7 +17,7 @@ buildflag_header("jank_tracker_for_experiments_buildflags") { + flags = [ "JANK_TRACKER_FOR_EXPERIMENTS=$use_jank_tracker_for_experiments" ] + } + +-source_set("latency") { ++jumbo_source_set("latency") { + sources = [ + "latency_info.cc", + "latency_info.h", +@@ -43,7 +44,7 @@ source_set("latency") { + ] + } + +-source_set("test_support") { ++jumbo_source_set("test_support") { + testonly = true + sources = [ "latency_info_test_support.cc" ] + +diff --git a/ui/message_center/BUILD.gn b/ui/message_center/BUILD.gn +index 651cfec4f5..be15900b9a 100644 +--- a/ui/message_center/BUILD.gn ++++ b/ui/message_center/BUILD.gn +@@ -3,6 +3,7 @@ + # found in the LICENSE file. + + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//components/vector_icons/vector_icons.gni") + import("//testing/test.gni") +@@ -23,7 +24,7 @@ aggregate_vector_icons("message_center_vector_icons") { + } + + # TODO(msw|mukai|dewittj): Move ash-specific files: crbug.com/585175 +-component("message_center") { ++jumbo_component("message_center") { + deps = [ + "//base", + "//build:chromeos_buildflags", +diff --git a/ui/message_center/public/cpp/BUILD.gn b/ui/message_center/public/cpp/BUILD.gn +index 1e9e3ec8d9..33925d047f 100644 +--- a/ui/message_center/public/cpp/BUILD.gn ++++ b/ui/message_center/public/cpp/BUILD.gn +@@ -2,10 +2,11 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + + # C++ headers and sources that can be used outside message_center. +-component("cpp") { ++jumbo_component("cpp") { + output_name = "ui_message_center_cpp" + + sources = [ +diff --git a/ui/native_theme/BUILD.gn b/ui/native_theme/BUILD.gn +index 60f431fb5d..a32f9a4c36 100644 +--- a/ui/native_theme/BUILD.gn ++++ b/ui/native_theme/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//testing/test.gni") + +@@ -22,7 +23,7 @@ component("features") { + ] + } + +-component("native_theme") { ++jumbo_component("native_theme") { + sources = [ + "caption_style.cc", + "caption_style.h", +@@ -108,7 +109,7 @@ component("native_theme") { + } + + if (is_win) { +- component("native_theme_browser") { ++ jumbo_component("native_theme_browser") { + defines = [ "NATIVE_THEME_IMPLEMENTATION" ] + + # These files cannot work in the renderer on Windows. +@@ -130,11 +131,11 @@ if (is_win) { + libs = [ "uxtheme.lib" ] + } + } else { +- source_set("native_theme_browser") { ++ jumbo_source_set("native_theme_browser") { + } + } + +-source_set("test_support") { ++jumbo_source_set("test_support") { + testonly = true + + deps = [ +diff --git a/ui/ozone/BUILD.gn b/ui/ozone/BUILD.gn +index 4c1c77cce3..04cb437f62 100644 +--- a/ui/ozone/BUILD.gn ++++ b/ui/ozone/BUILD.gn +@@ -3,6 +3,7 @@ + # found in the LICENSE file. + + import("//build/buildflag_header.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ozone.gni") + import("//build/config/python.gni") + import("//build/config/ui.gni") +@@ -78,7 +79,7 @@ constructor_list_cc_file = "$target_gen_dir/constructor_list.cc" + + test_constructor_list_cc_file = "$target_gen_dir/test_constructor_list.cc" + +-component("ozone_base") { ++jumbo_component("ozone_base") { + sources = [ + "public/gl_ozone.h", + "public/gpu_platform_support_host.cc", +@@ -259,7 +260,7 @@ source_set("ozone_switches") { + ] + } + +-component("ozone") { ++jumbo_component("ozone") { + visibility = [] + visibility = [ "*" ] + public_deps = [ ":platform" ] +@@ -276,7 +277,7 @@ source_set("drm_modifiers_filter") { + visibility += [ "//gpu/vulkan" ] + } + +-source_set("test_support_internal") { ++jumbo_source_set("test_support_internal") { + testonly = true + + sources = [ +@@ -299,7 +300,7 @@ source_set("test_support_internal") { + public_deps = [ "//base/test:test_support" ] + } + +-static_library("ui_test_support") { ++jumbo_static_library("ui_test_support") { + visibility = [] + visibility = [ "//ui/views:test_support" ] + +@@ -335,7 +336,7 @@ source_set("ozone_interactive_ui_tests") { + deps = ozone_platform_interactive_ui_tests_sources + } + +-static_library("test_support") { ++jumbo_static_library("test_support") { + visibility = [] + visibility = [ + ":*", +diff --git a/ui/platform_window/stub/BUILD.gn b/ui/platform_window/stub/BUILD.gn +index 5f41949321..1d64d126b9 100644 +--- a/ui/platform_window/stub/BUILD.gn ++++ b/ui/platform_window/stub/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-component("stub") { ++import("//build/config/jumbo.gni") ++ ++jumbo_component("stub") { + output_name = "stub_window" + + deps = [ +diff --git a/ui/platform_window/win/BUILD.gn b/ui/platform_window/win/BUILD.gn +index e172d7b2b4..f57d6db0d7 100644 +--- a/ui/platform_window/win/BUILD.gn ++++ b/ui/platform_window/win/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-component("win") { ++import("//build/config/jumbo.gni") ++ ++jumbo_component("win") { + output_name = "win_window" + + deps = [ +diff --git a/ui/resources/BUILD.gn b/ui/resources/BUILD.gn +index 67a0edca7b..c86b02b1cb 100644 +--- a/ui/resources/BUILD.gn ++++ b/ui/resources/BUILD.gn +@@ -3,6 +3,7 @@ + # found in the LICENSE file. + + import("//build/config/chromeos/ui_mode.gni") ++import("//build/config/jumbo.gni") + import("//tools/grit/grit_rule.gni") + import("//tools/grit/repack.gni") + import("//ui/webui/webui_features.gni") +diff --git a/ui/shell_dialogs/BUILD.gn b/ui/shell_dialogs/BUILD.gn +index b14a028899..e2d38245c6 100644 +--- a/ui/shell_dialogs/BUILD.gn ++++ b/ui/shell_dialogs/BUILD.gn +@@ -3,6 +3,7 @@ + # found in the LICENSE file. + + import("//build/config/chromeos/ui_mode.gni") ++import("//build/config/jumbo.gni") + import("//build/config/features.gni") + import("//build/config/ui.gni") + import("//testing/test.gni") +@@ -14,7 +15,7 @@ if (is_mac) { + import("//build/config/mac/rules.gni") + } + +-component("shell_dialogs") { ++jumbo_component("shell_dialogs") { + sources = [ + "base_shell_dialog.cc", + "base_shell_dialog.h", +diff --git a/ui/snapshot/BUILD.gn b/ui/snapshot/BUILD.gn +index 2274897e30..6e2cc4d4ff 100644 +--- a/ui/snapshot/BUILD.gn ++++ b/ui/snapshot/BUILD.gn +@@ -2,10 +2,11 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//testing/test.gni") + +-component("snapshot") { ++jumbo_component("snapshot") { + sources = [ + "screenshot_grabber.cc", + "screenshot_grabber.h", +@@ -76,7 +77,7 @@ component("snapshot") { + } + } + +-source_set("snapshot_export") { ++jumbo_source_set("snapshot_export") { + sources = [ "snapshot_export.h" ] + visibility = [ ":*" ] + } +diff --git a/ui/surface/BUILD.gn b/ui/surface/BUILD.gn +index 531dbf1202..1d2751db6b 100644 +--- a/ui/surface/BUILD.gn ++++ b/ui/surface/BUILD.gn +@@ -2,9 +2,10 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + +-component("surface") { ++jumbo_component("surface") { + sources = [ + "surface_export.h", + "transport_dib.cc", +diff --git a/ui/touch_selection/BUILD.gn b/ui/touch_selection/BUILD.gn +index c72c37286b..92c8ad090f 100644 +--- a/ui/touch_selection/BUILD.gn ++++ b/ui/touch_selection/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//testing/test.gni") + +@@ -9,7 +10,7 @@ if (is_android) { + import("//build/config/android/rules.gni") + } + +-component("touch_selection") { ++jumbo_component("touch_selection") { + output_name = "ui_touch_selection" + + sources = [ +diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn +index 3600dd711f..677cb5c106 100644 +--- a/ui/views/BUILD.gn ++++ b/ui/views/BUILD.gn +@@ -5,6 +5,7 @@ + import("//build/buildflag_header.gni") + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ozone.gni") + import("//build/config/ui.gni") + import("//components/metrics/generate_histograms_variants_allowlist.gni") +@@ -72,7 +73,7 @@ buildflag_header("buildflags") { + ] + } + +-component("views") { ++jumbo_component("views") { + all_dependent_configs = [ ":flags" ] + + public = [ +@@ -976,7 +977,7 @@ component("views") { + } + + if (is_win || is_mac || is_linux || is_chromeos) { +- static_library("view_pixel_diff_test_support") { ++ jumbo_static_library("view_pixel_diff_test_support") { + testonly = true + sources = [ + "test/view_skia_gold_pixel_diff.cc", +@@ -995,7 +996,7 @@ if (is_win || is_mac || is_linux || is_chromeos) { + } + } + +-source_set("test_support") { ++jumbo_source_set("test_support") { + testonly = true + sources = [ + "animation/test/flood_fill_ink_drop_ripple_test_api.cc", +diff --git a/ui/views/controls/webview/BUILD.gn b/ui/views/controls/webview/BUILD.gn +index e3dd4fab3a..fbcdfd4da5 100644 +--- a/ui/views/controls/webview/BUILD.gn ++++ b/ui/views/controls/webview/BUILD.gn +@@ -2,9 +2,10 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//build/config/ozone.gni") + +-component("webview") { ++jumbo_component("webview") { + sources = [ + "unhandled_keyboard_event_handler.cc", + "unhandled_keyboard_event_handler.h", +diff --git a/ui/views/examples/BUILD.gn b/ui/views/examples/BUILD.gn +index 4114081040..319d44dda2 100644 +--- a/ui/views/examples/BUILD.gn ++++ b/ui/views/examples/BUILD.gn +@@ -3,11 +3,12 @@ + # found in the LICENSE file. + + import("//build/config/chromeos/ui_mode.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//testing/test.gni") + import("//tools/grit/grit_rule.gni") + +-component("views_examples_lib") { ++jumbo_component("views_examples_lib") { + testonly = true + + sources = [ +@@ -231,7 +232,7 @@ executable("views_examples") { + ] + } + +-component("views_examples_with_content_lib") { ++jumbo_component("views_examples_with_content_lib") { + testonly = true + sources = [ + "examples_window_with_content.cc", +diff --git a/ui/views_content_client/BUILD.gn b/ui/views_content_client/BUILD.gn +index e01d44b0cc..11684632b6 100644 +--- a/ui/views_content_client/BUILD.gn ++++ b/ui/views_content_client/BUILD.gn +@@ -3,9 +3,10 @@ + # found in the LICENSE file. + + import("//build/config/chromeos/ui_mode.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + +-component("views_content_client") { ++jumbo_component("views_content_client") { + testonly = true + sources = [ + "views_content_browser_client.cc", +diff --git a/ui/web_dialogs/BUILD.gn b/ui/web_dialogs/BUILD.gn +index a8dda147dd..9718e6bfb6 100644 +--- a/ui/web_dialogs/BUILD.gn ++++ b/ui/web_dialogs/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-component("web_dialogs") { ++import("//build/config/jumbo.gni") ++ ++jumbo_component("web_dialogs") { + sources = [ + "web_dialog_delegate.cc", + "web_dialog_delegate.h", +@@ -31,7 +33,7 @@ component("web_dialogs") { + } + } + +-static_library("test_support") { ++jumbo_static_library("test_support") { + sources = [ + "test/test_web_contents_handler.cc", + "test/test_web_contents_handler.h", +diff --git a/ui/wm/BUILD.gn b/ui/wm/BUILD.gn +index 9f5cd35373..3a87973389 100644 +--- a/ui/wm/BUILD.gn ++++ b/ui/wm/BUILD.gn +@@ -3,13 +3,14 @@ + # found in the LICENSE file. + + import("//build/config/chromeos/ui_mode.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//testing/test.gni") + import("//ui/base/ui_features.gni") + + assert(use_aura) + +-component("wm") { ++jumbo_component("wm") { + output_name = "ui_wm" + sources = [ + "core/accelerator_delegate.h", +@@ -104,7 +105,7 @@ component("wm") { + } + } + +-static_library("test_support") { ++jumbo_static_library("test_support") { + testonly = true + sources = [ + "test/testing_cursor_client_observer.cc", +diff --git a/ui/wm/public/BUILD.gn b/ui/wm/public/BUILD.gn +index e27ef11fd4..15b7e911c9 100644 +--- a/ui/wm/public/BUILD.gn ++++ b/ui/wm/public/BUILD.gn +@@ -2,11 +2,12 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + + assert(use_aura) + +-component("public") { ++jumbo_component("public") { + output_name = "wm_public" + + public = [ +diff --git a/v8/BUILD.gn b/v8/BUILD.gn +index bc087fd6fe..ee5dbe8ba4 100644 +--- a/v8/BUILD.gn ++++ b/v8/BUILD.gn +@@ -7,6 +7,7 @@ import("//build/config/arm.gni") + import("//build/config/coverage/coverage.gni") + import("//build/config/dcheck_always_on.gni") + import("//build/config/host_byteorder.gni") ++import("//build/config/jumbo.gni") + import("//build/config/mips.gni") + import("//build/config/riscv.gni") + import("//build/config/sanitizers/sanitizers.gni") +@@ -2886,6 +2887,17 @@ v8_source_set("v8_initializers") { + ] + } + ++ jumbo_excluded_sources = [ ++ # TODO(mostynb@vewd.com): don't exclude these http://crbug.com/752428 ++ "src/builtins/builtins-async-iterator-gen.cc", ++ "src/builtins/builtins-async-generator-gen.cc", ++ ++ # These source files take an unusually large amount of time to ++ # compile. Build them separately to avoid bottlenecks. ++ "src/builtins/builtins-regexp-gen.cc", ++ "src/codegen/code-stub-assembler.cc", ++ ] ++ + if (v8_current_cpu == "x86") { + sources += [ + ### gcmole(ia32) ### +@@ -5718,6 +5730,23 @@ v8_source_set("v8_base_without_compiler") { + sources += [ "src/heap/reference-summarizer.cc" ] + } + ++ jumbo_excluded_sources = [ ++ # TODO(mostynb@vewd.com): don't exclude these http://crbug.com/752428 ++ "src/profiler/heap-snapshot-generator.cc", # Macro clash in mman-linux.h ++ "src/heap/local-heap.cc", ++ "src/heap/safepoint.cc", ++ "src/objects/js-display-names.cc", ++ "src/objects/js-relative-time-format.cc", ++ ++ # These source files take an unusually large amount of time to ++ # compile. Build them separately to avoid bottlenecks. ++ "src/api/api.cc", ++ "src/heap/heap.cc", ++ "src/objects/elements.cc", ++ "src/objects/objects.cc", ++ "src/parsing/parser.cc", ++ ] ++ + if (v8_current_cpu == "x86") { + sources += [ + ### gcmole(ia32) ### +@@ -5825,6 +5854,11 @@ v8_source_set("v8_base_without_compiler") { + if (is_win) { + sources += [ "src/diagnostics/unwinding-info-win64.cc" ] + } ++ jumbo_excluded_sources += [ ++ # TODO(mostynb@vewd.com): fix this code so it doesn't need ++ # to be excluded, see the comments inside. ++ "src/codegen/arm64/instructions-arm64-constants.cc", ++ ] + } else if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") { + sources += [ + ### gcmole(mips64el) ### +diff --git a/v8/gni/v8.gni b/v8/gni/v8.gni +index 72381c75ca..57a0d1522a 100644 +--- a/v8/gni/v8.gni ++++ b/v8/gni/v8.gni +@@ -4,6 +4,7 @@ + + import("//build/config/chrome_build.gni") + import("//build/config/compiler/pgo/pgo.gni") ++import("//build/config/jumbo.gni") + import("//build/config/gclient_args.gni") + import("//build/config/ios/config.gni") + import("//build/config/sanitizers/sanitizers.gni") +@@ -285,9 +286,9 @@ template("v8_source_set") { + defined(v8_static_library) && v8_static_library && is_win) { + link_target_type = "split_static_library" + } else if (defined(v8_static_library) && v8_static_library) { +- link_target_type = "static_library" ++ link_target_type = "jumbo_static_library" + } else { +- link_target_type = "source_set" ++ link_target_type = "jumbo_source_set" + } + target(link_target_type, target_name) { + forward_variables_from(invoker, +@@ -306,7 +307,7 @@ template("v8_source_set") { + } + + template("v8_header_set") { +- source_set(target_name) { ++ jumbo_source_set(target_name) { + forward_variables_from(invoker, "*", [ "configs" ]) + configs -= v8_remove_configs + configs += v8_add_configs +diff --git a/v8/infra/mb/mb_config.pyl b/v8/infra/mb/mb_config.pyl +index c9b20e7d64..802abdacd6 100644 +--- a/v8/infra/mb/mb_config.pyl ++++ b/v8/infra/mb/mb_config.pyl +@@ -81,6 +81,11 @@ + 'V8 Linux64 - shared - builder': 'release_x64_shared_verify_heap', + 'V8 Linux64 - verify csa - builder': 'release_x64_verify_csa', + 'V8 Linux64 - no wasm - builder': 'release_x64_webassembly_disabled', ++ # Jumbo. ++ 'V8 Linux64 Jumbo': 'release_x64_jumbo', ++ 'V8 Linux64 Jumbo - debug': 'debug_x64_jumbo', ++ 'V8 Linux64 Jumbo - limited': 'release_x64_jumbo_limited', ++ 'V8 Linux64 Jumbo - limited - debug': 'debug_x64_jumbo_limited', + # Windows. + 'V8 Win32 - builder': 'release_x86_minimal_symbols', + 'V8 Win32 - builder (goma cache silo)': 'release_x86', +@@ -595,6 +600,14 @@ + 'release_bot', 'x64', 'ios_simulator'], + 'release_x64_internal': [ + 'release_bot', 'x64', 'v8_snapshot_internal'], ++ 'release_x64_jumbo': [ ++ 'release_bot', 'x64', 'jumbo'], ++ 'release_x64_jumbo_trybot': [ ++ 'release_trybot', 'x64', 'jumbo'], ++ 'release_x64_jumbo_limited': [ ++ 'release_bot', 'x64', 'jumbo_limited'], ++ 'release_x64_jumbo_limited_trybot': [ ++ 'release_trybot', 'x64', 'jumbo_limited'], + 'release_x64_minimal_symbols': [ + 'release_bot', 'x64', 'minimal_symbols'], + 'release_x64_minimal_symbols_reclient': [ +@@ -669,6 +682,10 @@ + 'debug_bot', 'x64', 'v8_check_header_includes'], + 'debug_x64_no_shared_cage': [ + 'debug_bot', 'x64', 'v8_disable_pointer_compression_shared_cage'], ++ 'debug_x64_jumbo': [ ++ 'debug_bot', 'x64', 'jumbo'], ++ 'debug_x64_jumbo_limited': [ ++ 'debug_bot', 'x64', 'jumbo_limited'], + 'debug_x64_minimal_symbols': [ + 'debug_bot', 'x64', 'minimal_symbols'], + 'debug_x64_non_default_cppgc': [ +@@ -878,6 +895,14 @@ + 'gn_args': 'target_cpu="x64" target_os="ios"', + }, + ++ 'jumbo': { ++ 'gn_args': 'use_jumbo_build=true', ++ }, ++ ++ 'jumbo_limited': { ++ 'gn_args': 'use_jumbo_build=true jumbo_file_merge_limit=50', ++ }, ++ + 'lld': { + 'gn_args': 'use_lld=true', + }, +diff --git a/v8/test/cctest/BUILD.gn b/v8/test/cctest/BUILD.gn +index 83b2ce1484..8493f6da98 100644 +--- a/v8/test/cctest/BUILD.gn ++++ b/v8/test/cctest/BUILD.gn +@@ -212,6 +212,16 @@ v8_source_set("cctest_sources") { + ] + } + ++ if (use_jumbo_build) { ++ jumbo_excluded_sources = [ ++ # TODO(mostynb@opera.com): figure out the jumbo issues with these source ++ # files, and include them in jumbo compilation units. ++ "interpreter/bytecode-expectations-printer.cc", ++ "interpreter/test-bytecode-generator.cc", ++ "test-api.cc", ++ ] ++ } ++ + if (v8_current_cpu == "arm") { + sources += [ + ### gcmole(arm) ### +diff --git a/v8/test/unittests/BUILD.gn b/v8/test/unittests/BUILD.gn +index 6406cb1466..bafdf00d66 100644 +--- a/v8/test/unittests/BUILD.gn ++++ b/v8/test/unittests/BUILD.gn +@@ -575,6 +575,15 @@ v8_source_set("v8_unittests_sources") { + ] + } + ++ if (use_jumbo_build) { ++ jumbo_excluded_sources = [ ++ # TODO(mostynb@opera.com): figure out how to make this build in both ++ # modes. Template issues on windows if we add a functional_unittest ++ # namespace as with the other files. ++ "base/functional-unittest.cc", ++ ] ++ } ++ + if (v8_enable_runtime_call_stats) { + sources += [ "logging/runtime-call-stats-unittest.cc" ] + } diff --git a/tur/chromium-jumbo/0002-reland-jumbo-build-2.patch b/tur/chromium-jumbo/0002-reland-jumbo-build-2.patch new file mode 100644 index 000000000..3f26138d8 --- /dev/null +++ b/tur/chromium-jumbo/0002-reland-jumbo-build-2.patch @@ -0,0 +1,9934 @@ +https://github.com/qt/qtwebengine-chromium/commit/0e971d4a74288d5fa8b3dbebc2cc6423b034ed4a + +diff --git a/base/BUILD.gn b/base/BUILD.gn +index 779a4f0b0e..3cabbdc5bf 100644 +--- a/base/BUILD.gn ++++ b/base/BUILD.gn +@@ -1001,6 +1001,10 @@ jumbo_component("base") { + ] + } + ++ jumbo_excluded_sources = [ ++ "logging.cc", ++ ] ++ + if (is_linux || is_chromeos) { + sources += [ + "debug/proc_maps_linux.cc", +@@ -1019,6 +1023,7 @@ jumbo_component("base") { + "threading/thread_type_delegate.cc", + "threading/thread_type_delegate.h", + ] ++ jumbo_excluded_sources += [ "process/memory_linux.cc" ] + } + + if (is_chromeos) { +@@ -1913,6 +1918,11 @@ jumbo_component("base") { + "win/wrapped_window_proc.h", + ] + ++ # winternl.h and NTSecAPI.h have different definitions of UNICODE_STRING. ++ # There's only one client of NTSecAPI.h in base but several of winternl.h, ++ # so exclude the NTSecAPI.h one. ++ jumbo_excluded_sources += [ "rand_util_win.cc" ] ++ + deps += [ "//base/win:base_win_buildflags" ] + + if (com_init_check_hook_disabled) { +diff --git a/base/metrics/sample_map.cc b/base/metrics/sample_map.cc +index 427db0cce2..92d597cb12 100644 +--- a/base/metrics/sample_map.cc ++++ b/base/metrics/sample_map.cc +@@ -20,14 +20,14 @@ namespace { + // to that of the iterator for PersistentSampleMap but with different data + // structures. Changes here likely need to be duplicated there. + template +-class IteratorTemplate : public SampleCountIterator { ++class IteratorTemplateSM : public SampleCountIterator { + public: +- explicit IteratorTemplate(T& sample_counts) ++ explicit IteratorTemplateSM(T& sample_counts) + : iter_(sample_counts.begin()), end_(sample_counts.end()) { + SkipEmptyBuckets(); + } + +- ~IteratorTemplate() override; ++ ~IteratorTemplateSM() override; + + // SampleCountIterator: + bool Done() const override { return iter_ == end_; } +@@ -51,13 +51,13 @@ class IteratorTemplate : public SampleCountIterator { + const I end_; + }; + +-typedef std::map SampleToCountMap; +-typedef IteratorTemplate ++typedef std::map SampleToCountMapSM; ++typedef IteratorTemplateSM + SampleMapIterator; + + template <> +-SampleMapIterator::~IteratorTemplate() = default; ++SampleMapIterator::~IteratorTemplateSM() = default; + + // Get() for an iterator of a SampleMap. + template <> +@@ -73,11 +73,11 @@ void SampleMapIterator::Get(Sample* min, int64_t* max, Count* count) { + *count = iter_->second; + } + +-typedef IteratorTemplate ++typedef IteratorTemplateSM + ExtractingSampleMapIterator; + + template <> +-ExtractingSampleMapIterator::~IteratorTemplate() { ++ExtractingSampleMapIterator::~IteratorTemplateSM() { + // Ensure that the user has consumed all the samples in order to ensure no + // samples are lost. + DCHECK(Done()); +diff --git a/base/metrics/sample_vector.cc b/base/metrics/sample_vector.cc +index 8c45ddbccb..9b83989dcb 100644 +--- a/base/metrics/sample_vector.cc ++++ b/base/metrics/sample_vector.cc +@@ -34,15 +34,15 @@ namespace { + + // An iterator for sample vectors. + template +-class IteratorTemplate : public SampleCountIterator { ++class IteratorTemplateSV : public SampleCountIterator { + public: +- IteratorTemplate(base::span counts, const BucketRanges* bucket_ranges) ++ IteratorTemplateSV(base::span counts, const BucketRanges* bucket_ranges) + : counts_(counts), bucket_ranges_(bucket_ranges) { + DCHECK_GE(bucket_ranges_->bucket_count(), counts_.size()); + SkipEmptyBuckets(); + } + +- ~IteratorTemplate() override; ++ ~IteratorTemplateSV() override; + + // SampleCountIterator: + bool Done() const override { return index_ >= counts_.size(); } +@@ -83,14 +83,14 @@ class IteratorTemplate : public SampleCountIterator { + size_t index_ = 0; + }; + +-using SampleVectorIterator = IteratorTemplate; ++using SampleVectorIteratorSV = IteratorTemplateSV; + + template <> +-SampleVectorIterator::~IteratorTemplate() = default; ++SampleVectorIteratorSV::~IteratorTemplateSV() = default; + + // Get() for an iterator of a SampleVector. + template <> +-void SampleVectorIterator::Get(HistogramBase::Sample* min, ++void SampleVectorIteratorSV::Get(HistogramBase::Sample* min, + int64_t* max, + HistogramBase::Count* count) { + DCHECK(!Done()); +@@ -100,10 +100,10 @@ void SampleVectorIterator::Get(HistogramBase::Sample* min, + } + + using ExtractingSampleVectorIterator = +- IteratorTemplate; ++ IteratorTemplateSV; + + template <> +-ExtractingSampleVectorIterator::~IteratorTemplate() { ++ExtractingSampleVectorIterator::~IteratorTemplateSV() { + // Ensure that the user has consumed all the samples in order to ensure no + // samples are lost. + DCHECK(Done()); +@@ -227,12 +227,12 @@ std::unique_ptr SampleVectorBase::Iterator() const { + + // Handle the multi-sample case. + if (counts() || MountExistingCountsStorage()) { +- return std::make_unique( ++ return std::make_unique( + base::make_span(counts(), counts_size()), bucket_ranges_); + } + + // And the no-value case. +- return std::make_unique( ++ return std::make_unique( + base::span(), bucket_ranges_); + } + +diff --git a/base/sampling_heap_profiler/sampling_heap_profiler.cc b/base/sampling_heap_profiler/sampling_heap_profiler.cc +index 324378ef37..e74841b00a 100644 +--- a/base/sampling_heap_profiler/sampling_heap_profiler.cc ++++ b/base/sampling_heap_profiler/sampling_heap_profiler.cc +@@ -39,18 +39,18 @@ constexpr uint32_t kMaxStackEntries = 256; + + namespace { + +-struct ThreadLocalData { ++struct ThreadLocalData_SHP { + const char* thread_name = nullptr; + }; + +-ThreadLocalData* GetThreadLocalData() { ++ThreadLocalData_SHP* GetThreadLocalData_SHP() { + #if USE_LOCAL_TLS_EMULATION() + static base::NoDestructor< +- base::allocator::dispatcher::ThreadLocalStorage> ++ base::allocator::dispatcher::ThreadLocalStorage> + thread_local_data("sampling_heap_profiler"); + return thread_local_data->GetThreadLocalData(); + #else +- static thread_local ThreadLocalData thread_local_data; ++ static thread_local ThreadLocalData_SHP thread_local_data; + return &thread_local_data; + #endif + } +@@ -99,7 +99,7 @@ const char* GetAndLeakThreadName() { + } + + const char* UpdateAndGetThreadName(const char* name) { +- ThreadLocalData* const thread_local_data = GetThreadLocalData(); ++ ThreadLocalData_SHP* const thread_local_data = GetThreadLocalData_SHP(); + if (name) + thread_local_data->thread_name = name; + if (!thread_local_data->thread_name) { +@@ -322,7 +322,7 @@ std::vector SamplingHeapProfiler::GetStrings() { + + // static + void SamplingHeapProfiler::Init() { +- GetThreadLocalData(); ++ GetThreadLocalData_SHP(); + PoissonAllocationSampler::Init(); + } + +diff --git a/base/task/sequence_manager/sequence_manager_impl.cc b/base/task/sequence_manager/sequence_manager_impl.cc +index 142bbad2ed..7fe962a084 100644 +--- a/base/task/sequence_manager/sequence_manager_impl.cc ++++ b/base/task/sequence_manager/sequence_manager_impl.cc +@@ -159,7 +159,7 @@ char* PrependHexAddress(char* output, const void* address) { + std::atomic_bool g_record_crash_keys = false; + + #if BUILDFLAG(IS_WIN) +-bool g_explicit_high_resolution_timer_win = true; ++bool g_explicit_high_resolution_timer_win_smi = true; + #endif // BUILDFLAG(IS_WIN) + + } // namespace +@@ -297,7 +297,7 @@ void SequenceManagerImpl::InitializeFeatures() { + MessagePump::InitializeFeatures(); + ThreadControllerWithMessagePumpImpl::InitializeFeatures(); + #if BUILDFLAG(IS_WIN) +- g_explicit_high_resolution_timer_win = ++ g_explicit_high_resolution_timer_win_smi = + FeatureList::IsEnabled(kExplicitHighResolutionTimerWin); + #endif // BUILDFLAG(IS_WIN) + +@@ -760,7 +760,7 @@ bool SequenceManagerImpl::HasPendingHighResolutionTasks() { + // Only consider high-res tasks in the |wake_up_queue| (ignore the + // |non_waking_wake_up_queue|). + #if BUILDFLAG(IS_WIN) +- if (g_explicit_high_resolution_timer_win) { ++ if (g_explicit_high_resolution_timer_win_smi) { + absl::optional wake_up = + main_thread_only().wake_up_queue->GetNextDelayedWakeUp(); + if (!wake_up) +diff --git a/base/task/sequence_manager/task_order.cc b/base/task/sequence_manager/task_order.cc +index b2bdae4e9e..1e9635b289 100644 +--- a/base/task/sequence_manager/task_order.cc ++++ b/base/task/sequence_manager/task_order.cc +@@ -17,7 +17,7 @@ namespace { + // Returns true iff `task_order1` Comparator{} `task_order2`. Used to + // implement other comparison operators. + template +-static bool Compare(const base::sequence_manager::TaskOrder& task_order1, ++static bool CompareTO(const base::sequence_manager::TaskOrder& task_order1, + const base::sequence_manager::TaskOrder& task_order2) { + Comparator cmp{}; + +@@ -60,19 +60,19 @@ TaskOrder& TaskOrder::operator=(const TaskOrder& other) = default; + TaskOrder::~TaskOrder() = default; + + bool TaskOrder::operator>(const TaskOrder& other) const { +- return Compare>(*this, other); ++ return CompareTO>(*this, other); + } + + bool TaskOrder::operator<(const TaskOrder& other) const { +- return Compare>(*this, other); ++ return CompareTO>(*this, other); + } + + bool TaskOrder::operator<=(const TaskOrder& other) const { +- return Compare>(*this, other); ++ return CompareTO>(*this, other); + } + + bool TaskOrder::operator>=(const TaskOrder& other) const { +- return Compare>(*this, other); ++ return CompareTO>(*this, other); + } + + bool TaskOrder::operator==(const TaskOrder& other) const { +diff --git a/base/task/sequence_manager/task_queue_impl.cc b/base/task/sequence_manager/task_queue_impl.cc +index cb18ba61b8..8c509391e9 100644 +--- a/base/task/sequence_manager/task_queue_impl.cc ++++ b/base/task/sequence_manager/task_queue_impl.cc +@@ -52,7 +52,7 @@ std::atomic g_max_precise_delay{kDefaultMaxPreciseDelay}; + #if BUILDFLAG(IS_WIN) + // An atomic is used here because the flag is queried from other threads when + // tasks are posted cross-thread, which can race with its initialization. +-std::atomic_bool g_explicit_high_resolution_timer_win{true}; ++std::atomic_bool g_explicit_high_resolution_timer_win_tqi{true}; + #endif // BUILDFLAG(IS_WIN) + + void RunTaskSynchronously(const AssociatedThreadId* associated_thread, +@@ -196,7 +196,7 @@ bool TaskQueueImpl::TaskRunner::RunsTasksInCurrentSequence() const { + void TaskQueueImpl::InitializeFeatures() { + g_max_precise_delay = kMaxPreciseDelay.Get(); + #if BUILDFLAG(IS_WIN) +- g_explicit_high_resolution_timer_win.store( ++ g_explicit_high_resolution_timer_win_tqi.store( + FeatureList::IsEnabled(kExplicitHighResolutionTimerWin), + std::memory_order_relaxed); + #endif // BUILDFLAG(IS_WIN) +@@ -1050,7 +1050,7 @@ Task TaskQueueImpl::MakeDelayedTask(PostedTask delayed_task, + WakeUpResolution resolution = WakeUpResolution::kLow; + #if BUILDFLAG(IS_WIN) + const bool explicit_high_resolution_timer_win = +- g_explicit_high_resolution_timer_win.load(std::memory_order_relaxed); ++ g_explicit_high_resolution_timer_win_tqi.load(std::memory_order_relaxed); + #endif // BUILDFLAG(IS_WIN) + if (absl::holds_alternative( + delayed_task.delay_or_delayed_run_time)) { +diff --git a/base/task/single_thread_task_runner.cc b/base/task/single_thread_task_runner.cc +index 2b0ea0fe8e..995ad954c2 100644 +--- a/base/task/single_thread_task_runner.cc ++++ b/base/task/single_thread_task_runner.cc +@@ -21,18 +21,18 @@ namespace base { + namespace { + + ABSL_CONST_INIT thread_local SingleThreadTaskRunner::CurrentDefaultHandle* +- current_default_handle = nullptr; ++ current_default_handleSTTR = nullptr; + + // This function can be removed, and the calls below replaced with direct + // variable accesses, once the MSAN workaround is not necessary. +-SingleThreadTaskRunner::CurrentDefaultHandle* GetCurrentDefaultHandle() { ++SingleThreadTaskRunner::CurrentDefaultHandle* GetCurrentDefaultHandle2() { + // Workaround false-positive MSAN use-of-uninitialized-value on + // thread_local storage for loaded libraries: + // https://github.com/google/sanitizers/issues/1265 +- MSAN_UNPOISON(¤t_default_handle, ++ MSAN_UNPOISON(¤t_default_handleSTTR, + sizeof(SingleThreadTaskRunner::CurrentDefaultHandle*)); + +- return current_default_handle; ++ return current_default_handleSTTR; + } + + } // namespace +@@ -40,7 +40,7 @@ SingleThreadTaskRunner::CurrentDefaultHandle* GetCurrentDefaultHandle() { + // static + const scoped_refptr& + SingleThreadTaskRunner::GetCurrentDefault() { +- const auto* const handle = GetCurrentDefaultHandle(); ++ const auto* const handle = GetCurrentDefaultHandle2(); + CHECK(handle) + << "Error: This caller requires a single-threaded context (i.e. the " + "current task needs to run from a SingleThreadTaskRunner). If you're " +@@ -56,12 +56,12 @@ SingleThreadTaskRunner::GetCurrentDefault() { + + // static + bool SingleThreadTaskRunner::HasCurrentDefault() { +- return !!GetCurrentDefaultHandle(); ++ return !!GetCurrentDefaultHandle2(); + } + + SingleThreadTaskRunner::CurrentDefaultHandle::CurrentDefaultHandle( + scoped_refptr task_runner) +- : resetter_(¤t_default_handle, this, nullptr), ++ : resetter_(¤t_default_handleSTTR, this, nullptr), + task_runner_(std::move(task_runner)), + sequenced_task_runner_current_default_(task_runner_) { + DCHECK(task_runner_->BelongsToCurrentThread()); +@@ -69,7 +69,7 @@ SingleThreadTaskRunner::CurrentDefaultHandle::CurrentDefaultHandle( + + SingleThreadTaskRunner::CurrentDefaultHandle::~CurrentDefaultHandle() { + DCHECK(task_runner_->BelongsToCurrentThread()); +- DCHECK_EQ(GetCurrentDefaultHandle(), this); ++ DCHECK_EQ(GetCurrentDefaultHandle2(), this); + } + + SingleThreadTaskRunner::CurrentHandleOverride::CurrentHandleOverride( +@@ -92,7 +92,7 @@ SingleThreadTaskRunner::CurrentHandleOverride::CurrentHandleOverride( + #if DCHECK_IS_ON() + expected_task_runner_before_restore_ = overriding_task_runner.get(); + #endif +- auto* const handle = GetCurrentDefaultHandle(); ++ auto* const handle = GetCurrentDefaultHandle2(); + SequencedTaskRunner::SetCurrentDefaultHandleTaskRunner( + handle->sequenced_task_runner_current_default_, overriding_task_runner); + handle->task_runner_.swap(overriding_task_runner); +@@ -108,7 +108,7 @@ SingleThreadTaskRunner::CurrentHandleOverride::CurrentHandleOverride( + + SingleThreadTaskRunner::CurrentHandleOverride::~CurrentHandleOverride() { + if (task_runner_to_restore_) { +- auto* const handle = GetCurrentDefaultHandle(); ++ auto* const handle = GetCurrentDefaultHandle2(); + #if DCHECK_IS_ON() + DCHECK_EQ(expected_task_runner_before_restore_, handle->task_runner_.get()) + << "Nested overrides must expire their " +diff --git a/base/task/thread_pool/job_task_source_old.cc b/base/task/thread_pool/job_task_source_old.cc +index 5fb4856bd3..060e7d26c4 100644 +--- a/base/task/thread_pool/job_task_source_old.cc ++++ b/base/task/thread_pool/job_task_source_old.cc +@@ -28,13 +28,13 @@ namespace internal { + namespace { + + // Capped to allow assigning task_ids from a bitfield. +-constexpr size_t kMaxWorkersPerJob = 32; ++constexpr size_t kMaxWorkersPerJobJTSO = 32; + static_assert( +- kMaxWorkersPerJob <= ++ kMaxWorkersPerJobJTSO <= + std::numeric_limits< + std::invoke_result::type>::max(), +- "AcquireTaskId return type isn't big enough to fit kMaxWorkersPerJob"); ++ "AcquireTaskId return type isn't big enough to fit kMaxWorkersPerJobJTSO"); + + } // namespace + +@@ -308,12 +308,12 @@ size_t JobTaskSourceOld::GetMaxConcurrency() const { + + size_t JobTaskSourceOld::GetMaxConcurrency(size_t worker_count) const { + return std::min(max_concurrency_callback_.Run(worker_count), +- kMaxWorkersPerJob); ++ kMaxWorkersPerJobJTSO); + } + + uint8_t JobTaskSourceOld::AcquireTaskId() { +- static_assert(kMaxWorkersPerJob <= sizeof(assigned_task_ids_) * 8, +- "TaskId bitfield isn't big enough to fit kMaxWorkersPerJob."); ++ static_assert(kMaxWorkersPerJobJTSO <= sizeof(assigned_task_ids_) * 8, ++ "TaskId bitfield isn't big enough to fit kMaxWorkersPerJobJTSO."); + uint32_t assigned_task_ids = + assigned_task_ids_.load(std::memory_order_relaxed); + uint32_t new_assigned_task_ids = 0; +diff --git a/base/task/thread_pool/thread_group_impl.cc b/base/task/thread_pool/thread_group_impl.cc +index c8e906d6b4..dab9496bfe 100644 +--- a/base/task/thread_pool/thread_group_impl.cc ++++ b/base/task/thread_pool/thread_group_impl.cc +@@ -24,7 +24,7 @@ namespace internal { + + namespace { + +-constexpr size_t kMaxNumberOfWorkers = 256; ++constexpr size_t kMaxNumberOfWorkers2 = 256; + + } // namespace + +@@ -595,10 +595,10 @@ size_t ThreadGroupImpl::NumberOfIdleWorkersForTesting() const { + + void ThreadGroupImpl::MaintainAtLeastOneIdleWorkerLockRequired( + ScopedCommandsExecutor* executor) { +- if (workers_.size() == kMaxNumberOfWorkers) { ++ if (workers_.size() == kMaxNumberOfWorkers2) { + return; + } +- DCHECK_LT(workers_.size(), kMaxNumberOfWorkers); ++ DCHECK_LT(workers_.size(), kMaxNumberOfWorkers2); + + if (!idle_workers_set_.IsEmpty()) { + return; +@@ -619,7 +619,7 @@ ThreadGroupImpl::CreateAndRegisterWorkerLockRequired( + ScopedCommandsExecutor* executor) { + DCHECK(!join_for_testing_started_); + DCHECK_LT(workers_.size(), max_tasks_); +- DCHECK_LT(workers_.size(), kMaxNumberOfWorkers); ++ DCHECK_LT(workers_.size(), kMaxNumberOfWorkers2); + DCHECK(idle_workers_set_.IsEmpty()); + + // WorkerThread needs |lock_| as a predecessor for its thread lock because in +diff --git a/base/trace_event/trace_log.cc b/base/trace_event/trace_log.cc +index 03e14fcd1c..ab4872eed8 100644 +--- a/base/trace_event/trace_log.cc ++++ b/base/trace_event/trace_log.cc +@@ -166,13 +166,13 @@ bool DefaultIsTraceEventArgsAllowlisted( + } + + #if BUILDFLAG(USE_PERFETTO_CLIENT_LIBRARY) +-class PerfettoProtoAppender ++class PerfettoProtoAppenderTL + : public base::trace_event::ConvertableToTraceFormat::ProtoAppender { + public: +- explicit PerfettoProtoAppender( ++ explicit PerfettoProtoAppenderTL( + perfetto::protos::pbzero::DebugAnnotation* proto) + : annotation_proto_(proto) {} +- ~PerfettoProtoAppender() override = default; ++ ~PerfettoProtoAppenderTL() override = default; + + // ProtoAppender implementation + void AddBuffer(uint8_t* begin, uint8_t* end) override { +@@ -194,7 +194,7 @@ class PerfettoProtoAppender + void AddConvertableToTraceFormat( + base::trace_event::ConvertableToTraceFormat* value, + perfetto::protos::pbzero::DebugAnnotation* annotation) { +- PerfettoProtoAppender proto_appender(annotation); ++ PerfettoProtoAppenderTL proto_appender(annotation); + if (value->AppendToProto(&proto_appender)) { + return; + } +diff --git a/build/config/jumbo.gni b/build/config/jumbo.gni +index dd8972423e..0253149088 100644 +--- a/build/config/jumbo.gni ++++ b/build/config/jumbo.gni +@@ -78,7 +78,7 @@ template("internal_jumbo_target") { + if (defined(invoker.never_build_jumbo) && invoker.never_build_jumbo) { + use_jumbo_build_for_target = false + } +- if (is_nacl_irt || is_nacl_nonsfi) { ++ if (is_nacl_irt) { + # The code is barely compatible with the nacl toolchain anymore and we + # don't want to stress it further with jumbo compilation units. + use_jumbo_build_for_target = false +diff --git a/cc/metrics/compositor_frame_reporter.cc b/cc/metrics/compositor_frame_reporter.cc +index 1392e85dc2..5435400e7c 100644 +--- a/cc/metrics/compositor_frame_reporter.cc ++++ b/cc/metrics/compositor_frame_reporter.cc +@@ -175,12 +175,12 @@ void ReportEventLatencyMetric( + } + } + +-constexpr char kTraceCategory[] = ++constexpr char kTraceCategory2[] = + "cc,benchmark," TRACE_DISABLED_BY_DEFAULT("devtools.timeline.frame"); + + bool IsTracingEnabled() { + bool enabled; +- TRACE_EVENT_CATEGORY_GROUP_ENABLED(kTraceCategory, &enabled); ++ TRACE_EVENT_CATEGORY_GROUP_ENABLED(kTraceCategory2, &enabled); + return enabled; + } + +@@ -1304,7 +1304,7 @@ void CompositorFrameReporter::ReportCompositorLatencyTraceEvents( + const auto trace_track = + perfetto::Track(base::trace_event::GetNextGlobalTraceId()); + TRACE_EVENT_BEGIN( +- kTraceCategory, "PipelineReporter", trace_track, args_.frame_time, ++ kTraceCategory2, "PipelineReporter", trace_track, args_.frame_time, + [&](perfetto::EventContext context) { + using perfetto::protos::pbzero::ChromeFrameReporter; + ChromeFrameReporter::State state; +@@ -1385,7 +1385,7 @@ void CompositorFrameReporter::ReportCompositorLatencyTraceEvents( + + if (stage.stage_type == StageType::kSendBeginMainFrameToCommit) { + TRACE_EVENT_BEGIN( +- kTraceCategory, perfetto::StaticString{stage_name}, trace_track, ++ kTraceCategory2, perfetto::StaticString{stage_name}, trace_track, + stage.start_time, [&](perfetto::EventContext context) { + DCHECK(processed_blink_breakdown_); + auto* reporter = +@@ -1435,7 +1435,7 @@ void CompositorFrameReporter::ReportCompositorLatencyTraceEvents( + } + }); + } else { +- TRACE_EVENT_BEGIN(kTraceCategory, perfetto::StaticString{stage_name}, ++ TRACE_EVENT_BEGIN(kTraceCategory2, perfetto::StaticString{stage_name}, + trace_track, stage.start_time); + } + +@@ -1449,16 +1449,16 @@ void CompositorFrameReporter::ReportCompositorLatencyTraceEvents( + if (start_time >= end_time) + continue; + const char* breakdown_name = GetVizBreakdownName(it.GetBreakdown()); +- TRACE_EVENT_BEGIN(kTraceCategory, ++ TRACE_EVENT_BEGIN(kTraceCategory2, + perfetto::StaticString{breakdown_name}, trace_track, + start_time); +- TRACE_EVENT_END(kTraceCategory, trace_track, end_time); ++ TRACE_EVENT_END(kTraceCategory2, trace_track, end_time); + } + } +- TRACE_EVENT_END(kTraceCategory, trace_track, stage.end_time); ++ TRACE_EVENT_END(kTraceCategory2, trace_track, stage.end_time); + } + +- TRACE_EVENT_END(kTraceCategory, trace_track, frame_termination_time_); ++ TRACE_EVENT_END(kTraceCategory2, trace_track, frame_termination_time_); + } + + void CompositorFrameReporter::ReportScrollJankMetrics() const { +diff --git a/cc/metrics/compositor_frame_reporting_controller.cc b/cc/metrics/compositor_frame_reporting_controller.cc +index 3efdc1dba6..938a6812c6 100644 +--- a/cc/metrics/compositor_frame_reporting_controller.cc ++++ b/cc/metrics/compositor_frame_reporting_controller.cc +@@ -24,10 +24,10 @@ using SmoothThread = CompositorFrameReporter::SmoothThread; + using StageType = CompositorFrameReporter::StageType; + using FrameTerminationStatus = CompositorFrameReporter::FrameTerminationStatus; + +-constexpr char kTraceCategory[] = "cc,benchmark"; +-constexpr int kNumOfCompositorStages = ++constexpr char kTraceCategory3[] = "cc,benchmark"; ++constexpr int kNumOfCompositorStages3 = + static_cast(StageType::kStageTypeCount) - 1; +-constexpr int kNumDispatchStages = ++constexpr int kNumDispatchStages3 = + static_cast(EventMetrics::DispatchStage::kMaxValue); + constexpr base::TimeDelta kDefaultLatencyPredictionDeviationThreshold = + viz::BeginFrameArgs::DefaultInterval() / 2; +@@ -47,8 +47,8 @@ CompositorFrameReportingController::CompositorFrameReportingController( + previous_latency_predictions_main_(base::Microseconds(-1)), + previous_latency_predictions_impl_(base::Microseconds(-1)), + event_latency_predictions_( +- CompositorFrameReporter::EventLatencyInfo(kNumDispatchStages, +- kNumOfCompositorStages)) { ++ CompositorFrameReporter::EventLatencyInfo(kNumDispatchStages3, ++ kNumOfCompositorStages3)) { + if (should_report_ukm) { + // UKM metrics should be reported if and only if `latency_ukm_reporter` is + // set on `global_trackers_`. +@@ -465,9 +465,9 @@ void CompositorFrameReportingController::ReportMultipleSwaps( + + const auto trace_track = + perfetto::Track(base::trace_event::GetNextGlobalTraceId()); +- TRACE_EVENT_BEGIN(kTraceCategory, "MultipleSwaps", trace_track, ++ TRACE_EVENT_BEGIN(kTraceCategory3, "MultipleSwaps", trace_track, + latest_swap_times_.front()); +- TRACE_EVENT_END(kTraceCategory, trace_track, latest_swap_times_.back()); ++ TRACE_EVENT_END(kTraceCategory3, trace_track, latest_swap_times_.back()); + } + } + } +diff --git a/cc/metrics/event_latency_tracing_recorder.cc b/cc/metrics/event_latency_tracing_recorder.cc +index fa2db3de1e..10fbbbc5bd 100644 +--- a/cc/metrics/event_latency_tracing_recorder.cc ++++ b/cc/metrics/event_latency_tracing_recorder.cc +@@ -18,7 +18,7 @@ namespace { + + constexpr char kTracingCategory[] = "cc,benchmark,input,input.scrolling"; + +-bool IsTracingEnabled() { ++bool IsTracingEnabled2() { + bool enabled; + TRACE_EVENT_CATEGORY_GROUP_ENABLED(kTracingCategory, &enabled); + return enabled; +@@ -215,7 +215,7 @@ void EventLatencyTracingRecorder::RecordEventLatencyTraceEvent( + const CompositorFrameReporter::ProcessedVizBreakdown* viz_breakdown) { + // As there are multiple teardown paths for EventMetrics, we want to denote + // the attempt to trace, even if tracing is currently disabled. +- if (IsTracingEnabled()) { ++ if (IsTracingEnabled2()) { + RecordEventLatencyTraceEventInternal(event_metrics, termination_time, + vsync_interval, stage_history, + viz_breakdown); +diff --git a/cc/metrics/frame_sequence_tracker.cc b/cc/metrics/frame_sequence_tracker.cc +index 4988fad0fc..eb25741952 100644 +--- a/cc/metrics/frame_sequence_tracker.cc ++++ b/cc/metrics/frame_sequence_tracker.cc +@@ -38,7 +38,7 @@ namespace cc { + + namespace { + +-constexpr char kTraceCategory[] = ++constexpr char kTraceCategoryFST[] = + "cc,benchmark," TRACE_DISABLED_BY_DEFAULT("devtools.timeline.frame"); + + } // namespace +@@ -91,7 +91,7 @@ FrameSequenceTracker::FrameSequenceTracker(FrameSequenceTrackerType type) + // TODO(crbug.com/1158439): remove the trace event once the validation is + // completed. + TRACE_EVENT_NESTABLE_ASYNC_BEGIN_WITH_TIMESTAMP1( +- kTraceCategory, "TrackerValidation", TRACE_ID_LOCAL(this), ++ kTraceCategoryFST, "TrackerValidation", TRACE_ID_LOCAL(this), + base::TimeTicks::Now(), "name", GetFrameSequenceTrackerTypeName(type)); + } + +@@ -107,7 +107,7 @@ FrameSequenceTracker::FrameSequenceTracker( + + FrameSequenceTracker::~FrameSequenceTracker() { + TRACE_EVENT_NESTABLE_ASYNC_END_WITH_TIMESTAMP2( +- kTraceCategory, "TrackerValidation", TRACE_ID_LOCAL(this), ++ kTraceCategoryFST, "TrackerValidation", TRACE_ID_LOCAL(this), + base::TimeTicks::Now(), "aborted_main", aborted_main_frame_, + "no_damage_main", no_damage_draw_main_frames_); + CleanUp(); +diff --git a/cc/metrics/jank_metrics.cc b/cc/metrics/jank_metrics.cc +index c8ce4e823d..222cdc7f58 100644 +--- a/cc/metrics/jank_metrics.cc ++++ b/cc/metrics/jank_metrics.cc +@@ -21,9 +21,9 @@ namespace cc { + namespace { + + constexpr uint64_t kMaxNoUpdateFrameQueueLength = 100; +-constexpr int kBuiltinSequenceNum = ++constexpr int kBuiltinJankSequenceNum = + static_cast(FrameSequenceTrackerType::kMaxType) + 1; +-constexpr int kMaximumStaleHistogramIndex = kBuiltinSequenceNum; ++constexpr int kMaximumJankStaleHistogramIndex = kBuiltinJankSequenceNum; + + constexpr base::TimeDelta kStaleHistogramMin = base::Microseconds(1); + constexpr base::TimeDelta kStaleHistogramMax = base::Milliseconds(1000); +@@ -182,7 +182,7 @@ void JankMetrics::AddPresentedFrame( + if (tracker_type_ != FrameSequenceTrackerType::kCustom) { + STATIC_HISTOGRAM_POINTER_GROUP( + GetStaleHistogramName(tracker_type_), +- GetIndexForStaleMetric(tracker_type_), kMaximumStaleHistogramIndex, ++ GetIndexForStaleMetric(tracker_type_), kMaximumJankStaleHistogramIndex, + AddTimeMillisecondsGranularity(staleness), + base::Histogram::FactoryTimeGet( + GetStaleHistogramName(tracker_type_), kStaleHistogramMin, +@@ -209,7 +209,7 @@ void JankMetrics::ReportJankMetrics(int frames_expected) { + // Report the max staleness metrics + STATIC_HISTOGRAM_POINTER_GROUP( + GetMaxStaleHistogramName(tracker_type_), +- GetIndexForStaleMetric(tracker_type_), kMaximumStaleHistogramIndex, ++ GetIndexForStaleMetric(tracker_type_), kMaximumJankStaleHistogramIndex, + AddTimeMillisecondsGranularity(max_staleness_), + base::Histogram::FactoryTimeGet( + GetMaxStaleHistogramName(tracker_type_), kStaleHistogramMin, +diff --git a/components/autofill/content/renderer/BUILD.gn b/components/autofill/content/renderer/BUILD.gn +index e4813b9dea..d779108937 100644 +--- a/components/autofill/content/renderer/BUILD.gn ++++ b/components/autofill/content/renderer/BUILD.gn +@@ -40,6 +40,10 @@ jumbo_static_library("renderer") { + "suggestion_properties.h", + ] + ++ jumbo_excluded_sources = [ ++ "form_cache.cc", ++ ] ++ + deps = [ + "//base", + "//base:i18n", +diff --git a/components/download/internal/common/BUILD.gn b/components/download/internal/common/BUILD.gn +index a75968d214..f5844398f4 100644 +--- a/components/download/internal/common/BUILD.gn ++++ b/components/download/internal/common/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//components/safe_browsing/buildflags.gni") + + if (is_android) { +@@ -10,7 +11,7 @@ if (is_android) { + import("//third_party/jni_zero/jni_zero.gni") + } + +-source_set("internal") { ++jumbo_source_set("internal") { + visibility = [ + ":for_tests", + "//components/download/public/common:public", +diff --git a/components/guest_view/browser/BUILD.gn b/components/guest_view/browser/BUILD.gn +index 549f05877a..36c23e0ead 100644 +--- a/components/guest_view/browser/BUILD.gn ++++ b/components/guest_view/browser/BUILD.gn +@@ -8,7 +8,9 @@ + # remove this assert. + assert(!is_android) + +-static_library("browser") { ++import("//build/config/jumbo.gni") ++ ++jumbo_static_library("browser") { + output_name = "guest_view_browser" + sources = [ + "//components/guest_view/browser/bad_message.cc", +diff --git a/components/guest_view/renderer/BUILD.gn b/components/guest_view/renderer/BUILD.gn +index d12cd543e3..b6d9838916 100644 +--- a/components/guest_view/renderer/BUILD.gn ++++ b/components/guest_view/renderer/BUILD.gn +@@ -8,7 +8,9 @@ + # remove this assert. + assert(!is_android && !is_ios) + +-static_library("renderer") { ++import("//build/config/jumbo.gni") ++ ++jumbo_static_library("renderer") { + sources = [ + "guest_view_container.cc", + "guest_view_container.h", +diff --git a/components/metrics/BUILD.gn b/components/metrics/BUILD.gn +index 5bdc91344d..7cf71b05b6 100644 +--- a/components/metrics/BUILD.gn ++++ b/components/metrics/BUILD.gn +@@ -298,7 +298,7 @@ if (!is_cronet_build || is_ios) { + } + } + +- jumvo_static_library("test_support") { ++ jumbo_static_library("test_support") { + testonly = true + sources = [ + "test/test_enabled_state_provider.cc", +diff --git a/components/metrics/metrics_log.cc b/components/metrics/metrics_log.cc +index 2fe044313f..605059bf52 100644 +--- a/components/metrics/metrics_log.cc ++++ b/components/metrics/metrics_log.cc +@@ -332,8 +332,8 @@ void MetricsLog::RecordCoreSystemProfile(MetricsServiceClient* client, + // Exclude these switches which are very frequently on the command line but + // serve no meaningful purpose. + static const char* const kSwitchesToFilter[] = { +- switches::kFlagSwitchesBegin, +- switches::kFlagSwitchesEnd, ++ ::switches::kFlagSwitchesBegin, ++ ::switches::kFlagSwitchesEnd, + }; + + for (const char* filter_switch : kSwitchesToFilter) +diff --git a/components/metrics/metrics_state_manager.cc b/components/metrics/metrics_state_manager.cc +index f51f4ed792..86a1db9715 100644 +--- a/components/metrics/metrics_state_manager.cc ++++ b/components/metrics/metrics_state_manager.cc +@@ -527,8 +527,8 @@ MetricsStateManager::CreateEntropyProviders() { + return std::make_unique( + GetHighEntropySource(), + variations::ValueInRange{ +- .value = base::checked_cast(GetLowEntropySource()), +- .range = EntropyState::kMaxLowEntropySize}, ++ /*.value =*/ base::checked_cast(GetLowEntropySource()), ++ /*.range =*/ EntropyState::kMaxLowEntropySize}, + ShouldEnableBenchmarking(entropy_params_.force_benchmarking_mode)); + } + +diff --git a/components/performance_manager/BUILD.gn b/components/performance_manager/BUILD.gn +index 60b6e90efd..a877db3439 100644 +--- a/components/performance_manager/BUILD.gn ++++ b/components/performance_manager/BUILD.gn +@@ -2,13 +2,14 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//third_party/protobuf/proto_library.gni") + + proto_library("site_data_proto") { + sources = [ "persistence/site_data/site_data.proto" ] + } + +-static_library("performance_manager") { ++jumbo_static_library("performance_manager") { + sources = [ + "binders.cc", + "browser_child_process_host_proxy.cc", +@@ -286,6 +287,7 @@ static_library("performance_manager") { + "public/persistence/site_data/feature_usage.h", + "public/persistence/site_data/site_data_reader.h", + ] ++ jumbo_excluded_sources = [ "decorators/site_data_recorder.cc" ] + + public_deps += [ + ":site_data_proto", +diff --git a/components/performance_manager/decorators/page_live_state_decorator.cc b/components/performance_manager/decorators/page_live_state_decorator.cc +index fcceab286a..1d90cac3e5 100644 +--- a/components/performance_manager/decorators/page_live_state_decorator.cc ++++ b/components/performance_manager/decorators/page_live_state_decorator.cc +@@ -285,8 +285,6 @@ class PageLiveStateDataImpl + const raw_ptr page_node_; + }; + +-const char kDescriberName[] = "PageLiveStateDecorator"; +- + } // namespace + + void PageLiveStateDecorator::Delegate::GetContentSettingsAndReply( +@@ -420,7 +418,7 @@ void PageLiveStateDecorator::SetIsDevToolsOpen(content::WebContents* contents, + + void PageLiveStateDecorator::OnPassedToGraph(Graph* graph) { + graph->GetNodeDataDescriberRegistry()->RegisterDescriber(this, +- kDescriberName); ++ "PageLiveStateDecorator"); + graph->AddPageNodeObserver(this); + } + +diff --git a/components/performance_manager/decorators/page_load_tracker_decorator.cc b/components/performance_manager/decorators/page_load_tracker_decorator.cc +index a408640407..05f1122d10 100644 +--- a/components/performance_manager/decorators/page_load_tracker_decorator.cc ++++ b/components/performance_manager/decorators/page_load_tracker_decorator.cc +@@ -68,8 +68,6 @@ const char* ToString(LoadIdleState state) { + } + } + +-const char kDescriberName[] = "PageLoadTrackerDecorator"; +- + } // namespace + + // static +@@ -94,7 +92,7 @@ void PageLoadTrackerDecorator::OnNetworkAlmostIdleChanged( + void PageLoadTrackerDecorator::OnPassedToGraph(Graph* graph) { + RegisterObservers(graph); + graph->GetNodeDataDescriberRegistry()->RegisterDescriber(this, +- kDescriberName); ++ "PageLoadTrackerDecorator"); + } + + void PageLoadTrackerDecorator::OnTakenFromGraph(Graph* graph) { +diff --git a/components/performance_manager/decorators/process_priority_aggregator.cc b/components/performance_manager/decorators/process_priority_aggregator.cc +index 71b56dd930..c36792fa58 100644 +--- a/components/performance_manager/decorators/process_priority_aggregator.cc ++++ b/components/performance_manager/decorators/process_priority_aggregator.cc +@@ -25,15 +25,15 @@ namespace { + + const char kDescriberName[] = "ProcessPriorityAggregator"; + +-class DataImpl : public ProcessPriorityAggregator::Data, +- public NodeAttachedDataImpl { ++class DataImplPPA : public ProcessPriorityAggregator::Data, ++ public NodeAttachedDataImpl { + public: + using StorageType = ProcessPriorityAggregatorAccess::StorageType; + + struct Traits : public NodeAttachedDataOwnedByNodeType {}; + +- explicit DataImpl(const ProcessNode* process_node) {} +- ~DataImpl() override {} ++ explicit DataImplPPA(const ProcessNode* process_node) {} ++ ~DataImplPPA() override {} + + static std::unique_ptr* GetUniquePtrStorage( + ProcessNodeImpl* process_node) { +@@ -109,7 +109,7 @@ base::TaskPriority ProcessPriorityAggregator::Data::GetPriority() const { + // static + ProcessPriorityAggregator::Data* ProcessPriorityAggregator::Data::GetForTesting( + ProcessNodeImpl* process_node) { +- return DataImpl::Get(process_node); ++ return DataImplPPA::Get(process_node); + } + + ProcessPriorityAggregator::ProcessPriorityAggregator() = default; +@@ -149,7 +149,7 @@ void ProcessPriorityAggregator::OnTakenFromGraph(Graph* graph) { + + base::Value::Dict ProcessPriorityAggregator::DescribeProcessNodeData( + const ProcessNode* node) const { +- DataImpl* data = DataImpl::Get(ProcessNodeImpl::FromNode(node)); ++ DataImplPPA* data = DataImplPPA::Get(ProcessNodeImpl::FromNode(node)); + if (data == nullptr) + return base::Value::Dict(); + +@@ -165,14 +165,14 @@ base::Value::Dict ProcessPriorityAggregator::DescribeProcessNodeData( + void ProcessPriorityAggregator::OnProcessNodeAdded( + const ProcessNode* process_node) { + auto* process_node_impl = ProcessNodeImpl::FromNode(process_node); +- DCHECK(!DataImpl::Get(process_node_impl)); ++ DCHECK(!DataImplPPA::Get(process_node_impl)); + } + + void ProcessPriorityAggregator::OnBeforeProcessNodeRemoved( + const ProcessNode* process_node) { + #if DCHECK_IS_ON() + auto* process_node_impl = ProcessNodeImpl::FromNode(process_node); +- DataImpl* data = DataImpl::Get(process_node_impl); ++ DataImplPPA* data = DataImplPPA::Get(process_node_impl); + if (data) { + DCHECK(data->IsEmpty()); + } +@@ -182,7 +182,7 @@ void ProcessPriorityAggregator::OnBeforeProcessNodeRemoved( + void ProcessPriorityAggregator::OnExecutionContextAdded( + const execution_context::ExecutionContext* ec) { + auto* process_node = ProcessNodeImpl::FromNode(ec->GetProcessNode()); +- DataImpl* data = DataImpl::GetOrCreate(process_node); ++ DataImplPPA* data = DataImplPPA::GetOrCreate(process_node); + data->Increment(ec->GetPriorityAndReason().priority()); + // This is a nop if the priority didn't actually change. + process_node->set_priority(data->GetPriority()); +@@ -191,7 +191,7 @@ void ProcessPriorityAggregator::OnExecutionContextAdded( + void ProcessPriorityAggregator::OnBeforeExecutionContextRemoved( + const execution_context::ExecutionContext* ec) { + auto* process_node = ProcessNodeImpl::FromNode(ec->GetProcessNode()); +- DataImpl* data = DataImpl::Get(process_node); ++ DataImplPPA* data = DataImplPPA::Get(process_node); + data->Decrement(ec->GetPriorityAndReason().priority()); + // This is a nop if the priority didn't actually change. + process_node->set_priority(data->GetPriority()); +@@ -208,7 +208,7 @@ void ProcessPriorityAggregator::OnPriorityAndReasonChanged( + // Update the distinct frame priority counts, and set the process priority + // accordingly. + auto* process_node = ProcessNodeImpl::FromNode(ec->GetProcessNode()); +- DataImpl* data = DataImpl::Get(process_node); ++ DataImplPPA* data = DataImplPPA::Get(process_node); + data->Decrement(previous_value.priority()); + data->Increment(new_value.priority()); + // This is a nop if the priority didn't actually change. +diff --git a/components/performance_manager/execution_context_priority/frame_audible_voter.cc b/components/performance_manager/execution_context_priority/frame_audible_voter.cc +index 22baf9b8bc..4f2147692f 100644 +--- a/components/performance_manager/execution_context_priority/frame_audible_voter.cc ++++ b/components/performance_manager/execution_context_priority/frame_audible_voter.cc +@@ -13,7 +13,7 @@ namespace execution_context_priority { + + namespace { + +-const execution_context::ExecutionContext* GetExecutionContext( ++const execution_context::ExecutionContext* GetExecutionContext2( + const FrameNode* frame_node) { + return execution_context::ExecutionContextRegistry::GetFromGraph( + frame_node->GetGraph()) +@@ -43,16 +43,16 @@ void FrameAudibleVoter::SetVotingChannel(VotingChannel voting_channel) { + + void FrameAudibleVoter::OnFrameNodeInitializing(const FrameNode* frame_node) { + const Vote vote = GetVote(frame_node->IsAudible()); +- voting_channel_.SubmitVote(GetExecutionContext(frame_node), vote); ++ voting_channel_.SubmitVote(GetExecutionContext2(frame_node), vote); + } + + void FrameAudibleVoter::OnFrameNodeTearingDown(const FrameNode* frame_node) { +- voting_channel_.InvalidateVote(GetExecutionContext(frame_node)); ++ voting_channel_.InvalidateVote(GetExecutionContext2(frame_node)); + } + + void FrameAudibleVoter::OnIsAudibleChanged(const FrameNode* frame_node) { + const Vote new_vote = GetVote(frame_node->IsAudible()); +- voting_channel_.ChangeVote(GetExecutionContext(frame_node), new_vote); ++ voting_channel_.ChangeVote(GetExecutionContext2(frame_node), new_vote); + } + + } // namespace execution_context_priority +diff --git a/components/performance_manager/execution_context_priority/frame_visibility_voter.cc b/components/performance_manager/execution_context_priority/frame_visibility_voter.cc +index 1abbba23f5..e101384e78 100644 +--- a/components/performance_manager/execution_context_priority/frame_visibility_voter.cc ++++ b/components/performance_manager/execution_context_priority/frame_visibility_voter.cc +@@ -14,7 +14,7 @@ namespace execution_context_priority { + + namespace { + +-const execution_context::ExecutionContext* GetExecutionContext( ++const execution_context::ExecutionContext* GetExecutionContext5( + const FrameNode* frame_node) { + return execution_context::ExecutionContextRegistry::GetFromGraph( + frame_node->GetGraph()) +@@ -23,7 +23,7 @@ const execution_context::ExecutionContext* GetExecutionContext( + + // Returns a vote with the appropriate priority depending on the frame's + // |visibility|. +-Vote GetVote(FrameNode::Visibility visibility) { ++Vote GetVote2(FrameNode::Visibility visibility) { + base::TaskPriority priority; + switch (visibility) { + case FrameNode::Visibility::kUnknown: +@@ -54,24 +54,24 @@ void FrameVisibilityVoter::SetVotingChannel(VotingChannel voting_channel) { + + void FrameVisibilityVoter::OnFrameNodeInitializing( + const FrameNode* frame_node) { +- const Vote vote = GetVote(frame_node->GetVisibility()); +- voting_channel_.SubmitVote(GetExecutionContext(frame_node), vote); ++ const Vote vote = GetVote2(frame_node->GetVisibility()); ++ voting_channel_.SubmitVote(GetExecutionContext5(frame_node), vote); + } + + void FrameVisibilityVoter::OnFrameNodeTearingDown(const FrameNode* frame_node) { +- voting_channel_.InvalidateVote(GetExecutionContext(frame_node)); ++ voting_channel_.InvalidateVote(GetExecutionContext5(frame_node)); + } + + void FrameVisibilityVoter::OnFrameVisibilityChanged( + const FrameNode* frame_node, + FrameNode::Visibility previous_value) { +- const Vote new_vote = GetVote(frame_node->GetVisibility()); ++ const Vote new_vote = GetVote2(frame_node->GetVisibility()); + + // Nothing to change if the new priority is the same as the old one. +- if (new_vote == GetVote(previous_value)) ++ if (new_vote == GetVote2(previous_value)) + return; + +- voting_channel_.ChangeVote(GetExecutionContext(frame_node), new_vote); ++ voting_channel_.ChangeVote(GetExecutionContext5(frame_node), new_vote); + } + + } // namespace execution_context_priority +diff --git a/components/performance_manager/execution_context_priority/inherit_client_priority_voter.cc b/components/performance_manager/execution_context_priority/inherit_client_priority_voter.cc +index 92c1f24200..63af7c759c 100644 +--- a/components/performance_manager/execution_context_priority/inherit_client_priority_voter.cc ++++ b/components/performance_manager/execution_context_priority/inherit_client_priority_voter.cc +@@ -16,14 +16,14 @@ namespace execution_context_priority { + + namespace { + +-const execution_context::ExecutionContext* GetExecutionContext( ++const execution_context::ExecutionContext* GetExecutionContext_ICPV( + const FrameNode* frame_node) { + return execution_context::ExecutionContextRegistry::GetFromGraph( + frame_node->GetGraph()) + ->GetExecutionContextForFrameNode(frame_node); + } + +-const execution_context::ExecutionContext* GetExecutionContext( ++const execution_context::ExecutionContext* GetExecutionContext_ICPV( + const WorkerNode* worker_node) { + return execution_context::ExecutionContextRegistry::GetFromGraph( + worker_node->GetGraph()) +@@ -50,7 +50,7 @@ void InheritClientPriorityVoter::SetVotingChannel( + + void InheritClientPriorityVoter::OnFrameNodeAdded(const FrameNode* frame_node) { + bool inserted = voting_channels_ +- .emplace(GetExecutionContext(frame_node), ++ .emplace(GetExecutionContext_ICPV(frame_node), + max_vote_aggregator_.GetVotingChannel()) + .second; + DCHECK(inserted); +@@ -60,7 +60,7 @@ void InheritClientPriorityVoter::OnFrameNodeAdded(const FrameNode* frame_node) { + void InheritClientPriorityVoter::OnBeforeFrameNodeRemoved( + const FrameNode* frame_node) { + DCHECK(frame_node->GetChildWorkerNodes().empty()); +- size_t removed = voting_channels_.erase(GetExecutionContext(frame_node)); ++ size_t removed = voting_channels_.erase(GetExecutionContext_ICPV(frame_node)); + DCHECK_EQ(removed, 1u); + } + +@@ -76,7 +76,7 @@ void InheritClientPriorityVoter::OnPriorityAndReasonChanged( + // The priority of a frame changed. All its children must inherit the new + // priority. + +- auto it = voting_channels_.find(GetExecutionContext(frame_node)); ++ auto it = voting_channels_.find(GetExecutionContext_ICPV(frame_node)); + DCHECK(it != voting_channels_.end()); + + auto& voting_channel = it->second; +@@ -86,7 +86,7 @@ void InheritClientPriorityVoter::OnPriorityAndReasonChanged( + for (const WorkerNode* child_worker_node : + frame_node->GetChildWorkerNodes()) { + const ExecutionContext* child_execution_context = +- GetExecutionContext(child_worker_node); ++ GetExecutionContext_ICPV(child_worker_node); + voting_channel.ChangeVote(child_execution_context, inherited_vote); + } + } +@@ -94,7 +94,7 @@ void InheritClientPriorityVoter::OnPriorityAndReasonChanged( + void InheritClientPriorityVoter::OnWorkerNodeAdded( + const WorkerNode* worker_node) { + bool inserted = voting_channels_ +- .emplace(GetExecutionContext(worker_node), ++ .emplace(GetExecutionContext_ICPV(worker_node), + max_vote_aggregator_.GetVotingChannel()) + .second; + DCHECK(inserted); +@@ -104,7 +104,7 @@ void InheritClientPriorityVoter::OnWorkerNodeAdded( + void InheritClientPriorityVoter::OnBeforeWorkerNodeRemoved( + const WorkerNode* worker_node) { + DCHECK(worker_node->GetChildWorkers().empty()); +- size_t removed = voting_channels_.erase(GetExecutionContext(worker_node)); ++ size_t removed = voting_channels_.erase(GetExecutionContext_ICPV(worker_node)); + DCHECK_EQ(removed, 1u); + } + +@@ -115,14 +115,14 @@ void InheritClientPriorityVoter::OnClientFrameAdded( + // priority. + + // Get the voting channel for the client. +- auto it = voting_channels_.find(GetExecutionContext(client_frame_node)); ++ auto it = voting_channels_.find(GetExecutionContext_ICPV(client_frame_node)); + DCHECK(it != voting_channels_.end()); + auto* voting_channel = &it->second; + + const Vote inherited_vote( + client_frame_node->GetPriorityAndReason().priority(), + kPriorityInheritedReason); +- voting_channel->SubmitVote(GetExecutionContext(worker_node), inherited_vote); ++ voting_channel->SubmitVote(GetExecutionContext_ICPV(worker_node), inherited_vote); + } + + void InheritClientPriorityVoter::OnBeforeClientFrameRemoved( +@@ -132,11 +132,11 @@ void InheritClientPriorityVoter::OnBeforeClientFrameRemoved( + // vote must be invalidated. + + // Get the voting channel for the client. +- auto it = voting_channels_.find(GetExecutionContext(client_frame_node)); ++ auto it = voting_channels_.find(GetExecutionContext_ICPV(client_frame_node)); + DCHECK(it != voting_channels_.end()); + auto* voting_channel = &it->second; + +- voting_channel->InvalidateVote(GetExecutionContext(worker_node)); ++ voting_channel->InvalidateVote(GetExecutionContext_ICPV(worker_node)); + } + + void InheritClientPriorityVoter::OnClientWorkerAdded( +@@ -146,14 +146,14 @@ void InheritClientPriorityVoter::OnClientWorkerAdded( + // priority. + + // Get the voting channel for the client. +- auto it = voting_channels_.find(GetExecutionContext(client_worker_node)); ++ auto it = voting_channels_.find(GetExecutionContext_ICPV(client_worker_node)); + DCHECK(it != voting_channels_.end()); + auto* voting_channel = &it->second; + + const Vote inherited_vote( + client_worker_node->GetPriorityAndReason().priority(), + kPriorityInheritedReason); +- voting_channel->SubmitVote(GetExecutionContext(worker_node), inherited_vote); ++ voting_channel->SubmitVote(GetExecutionContext_ICPV(worker_node), inherited_vote); + } + + void InheritClientPriorityVoter::OnBeforeClientWorkerRemoved( +@@ -163,11 +163,11 @@ void InheritClientPriorityVoter::OnBeforeClientWorkerRemoved( + // vote must be invalidated. + + // Get the voting channel for the client. +- auto it = voting_channels_.find(GetExecutionContext(client_worker_node)); ++ auto it = voting_channels_.find(GetExecutionContext_ICPV(client_worker_node)); + DCHECK(it != voting_channels_.end()); + auto* voting_channel = &it->second; + +- voting_channel->InvalidateVote(GetExecutionContext(worker_node)); ++ voting_channel->InvalidateVote(GetExecutionContext_ICPV(worker_node)); + } + + void InheritClientPriorityVoter::OnPriorityAndReasonChanged( +@@ -182,7 +182,7 @@ void InheritClientPriorityVoter::OnPriorityAndReasonChanged( + // The priority of a worker changed. All its children must inherit the new + // priority. + +- auto it = voting_channels_.find(GetExecutionContext(worker_node)); ++ auto it = voting_channels_.find(GetExecutionContext_ICPV(worker_node)); + DCHECK(it != voting_channels_.end()); + auto& voting_channel = it->second; + +@@ -190,7 +190,7 @@ void InheritClientPriorityVoter::OnPriorityAndReasonChanged( + kPriorityInheritedReason); + for (const WorkerNode* child_worker_node : worker_node->GetChildWorkers()) { + const ExecutionContext* child_execution_context = +- GetExecutionContext(child_worker_node); ++ GetExecutionContext_ICPV(child_worker_node); + voting_channel.ChangeVote(child_execution_context, inherited_vote); + } + } +diff --git a/components/performance_manager/graph/frame_node_impl_describer.cc b/components/performance_manager/graph/frame_node_impl_describer.cc +index 435e7b6005..bccca56b2a 100644 +--- a/components/performance_manager/graph/frame_node_impl_describer.cc ++++ b/components/performance_manager/graph/frame_node_impl_describer.cc +@@ -18,8 +18,6 @@ namespace performance_manager { + + namespace { + +-const char kDescriberName[] = "FrameNodeImpl"; +- + std::string IntersectsViewportToString( + absl::optional intersects_viewport) { + if (!intersects_viewport.has_value()) { +@@ -47,7 +45,7 @@ FrameNodeImplDescriber::~FrameNodeImplDescriber() = default; + + void FrameNodeImplDescriber::OnPassedToGraph(Graph* graph) { + graph->GetNodeDataDescriberRegistry()->RegisterDescriber(this, +- kDescriberName); ++ "FrameNodeImpl"); + } + + void FrameNodeImplDescriber::OnTakenFromGraph(Graph* graph) { +diff --git a/components/performance_manager/graph/page_node_impl_describer.cc b/components/performance_manager/graph/page_node_impl_describer.cc +index f12ebb0542..f38c3daf4a 100644 +--- a/components/performance_manager/graph/page_node_impl_describer.cc ++++ b/components/performance_manager/graph/page_node_impl_describer.cc +@@ -16,8 +16,6 @@ namespace performance_manager { + + namespace { + +-const char kDescriberName[] = "PageNodeImpl"; +- + const char* FreezingVoteToString( + absl::optional freezing_vote) { + if (!freezing_vote) +@@ -33,7 +31,7 @@ PageNodeImplDescriber::~PageNodeImplDescriber() = default; + + void PageNodeImplDescriber::OnPassedToGraph(Graph* graph) { + graph->GetNodeDataDescriberRegistry()->RegisterDescriber(this, +- kDescriberName); ++ "PageNodeImpl"); + } + + void PageNodeImplDescriber::OnTakenFromGraph(Graph* graph) { +diff --git a/components/performance_manager/graph/process_node_impl_describer.cc b/components/performance_manager/graph/process_node_impl_describer.cc +index b600c6346c..dbd8e51426 100644 +--- a/components/performance_manager/graph/process_node_impl_describer.cc ++++ b/components/performance_manager/graph/process_node_impl_describer.cc +@@ -28,8 +28,6 @@ namespace performance_manager { + + namespace { + +-const char kDescriberName[] = "ProcessNodeImpl"; +- + std::string ContentTypeToString(ProcessNode::ContentType content_type) { + switch (content_type) { + case ProcessNode::ContentType::kExtension: +@@ -141,7 +139,7 @@ base::Time TicksToTime(base::TimeTicks ticks) { + + void ProcessNodeImplDescriber::OnPassedToGraph(Graph* graph) { + graph->GetNodeDataDescriberRegistry()->RegisterDescriber(this, +- kDescriberName); ++ "ProcessNodeImpl"); + } + + void ProcessNodeImplDescriber::OnTakenFromGraph(Graph* graph) { +diff --git a/components/performance_manager/graph/worker_node_impl_describer.cc b/components/performance_manager/graph/worker_node_impl_describer.cc +index 99fa33ab49..0d191ed6d3 100644 +--- a/components/performance_manager/graph/worker_node_impl_describer.cc ++++ b/components/performance_manager/graph/worker_node_impl_describer.cc +@@ -16,8 +16,6 @@ namespace performance_manager { + + namespace { + +-const char kDescriberName[] = "WorkerNode"; +- + const char* WorkerTypeToString(WorkerNode::WorkerType state) { + switch (state) { + case WorkerNode::WorkerType::kDedicated: +@@ -33,7 +31,7 @@ const char* WorkerTypeToString(WorkerNode::WorkerType state) { + + void WorkerNodeImplDescriber::OnPassedToGraph(Graph* graph) { + graph->GetNodeDataDescriberRegistry()->RegisterDescriber(this, +- kDescriberName); ++ "WorkerNode"); + } + + void WorkerNodeImplDescriber::OnTakenFromGraph(Graph* graph) { +diff --git a/components/performance_manager/performance_manager_registry_impl.cc b/components/performance_manager/performance_manager_registry_impl.cc +index a39bdd210b..e2d6ccea29 100644 +--- a/components/performance_manager/performance_manager_registry_impl.cc ++++ b/components/performance_manager/performance_manager_registry_impl.cc +@@ -28,15 +28,15 @@ + + namespace performance_manager { + +-namespace { ++namespace performance_manager_registry_impl { + + PerformanceManagerRegistryImpl* g_instance = nullptr; + + } // namespace + + PerformanceManagerRegistryImpl::PerformanceManagerRegistryImpl() { +- DCHECK(!g_instance); +- g_instance = this; ++ DCHECK(!performance_manager_registry_impl::g_instance); ++ performance_manager_registry_impl::g_instance = this; + + // The registry should be created after the PerformanceManager. + DCHECK(PerformanceManager::IsAvailable()); +@@ -49,7 +49,7 @@ PerformanceManagerRegistryImpl::~PerformanceManagerRegistryImpl() { + // TearDown() should have been invoked to reset |g_instance| and clear + // |web_contents_| and |render_process_user_data_| prior to destroying the + // registry. +- DCHECK(!g_instance); ++ DCHECK(!performance_manager_registry_impl::g_instance); + DCHECK(web_contents_.empty()); + DCHECK(render_process_hosts_.empty()); + DCHECK(pm_owned_.empty()); +@@ -60,7 +60,7 @@ PerformanceManagerRegistryImpl::~PerformanceManagerRegistryImpl() { + + // static + PerformanceManagerRegistryImpl* PerformanceManagerRegistryImpl::GetInstance() { +- return g_instance; ++ return performance_manager_registry_impl::g_instance; + } + + void PerformanceManagerRegistryImpl::AddObserver( +@@ -246,8 +246,8 @@ void PerformanceManagerRegistryImpl::TearDown() { + observer.OnBeforePerformanceManagerDestroyed(); + } + +- DCHECK_EQ(g_instance, this); +- g_instance = nullptr; ++ DCHECK_EQ(performance_manager_registry_impl::g_instance, this); ++ performance_manager_registry_impl::g_instance = nullptr; + + // Destroy WorkerNodes before ProcessNodes, because ProcessNode checks that it + // has no associated WorkerNode when torn down. +diff --git a/components/performance_manager/persistence/site_data/site_data_cache_factory.cc b/components/performance_manager/persistence/site_data/site_data_cache_factory.cc +index 9c8f5f591f..ecdc531713 100644 +--- a/components/performance_manager/persistence/site_data/site_data_cache_factory.cc ++++ b/components/performance_manager/persistence/site_data/site_data_cache_factory.cc +@@ -18,29 +18,29 @@ + + namespace performance_manager { + +-namespace { ++namespace site_data_cache_factory { + SiteDataCacheFactory* g_instance = nullptr; + } // namespace + + SiteDataCacheFactory::SiteDataCacheFactory() { +- DCHECK(!g_instance); +- g_instance = this; ++ DCHECK(!site_data_cache_factory::g_instance); ++ site_data_cache_factory::g_instance = this; + } + + SiteDataCacheFactory::~SiteDataCacheFactory() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +- DCHECK_EQ(this, g_instance); ++ DCHECK_EQ(this, site_data_cache_factory::g_instance); + // Clear the cache map before unsetting |g_instance| as this will cause some + // calls to |SetDataCacheInspectorForBrowserContext|. + data_cache_map_.clear(); + for (const auto& iter : data_cache_map_) + DCHECK_EQ(0, iter.second->Size()); +- g_instance = nullptr; ++ site_data_cache_factory::g_instance = nullptr; + } + + // static + SiteDataCacheFactory* SiteDataCacheFactory::GetInstance() { +- return g_instance; ++ return site_data_cache_factory::g_instance; + } + + SiteDataCache* SiteDataCacheFactory::GetDataCacheForBrowserContext( +diff --git a/components/policy/core/browser/url_blocklist_policy_handler.cc b/components/policy/core/browser/url_blocklist_policy_handler.cc +index 5a717a90c4..37ac7df468 100644 +--- a/components/policy/core/browser/url_blocklist_policy_handler.cc ++++ b/components/policy/core/browser/url_blocklist_policy_handler.cc +@@ -31,7 +31,7 @@ namespace { + // a wildcard in the hostname although it has no effect on the domain and + // subdomains. Two example for such a common mistake are: 1- *.android.com 2- + // developer.*.com which allow neither android.com nor developer.android.com +-bool ValidateHost(const std::string& host) { ++bool ValidateHostUBPH(const std::string& host) { + return host == "*" || host.find('*') == std::string::npos; + } + +@@ -156,7 +156,7 @@ bool URLBlocklistPolicyHandler::ValidatePolicy(const std::string& url_pattern) { + url_pattern, &components.scheme, &components.host, + &components.match_subdomains, &components.port, &components.path, + &components.query) && +- ValidateHost(components.host); ++ ValidateHostUBPH(components.host); + } + + } // namespace policy +diff --git a/components/policy/core/common/cloud/profile_cloud_policy_store.cc b/components/policy/core/common/cloud/profile_cloud_policy_store.cc +index 24173d8563..752b39c27b 100644 +--- a/components/policy/core/common/cloud/profile_cloud_policy_store.cc ++++ b/components/policy/core/common/cloud/profile_cloud_policy_store.cc +@@ -20,7 +20,7 @@ namespace em = enterprise_management; + namespace policy { + namespace { + +-const base::FilePath::CharType kPolicy[] = FILE_PATH_LITERAL("Policy"); ++const base::FilePath::CharType kPolicyPCPS[] = FILE_PATH_LITERAL("Policy"); + const base::FilePath::CharType kPolicyCache[] = + FILE_PATH_LITERAL("Profile Cloud Policy"); + const base::FilePath::CharType kKeyCache[] = +@@ -44,7 +44,7 @@ ProfileCloudPolicyStore::~ProfileCloudPolicyStore() = default; + std::unique_ptr ProfileCloudPolicyStore::Create( + const base::FilePath& profile_dir, + scoped_refptr background_task_runner) { +- base::FilePath policy_dir = profile_dir.Append(kPolicy); ++ base::FilePath policy_dir = profile_dir.Append(kPolicyPCPS); + base::FilePath policy_cache_file = policy_dir.Append(kPolicyCache); + base::FilePath key_cache_file = policy_dir.Append(kKeyCache); + return std::make_unique( +diff --git a/components/policy/core/common/policy_proto_decoders.cc b/components/policy/core/common/policy_proto_decoders.cc +index f9f08f610c..3984e4de37 100644 +--- a/components/policy/core/common/policy_proto_decoders.cc ++++ b/components/policy/core/common/policy_proto_decoders.cc +@@ -29,7 +29,7 @@ namespace { + + const char kValue[] = "Value"; + const char kLevel[] = "Level"; +-const char kRecommended[] = "Recommended"; ++const char kRecommendedLocal[] = "Recommended"; + + // Returns true and sets |level| to a PolicyLevel if the policy has been set + // at that level. Returns false if the policy is not set, or has been set at +@@ -254,7 +254,7 @@ bool ParseComponentPolicy(base::Value::Dict json_dict, + + PolicyLevel level = POLICY_LEVEL_MANDATORY; + const std::string* level_string = description_dict.FindString(kLevel); +- if (level_string && *level_string == kRecommended) ++ if (level_string && *level_string == kRecommendedLocal) + level = POLICY_LEVEL_RECOMMENDED; + + policy->Set(policy_name, level, scope, source, std::move(value.value()), +diff --git a/components/printing/browser/BUILD.gn b/components/printing/browser/BUILD.gn +index cd2f244c1f..a5f46dda27 100644 +--- a/components/printing/browser/BUILD.gn ++++ b/components/printing/browser/BUILD.gn +@@ -2,7 +2,9 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-static_library("browser") { ++import("//build/config/jumbo.gni") ++ ++jumbo_static_library("browser") { + sources = [ + "print_composite_client.cc", + "print_composite_client.h", +diff --git a/components/storage_monitor/BUILD.gn b/components/storage_monitor/BUILD.gn +index 4f1e72155a..8f73984590 100644 +--- a/components/storage_monitor/BUILD.gn ++++ b/components/storage_monitor/BUILD.gn +@@ -4,8 +4,9 @@ + + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + +-static_library("storage_monitor") { ++jumbo_static_library("storage_monitor") { + sources = [ + "media_storage_util.cc", + "media_storage_util.h", +diff --git a/components/viz/host/host_frame_sink_manager.cc b/components/viz/host/host_frame_sink_manager.cc +index e893c89eb2..c36daec84a 100644 +--- a/components/viz/host/host_frame_sink_manager.cc ++++ b/components/viz/host/host_frame_sink_manager.cc +@@ -201,7 +201,7 @@ void HostFrameSinkManager::CreateFrameSink( + mojo::PendingReceiver receiver, + mojo::PendingRemote client) { + FrameSinkData& data = frame_sink_data_map_[frame_sink_id]; +- DCHECK(data.IsFrameSinkRegistered()); ++ // DCHECK(data.IsFrameSinkRegistered()); + + // If GL context is lost a new CompositorFrameSink will be created. Destroy + // the old CompositorFrameSink first. +diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn +index 59c7ab0e69..6672e37ace 100644 +--- a/components/viz/service/BUILD.gn ++++ b/components/viz/service/BUILD.gn +@@ -251,6 +251,22 @@ viz_component("service") { + "transitions/transferable_resource_tracker.h", + ] + ++ # Keep sources with "ui/gl" includes separate to avoid mixing OpenGL sources ++ jumbo_excluded_sources = [ ++ "display/display.cc", ++ "display/output_surface.cc", ++ "display/overlay_processor_on_gpu.cc", ++ "display_embedder/compositor_gpu_thread.cc", ++ "display_embedder/image_context_impl.cc", ++ "display_embedder/skia_output_device_gl.cc", ++ "display_embedder/skia_output_device_offscreen.cc", ++ "display_embedder/skia_output_surface_impl.cc", ++ "display_embedder/skia_output_surface_impl_on_gpu.cc", ++ "frame_sinks/frame_sink_manager_impl.cc", ++ "frame_sinks/video_capture/frame_sink_video_capturer_impl.cc", ++ "gl/gpu_service_impl.cc", ++ ] ++ + defines = [ "VIZ_SERVICE_IMPLEMENTATION" ] + + deps = [ +@@ -431,6 +447,9 @@ viz_component("service") { + "gl/info_collection_gpu_service_impl.cc", + "gl/info_collection_gpu_service_impl.h", + ] ++ jumbo_excluded_sources += [ ++ "display_embedder/skia_output_device_dcomp.cc", ++ ] + + # SkiaOutputDeviceBufferQueue doesn't support Windows. + sources -= [ +@@ -441,6 +460,11 @@ viz_component("service") { + "display_embedder/skia_output_device_buffer_queue.cc", + "display_embedder/skia_output_device_buffer_queue.h", + ] ++ } else { ++ jumbo_excluded_sources += [ ++ "display_embedder/output_presenter_gl.cc", ++ "display_embedder/skia_output_device_buffer_queue.cc", ++ ] + } + + if (is_fuchsia) { +@@ -462,6 +486,10 @@ viz_component("service") { + "display_embedder/skia_output_device_vulkan.h", + ] + ++ jumbo_excluded_sources += [ ++ "display_embedder/skia_output_device_vulkan.cc", ++ ] ++ + if (is_android) { + sources += [ + "display_embedder/skia_output_device_vulkan_secondary_cb.cc", +diff --git a/components/viz/service/display_embedder/skia_output_device_webview.cc b/components/viz/service/display_embedder/skia_output_device_webview.cc +index bddc6ddf2c..6a3d89b14c 100644 +--- a/components/viz/service/display_embedder/skia_output_device_webview.cc ++++ b/components/viz/service/display_embedder/skia_output_device_webview.cc +@@ -21,7 +21,7 @@ + namespace viz { + + namespace { +-constexpr auto kSurfaceColorType = kRGBA_8888_SkColorType; ++constexpr auto kMySurfaceColorType = kRGBA_8888_SkColorType; + } + + SkiaOutputDeviceWebView::SkiaOutputDeviceWebView( +@@ -47,9 +47,9 @@ SkiaOutputDeviceWebView::SkiaOutputDeviceWebView( + DCHECK(context_state_->context()); + + capabilities_.sk_color_types[static_cast(gfx::BufferFormat::RGBA_8888)] = +- kSurfaceColorType; ++ kMySurfaceColorType; + capabilities_.sk_color_types[static_cast(gfx::BufferFormat::BGRA_8888)] = +- kSurfaceColorType; ++ kMySurfaceColorType; + } + + SkiaOutputDeviceWebView::~SkiaOutputDeviceWebView() = default; +@@ -111,7 +111,7 @@ void SkiaOutputDeviceWebView::InitSkiaSurface(unsigned int fbo) { + GrGLFramebufferInfo framebuffer_info; + framebuffer_info.fFBOID = fbo; + framebuffer_info.fFormat = GL_RGBA8; +- SkColorType color_type = kSurfaceColorType; ++ SkColorType color_type = kMySurfaceColorType; + + auto render_target = + GrBackendRenderTargets::MakeGL(size_.width(), size_.height(), +diff --git a/components/viz/service/transitions/transferable_resource_tracker.cc b/components/viz/service/transitions/transferable_resource_tracker.cc +index 84b8ac61de..ae8c20277d 100644 +--- a/components/viz/service/transitions/transferable_resource_tracker.cc ++++ b/components/viz/service/transitions/transferable_resource_tracker.cc +@@ -4,7 +4,7 @@ + + #include "components/viz/service/transitions/transferable_resource_tracker.h" + +-#include ++#include "third_party/khronos/GLES2/gl2.h" + + #include + #include +diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn +index 6422a52f1f..e546c41a10 100644 +--- a/content/browser/BUILD.gn ++++ b/content/browser/BUILD.gn +@@ -33,6 +33,96 @@ if (is_android) { + import("//third_party/jni_zero/jni_zero.gni") + } + ++jumbo_static_library("devtools_protocol") { ++ configs += [ ++ "//build/config:precompiled_headers", ++ "//content:content_implementation", ++ ] ++ ++ deps = [ ++ "//base", ++ "//content/browser/devtools:devtools_background_services_proto", ++ "//content/browser/devtools:protocol_sources", ++ "//content/common:buildflags", ++ "//services/viz/privileged/mojom", ++ "//third_party/blink/public/mojom:mojom_platform", ++ "//third_party/inspector_protocol:crdtp", ++ ] ++ ++ sources = [ ++ "$target_gen_dir/devtools/protocol/audits.cc", ++ "$target_gen_dir/devtools/protocol/audits.h", ++ "$target_gen_dir/devtools/protocol/background_service.cc", ++ "$target_gen_dir/devtools/protocol/background_service.h", ++ "$target_gen_dir/devtools/protocol/browser.cc", ++ "$target_gen_dir/devtools/protocol/browser.h", ++ "$target_gen_dir/devtools/protocol/device_access.cc", ++ "$target_gen_dir/devtools/protocol/device_access.h", ++ "$target_gen_dir/devtools/protocol/dom.cc", ++ "$target_gen_dir/devtools/protocol/dom.h", ++ "$target_gen_dir/devtools/protocol/emulation.cc", ++ "$target_gen_dir/devtools/protocol/emulation.h", ++ "$target_gen_dir/devtools/protocol/fed_cm.cc", ++ "$target_gen_dir/devtools/protocol/fed_cm.h", ++ "$target_gen_dir/devtools/protocol/fetch.cc", ++ "$target_gen_dir/devtools/protocol/fetch.h", ++ "$target_gen_dir/devtools/protocol/forward.h", ++ "$target_gen_dir/devtools/protocol/input.cc", ++ "$target_gen_dir/devtools/protocol/input.h", ++ "$target_gen_dir/devtools/protocol/inspector.cc", ++ "$target_gen_dir/devtools/protocol/inspector.h", ++ "$target_gen_dir/devtools/protocol/io.cc", ++ "$target_gen_dir/devtools/protocol/io.h", ++ "$target_gen_dir/devtools/protocol/log.cc", ++ "$target_gen_dir/devtools/protocol/log.h", ++ "$target_gen_dir/devtools/protocol/memory.cc", ++ "$target_gen_dir/devtools/protocol/memory.h", ++ "$target_gen_dir/devtools/protocol/network.cc", ++ "$target_gen_dir/devtools/protocol/network.h", ++ "$target_gen_dir/devtools/protocol/overlay.cc", ++ "$target_gen_dir/devtools/protocol/overlay.h", ++ "$target_gen_dir/devtools/protocol/page.cc", ++ "$target_gen_dir/devtools/protocol/page.h", ++ "$target_gen_dir/devtools/protocol/preload.cc", ++ "$target_gen_dir/devtools/protocol/preload.h", ++ "$target_gen_dir/devtools/protocol/protocol.h", ++ "$target_gen_dir/devtools/protocol/runtime.cc", ++ "$target_gen_dir/devtools/protocol/runtime.h", ++ "$target_gen_dir/devtools/protocol/schema.cc", ++ "$target_gen_dir/devtools/protocol/schema.h", ++ "$target_gen_dir/devtools/protocol/security.cc", ++ "$target_gen_dir/devtools/protocol/security.h", ++ "$target_gen_dir/devtools/protocol/service_worker.cc", ++ "$target_gen_dir/devtools/protocol/service_worker.h", ++ "$target_gen_dir/devtools/protocol/storage.cc", ++ "$target_gen_dir/devtools/protocol/storage.h", ++ "$target_gen_dir/devtools/protocol/system_info.cc", ++ "$target_gen_dir/devtools/protocol/system_info.h", ++ "$target_gen_dir/devtools/protocol/target.cc", ++ "$target_gen_dir/devtools/protocol/target.h", ++ "$target_gen_dir/devtools/protocol/tethering.cc", ++ "$target_gen_dir/devtools/protocol/tethering.h", ++ "$target_gen_dir/devtools/protocol/tracing.cc", ++ "$target_gen_dir/devtools/protocol/tracing.h", ++ ] ++ if (!is_android) { ++ # The WebAuthn devtools protocol API is not supported in Android yet. ++ sources += [ ++ "$target_gen_dir/devtools/protocol/web_authn.cc", ++ "$target_gen_dir/devtools/protocol/web_authn.h", ++ ] ++ } ++ ++ if (use_viz_debugger) { ++ sources += [ ++ "$target_gen_dir/devtools/protocol/visual_debugger.cc", ++ "$target_gen_dir/devtools/protocol/visual_debugger.h", ++ "devtools/protocol/visual_debugger_handler.cc", ++ "devtools/protocol/visual_debugger_handler.h", ++ ] ++ } ++} ++ + jumbo_source_set("browser") { + # Only the public target should depend on this. All other targets (even + # internal content ones) should depend on the public one. +@@ -128,8 +218,6 @@ jumbo_source_set("browser") { + "//content/browser/cache_storage:cache_storage_proto", + "//content/browser/content_index:content_index_proto", + "//content/browser/cookie_store:cookie_store_proto", +- "//content/browser/devtools:devtools_background_services_proto", +- "//content/browser/devtools:protocol_sources", + "//content/browser/download:proto", + "//content/browser/file_system_access:proto", + "//content/browser/indexed_db:mojo_bindings", +@@ -292,6 +380,7 @@ jumbo_source_set("browser") { + "//ui/strings:ax_strings", + "//ui/touch_selection", + "//v8:v8_version", ++ ":devtools_protocol", + ] + + public_deps = [ +@@ -306,60 +395,6 @@ jumbo_source_set("browser") { + ] + + sources = [ +- "$target_gen_dir/devtools/protocol/audits.cc", +- "$target_gen_dir/devtools/protocol/audits.h", +- "$target_gen_dir/devtools/protocol/background_service.cc", +- "$target_gen_dir/devtools/protocol/background_service.h", +- "$target_gen_dir/devtools/protocol/browser.cc", +- "$target_gen_dir/devtools/protocol/browser.h", +- "$target_gen_dir/devtools/protocol/device_access.cc", +- "$target_gen_dir/devtools/protocol/device_access.h", +- "$target_gen_dir/devtools/protocol/dom.cc", +- "$target_gen_dir/devtools/protocol/dom.h", +- "$target_gen_dir/devtools/protocol/emulation.cc", +- "$target_gen_dir/devtools/protocol/emulation.h", +- "$target_gen_dir/devtools/protocol/fed_cm.cc", +- "$target_gen_dir/devtools/protocol/fed_cm.h", +- "$target_gen_dir/devtools/protocol/fetch.cc", +- "$target_gen_dir/devtools/protocol/fetch.h", +- "$target_gen_dir/devtools/protocol/forward.h", +- "$target_gen_dir/devtools/protocol/input.cc", +- "$target_gen_dir/devtools/protocol/input.h", +- "$target_gen_dir/devtools/protocol/inspector.cc", +- "$target_gen_dir/devtools/protocol/inspector.h", +- "$target_gen_dir/devtools/protocol/io.cc", +- "$target_gen_dir/devtools/protocol/io.h", +- "$target_gen_dir/devtools/protocol/log.cc", +- "$target_gen_dir/devtools/protocol/log.h", +- "$target_gen_dir/devtools/protocol/memory.cc", +- "$target_gen_dir/devtools/protocol/memory.h", +- "$target_gen_dir/devtools/protocol/network.cc", +- "$target_gen_dir/devtools/protocol/network.h", +- "$target_gen_dir/devtools/protocol/overlay.cc", +- "$target_gen_dir/devtools/protocol/overlay.h", +- "$target_gen_dir/devtools/protocol/page.cc", +- "$target_gen_dir/devtools/protocol/page.h", +- "$target_gen_dir/devtools/protocol/preload.cc", +- "$target_gen_dir/devtools/protocol/preload.h", +- "$target_gen_dir/devtools/protocol/protocol.h", +- "$target_gen_dir/devtools/protocol/runtime.cc", +- "$target_gen_dir/devtools/protocol/runtime.h", +- "$target_gen_dir/devtools/protocol/schema.cc", +- "$target_gen_dir/devtools/protocol/schema.h", +- "$target_gen_dir/devtools/protocol/security.cc", +- "$target_gen_dir/devtools/protocol/security.h", +- "$target_gen_dir/devtools/protocol/service_worker.cc", +- "$target_gen_dir/devtools/protocol/service_worker.h", +- "$target_gen_dir/devtools/protocol/storage.cc", +- "$target_gen_dir/devtools/protocol/storage.h", +- "$target_gen_dir/devtools/protocol/system_info.cc", +- "$target_gen_dir/devtools/protocol/system_info.h", +- "$target_gen_dir/devtools/protocol/target.cc", +- "$target_gen_dir/devtools/protocol/target.h", +- "$target_gen_dir/devtools/protocol/tethering.cc", +- "$target_gen_dir/devtools/protocol/tethering.h", +- "$target_gen_dir/devtools/protocol/tracing.cc", +- "$target_gen_dir/devtools/protocol/tracing.h", + "about_url_loader_factory.cc", + "about_url_loader_factory.h", + "accessibility/accessibility_tree_formatter_blink.cc", +@@ -2392,6 +2427,8 @@ jumbo_source_set("browser") { + ] + } + ++ jumbo_excluded_sources = [] ++ + # TODO(crbug.com/1327384): Remove `permissions_common`. + # DO NOT add unrelated entries to this block. + deps += [ "//components/permissions:permissions_common" ] +@@ -2750,6 +2787,9 @@ jumbo_source_set("browser") { + ] + public_deps += [ "//ui/base/cursor" ] + deps += [ "//third_party/webrtc_overrides:webrtc_component" ] ++ jumbo_excluded_sources += [ ++ "media/capture/desktop_capture_device.cc", ++ ] + } + if (use_aura) { + sources += [ +@@ -3229,6 +3269,12 @@ jumbo_source_set("browser") { + "webid/digital_credentials/digital_credential_provider_android.h", + ] + ++ jumbo_excluded_sources += [ ++ # Files with kJavaLangClass and similar constants: ++ # Bug https://crbug.com/787557. ++ "android/java/java_method.cc", # and in gin_java_bound_object.cc. ++ ] ++ + deps += [ + ":reflection_jni_headers", + "//build/config/freetype", +@@ -3260,9 +3306,6 @@ jumbo_source_set("browser") { + } else { + # Not Android. + sources += [ +- # The WebAuthn devtools protocol API is not supported in Android yet. +- "$target_gen_dir/devtools/protocol/web_authn.cc", +- "$target_gen_dir/devtools/protocol/web_authn.h", + "devtools/protocol/webauthn_handler.cc", + "devtools/protocol/webauthn_handler.h", + "media/session/audio_focus_delegate_default.cc", +diff --git a/content/browser/attribution_reporting/attribution_internals_handler_impl.cc b/content/browser/attribution_reporting/attribution_internals_handler_impl.cc +index cba9c38723..a681cfe037 100644 +--- a/content/browser/attribution_reporting/attribution_internals_handler_impl.cc ++++ b/content/browser/attribution_reporting/attribution_internals_handler_impl.cc +@@ -96,7 +96,7 @@ attribution_internals::mojom::WebUISourcePtr WebUISource( + source.debug_cookie_set(), attributability); + } + +-void ForwardSourcesToWebUI( ++void ForwardSourcesToWebUI2( + attribution_internals::mojom::Handler::GetActiveSourcesCallback + web_ui_callback, + std::vector active_sources) { +@@ -208,7 +208,7 @@ attribution_internals::mojom::WebUIReportPtr WebUIReport( + std::move(status), std::move(data)); + } + +-void ForwardReportsToWebUI( ++void ForwardReportsToWebUI2( + attribution_internals::mojom::Handler::GetReportsCallback web_ui_callback, + std::vector pending_reports) { + std::vector web_ui_reports; +@@ -271,7 +271,7 @@ void AttributionInternalsHandlerImpl::GetActiveSources( + if (AttributionManager* manager = + AttributionManager::FromWebContents(web_ui_->GetWebContents())) { + manager->GetActiveSourcesForWebUI( +- base::BindOnce(&ForwardSourcesToWebUI, std::move(callback))); ++ base::BindOnce(&ForwardSourcesToWebUI2, std::move(callback))); + } else { + std::move(callback).Run({}); + } +@@ -283,7 +283,7 @@ void AttributionInternalsHandlerImpl::GetReports( + AttributionManager::FromWebContents(web_ui_->GetWebContents())) { + manager->GetPendingReportsForInternalUse( + /*limit=*/1000, +- base::BindOnce(&ForwardReportsToWebUI, std::move(callback))); ++ base::BindOnce(&ForwardReportsToWebUI2, std::move(callback))); + } else { + std::move(callback).Run({}); + } +diff --git a/content/browser/attribution_reporting/attribution_storage_sql.cc b/content/browser/attribution_reporting/attribution_storage_sql.cc +index 51d75e97c0..a84eb9d532 100644 +--- a/content/browser/attribution_reporting/attribution_storage_sql.cc ++++ b/content/browser/attribution_reporting/attribution_storage_sql.cc +@@ -97,7 +97,7 @@ using ::attribution_reporting::SuitableOrigin; + using ::attribution_reporting::mojom::SourceType; + using ::attribution_reporting::mojom::TriggerDataMatching; + +-const base::FilePath::CharType kDatabasePath[] = ++const base::FilePath::CharType kDatabasePathASS[] = + FILE_PATH_LITERAL("Conversions"); + + constexpr int64_t kUnsetRecordId = -1; +@@ -456,7 +456,7 @@ AttributionStorageSql::ReadSourceToAttribute(StoredSource::Id source_id) { + namespace { + + base::FilePath DatabasePath(const base::FilePath& user_data_directory) { +- return user_data_directory.Append(kDatabasePath); ++ return user_data_directory.Append(kDatabasePathASS); + } + + } // namespace +diff --git a/content/browser/attribution_reporting/store_source_result.cc b/content/browser/attribution_reporting/store_source_result.cc +index b766078e34..9a1348e4d0 100644 +--- a/content/browser/attribution_reporting/store_source_result.cc ++++ b/content/browser/attribution_reporting/store_source_result.cc +@@ -11,41 +11,41 @@ + namespace content { + + namespace { +-using Status = ::attribution_reporting::mojom::StoreSourceResult; ++using StatusSSR = ::attribution_reporting::mojom::StoreSourceResult; + } // namespace + +-Status StoreSourceResult::status() const { ++StatusSSR StoreSourceResult::status() const { + return absl::visit( + base::Overloaded{ +- [](Success) { return Status::kSuccess; }, +- [](InternalError) { return Status::kInternalError; }, ++ [](Success) { return StatusSSR::kSuccess; }, ++ [](InternalError) { return StatusSSR::kInternalError; }, + [](InsufficientSourceCapacity) { +- return Status::kInsufficientSourceCapacity; ++ return StatusSSR::kInsufficientSourceCapacity; + }, + [](InsufficientUniqueDestinationCapacity) { +- return Status::kInsufficientUniqueDestinationCapacity; ++ return StatusSSR::kInsufficientUniqueDestinationCapacity; + }, + [](ExcessiveReportingOrigins) { +- return Status::kExcessiveReportingOrigins; ++ return StatusSSR::kExcessiveReportingOrigins; + }, + [](ProhibitedByBrowserPolicy) { +- return Status::kProhibitedByBrowserPolicy; ++ return StatusSSR::kProhibitedByBrowserPolicy; + }, +- [](SuccessNoised) { return Status::kSuccessNoised; }, ++ [](SuccessNoised) { return StatusSSR::kSuccessNoised; }, + [](DestinationReportingLimitReached) { +- return Status::kDestinationReportingLimitReached; ++ return StatusSSR::kDestinationReportingLimitReached; + }, + [](DestinationGlobalLimitReached) { +- return Status::kDestinationGlobalLimitReached; ++ return StatusSSR::kDestinationGlobalLimitReached; + }, + [](DestinationBothLimitsReached) { +- return Status::kDestinationBothLimitsReached; ++ return StatusSSR::kDestinationBothLimitsReached; + }, + [](ReportingOriginsPerSiteLimitReached) { +- return Status::kReportingOriginsPerSiteLimitReached; ++ return StatusSSR::kReportingOriginsPerSiteLimitReached; + }, + [](ExceedsMaxChannelCapacity) { +- return Status::kExceedsMaxChannelCapacity; ++ return StatusSSR::kExceedsMaxChannelCapacity; + }, + }, + result_); +diff --git a/content/browser/cookie_store/cookie_change_subscription.cc b/content/browser/cookie_store/cookie_change_subscription.cc +index dbe3c5b8a6..df3a1baf1d 100644 +--- a/content/browser/cookie_store/cookie_change_subscription.cc ++++ b/content/browser/cookie_store/cookie_change_subscription.cc +@@ -12,14 +12,15 @@ + #include "net/cookies/cookie_constants.h" + #include "net/cookies/cookie_util.h" + #include "services/network/public/cpp/is_potentially_trustworthy.h" ++#include "third_party/blink/renderer/platform/wtf/assertions.h" + + namespace content { + + namespace { + +-#define STATIC_ASSERT_ENUM(a, b) \ +- static_assert(static_cast(a) == static_cast(b), \ +- "mismatching enums: " #a) ++//#define STATIC_ASSERT_ENUM(a, b) \ ++// static_assert(static_cast(a) == static_cast(b), \ ++// "mismatching enums: " #a) + + STATIC_ASSERT_ENUM(network::mojom::CookieMatchType::EQUALS, + proto::CookieMatchType::EQUALS); +diff --git a/content/browser/devtools/BUILD.gn b/content/browser/devtools/BUILD.gn +index d9812e6c60..fe08bf22bd 100644 +--- a/content/browser/devtools/BUILD.gn ++++ b/content/browser/devtools/BUILD.gn +@@ -82,7 +82,7 @@ action("concatenate_protocols") { + } + + inspector_protocol_generate("protocol_sources") { +- visibility = [ "//content/browser" ] ++ visibility = [ "//content/browser:*" ] + deps = [ ":concatenate_protocols" ] + inspector_protocol_dir = "//third_party/inspector_protocol" + out_dir = target_gen_dir +diff --git a/content/browser/devtools/protocol/page_handler.cc b/content/browser/devtools/protocol/page_handler.cc +index 3ac4273bdb..b2f0a69488 100644 +--- a/content/browser/devtools/protocol/page_handler.cc ++++ b/content/browser/devtools/protocol/page_handler.cc +@@ -84,7 +84,7 @@ namespace { + constexpr const char* kMhtml = "mhtml"; + constexpr int kDefaultScreenshotQuality = 80; + constexpr int kMaxScreencastFramesInFlight = 2; +-constexpr char kCommandIsOnlyAvailableAtTopTarget[] = ++constexpr char kCommandIsOnlyAvailableAtTopTarget2[] = + "Command can only be executed on top-level targets"; + constexpr char kErrorNotAttached[] = "Not attached to a page"; + constexpr char kErrorInactivePage[] = "Not attached to an active page"; +@@ -2006,7 +2006,7 @@ Response PageHandler::AssureTopLevelActiveFrame() { + return Response::ServerError(kErrorNotAttached); + + if (host_->GetParentOrOuterDocument()) +- return Response::ServerError(kCommandIsOnlyAvailableAtTopTarget); ++ return Response::ServerError(kCommandIsOnlyAvailableAtTopTarget2); + + if (!host_->IsActive()) + return Response::ServerError(kErrorInactivePage); +diff --git a/content/browser/devtools/protocol/target_handler.cc b/content/browser/devtools/protocol/target_handler.cc +index aca11bfa74..72e4331eb9 100644 +--- a/content/browser/devtools/protocol/target_handler.cc ++++ b/content/browser/devtools/protocol/target_handler.cc +@@ -68,7 +68,7 @@ constexpr net::NetworkTrafficAnnotationTag + "Not implemented, only used in DevTools and is behind a switch." + })"); + +-static const char kNotAllowedError[] = "Not allowed"; ++static const char kNotAllowedErrorTH[] = "Not allowed"; + static const char kMethod[] = "method"; + static const char kResumeMethod[] = "Runtime.runIfWaitingForDebugger"; + +@@ -973,7 +973,7 @@ Response TargetHandler::SetDiscoverTargets( + bool discover, + Maybe> filter) { + if (access_mode_ == AccessMode::kAutoAttachOnly) +- return Response::ServerError(kNotAllowedError); ++ return Response::ServerError(kNotAllowedErrorTH); + if (!discover && filter && !filter->empty()) { + return Response::InvalidParams( + "Filter should not be present with `discover` is off"); +@@ -1080,7 +1080,7 @@ Response TargetHandler::AttachToTarget(const std::string& target_id, + Maybe flatten, + std::string* out_session_id) { + if (access_mode_ == AccessMode::kAutoAttachOnly) +- return Response::ServerError(kNotAllowedError); ++ return Response::ServerError(kNotAllowedErrorTH); + // TODO(dgozman): only allow reported hosts. + scoped_refptr agent_host = + DevToolsAgentHost::GetForId(target_id); +@@ -1093,7 +1093,7 @@ Response TargetHandler::AttachToTarget(const std::string& target_id, + + Response TargetHandler::AttachToBrowserTarget(std::string* out_session_id) { + if (access_mode_ != AccessMode::kBrowser) +- return Response::ServerError(kNotAllowedError); ++ return Response::ServerError(kNotAllowedErrorTH); + scoped_refptr agent_host = + DevToolsAgentHost::CreateForBrowser( + nullptr, DevToolsAgentHost::CreateServerSocketCallback()); +@@ -1104,7 +1104,7 @@ Response TargetHandler::AttachToBrowserTarget(std::string* out_session_id) { + Response TargetHandler::DetachFromTarget(Maybe session_id, + Maybe target_id) { + if (access_mode_ == AccessMode::kAutoAttachOnly) +- return Response::ServerError(kNotAllowedError); ++ return Response::ServerError(kNotAllowedErrorTH); + Session* session = nullptr; + Response response = + FindSession(std::move(session_id), std::move(target_id), &session); +@@ -1137,7 +1137,7 @@ Response TargetHandler::GetTargetInfo( + const std::string& target_id = maybe_target_id.value_or(owner_target_id_); + if (access_mode_ == AccessMode::kAutoAttachOnly && + target_id != owner_target_id_) { +- return Response::ServerError(kNotAllowedError); ++ return Response::ServerError(kNotAllowedErrorTH); + } + // TODO(dgozman): only allow reported hosts. + scoped_refptr agent_host( +@@ -1150,7 +1150,7 @@ Response TargetHandler::GetTargetInfo( + + Response TargetHandler::ActivateTarget(const std::string& target_id) { + if (access_mode_ == AccessMode::kAutoAttachOnly) +- return Response::ServerError(kNotAllowedError); ++ return Response::ServerError(kNotAllowedErrorTH); + // TODO(dgozman): only allow reported hosts. + scoped_refptr agent_host( + DevToolsAgentHost::GetForId(target_id)); +@@ -1163,7 +1163,7 @@ Response TargetHandler::ActivateTarget(const std::string& target_id) { + Response TargetHandler::CloseTarget(const std::string& target_id, + bool* out_success) { + if (access_mode_ == AccessMode::kAutoAttachOnly) +- return Response::ServerError(kNotAllowedError); ++ return Response::ServerError(kNotAllowedErrorTH); + scoped_refptr agent_host = + DevToolsAgentHost::GetForId(target_id); + if (!agent_host) +@@ -1178,7 +1178,7 @@ Response TargetHandler::ExposeDevToolsProtocol( + const std::string& target_id, + Maybe binding_name) { + if (access_mode_ != AccessMode::kBrowser) +- return Response::InvalidParams(kNotAllowedError); ++ return Response::InvalidParams(kNotAllowedErrorTH); + scoped_refptr agent_host = + DevToolsAgentHost::GetForId(target_id); + if (!agent_host) +@@ -1208,7 +1208,7 @@ Response TargetHandler::CreateTarget(const std::string& url, + Maybe for_tab, + std::string* out_target_id) { + if (access_mode_ == AccessMode::kAutoAttachOnly) +- return Response::ServerError(kNotAllowedError); ++ return Response::ServerError(kNotAllowedErrorTH); + DevToolsManagerDelegate* delegate = + DevToolsManager::GetInstance()->delegate(); + if (!delegate) +@@ -1234,7 +1234,7 @@ Response TargetHandler::GetTargets( + Maybe> filter, + std::unique_ptr>* target_infos) { + if (access_mode_ == AccessMode::kAutoAttachOnly) +- return Response::ServerError(kNotAllowedError); ++ return Response::ServerError(kNotAllowedErrorTH); + std::unique_ptr passed_filter = + filter.has_value() || !discover_target_filter_ + ? TargetFilter::Create(std::move(filter)) +@@ -1309,7 +1309,7 @@ void TargetHandler::CreateBrowserContext( + Maybe> in_originsToGrantUniversalNetworkAccess, + std::unique_ptr callback) { + if (access_mode_ != AccessMode::kBrowser) { +- callback->sendFailure(Response::ServerError(kNotAllowedError)); ++ callback->sendFailure(Response::ServerError(kNotAllowedErrorTH)); + return; + } + DevToolsManagerDelegate* delegate = +@@ -1387,7 +1387,7 @@ void TargetHandler::CreateBrowserContext( + protocol::Response TargetHandler::GetBrowserContexts( + std::unique_ptr>* browser_context_ids) { + if (access_mode_ != AccessMode::kBrowser) +- return Response::ServerError(kNotAllowedError); ++ return Response::ServerError(kNotAllowedErrorTH); + DevToolsManagerDelegate* delegate = + DevToolsManager::GetInstance()->delegate(); + if (!delegate) +@@ -1405,7 +1405,7 @@ void TargetHandler::DisposeBrowserContext( + const std::string& context_id, + std::unique_ptr callback) { + if (access_mode_ != AccessMode::kBrowser) { +- callback->sendFailure(Response::ServerError(kNotAllowedError)); ++ callback->sendFailure(Response::ServerError(kNotAllowedErrorTH)); + return; + } + DevToolsManagerDelegate* delegate = +diff --git a/content/browser/devtools/web_contents_devtools_agent_host.cc b/content/browser/devtools/web_contents_devtools_agent_host.cc +index 0569c749cf..adeefaad3d 100644 +--- a/content/browser/devtools/web_contents_devtools_agent_host.cc ++++ b/content/browser/devtools/web_contents_devtools_agent_host.cc +@@ -18,14 +18,14 @@ namespace content { + namespace { + using WebContentsDevToolsMap = + std::map; +-base::LazyInstance::Leaky g_agent_host_instances = ++base::LazyInstance::Leaky g_agent_host_instances2 = + LAZY_INSTANCE_INITIALIZER; + + WebContentsDevToolsAgentHost* FindAgentHost(WebContents* wc) { +- if (!g_agent_host_instances.IsCreated()) ++ if (!g_agent_host_instances2.IsCreated()) + return nullptr; +- auto it = g_agent_host_instances.Get().find(wc); +- return it == g_agent_host_instances.Get().end() ? nullptr : it->second; ++ auto it = g_agent_host_instances2.Get().find(wc); ++ return it == g_agent_host_instances2.Get().end() ? nullptr : it->second; + } + + // This implements the DevTools definition of outermost web contents, +@@ -178,13 +178,13 @@ void WebContentsDevToolsAgentHost::InnerAttach(WebContents* wc) { + // a different host created. + // TODO(caseq): find a better solution. See also a similar comment in + // RenderFrameDevToolsAgentHost::SetFrameTreeNode(); +- auto prev_entry = g_agent_host_instances.Get().find(wc); +- if (prev_entry != g_agent_host_instances.Get().end()) { ++ auto prev_entry = g_agent_host_instances2.Get().find(wc); ++ if (prev_entry != g_agent_host_instances2.Get().end()) { + CHECK_NE(prev_entry->second, this); + prev_entry->second->InnerDetach(); + } + const bool inserted = +- g_agent_host_instances.Get().insert(std::make_pair(wc, this)).second; ++ g_agent_host_instances2.Get().insert(std::make_pair(wc, this)).second; + CHECK(inserted); + auto_attacher_->SetWebContents(wc); + Observe(wc); +@@ -196,7 +196,7 @@ void WebContentsDevToolsAgentHost::InnerAttach(WebContents* wc) { + void WebContentsDevToolsAgentHost::InnerDetach() { + DCHECK_EQ(this, FindAgentHost(web_contents())); + auto_attacher_->SetWebContents(nullptr); +- g_agent_host_instances.Get().erase(web_contents()); ++ g_agent_host_instances2.Get().erase(web_contents()); + Observe(nullptr); + // We may or may not be destruced here, depending on embedders + // potentially retaining references. +diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc +index 8cc30d6e8e..c1a203f863 100644 +--- a/content/browser/gpu/compositor_util.cc ++++ b/content/browser/gpu/compositor_util.cc +@@ -108,7 +108,7 @@ const GpuFeatureData GetGpuFeatureData( + {"canvas_oop_rasterization", + SafeGetFeatureStatus(gpu_feature_info, + gpu::GPU_FEATURE_TYPE_CANVAS_OOP_RASTERIZATION), +- !features::IsCanvasOopRasterizationEnabled() || ++ !::features::IsCanvasOopRasterizationEnabled() || + command_line.HasSwitch(switches::kDisableAccelerated2dCanvas), + #if 0 + // TODO(crbug.com/1240756): Remove the "#if 0" once OOPR-Canvas is fully +@@ -196,7 +196,7 @@ const GpuFeatureData GetGpuFeatureData( + {"surface_control", + SafeGetFeatureStatus(gpu_feature_info, + gpu::GPU_FEATURE_TYPE_ANDROID_SURFACE_CONTROL), +- !features::IsAndroidSurfaceControlEnabled(), ++ !::features::IsAndroidSurfaceControlEnabled(), + DisableInfo::Problem( + "Surface Control has been disabled by Finch trial or command line."), + false}, +@@ -224,7 +224,7 @@ const GpuFeatureData GetGpuFeatureData( + {"skia_graphite", + SafeGetFeatureStatus(gpu_feature_info, + gpu::GPU_FEATURE_TYPE_SKIA_GRAPHITE), +- !base::FeatureList::IsEnabled(features::kSkiaGraphite) && ++ !base::FeatureList::IsEnabled(::features::kSkiaGraphite) && + !command_line.HasSwitch(switches::kEnableSkiaGraphite), + DisableInfo::NotProblem(), false}, + }; +@@ -455,7 +455,7 @@ bool IsZeroCopyUploadEnabled() { + + bool IsPartialRasterEnabled() { + // Partial raster is not supported with RawDraw. +- if (features::IsUsingRawDraw()) { ++ if (::features::IsUsingRawDraw()) { + return false; + } + const auto& command_line = *base::CommandLine::ForCurrentProcess(); +@@ -465,7 +465,7 @@ bool IsPartialRasterEnabled() { + bool IsGpuMemoryBufferCompositorResourcesEnabled() { + // To use Raw Draw, the Raw Draw shared image backing should be used, so + // not use GPU memory buffer shared image backings for compositor resources. +- if (features::IsUsingRawDraw()) { ++ if (::features::IsUsingRawDraw()) { + return false; + } + const base::CommandLine& command_line = +@@ -482,7 +482,7 @@ bool IsGpuMemoryBufferCompositorResourcesEnabled() { + #if BUILDFLAG(IS_APPLE) + return true; + #elif BUILDFLAG(IS_CHROMEOS_LACROS) +- return features::IsDelegatedCompositingEnabled(); ++ return ::features::IsDelegatedCompositingEnabled(); + #else + return false; + #endif +diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc +index c062520d8e..70b4878c96 100644 +--- a/content/browser/gpu/gpu_process_host.cc ++++ b/content/browser/gpu/gpu_process_host.cc +@@ -750,7 +750,7 @@ GpuProcessHost::GpuProcessHost(int host_id, GpuProcessKind kind) + #if !BUILDFLAG(IS_ANDROID) + if (!in_process_ && kind != GPU_PROCESS_KIND_INFO_COLLECTION && + base::FeatureList::IsEnabled( +- features::kForwardMemoryPressureEventsToGpuProcess)) { ++ ::features::kForwardMemoryPressureEventsToGpuProcess)) { + memory_pressure_listener_ = std::make_unique( + FROM_HERE, base::BindRepeating(&GpuProcessHost::OnMemoryPressure, + base::Unretained(this))); +diff --git a/content/browser/interest_group/bidding_and_auction_serializer.cc b/content/browser/interest_group/bidding_and_auction_serializer.cc +index a662460231..16ef6662ad 100644 +--- a/content/browser/interest_group/bidding_and_auction_serializer.cc ++++ b/content/browser/interest_group/bidding_and_auction_serializer.cc +@@ -27,7 +27,7 @@ namespace content { + + namespace { + +-const size_t kFramingHeaderSize = 5; // bytes ++const size_t kFramingHeaderSizeBAAS = 5; // bytes + + const uint8_t kRequestVersion = 0; + const uint8_t kRequestVersionBitOffset = 5; +@@ -255,7 +255,7 @@ BiddingAndAuctionData BiddingAndAuctionSerializer::Build() { + std::optional> maybe_msg = cbor::Writer::Write(message); + DCHECK(maybe_msg); + +- size_t size_before_padding = kFramingHeaderSize + maybe_msg->size(); ++ size_t size_before_padding = kFramingHeaderSizeBAAS + maybe_msg->size(); + size_t desired_size = absl::bit_ceil(size_before_padding); + + std::vector request(desired_size); +@@ -267,8 +267,8 @@ BiddingAndAuctionData BiddingAndAuctionSerializer::Build() { + request[2] = (request_size >> 16) & 0xff; + request[3] = (request_size >> 8) & 0xff; + request[4] = (request_size >> 0) & 0xff; +- DCHECK_GE(request.size(), kFramingHeaderSize + maybe_msg->size()); +- memcpy(&request[kFramingHeaderSize], maybe_msg->data(), maybe_msg->size()); ++ DCHECK_GE(request.size(), kFramingHeaderSizeBAAS + maybe_msg->size()); ++ memcpy(&request[kFramingHeaderSizeBAAS], maybe_msg->data(), maybe_msg->size()); + + data.request = std::move(request); + return data; +diff --git a/content/browser/interest_group/interest_group_manager_impl.cc b/content/browser/interest_group/interest_group_manager_impl.cc +index 95009f773f..b0c1e7bc1a 100644 +--- a/content/browser/interest_group/interest_group_manager_impl.cc ++++ b/content/browser/interest_group/interest_group_manager_impl.cc +@@ -54,7 +54,7 @@ constexpr base::TimeDelta kMaxReportingRoundDuration = base::Minutes(10); + // The time interval to wait before sending the next report after sending one. + constexpr base::TimeDelta kReportingInterval = base::Milliseconds(50); + +-constexpr net::NetworkTrafficAnnotationTag kTrafficAnnotation = ++constexpr net::NetworkTrafficAnnotationTag kTrafficAnnotationIGMI = + net::DefineNetworkTrafficAnnotation("auction_report_sender", R"( + semantics { + sender: "Interest group based Ad Auction report" +@@ -138,7 +138,7 @@ std::unique_ptr BuildUncredentialedRequest( + std::unique_ptr BuildSimpleUrlLoader( + std::unique_ptr resource_request) { + auto simple_url_loader = network::SimpleURLLoader::Create( +- std::move(resource_request), kTrafficAnnotation); ++ std::move(resource_request), kTrafficAnnotationIGMI); + simple_url_loader->SetTimeoutDuration(base::Seconds(30)); + + simple_url_loader->SetAllowHttpErrorResults(true); +diff --git a/content/browser/interest_group/interest_group_permissions_checker.cc b/content/browser/interest_group/interest_group_permissions_checker.cc +index c101a5144c..3ae72fceff 100644 +--- a/content/browser/interest_group/interest_group_permissions_checker.cc ++++ b/content/browser/interest_group/interest_group_permissions_checker.cc +@@ -28,7 +28,7 @@ namespace content { + + namespace { + +-constexpr net::NetworkTrafficAnnotationTag kTrafficAnnotation = ++constexpr net::NetworkTrafficAnnotationTag kTrafficAnnotationIGPC = + net::DefineNetworkTrafficAnnotation("interest_group_well_known_fetcher", R"( + semantics { + sender: "Interest group well-known fetcher" +@@ -142,7 +142,7 @@ void InterestGroupPermissionsChecker::CheckPermissions( + + active_request->second->simple_url_loader = + network::SimpleURLLoader::Create(std::move(resource_request), +- kTrafficAnnotation); ++ kTrafficAnnotationIGPC); + active_request->second->simple_url_loader->SetTimeoutDuration( + kRequestTimeout); + active_request->second->simple_url_loader->SetRequestID( +diff --git a/content/browser/media/media_internals_cdm_helper.cc b/content/browser/media/media_internals_cdm_helper.cc +index 85e33ac608..eb345851ae 100644 +--- a/content/browser/media/media_internals_cdm_helper.cc ++++ b/content/browser/media/media_internals_cdm_helper.cc +@@ -118,7 +118,7 @@ base::Value::Dict CdmInfoToDict(const CdmInfo& cdm_info) { + return dict; + } + +-std::u16string SerializeUpdate(base::StringPiece function, ++std::u16string SerializeUpdate2(base::StringPiece function, + const base::Value::List& value) { + base::ValueView args[] = {value}; + return content::WebUI::GetJavascriptCall(function, args); +@@ -149,7 +149,7 @@ void MediaInternalsCdmHelper::OnKeySystemCapabilitiesUpdated( + } + + return MediaInternals::GetInstance()->SendUpdate( +- SerializeUpdate("media.updateRegisteredCdms", cdm_list)); ++ SerializeUpdate2("media.updateRegisteredCdms", cdm_list)); + } + + } // namespace content +diff --git a/content/browser/media/media_license_database.cc b/content/browser/media/media_license_database.cc +index faf90f2eb7..71f7286143 100644 +--- a/content/browser/media/media_license_database.cc ++++ b/content/browser/media/media_license_database.cc +@@ -19,9 +19,9 @@ using MediaLicenseStorageHostOpenError = + + namespace { + +-static const int kVersionNumber = 1; ++static const int kVersionNumberMLD = 1; + +-const char kUmaPrefix[] = "Media.EME.MediaLicenseDatabaseSQLiteError"; ++const char kUmaPrefixMLD[] = "Media.EME.MediaLicenseDatabaseSQLiteError"; + const char kUmaPrefixWithPeriod[] = + "Media.EME.MediaLicenseDatabaseSQLiteError."; + +@@ -230,7 +230,7 @@ MediaLicenseStorageHostOpenError MediaLicenseDatabase::OpenDatabase( + } + + sql::MetaTable meta_table; +- if (!meta_table.Init(&db_, kVersionNumber, kVersionNumber)) { ++ if (!meta_table.Init(&db_, kVersionNumberMLD, kVersionNumberMLD)) { + DVLOG(1) << "Could not initialize Media License database metadata table."; + // Wipe the database and start over. If we've already wiped the database and + // are still failing, just return false. +@@ -239,12 +239,12 @@ MediaLicenseStorageHostOpenError MediaLicenseDatabase::OpenDatabase( + : OpenDatabase(/*is_retry=*/true); + } + +- if (meta_table.GetCompatibleVersionNumber() > kVersionNumber) { ++ if (meta_table.GetCompatibleVersionNumber() > kVersionNumberMLD) { + // This should only happen if the user downgrades the Chrome channel (for + // example, from Beta to Stable). If that results in an incompatible schema, + // we need to wipe the database and start over. + DVLOG(1) << "Media License database is too new, kVersionNumber" +- << kVersionNumber << ", GetCompatibleVersionNumber=" ++ << kVersionNumberMLD << ", GetCompatibleVersionNumber=" + << meta_table.GetCompatibleVersionNumber(); + db_.Raze(); + return is_retry ? MediaLicenseStorageHostOpenError::kDatabaseRazeError +@@ -273,7 +273,7 @@ MediaLicenseStorageHostOpenError MediaLicenseDatabase::OpenDatabase( + void MediaLicenseDatabase::OnDatabaseError(int error, sql::Statement* stmt) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + +- sql::UmaHistogramSqliteResult(kUmaPrefix, error); ++ sql::UmaHistogramSqliteResult(kUmaPrefixMLD, error); + + if (last_operation_) { + sql::UmaHistogramSqliteResult(kUmaPrefixWithPeriod + *last_operation_, +diff --git a/content/browser/media/media_license_manager.cc b/content/browser/media/media_license_manager.cc +index 92f3e698da..91a171a133 100644 +--- a/content/browser/media/media_license_manager.cc ++++ b/content/browser/media/media_license_manager.cc +@@ -41,7 +41,7 @@ using MediaLicenseStorageHostOpenError = + namespace { + + // Creates a task runner suitable for running SQLite database operations. +-scoped_refptr CreateDatabaseTaskRunner() { ++scoped_refptr CreateDatabaseTaskRunner_MLM() { + // We use a SequencedTaskRunner so that there is a global ordering to a + // storage key's directory operations. + return base::ThreadPool::CreateSequencedTaskRunner({ +@@ -64,7 +64,7 @@ MediaLicenseManager::MediaLicenseManager( + bool in_memory, + scoped_refptr special_storage_policy, + scoped_refptr quota_manager_proxy) +- : db_runner_(CreateDatabaseTaskRunner()), ++ : db_runner_(CreateDatabaseTaskRunner_MLM()), + in_memory_(in_memory), + special_storage_policy_(std::move(special_storage_policy)), + quota_manager_proxy_(std::move(quota_manager_proxy)), +diff --git a/content/browser/network/cross_origin_embedder_policy_reporter.cc b/content/browser/network/cross_origin_embedder_policy_reporter.cc +index 1e1ab5c3c5..1b291b57be 100644 +--- a/content/browser/network/cross_origin_embedder_policy_reporter.cc ++++ b/content/browser/network/cross_origin_embedder_policy_reporter.cc +@@ -14,7 +14,7 @@ namespace content { + + namespace { + +-constexpr char kType[] = "coep"; ++constexpr char kTypeCoep[] = "coep"; + + GURL StripUsernameAndPassword(const GURL& url) { + GURL::Replacements replacements; +@@ -109,7 +109,7 @@ void CrossOriginEmbedderPolicyReporter::QueueAndNotify( + blink::mojom::ReportBodyElement::New("disposition", disposition)); + + observer_->Notify(blink::mojom::Report::New( +- kType, context_url_, blink::mojom::ReportBody::New(std::move(list)))); ++ kTypeCoep, context_url_, blink::mojom::ReportBody::New(std::move(list)))); + } + if (endpoint) { + base::Value::Dict body_to_pass; +@@ -120,7 +120,7 @@ void CrossOriginEmbedderPolicyReporter::QueueAndNotify( + + if (auto* storage_partition = storage_partition_.get()) { + storage_partition->GetNetworkContext()->QueueReport( +- kType, *endpoint, context_url_, reporting_source_, ++ kTypeCoep, *endpoint, context_url_, reporting_source_, + network_anonymization_key_, + /*user_agent=*/std::nullopt, std::move(body_to_pass)); + } +diff --git a/content/browser/preloading/prefetch/prefetch_url_loader_interceptor.cc b/content/browser/preloading/prefetch/prefetch_url_loader_interceptor.cc +index 6b6997d1b1..ad1f672cd1 100644 +--- a/content/browser/preloading/prefetch/prefetch_url_loader_interceptor.cc ++++ b/content/browser/preloading/prefetch/prefetch_url_loader_interceptor.cc +@@ -25,7 +25,7 @@ + namespace content { + namespace { + +-BrowserContext* BrowserContextFromFrameTreeNodeId(int frame_tree_node_id) { ++BrowserContext* BrowserContextFromFrameTreeNodeIdPULI(int frame_tree_node_id) { + WebContents* web_content = + WebContents::FromFrameTreeNodeId(frame_tree_node_id); + if (!web_content) +@@ -188,7 +188,7 @@ void PrefetchURLLoaderInterceptor::OnGetPrefetchComplete( + // TODO (https://crbug.com/1369766): Investigate if header_client param should + // be non-null, and then how to utilize it. + GetContentClient()->browser()->WillCreateURLLoaderFactory( +- BrowserContextFromFrameTreeNodeId(frame_tree_node_id_), render_frame_host, ++ BrowserContextFromFrameTreeNodeIdPULI(frame_tree_node_id_), render_frame_host, + render_frame_host->GetProcess()->GetID(), + ContentBrowserClient::URLLoaderFactoryType::kNavigation, url::Origin(), + navigation_request->GetNavigationId(), +diff --git a/content/browser/preloading/preloading_config.cc b/content/browser/preloading/preloading_config.cc +index bb2ce4b4f3..cf5a1a33ac 100644 +--- a/content/browser/preloading/preloading_config.cc ++++ b/content/browser/preloading/preloading_config.cc +@@ -27,7 +27,7 @@ namespace { + // logged in UKM. See crbug.com/1411841#c3 to see how the sampling_likelihood + // default values are determined. + constexpr base::FeatureParam kPreloadingConfigParam{ +- &features::kPreloadingConfig, "preloading_config", R"( ++ &::features::kPreloadingConfig, "preloading_config", R"( + [{ + "preloading_type": "NoStatePrefetch", + "preloading_predictor": "LinkRel", +@@ -125,7 +125,7 @@ PreloadingConfig* PreloadingConfig::OverrideForTesting( + void PreloadingConfig::ParseConfig() { + entries_.clear(); + +- if (!base::FeatureList::IsEnabled(features::kPreloadingConfig)) { ++ if (!base::FeatureList::IsEnabled(::features::kPreloadingConfig)) { + return; + } + // Throughout parsing the config, if we fail to parse, we silently skip the +diff --git a/content/browser/push_messaging/push_messaging_router.cc b/content/browser/push_messaging/push_messaging_router.cc +index 3726401f32..086fb99f33 100644 +--- a/content/browser/push_messaging/push_messaging_router.cc ++++ b/content/browser/push_messaging/push_messaging_router.cc +@@ -263,7 +263,7 @@ void PushMessagingRouter::FireSubscriptionChangeEvent( + blink::mojom::PushSubscriptionPtr old_subscription, + PushEventCallback subscription_change_callback) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); +- DCHECK(base::FeatureList::IsEnabled(features::kPushSubscriptionChangeEvent)); ++ DCHECK(base::FeatureList::IsEnabled(::features::kPushSubscriptionChangeEvent)); + + StartServiceWorkerForDispatch( + ServiceWorkerMetrics::EventType::PUSH_SUBSCRIPTION_CHANGE, +@@ -282,7 +282,7 @@ void PushMessagingRouter::FireSubscriptionChangeEventToWorker( + scoped_refptr service_worker_context, + blink::ServiceWorkerStatusCode status) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); +- DCHECK(base::FeatureList::IsEnabled(features::kPushSubscriptionChangeEvent)); ++ DCHECK(base::FeatureList::IsEnabled(::features::kPushSubscriptionChangeEvent)); + + if (!service_worker) { + DCHECK_NE(blink::ServiceWorkerStatusCode::kOk, status); +diff --git a/content/browser/renderer_host/agent_scheduling_group_host.cc b/content/browser/renderer_host/agent_scheduling_group_host.cc +index c2fb50fcc7..b2c5456b52 100644 +--- a/content/browser/renderer_host/agent_scheduling_group_host.cc ++++ b/content/browser/renderer_host/agent_scheduling_group_host.cc +@@ -36,14 +36,6 @@ namespace { + using ::IPC::ChannelMojo; + using ::IPC::ChannelProxy; + using ::IPC::Listener; +-using ::mojo::AssociatedReceiver; +-using ::mojo::AssociatedRemote; +-using ::mojo::PendingAssociatedReceiver; +-using ::mojo::PendingAssociatedRemote; +-using ::mojo::PendingReceiver; +-using ::mojo::PendingRemote; +-using ::mojo::Receiver; +-using ::mojo::Remote; + + static constexpr char kAgentSchedulingGroupHostDataKey[] = + "AgentSchedulingGroupHostUserDataKey"; +@@ -68,10 +60,10 @@ struct AgentSchedulingGroupHostUserData : public base::SupportsUserData::Data { + #endif + }; + +-static features::MBIMode GetMBIMode() { +- return base::FeatureList::IsEnabled(features::kMBIMode) +- ? features::kMBIModeParam.Get() +- : features::MBIMode::kLegacy; ++static ::features::MBIMode GetMBIMode() { ++ return base::FeatureList::IsEnabled(::features::kMBIMode) ++ ? ::features::kMBIModeParam.Get() ++ : ::features::MBIMode::kLegacy; + } + + } // namespace +@@ -93,8 +85,8 @@ AgentSchedulingGroupHost* AgentSchedulingGroupHost::GetOrCreate( + + DCHECK(data); + +- if (GetMBIMode() == features::MBIMode::kLegacy || +- GetMBIMode() == features::MBIMode::kEnabledPerRenderProcessHost) { ++ if (GetMBIMode() == ::features::MBIMode::kLegacy || ++ GetMBIMode() == ::features::MBIMode::kEnabledPerRenderProcessHost) { + // We don't use |data->site_instance_groups| at all when + // AgentSchedulingGroupHost is 1:1 with RenderProcessHost. + #if DCHECK_IS_ON() +@@ -118,7 +110,7 @@ AgentSchedulingGroupHost* AgentSchedulingGroupHost::GetOrCreate( + return data->owned_host_set.begin()->get(); + } + +- DCHECK_EQ(GetMBIMode(), features::MBIMode::kEnabledPerSiteInstance); ++ DCHECK_EQ(GetMBIMode(), ::features::MBIMode::kEnabledPerSiteInstance); + + // If we're in an MBI mode that creates multiple AgentSchedulingGroupHosts + // per RenderProcessHost, then this will be called whenever SiteInstance needs +@@ -237,7 +229,7 @@ void AgentSchedulingGroupHost::AddFilter(BrowserMessageFilter* filter) { + DCHECK(filter); + // When MBI mode is disabled, we forward these kinds of requests straight to + // the underlying `RenderProcessHost`. +- if (GetMBIMode() == features::MBIMode::kLegacy) { ++ if (GetMBIMode() == ::features::MBIMode::kLegacy) { + process_->AddFilter(filter); + return; + } +@@ -278,7 +270,7 @@ base::SafeRef AgentSchedulingGroupHost::GetSafeRef() + ChannelProxy* AgentSchedulingGroupHost::GetChannel() { + DCHECK_EQ(state_, LifecycleState::kBound); + +- if (GetMBIMode() == features::MBIMode::kLegacy) ++ if (GetMBIMode() == ::features::MBIMode::kLegacy) + return process_->GetChannel(); + + DCHECK(channel_); +@@ -290,7 +282,7 @@ bool AgentSchedulingGroupHost::Send(IPC::Message* message) { + + std::unique_ptr msg(message); + +- if (GetMBIMode() == features::MBIMode::kLegacy) ++ if (GetMBIMode() == ::features::MBIMode::kLegacy) + return process_->Send(msg.release()); + + // This DCHECK is too idealistic for now - messages that are handled by +@@ -422,7 +414,7 @@ void AgentSchedulingGroupHost::SetUpIPC() { + // 3. All the ASGH's other associated interfaces can now be initialized via + // `mojo_remote_`, and will be transitively associated with the appropriate + // IPC channel/pipe. +- if (GetMBIMode() == features::MBIMode::kLegacy) { ++ if (GetMBIMode() == ::features::MBIMode::kLegacy) { + process_->GetRendererInterface()->CreateAssociatedAgentSchedulingGroup( + mojo_remote_.BindNewEndpointAndPassReceiver(), + broker_receiver_.BindNewPipeAndPassRemote()); +@@ -430,7 +422,7 @@ void AgentSchedulingGroupHost::SetUpIPC() { + auto io_task_runner = GetIOThreadTaskRunner({}); + + // Empty interface endpoint to pass pipes more easily. +- PendingRemote bootstrap; ++ mojo::PendingRemote bootstrap; + + process_->GetRendererInterface()->CreateAgentSchedulingGroup( + bootstrap.InitWithNewPipeAndPassReceiver(), +diff --git a/content/browser/renderer_host/code_cache_host_impl.h b/content/browser/renderer_host/code_cache_host_impl.h +index e4069b9828..54a76218c3 100644 +--- a/content/browser/renderer_host/code_cache_host_impl.h ++++ b/content/browser/renderer_host/code_cache_host_impl.h +@@ -12,6 +12,8 @@ + #include "base/memory/weak_ptr.h" + #include "build/build_config.h" + #include "components/services/storage/public/mojom/cache_storage_control.mojom.h" ++#include "content/browser/code_cache/generated_code_cache.h" ++#include "content/browser/code_cache/generated_code_cache_context.h" + #include "content/common/content_export.h" + #include "mojo/public/cpp/base/big_buffer.h" + #include "mojo/public/cpp/bindings/pending_receiver.h" +@@ -24,8 +26,8 @@ class GURL; + + namespace content { + +-class GeneratedCodeCache; +-class GeneratedCodeCacheContext; ++// class GeneratedCodeCache; ++// class GeneratedCodeCacheContext; + + // The implementation of a CodeCacheHost, which stores and retrieves resource + // metadata, either bytecode or native code, generated by a renderer process. +diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc +index 5db8665f14..90eb0fbb4a 100644 +--- a/content/browser/renderer_host/media/media_stream_manager.cc ++++ b/content/browser/renderer_host/media/media_stream_manager.cc +@@ -193,7 +193,7 @@ MediaStreamType ConvertToMediaStreamType(MediaDeviceType type) { + return MediaStreamType::NO_SERVICE; + } + +-const char* DeviceTypeToString(MediaDeviceType type) { ++const char* DeviceTypeToStringMSM(MediaDeviceType type) { + switch (type) { + case MediaDeviceType::kMediaAudioInput: + return "DEVICE_AUDIO_INPUT"; +@@ -358,7 +358,7 @@ std::string GetStopStreamDeviceLogString( + requester_id, device_id.c_str(), session_id.ToString().c_str()); + } + +-void SendLogMessage(const std::string& message) { ++void SendLogMessageMSM(const std::string& message) { + MediaStreamManager::SendMessageToNativeLog("MSM::" + message); + } + +@@ -625,7 +625,7 @@ class MediaStreamManager::DeviceRequest { + audio_type_(MediaStreamType::NO_SERVICE), + video_type_(MediaStreamType::NO_SERVICE), + target_render_frame_host_id_(-1, -1) { +- SendLogMessage(base::StringPrintf( ++ SendLogMessageMSM(base::StringPrintf( + "DR::DeviceRequest({requesting_process_id=%d}, " + "{requesting_frame_id=%d}, {requester_id=%d}, {request_type=%s})", + requesting_render_frame_host_id.child_id, +@@ -643,7 +643,7 @@ class MediaStreamManager::DeviceRequest { + void SetAudioType(MediaStreamType audio_type) { + DCHECK(blink::IsAudioInputMediaType(audio_type) || + audio_type == MediaStreamType::NO_SERVICE); +- SendLogMessage(base::StringPrintf( ++ SendLogMessageMSM(base::StringPrintf( + "DR::SetAudioType([requester_id=%d] {audio_type=%s})", requester_id, + StreamTypeToString(audio_type))); + audio_type_ = audio_type; +@@ -674,7 +674,7 @@ class MediaStreamManager::DeviceRequest { + void CreateUIRequest(const std::string& requested_audio_device_id, + const std::string& requested_video_device_id) { + DCHECK(!ui_request_); +- SendLogMessage(base::StringPrintf( ++ SendLogMessageMSM(base::StringPrintf( + "DR::CreateUIRequest([requester_id=%d] {requested_audio_device_id=%s}, " + "{requested_video_device_id=%s})", + requester_id, requested_audio_device_id.c_str(), +@@ -720,7 +720,7 @@ class MediaStreamManager::DeviceRequest { + + // Update the request state and notify observers. + void SetState(MediaStreamType stream_type, MediaRequestState new_state) { +- SendLogMessage(base::StringPrintf( ++ SendLogMessageMSM(base::StringPrintf( + "DR::SetState([requester_id=%d] {stream_type=%s}, {new_state=%s})", + requester_id, StreamTypeToString(stream_type), + RequestStateToString(new_state))); +@@ -1069,7 +1069,7 @@ class MediaStreamManager::MediaAccessRequest + const blink::mojom::StreamDevicesSet& stream_devices_set) override { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + DCHECK(media_access_request_cb_); +- SendLogMessage(base::StringPrintf( ++ SendLogMessageMSM(base::StringPrintf( + "FinalizeMediaAccessRequest({label=%s}, {requester_id=" + "%d}, {request_type=%s})", + label.c_str(), requester_id, RequestTypeToString(request_type()))); +@@ -1142,7 +1142,7 @@ class MediaStreamManager::CreateDeviceRequest + const blink::mojom::StreamDevices& new_devices = + *stream_devices_set.stream_devices[0]; + +- SendLogMessage(base::StringPrintf( ++ SendLogMessageMSM(base::StringPrintf( + "FinalizeChangeDevice({label=%s}, {requester_id=" + "%d}, {request_type=%s})", + label.c_str(), requester_id, RequestTypeToString(request_type()))); +@@ -1451,7 +1451,7 @@ class MediaStreamManager::OpenDeviceRequest + void FinalizeRequest(const std::string& label) override { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + DCHECK(open_device_cb_); +- SendLogMessage(base::StringPrintf( ++ SendLogMessageMSM(base::StringPrintf( + "FinalizeOpenDevice({label=%s}, {requester_id=" + "%d}, {request_type=%s})", + label.c_str(), requester_id, RequestTypeToString(request_type()))); +@@ -1505,7 +1505,7 @@ MediaStreamManager* MediaStreamManager::GetInstance() { + + MediaStreamManager::MediaStreamManager(media::AudioSystem* audio_system) + : MediaStreamManager(audio_system, nullptr) { +- SendLogMessage(base::StringPrintf("MediaStreamManager([this=%p]))", this)); ++ SendLogMessageMSM(base::StringPrintf("MediaStreamManager([this=%p]))", this)); + } + + MediaStreamManager::MediaStreamManager( +@@ -1706,7 +1706,7 @@ void MediaStreamManager::GenerateStreams( + device_capture_configuration_change_cb, + DeviceCaptureHandleChangeCallback device_capture_handle_change_cb) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); +- SendLogMessage(GetGenerateStreamsLogString(render_frame_host_id, requester_id, ++ SendLogMessageMSM(GetGenerateStreamsLogString(render_frame_host_id, requester_id, + page_request_id)); + std::unique_ptr request = + std::make_unique( +@@ -1827,7 +1827,7 @@ void MediaStreamManager::CancelRequest(const std::string& label) { + + const DeviceRequests::const_iterator request_it = FindRequestIterator(label); + if (request_it == requests_.end()) { +- SendLogMessage( ++ SendLogMessageMSM( + base::StringPrintf("CancelRequest({label=%s})", label.c_str())); + LOG(ERROR) << "The request with label = " << label << " does not exist."; + return; +@@ -1862,7 +1862,7 @@ void MediaStreamManager::StopStreamDevice( + const std::string& device_id, + const base::UnguessableToken& session_id) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); +- SendLogMessage(GetStopStreamDeviceLogString( ++ SendLogMessageMSM(GetStopStreamDeviceLogString( + render_frame_host_id, requester_id, device_id, session_id)); + + // Find the first request for this `render_frame_host_id` +@@ -1961,7 +1961,7 @@ base::UnguessableToken MediaStreamManager::VideoDeviceIdToSessionId( + void MediaStreamManager::StopDevice(MediaStreamType type, + const base::UnguessableToken& session_id) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); +- SendLogMessage(base::StringPrintf("StopDevice({type=%s}, {session_id=%s})", ++ SendLogMessageMSM(base::StringPrintf("StopDevice({type=%s}, {session_id=%s})", + StreamTypeToString(type), + session_id.ToString().c_str())); + DeviceRequests::const_iterator request_it = requests_.begin(); +@@ -2024,7 +2024,7 @@ void MediaStreamManager::StopDevice(MediaStreamType type, + void MediaStreamManager::CloseDevice(MediaStreamType type, + const base::UnguessableToken& session_id) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); +- SendLogMessage(base::StringPrintf("CloseDevice({type=%s}, {session_id=%s})", ++ SendLogMessageMSM(base::StringPrintf("CloseDevice({type=%s}, {session_id=%s})", + StreamTypeToString(type), + session_id.ToString().c_str())); + GetDeviceManager(type)->Close(session_id); +@@ -2081,7 +2081,7 @@ void MediaStreamManager::OpenDevice( + DCHECK_CURRENTLY_ON(BrowserThread::IO); + DCHECK(type == MediaStreamType::DEVICE_AUDIO_CAPTURE || + type == MediaStreamType::DEVICE_VIDEO_CAPTURE); +- SendLogMessage(GetOpenDeviceLogString(render_frame_host_id, requester_id, ++ SendLogMessageMSM(GetOpenDeviceLogString(render_frame_host_id, requester_id, + page_request_id, device_id, type)); + StreamControls controls; + if (blink::IsAudioInputMediaType(type)) { +@@ -2131,9 +2131,9 @@ void MediaStreamManager::StopRemovedDevice( + DCHECK_CURRENTLY_ON(BrowserThread::IO); + DCHECK(type == MediaDeviceType::kMediaAudioInput || + type == MediaDeviceType::kMediaVideoInput); +- SendLogMessage(base::StringPrintf( ++ SendLogMessageMSM(base::StringPrintf( + "StopRemovedDevice({type=%s}, {device=[id: %s, name: %s]}", +- DeviceTypeToString(type), ++ DeviceTypeToStringMSM(type), + media_device_info.device_id.c_str(), + media_device_info.label.c_str()) + .c_str()); +@@ -2220,7 +2220,7 @@ void MediaStreamManager::TranslateDeviceIdToSourceId( + void MediaStreamManager::StartEnumeration(DeviceRequest* request, + const std::string& label) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); +- SendLogMessage( ++ SendLogMessageMSM( + base::StringPrintf("StartEnumeration({requester_id=%d}, {label=%s})", + request->requester_id, label.c_str())); + +@@ -2265,7 +2265,7 @@ MediaStreamManager::AddRequest(std::unique_ptr request) { + unique_label = base::Uuid::GenerateRandomV4().AsLowercaseString(); + } while (FindRequest(unique_label) != nullptr); + +- SendLogMessage( ++ SendLogMessageMSM( + base::StringPrintf("AddRequest([requester_id=%d]) => (label=%s)", + request->requester_id, unique_label.c_str())); + request->SetLabel(unique_label); +@@ -2437,7 +2437,7 @@ void MediaStreamManager::CancelRequest( + const std::string& label = request_it->first; + DeviceRequest* const request = request_it->second.get(); + +- SendLogMessage( ++ SendLogMessageMSM( + base::StringPrintf("CancelRequest({label=%s})", label.c_str())); + + // This is a request for closing one or more devices. +@@ -2474,7 +2474,7 @@ void MediaStreamManager::DeleteRequest( + DCHECK_CURRENTLY_ON(BrowserThread::IO); + DCHECK(request_it != requests_.end()); + +- SendLogMessage(base::StringPrintf("DeleteRequest([label=%s])", ++ SendLogMessageMSM(base::StringPrintf("DeleteRequest([label=%s])", + request_it->first.c_str())); + #if BUILDFLAG(IS_CHROMEOS) + if (request_it->second->IsGetAllScreensMedia()) { +@@ -2529,7 +2529,7 @@ void MediaStreamManager::PostRequestToUI( + return; + } + DCHECK(request->HasUIRequest()); +- SendLogMessage( ++ SendLogMessageMSM( + base::StringPrintf("PostRequestToUI({label=%s}, ", label.c_str())); + + const MediaStreamType audio_type = request->audio_type(); +@@ -2567,7 +2567,7 @@ void MediaStreamManager::SetUpRequest(const std::string& label) { + } + DeviceRequest* const request = request_it->second.get(); + +- SendLogMessage( ++ SendLogMessageMSM( + base::StringPrintf("SetUpRequest([requester_id=%d] {label=%s})", + request->requester_id, label.c_str())); + +@@ -2674,7 +2674,7 @@ bool MediaStreamManager::SetUpDeviceCaptureRequest( + request->audio_type() == MediaStreamType::NO_SERVICE) && + (request->video_type() == MediaStreamType::DEVICE_VIDEO_CAPTURE || + request->video_type() == MediaStreamType::NO_SERVICE)); +- SendLogMessage(base::StringPrintf( ++ SendLogMessageMSM(base::StringPrintf( + "SetUpDeviceCaptureRequest([requester_id=%d])", request->requester_id)); + std::string audio_device_id; + if (request->stream_controls().audio.requested() && +@@ -2979,7 +2979,7 @@ void MediaStreamManager::FinalizeGenerateStreams(const std::string& label, + DCHECK_CURRENTLY_ON(BrowserThread::IO); + DCHECK(request); + DCHECK_EQ(request->request_type(), blink::MEDIA_GENERATE_STREAM); +- SendLogMessage( ++ SendLogMessageMSM( + base::StringPrintf("FinalizeGenerateStreams({label=%s}, {requester_id=" + "%d}, {request_type=%s})", + label.c_str(), request->requester_id, +@@ -3035,7 +3035,7 @@ void MediaStreamManager::FinalizeGetOpenDevice(const std::string& label, + DCHECK_CURRENTLY_ON(BrowserThread::IO); + DCHECK(request); + DCHECK_EQ(request->request_type(), blink::MEDIA_GET_OPEN_DEVICE); +- SendLogMessage( ++ SendLogMessageMSM( + base::StringPrintf("FinalizeGetOpenDevice({label=%s}, {requester_id=" + "%d}, {request_type=%s})", + label.c_str(), request->requester_id, +@@ -3078,7 +3078,7 @@ void MediaStreamManager::PanTiltZoomPermissionChecked( + return; + } + +- SendLogMessage(base::StringPrintf( ++ SendLogMessageMSM(base::StringPrintf( + "PanTiltZoomPermissionChecked({label=%s}, {requester_id=" + "%d}, {request_type=%s}, {pan_tilt_zoom_allowed=%d})", + label.c_str(), request->requester_id, +@@ -3128,7 +3128,7 @@ void MediaStreamManager::FinalizeRequestFailed( + + DeviceRequest* const request = request_it->second.get(); + +- SendLogMessage(base::StringPrintf( ++ SendLogMessageMSM(base::StringPrintf( + "FinalizeRequestFailed({label=%s}, {requester_id=%d}, {result=%s})", + request_it->first.c_str(), request->requester_id, + RequestResultToString(result))); +@@ -3220,7 +3220,7 @@ void MediaStreamManager::InitializeMaybeAsync( + std::move(video_capture_provider))); + return; + } +- SendLogMessage(base::StringPrintf("InitializeMaybeAsync([this=%p])", this)); ++ SendLogMessageMSM(base::StringPrintf("InitializeMaybeAsync([this=%p])", this)); + + // Store a pointer to |this| on the IO thread to avoid having to jump to + // the UI thread to fetch a pointer to the MSM. In particular on Android, +@@ -3257,7 +3257,7 @@ void MediaStreamManager::Opened( + MediaStreamType stream_type, + const base::UnguessableToken& capture_session_id) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); +- SendLogMessage(base::StringPrintf("Opened({stream_type=%s}, {session_id=%s})", ++ SendLogMessageMSM(base::StringPrintf("Opened({stream_type=%s}, {session_id=%s})", + StreamTypeToString(stream_type), + capture_session_id.ToString().c_str())); + +@@ -3370,7 +3370,7 @@ void MediaStreamManager::Closed( + MediaStreamType stream_type, + const base::UnguessableToken& capture_session_id) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); +- SendLogMessage(base::StringPrintf("Closed({stream_type=%s}, {session_id=%s})", ++ SendLogMessageMSM(base::StringPrintf("Closed({stream_type=%s}, {session_id=%s})", + StreamTypeToString(stream_type), + capture_session_id.ToString().c_str())); + } +@@ -3388,7 +3388,7 @@ void MediaStreamManager::DevicesEnumerated( + } + DeviceRequest* const request = request_it->second.get(); + +- SendLogMessage(base::StringPrintf( ++ SendLogMessageMSM(base::StringPrintf( + "DevicesEnumerated({label=%s}, {requester_id=%d}, {request_type=%s})", + label.c_str(), request->requester_id, + RequestTypeToString(request->request_type()))); +@@ -3419,7 +3419,7 @@ void MediaStreamManager::Aborted( + MediaStreamType stream_type, + const base::UnguessableToken& capture_session_id) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); +- SendLogMessage(base::StringPrintf( ++ SendLogMessageMSM(base::StringPrintf( + "Aborted({stream_type=%s}, {session_id=%s})", + StreamTypeToString(stream_type), capture_session_id.ToString().c_str())); + StopDevice(stream_type, capture_session_id); +@@ -3486,7 +3486,7 @@ void MediaStreamManager::HandleAccessRequestResponse( + } + DeviceRequest* const request = request_it->second.get(); + +- SendLogMessage(base::StringPrintf( ++ SendLogMessageMSM(base::StringPrintf( + "HandleAccessRequestResponse({label=%s}, {request=%s}, {result=%s})", + label.c_str(), RequestTypeToString(request->request_type()), + RequestResultToString(result))); +@@ -3588,7 +3588,7 @@ void MediaStreamManager::HandleAccessRequestResponse( + *request->stream_devices_set.stream_devices[stream_index], + device); + request->SetState(device.type, state); +- SendLogMessage(base::StringPrintf( ++ SendLogMessageMSM(base::StringPrintf( + "HandleAccessRequestResponse([label=%s]) => " + "(already opened device: [id: %s, session_id: %s])", + label.c_str(), device.id.c_str(), +@@ -3610,7 +3610,7 @@ void MediaStreamManager::HandleAccessRequestResponse( + current_state != MEDIA_REQUEST_STATE_ERROR) { + request->SetState(device.type, MEDIA_REQUEST_STATE_OPENING); + } +- SendLogMessage( ++ SendLogMessageMSM( + base::StringPrintf("HandleAccessRequestResponse([label=%s]) => " + "(opening device: [id: %s, session_id: %s])", + label.c_str(), device.id.c_str(), +@@ -3699,7 +3699,7 @@ void MediaStreamManager::StopMediaStreamFromBrowser(const std::string& label) { + } + DeviceRequest* const request = request_it->second.get(); + +- SendLogMessage(base::StringPrintf("StopMediaStreamFromBrowser({label=%s})", ++ SendLogMessageMSM(base::StringPrintf("StopMediaStreamFromBrowser({label=%s})", + label.c_str())); + + // Notify renderers that the devices in the stream will be stopped. +@@ -3753,7 +3753,7 @@ void MediaStreamManager::ChangeMediaStreamSourceFromBrowser( + } + } + +- SendLogMessage(base::StringPrintf( ++ SendLogMessageMSM(base::StringPrintf( + "ChangeMediaStreamSourceFromBrowser({label=%s})", label.c_str())); + + SetUpDesktopCaptureChangeSourceRequest(request, label, media_id); +@@ -3771,7 +3771,7 @@ void MediaStreamManager::OnRequestStateChangeFromBrowser( + return; + } + +- SendLogMessage(base::StringPrintf("RequestStateChangeFromBrowser({label=%s})", ++ SendLogMessageMSM(base::StringPrintf("RequestStateChangeFromBrowser({label=%s})", + label.c_str())); + + request->OnRequestStateChangeFromBrowser(label, media_id, new_state); +@@ -3804,8 +3804,8 @@ void MediaStreamManager::NotifyDevicesChanged( + MediaDeviceType device_type, + const blink::WebMediaDeviceInfoArray& devices) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); +- SendLogMessage(base::StringPrintf("NotifyDevicesChanged({device_type=%s})", +- DeviceTypeToString(device_type))); ++ SendLogMessageMSM(base::StringPrintf("NotifyDevicesChanged({device_type=%s})", ++ DeviceTypeToStringMSM(device_type))); + + MediaObserver* media_observer = + GetContentClient()->browser()->GetMediaObserver(); +@@ -3833,7 +3833,7 @@ void MediaStreamManager::NotifyDevicesChanged( + + bool MediaStreamManager::RequestDone(const DeviceRequest& request) const { + DCHECK_CURRENTLY_ON(BrowserThread::IO); +- SendLogMessage(base::StringPrintf( ++ SendLogMessageMSM(base::StringPrintf( + "RequestDone({requester_id=%d}, {request_type=%s})", request.requester_id, + RequestTypeToString(request.request_type()))); + +@@ -4030,7 +4030,7 @@ void MediaStreamManager::OnStreamStarted(const std::string& label) { + if (!request) { + return; + } +- SendLogMessage(base::StringPrintf( ++ SendLogMessageMSM(base::StringPrintf( + "OnStreamStarted({label=%s}, {requester_id=%d}, {request_type=%s})", + label.c_str(), request->requester_id, + RequestTypeToString(request->request_type()))); +diff --git a/content/browser/renderer_host/media/media_stream_power_logger.cc b/content/browser/renderer_host/media/media_stream_power_logger.cc +index 733d66510f..450a1eb28e 100644 +--- a/content/browser/renderer_host/media/media_stream_power_logger.cc ++++ b/content/browser/renderer_host/media/media_stream_power_logger.cc +@@ -11,7 +11,7 @@ + namespace content { + + namespace { +-void SendLogMessage(const std::string& message) { ++void SendLogMessageMSPL(const std::string& message) { + MediaStreamManager::SendMessageToNativeLog("MSPL::" + message); + } + } // namespace +@@ -27,23 +27,23 @@ MediaStreamPowerLogger::~MediaStreamPowerLogger() { + } + + void MediaStreamPowerLogger::OnSuspend() { +- SendLogMessage(base::StringPrintf("OnSuspend([this=%p])", this)); ++ SendLogMessageMSPL(base::StringPrintf("OnSuspend([this=%p])", this)); + } + + void MediaStreamPowerLogger::OnResume() { +- SendLogMessage(base::StringPrintf("OnResume([this=%p])", this)); ++ SendLogMessageMSPL(base::StringPrintf("OnResume([this=%p])", this)); + } + + void MediaStreamPowerLogger::OnThermalStateChange( + base::PowerThermalObserver::DeviceThermalState new_state) { + const char* state_name = + base::PowerMonitorSource::DeviceThermalStateToString(new_state); +- SendLogMessage(base::StringPrintf( ++ SendLogMessageMSPL(base::StringPrintf( + "OnThermalStateChange({this=%p}, {new_state=%s})", this, state_name)); + } + + void MediaStreamPowerLogger::OnSpeedLimitChange(int new_limit) { +- SendLogMessage(base::StringPrintf( ++ SendLogMessageMSPL(base::StringPrintf( + "OnSpeedLimitChange({this=%p}, {new_limit=%d})", this, new_limit)); + } + +diff --git a/content/browser/renderer_host/media/render_frame_audio_input_stream_factory.cc b/content/browser/renderer_host/media/render_frame_audio_input_stream_factory.cc +index 587a9eeb2f..a574db0cee 100644 +--- a/content/browser/renderer_host/media/render_frame_audio_input_stream_factory.cc ++++ b/content/browser/renderer_host/media/render_frame_audio_input_stream_factory.cc +@@ -86,7 +86,7 @@ void TranslateDeviceId(const std::string& device_id, + // If we're unable to translate the device id, |cb| will not be run. + } + +-void GotSaltAndOrigin( ++void GotSaltAndOrigin2( + int process_id, + int frame_id, + base::OnceCallback cb) { + GetMediaDeviceSaltAndOrigin( + GlobalRenderFrameHostId(process_id, frame_id), +- base::BindOnce(&GotSaltAndOrigin, process_id, frame_id, std::move(cb))); ++ base::BindOnce(&GotSaltAndOrigin2, process_id, frame_id, std::move(cb))); + } + + } // namespace +diff --git a/content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.cc b/content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.cc +index 292641a8d1..a5fa1392cd 100644 +--- a/content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.cc ++++ b/content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.cc +@@ -81,7 +81,7 @@ void CallRemove(scoped_refptr file_system_context, + std::move(callback)); + } + +-void CallTouchFile( ++void CallTouchFile2( + scoped_refptr file_system_context, + const storage::FileSystemURL& url, + const base::Time& last_access_time, +@@ -247,7 +247,7 @@ int32_t PepperInternalFileRefBackend::Touch( + GetIOThreadTaskRunner({})->PostTask( + FROM_HERE, + base::BindOnce( +- CallTouchFile, GetFileSystemContext(), GetFileSystemURL(), ++ CallTouchFile2, GetFileSystemContext(), GetFileSystemURL(), + last_access_time, last_modified_time, + base::BindOnce(&PepperInternalFileRefBackend::DidFinishOnIOThread, + weak_factory_.GetWeakPtr(), reply_context, +diff --git a/content/browser/renderer_host/render_frame_proxy_host.cc b/content/browser/renderer_host/render_frame_proxy_host.cc +index b41f53a41a..58da6176c1 100644 +--- a/content/browser/renderer_host/render_frame_proxy_host.cc ++++ b/content/browser/renderer_host/render_frame_proxy_host.cc +@@ -67,10 +67,10 @@ typedef std::unordered_map::DestructorAtExit + g_routing_id_frame_proxy_map = LAZY_INSTANCE_INITIALIZER; + +-using TokenFrameMap = std::unordered_map; +-base::LazyInstance::Leaky g_token_frame_proxy_map = ++using TokenFrameProxyMap = std::unordered_map; ++base::LazyInstance::Leaky g_token_frame_proxy_map = + LAZY_INSTANCE_INITIALIZER; + + } // namespace +@@ -96,7 +96,7 @@ RenderFrameProxyHost* RenderFrameProxyHost::FromFrameToken( + int process_id, + const blink::RemoteFrameToken& frame_token) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); +- TokenFrameMap* frames = g_token_frame_proxy_map.Pointer(); ++ TokenFrameProxyMap* frames = g_token_frame_proxy_map.Pointer(); + auto it = frames->find(frame_token); + // The check against |process_id| isn't strictly necessary, but represents + // an extra level of protection against a renderer trying to force a frame +@@ -110,7 +110,7 @@ RenderFrameProxyHost* RenderFrameProxyHost::FromFrameToken( + bool RenderFrameProxyHost::IsFrameTokenInUse( + const blink::RemoteFrameToken& frame_token) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); +- TokenFrameMap* frames = g_token_frame_proxy_map.Pointer(); ++ TokenFrameProxyMap* frames = g_token_frame_proxy_map.Pointer(); + return frames->find(frame_token) != frames->end(); + } + +diff --git a/content/browser/service_worker/embedded_worker_instance.cc b/content/browser/service_worker/embedded_worker_instance.cc +index af99f798df..9a88a1d70b 100644 +--- a/content/browser/service_worker/embedded_worker_instance.cc ++++ b/content/browser/service_worker/embedded_worker_instance.cc +@@ -917,7 +917,7 @@ EmbeddedWorkerInstance::CreateFactoryBundle( + non_network_factories[url::kDataScheme] = DataURLLoaderFactory::Create(); + // Allow service workers for chrome:// or chrome-untrusted:// based on flags. + if (base::FeatureList::IsEnabled( +- features::kEnableServiceWorkersForChromeScheme) && ++ ::features::kEnableServiceWorkersForChromeScheme) && + origin.scheme() == content::kChromeUIScheme) { + non_network_factories.emplace( + content::kChromeUIScheme, +@@ -925,7 +925,7 @@ EmbeddedWorkerInstance::CreateFactoryBundle( + content::kChromeUIScheme, + base::flat_set())); + } else if (base::FeatureList::IsEnabled( +- features::kEnableServiceWorkersForChromeUntrusted) && ++ ::features::kEnableServiceWorkersForChromeUntrusted) && + origin.scheme() == content::kChromeUIUntrustedScheme) { + non_network_factories.emplace( + content::kChromeUIUntrustedScheme, +diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc +index c0ece46d3a..b06d275455 100644 +--- a/content/browser/service_worker/service_worker_context_wrapper.cc ++++ b/content/browser/service_worker/service_worker_context_wrapper.cc +@@ -1897,7 +1897,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( + } else { + DCHECK(storage_partition()); + if (base::FeatureList::IsEnabled( +- features::kPrivateNetworkAccessForWorkers)) { ++ ::features::kPrivateNetworkAccessForWorkers)) { + if (g_loader_factory_interceptor.Get()) { + g_loader_factory_interceptor.Get().Run(&pending_receiver); + } +@@ -1938,7 +1938,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( + // create a `WebUI` or a `WebUIController` for WebUI Service Workers so we + // register the URLDataSource directly. + if (base::FeatureList::IsEnabled( +- features::kEnableServiceWorkersForChromeScheme) && ++ ::features::kEnableServiceWorkersForChromeScheme) && + scope.scheme_piece() == kChromeUIScheme) { + config->RegisterURLDataSource(browser_context()); + static_cast( +@@ -1948,7 +1948,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( + browser_context(), kChromeUIScheme, + base::flat_set())); + } else if (base::FeatureList::IsEnabled( +- features::kEnableServiceWorkersForChromeUntrusted) && ++ ::features::kEnableServiceWorkersForChromeUntrusted) && + scope.scheme_piece() == kChromeUIUntrustedScheme) { + config->RegisterURLDataSource(browser_context()); + static_cast( +diff --git a/content/browser/service_worker/service_worker_controllee_request_handler.cc b/content/browser/service_worker/service_worker_controllee_request_handler.cc +index 4956d30b55..55ef658f75 100644 +--- a/content/browser/service_worker/service_worker_controllee_request_handler.cc ++++ b/content/browser/service_worker/service_worker_controllee_request_handler.cc +@@ -89,22 +89,22 @@ const char* FetchHandlerTypeToString( + + bool ShouldBypassFetchHandlerForMainResource(ServiceWorkerVersion& version) { + if (!base::FeatureList::IsEnabled( +- features::kServiceWorkerBypassFetchHandler)) { ++ ::features::kServiceWorkerBypassFetchHandler)) { + return false; + } + +- if (features::kServiceWorkerBypassFetchHandlerTarget.Get() != +- features::ServiceWorkerBypassFetchHandlerTarget::kMainResource) { ++ if (::features::kServiceWorkerBypassFetchHandlerTarget.Get() != ++ ::features::ServiceWorkerBypassFetchHandlerTarget::kMainResource) { + return false; + } + + // If the feature is enabled, the main resource request bypasses ServiceWorker + // and starts the worker in parallel for subsequent subresources. +- switch (features::kServiceWorkerBypassFetchHandlerStrategy.Get()) { ++ switch (::features::kServiceWorkerBypassFetchHandlerStrategy.Get()) { + // kFeatureOptIn means that the feature relies on the manual feature + // toggle from about://flags etc, which is triggered by developers. We + // bypass fetch handler regardless of the url matching in this case. +- case features::ServiceWorkerBypassFetchHandlerStrategy::kFeatureOptIn: ++ case ::features::ServiceWorkerBypassFetchHandlerStrategy::kFeatureOptIn: + RecordSkipReason( + ServiceWorkerControlleeRequestHandler::FetchHandlerSkipReason:: + kMainResourceSkippedDueToFeatureFlag); +@@ -112,7 +112,7 @@ bool ShouldBypassFetchHandlerForMainResource(ServiceWorkerVersion& version) { + // If kAllowList, the allowlist should be specified. In this case, main + // resource fetch handlers are bypassed only when the sha256 checksum of the + // script is in the allowlist. +- case features::ServiceWorkerBypassFetchHandlerStrategy::kAllowList: ++ case ::features::ServiceWorkerBypassFetchHandlerStrategy::kAllowList: + if (content::service_worker_loader_helpers:: + FetchHandlerBypassedHashStrings() + .contains(version.sha256_script_checksum())) { +@@ -551,12 +551,12 @@ void ServiceWorkerControlleeRequestHandler::ContinueWithActivatedVersion( + active_version->CountFeature( + blink::mojom::WebFeature::kServiceWorkerSkippedForEmptyFetchHandler); + CompleteWithoutLoader(); +- if (!features::kStartServiceWorkerForEmptyFetchHandler.Get()) { ++ if (!::features::kStartServiceWorkerForEmptyFetchHandler.Get()) { + return; + } +- if (features::kAsyncStartServiceWorkerForEmptyFetchHandler.Get()) { ++ if (::features::kAsyncStartServiceWorkerForEmptyFetchHandler.Get()) { + int duration = +- features::kAsyncStartServiceWorkerForEmptyFetchHandlerDurationInMs ++ ::features::kAsyncStartServiceWorkerForEmptyFetchHandlerDurationInMs + .Get(); + constexpr int kDurationThresholdInMs = 10 * 1000; // 10 seconds. + if (duration < 0 || duration > kDurationThresholdInMs) { +@@ -598,9 +598,9 @@ void ServiceWorkerControlleeRequestHandler::ContinueWithActivatedVersion( + // isn't started yet, skip the fetch handler and then start the + // ServiceWorker. + if (base::FeatureList::IsEnabled( +- features::kServiceWorkerBypassFetchHandler) && +- features::kServiceWorkerBypassFetchHandlerTarget.Get() == +- features::ServiceWorkerBypassFetchHandlerTarget:: ++ ::features::kServiceWorkerBypassFetchHandler) && ++ ::features::kServiceWorkerBypassFetchHandlerTarget.Get() == ++ ::features::ServiceWorkerBypassFetchHandlerTarget:: + kAllOnlyIfServiceWorkerNotStarted) { + switch (active_version->running_status()) { + case blink::EmbeddedWorkerStatus::kStopped: +diff --git a/content/browser/service_worker/service_worker_loader_helpers.cc b/content/browser/service_worker/service_worker_loader_helpers.cc +index b492e00437..59a0f70007 100644 +--- a/content/browser/service_worker/service_worker_loader_helpers.cc ++++ b/content/browser/service_worker/service_worker_loader_helpers.cc +@@ -331,7 +331,7 @@ bool IsPathRestrictionSatisfiedWithoutHeader(const GURL& scope, + const base::flat_set FetchHandlerBypassedHashStrings() { + const static base::NoDestructor> result( + base::SplitString( +- features::kServiceWorkerBypassFetchHandlerBypassedHashStrings.Get(), ++ ::features::kServiceWorkerBypassFetchHandlerBypassedHashStrings.Get(), + ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY)); + + return *result; +diff --git a/content/browser/service_worker/service_worker_main_resource_loader.cc b/content/browser/service_worker/service_worker_main_resource_loader.cc +index 14e5fe5906..50b53790da 100644 +--- a/content/browser/service_worker/service_worker_main_resource_loader.cc ++++ b/content/browser/service_worker/service_worker_main_resource_loader.cc +@@ -94,24 +94,24 @@ bool IsEligibleForRaceNetworkRequestByOriginTrial( + bool IsEligibleForRaceNetworkRequest( + scoped_refptr version) { + if (!base::FeatureList::IsEnabled( +- features::kServiceWorkerBypassFetchHandler)) { ++ ::features::kServiceWorkerBypassFetchHandler)) { + return false; + } +- if (features::kServiceWorkerBypassFetchHandlerTarget.Get() != +- features::ServiceWorkerBypassFetchHandlerTarget:: ++ if (::features::kServiceWorkerBypassFetchHandlerTarget.Get() != ++ ::features::ServiceWorkerBypassFetchHandlerTarget:: + kAllWithRaceNetworkRequest) { + return false; + } + +- switch (features::kServiceWorkerBypassFetchHandlerStrategy.Get()) { ++ switch (::features::kServiceWorkerBypassFetchHandlerStrategy.Get()) { + // kFeatureOptIn means that the feature relies on the manual feature + // toggle from about://flags etc, which is triggered by developers. +- case features::ServiceWorkerBypassFetchHandlerStrategy::kFeatureOptIn: ++ case ::features::ServiceWorkerBypassFetchHandlerStrategy::kFeatureOptIn: + return true; + // If kAllowList, the allowlist should be specified. In this case, + // RaceNetworkRequest is allowed only when the sha256 checksum of the + // script is in the allowlist. +- case features::ServiceWorkerBypassFetchHandlerStrategy::kAllowList: ++ case ::features::ServiceWorkerBypassFetchHandlerStrategy::kAllowList: + return HasRaceNetworkRequestEligibleScript(version); + } + } +@@ -481,7 +481,7 @@ bool ServiceWorkerMainResourceLoader::MaybeStartAutoPreload( + // running, preload requests for both main resource and subresources are not + // dispatched. + if (base::GetFieldTrialParamByFeatureAsBool( +- features::kServiceWorkerAutoPreload, ++ ::features::kServiceWorkerAutoPreload, + "enable_only_when_service_worker_not_running", + /*default_value=*/false) && + version->running_status() == blink::EmbeddedWorkerStatus::kRunning) { +@@ -504,7 +504,7 @@ bool ServiceWorkerMainResourceLoader::MaybeStartAutoPreload( + // dispatched for subresources. + version->set_fetch_handler_bypass_option( + base::GetFieldTrialParamByFeatureAsBool( +- features::kServiceWorkerAutoPreload, "enable_subresource_preload", ++ ::features::kServiceWorkerAutoPreload, "enable_subresource_preload", + /*default_value=*/true) + ? blink::mojom::ServiceWorkerFetchHandlerBypassOption::kAutoPreload + : blink::mojom::ServiceWorkerFetchHandlerBypassOption::kDefault); +diff --git a/content/child/BUILD.gn b/content/child/BUILD.gn +index 6742fc9754..b409564b77 100644 +--- a/content/child/BUILD.gn ++++ b/content/child/BUILD.gn +@@ -3,6 +3,7 @@ + # found in the LICENSE file. + + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//device/vr/buildflags/buildflags.gni") + import("//ppapi/buildflags/buildflags.gni") +@@ -12,9 +13,9 @@ if (is_android) { + } + + if (is_component_build) { +- link_target_type = "source_set" ++ link_target_type = "jumbo_source_set" + } else { +- link_target_type = "static_library" ++ link_target_type = "jumbo_static_library" + } + target(link_target_type, "child") { + # Targets external to content should always link to the public API. +diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn +index 250d68fe80..5ef417eef2 100644 +--- a/content/common/BUILD.gn ++++ b/content/common/BUILD.gn +@@ -4,6 +4,7 @@ + + import("//build/buildflag_header.gni") + import("//build/config/features.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//content/public/common/zygote/features.gni") + import("//ipc/features.gni") +@@ -61,7 +62,7 @@ if (is_linux || is_chromeos) { + } + } + +-source_set("common") { ++jumbo_source_set("common") { + # Targets external to content should always link to the public API. + # In addition, targets outside of the content component (shell and tests) + # must not link to this because it will duplicate the code in the component +@@ -235,6 +236,11 @@ source_set("common") { + "webid/identity_url_loader_throttle.cc", + "webid/identity_url_loader_throttle.h", + ] ++ jumbo_excluded_sources = [ ++ "common_param_traits.cc", ++ "content_message_generator.cc", ++ "content_param_traits.cc", ++ ] + + configs += [ + "//content:content_implementation", +@@ -544,6 +550,7 @@ mojom("mojo_bindings") { + visibility = [ "//content/*" ] + + disable_variants = true ++ disable_jumbo = true + + sources = [ + "agent_scheduling_group.mojom", +diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.h b/content/renderer/pepper/pepper_plugin_instance_impl.h +index d178eb807e..6ebcc2d186 100644 +--- a/content/renderer/pepper/pepper_plugin_instance_impl.h ++++ b/content/renderer/pepper/pepper_plugin_instance_impl.h +@@ -67,6 +67,11 @@ + #include "v8/include/v8-forward.h" + #include "v8/include/v8-persistent-handle.h" + ++// Windows defines 'PostMessage', so we have to undef it. ++#ifdef PostMessage ++#undef PostMessage ++#endif ++ + struct PP_Point; + + namespace blink { +diff --git a/content/renderer/service_worker/web_service_worker_provider_impl.cc b/content/renderer/service_worker/web_service_worker_provider_impl.cc +index 11d4e235f6..5fd53b2897 100644 +--- a/content/renderer/service_worker/web_service_worker_provider_impl.cc ++++ b/content/renderer/service_worker/web_service_worker_provider_impl.cc +@@ -32,7 +32,7 @@ const char kLostConnectionErrorMessage[] = + "Lost connection to the service worker system."; + + template +-static std::string MojoEnumToString(T mojo_enum) { ++static std::string MojoEnumToString2(T mojo_enum) { + std::ostringstream oss; + oss << mojo_enum; + return oss.str(); +@@ -232,7 +232,7 @@ void WebServiceWorkerProviderImpl::OnRegistered( + blink::mojom::ServiceWorkerRegistrationObjectInfoPtr registration) { + TRACE_EVENT_NESTABLE_ASYNC_END2( + "ServiceWorker", "WebServiceWorkerProviderImpl::RegisterServiceWorker", +- TRACE_ID_LOCAL(this), "Error", MojoEnumToString(error), "Message", ++ TRACE_ID_LOCAL(this), "Error", MojoEnumToString2(error), "Message", + error_msg ? *error_msg : "Success"); + if (error != blink::mojom::ServiceWorkerErrorType::kNone) { + DCHECK(error_msg); +@@ -258,7 +258,7 @@ void WebServiceWorkerProviderImpl::OnDidGetRegistration( + blink::mojom::ServiceWorkerRegistrationObjectInfoPtr registration) { + TRACE_EVENT_NESTABLE_ASYNC_END2( + "ServiceWorker", "WebServiceWorkerProviderImpl::GetRegistration", +- TRACE_ID_LOCAL(this), "Error", MojoEnumToString(error), "Message", ++ TRACE_ID_LOCAL(this), "Error", MojoEnumToString2(error), "Message", + error_msg ? *error_msg : "Success"); + if (error != blink::mojom::ServiceWorkerErrorType::kNone) { + DCHECK(error_msg); +@@ -288,7 +288,7 @@ void WebServiceWorkerProviderImpl::OnDidGetRegistrations( + infos) { + TRACE_EVENT_NESTABLE_ASYNC_END2( + "ServiceWorker", "WebServiceWorkerProviderImpl::GetRegistrations", +- TRACE_ID_LOCAL(this), "Error", MojoEnumToString(error), "Message", ++ TRACE_ID_LOCAL(this), "Error", MojoEnumToString2(error), "Message", + error_msg ? *error_msg : "Success"); + if (error != blink::mojom::ServiceWorkerErrorType::kNone) { + DCHECK(error_msg); +diff --git a/content/services/auction_worklet/BUILD.gn b/content/services/auction_worklet/BUILD.gn +index 99ec8a98c8..b95690a51f 100644 +--- a/content/services/auction_worklet/BUILD.gn ++++ b/content/services/auction_worklet/BUILD.gn +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/jumbo.gni") + import("//third_party/inspector_protocol/inspector_protocol.gni") + import("//v8/gni/v8.gni") + +@@ -30,7 +31,7 @@ inspector_protocol_generate("protocol_sources") { + ] + } + +-source_set("auction_worklet") { ++jumbo_source_set("auction_worklet") { + sources = [ + "auction_v8_devtools_agent.cc", + "auction_v8_devtools_agent.h", +@@ -84,6 +85,10 @@ source_set("auction_worklet") { + + sources += get_target_outputs(":protocol_sources") + ++ jumbo_excluded_sources = [ ++ "seller_worklet.cc", ++ ] ++ + configs += [ + "//build/config/compiler:wexit_time_destructors", + "//v8:external_startup_data", +diff --git a/dbus/message.cc b/dbus/message.cc +index 41a8b21635..01ee427b62 100644 +--- a/dbus/message.cc ++++ b/dbus/message.cc +@@ -777,7 +777,7 @@ bool MessageReader::PopBool(bool* value) { + // Like MessageWriter::AppendBool(), we should copy |value| to + // dbus_bool_t, as dbus_message_iter_get_basic() used in PopBasic() + // expects four bytes for DBUS_TYPE_BOOLEAN. +- dbus_bool_t dbus_value = FALSE; ++ dbus_bool_t dbus_value = 0; //FALSE; + const bool success = PopBasic(DBUS_TYPE_BOOLEAN, &dbus_value); + *value = static_cast(dbus_value); + return success; +@@ -972,7 +972,7 @@ bool MessageReader::PopVariantOfByte(uint8_t* value) { + + bool MessageReader::PopVariantOfBool(bool* value) { + // See the comment at MessageReader::PopBool(). +- dbus_bool_t dbus_value = FALSE; ++ dbus_bool_t dbus_value = 0; //FALSE; + const bool success = PopVariantOfBasic(DBUS_TYPE_BOOLEAN, &dbus_value); + *value = static_cast(dbus_value); + return success; +diff --git a/device/fido/cable/cable_discovery_data.h b/device/fido/cable/cable_discovery_data.h +index 7d224c2b62..2a52e88d10 100644 +--- a/device/fido/cable/cable_discovery_data.h ++++ b/device/fido/cable/cable_discovery_data.h +@@ -139,7 +139,7 @@ struct COMPONENT_EXPORT(DEVICE_FIDO) Pairing { + // within the structure is validated by using `local_identity_seed` and + // `handshake_hash`. + static absl::optional> Parse( +- const cbor::Value& cbor, ++ const ::cbor::Value& cbor, + tunnelserver::KnownDomainID domain, + base::span local_identity_seed, + base::span handshake_hash); +diff --git a/device/fido/public_key_credential_descriptor.h b/device/fido/public_key_credential_descriptor.h +index d6b40f93e4..9ba5c7456d 100644 +--- a/device/fido/public_key_credential_descriptor.h ++++ b/device/fido/public_key_credential_descriptor.h +@@ -25,7 +25,7 @@ namespace device { + class COMPONENT_EXPORT(DEVICE_FIDO) PublicKeyCredentialDescriptor { + public: + static absl::optional CreateFromCBORValue( +- const cbor::Value& cbor); ++ const ::cbor::Value& cbor); + + PublicKeyCredentialDescriptor(); + PublicKeyCredentialDescriptor(CredentialType credential_type, +@@ -54,7 +54,7 @@ class COMPONENT_EXPORT(DEVICE_FIDO) PublicKeyCredentialDescriptor { + }; + + COMPONENT_EXPORT(DEVICE_FIDO) +-cbor::Value AsCBOR(const PublicKeyCredentialDescriptor&); ++::cbor::Value AsCBOR(const PublicKeyCredentialDescriptor&); + + } // namespace device + +diff --git a/device/fido/public_key_credential_params.h b/device/fido/public_key_credential_params.h +index fe0c3b0632..34a266efb5 100644 +--- a/device/fido/public_key_credential_params.h ++++ b/device/fido/public_key_credential_params.h +@@ -31,7 +31,7 @@ class COMPONENT_EXPORT(DEVICE_FIDO) PublicKeyCredentialParams { + }; + + static absl::optional CreateFromCBORValue( +- const cbor::Value& cbor_value); ++ const ::cbor::Value& cbor_value); + + explicit PublicKeyCredentialParams( + std::vector credential_params); +@@ -49,7 +49,7 @@ class COMPONENT_EXPORT(DEVICE_FIDO) PublicKeyCredentialParams { + std::vector public_key_credential_params_; + }; + +-cbor::Value AsCBOR(const PublicKeyCredentialParams&); ++::cbor::Value AsCBOR(const PublicKeyCredentialParams&); + + } // namespace device + +diff --git a/device/fido/public_key_credential_rp_entity.h b/device/fido/public_key_credential_rp_entity.h +index d59250fd13..5a3c194b0c 100644 +--- a/device/fido/public_key_credential_rp_entity.h ++++ b/device/fido/public_key_credential_rp_entity.h +@@ -21,7 +21,7 @@ namespace device { + struct COMPONENT_EXPORT(DEVICE_FIDO) PublicKeyCredentialRpEntity { + public: + static absl::optional CreateFromCBORValue( +- const cbor::Value& cbor); ++ const ::cbor::Value& cbor); + + PublicKeyCredentialRpEntity(); + explicit PublicKeyCredentialRpEntity(std::string id); +@@ -38,7 +38,7 @@ struct COMPONENT_EXPORT(DEVICE_FIDO) PublicKeyCredentialRpEntity { + absl::optional name; + }; + +-cbor::Value AsCBOR(const PublicKeyCredentialRpEntity&); ++::cbor::Value AsCBOR(const PublicKeyCredentialRpEntity&); + + } // namespace device + +diff --git a/device/fido/public_key_credential_user_entity.h b/device/fido/public_key_credential_user_entity.h +index 88e5547443..87a3febf4b 100644 +--- a/device/fido/public_key_credential_user_entity.h ++++ b/device/fido/public_key_credential_user_entity.h +@@ -23,7 +23,7 @@ namespace device { + class COMPONENT_EXPORT(DEVICE_FIDO) PublicKeyCredentialUserEntity { + public: + static absl::optional CreateFromCBORValue( +- const cbor::Value& cbor); ++ const ::cbor::Value& cbor); + + PublicKeyCredentialUserEntity(); + explicit PublicKeyCredentialUserEntity(std::vector id); +@@ -44,7 +44,7 @@ class COMPONENT_EXPORT(DEVICE_FIDO) PublicKeyCredentialUserEntity { + absl::optional display_name; + }; + +-cbor::Value AsCBOR(const PublicKeyCredentialUserEntity&); ++::cbor::Value AsCBOR(const PublicKeyCredentialUserEntity&); + + } // namespace device + +diff --git a/extensions/browser/api/declarative_webrequest/webrequest_action.cc b/extensions/browser/api/declarative_webrequest/webrequest_action.cc +index 17a7b2b4d3..c017eede36 100644 +--- a/extensions/browser/api/declarative_webrequest/webrequest_action.cc ++++ b/extensions/browser/api/declarative_webrequest/webrequest_action.cc +@@ -35,7 +35,7 @@ using extension_web_request_api_helpers::EventResponseDelta; + namespace extensions { + + namespace helpers = extension_web_request_api_helpers; +-namespace keys = declarative_webrequest_constants; ++namespace keys_wa = declarative_webrequest_constants; + + namespace { + // Error messages. +@@ -56,32 +56,32 @@ const char kEmptyDocumentUrl[] = "data:text/html,"; + + helpers::RequestCookie ParseRequestCookie(const base::Value::Dict& dict) { + helpers::RequestCookie result; +- if (const std::string* name = dict.FindString(keys::kNameKey)) ++ if (const std::string* name = dict.FindString(keys_wa::kNameKey)) + result.name = *name; +- if (const std::string* value = dict.FindString(keys::kValueKey)) ++ if (const std::string* value = dict.FindString(keys_wa::kValueKey)) + result.value = *value; + return result; + } + + void ParseResponseCookieImpl(const base::Value::Dict& dict, + helpers::ResponseCookie* cookie) { +- if (const std::string* v = dict.FindString(keys::kNameKey)) ++ if (const std::string* v = dict.FindString(keys_wa::kNameKey)) + cookie->name = *v; +- if (const std::string* v = dict.FindString(keys::kValueKey)) ++ if (const std::string* v = dict.FindString(keys_wa::kValueKey)) + cookie->value = *v; +- if (const std::string* v = dict.FindString(keys::kExpiresKey)) ++ if (const std::string* v = dict.FindString(keys_wa::kExpiresKey)) + cookie->expires = *v; +- if (std::optional v = dict.FindInt(keys::kMaxAgeKey)) { ++ if (std::optional v = dict.FindInt(keys_wa::kMaxAgeKey)) { + cookie->max_age = *v; + } +- if (const std::string* v = dict.FindString(keys::kDomainKey)) ++ if (const std::string* v = dict.FindString(keys_wa::kDomainKey)) + cookie->domain = *v; +- if (const std::string* v = dict.FindString(keys::kPathKey)) ++ if (const std::string* v = dict.FindString(keys_wa::kPathKey)) + cookie->path = *v; +- if (std::optional v = dict.FindBool(keys::kSecureKey)) { ++ if (std::optional v = dict.FindBool(keys_wa::kSecureKey)) { + cookie->secure = *v; + } +- if (std::optional v = dict.FindBool(keys::kHttpOnlyKey)) { ++ if (std::optional v = dict.FindBool(keys_wa::kHttpOnlyKey)) { + cookie->http_only = *v; + } + } +@@ -97,13 +97,13 @@ helpers::FilterResponseCookie ParseFilterResponseCookie( + helpers::FilterResponseCookie result; + ParseResponseCookieImpl(dict, &result); + +- if (std::optional v = dict.FindInt(keys::kAgeUpperBoundKey)) { ++ if (std::optional v = dict.FindInt(keys_wa::kAgeUpperBoundKey)) { + result.age_upper_bound = *v; + } +- if (std::optional v = dict.FindInt(keys::kAgeLowerBoundKey)) { ++ if (std::optional v = dict.FindInt(keys_wa::kAgeLowerBoundKey)) { + result.age_lower_bound = *v; + } +- if (std::optional v = dict.FindBool(keys::kSessionCookieKey)) { ++ if (std::optional v = dict.FindBool(keys_wa::kSessionCookieKey)) { + result.session_cookie = *v; + } + return result; +@@ -126,7 +126,7 @@ scoped_refptr CreateRedirectRequestAction( + std::string* error, + bool* bad_message) { + const std::string* redirect_url_string = +- value.FindString(keys::kRedirectUrlKey); ++ value.FindString(keys_wa::kRedirectUrlKey); + INPUT_FORMAT_VALIDATE(redirect_url_string); + GURL redirect_url(*redirect_url_string); + return base::MakeRefCounted(redirect_url); +@@ -137,8 +137,8 @@ scoped_refptr CreateRedirectRequestByRegExAction( + const base::Value::Dict& value, + std::string* error, + bool* bad_message) { +- const std::string* from = value.FindString(keys::kFromKey); +- const std::string* to = value.FindString(keys::kToKey); ++ const std::string* from = value.FindString(keys_wa::kFromKey); ++ const std::string* to = value.FindString(keys_wa::kToKey); + INPUT_FORMAT_VALIDATE(from); + INPUT_FORMAT_VALIDATE(to); + +@@ -162,8 +162,8 @@ scoped_refptr CreateSetRequestHeaderAction( + const base::Value::Dict& dict, + std::string* error, + bool* bad_message) { +- const std::string* name = dict.FindString(keys::kNameKey); +- const std::string* value = dict.FindString(keys::kValueKey); ++ const std::string* name = dict.FindString(keys_wa::kNameKey); ++ const std::string* value = dict.FindString(keys_wa::kValueKey); + INPUT_FORMAT_VALIDATE(name); + INPUT_FORMAT_VALIDATE(value); + if (!net::HttpUtil::IsValidHeaderName(*name)) { +@@ -183,7 +183,7 @@ scoped_refptr CreateRemoveRequestHeaderAction( + const base::Value::Dict& value, + std::string* error, + bool* bad_message) { +- const std::string* name = value.FindString(keys::kNameKey); ++ const std::string* name = value.FindString(keys_wa::kNameKey); + INPUT_FORMAT_VALIDATE(name); + if (!net::HttpUtil::IsValidHeaderName(*name)) { + *error = extension_web_request_api_constants::kInvalidHeaderName; +@@ -197,8 +197,8 @@ scoped_refptr CreateAddResponseHeaderAction( + const base::Value::Dict& dict, + std::string* error, + bool* bad_message) { +- const std::string* name = dict.FindString(keys::kNameKey); +- const std::string* value = dict.FindString(keys::kValueKey); ++ const std::string* name = dict.FindString(keys_wa::kNameKey); ++ const std::string* value = dict.FindString(keys_wa::kValueKey); + INPUT_FORMAT_VALIDATE(name); + INPUT_FORMAT_VALIDATE(value); + if (!net::HttpUtil::IsValidHeaderName(*name)) { +@@ -218,9 +218,9 @@ scoped_refptr CreateRemoveResponseHeaderAction( + const base::Value::Dict& dict, + std::string* error, + bool* bad_message) { +- const std::string* name = dict.FindString(keys::kNameKey); ++ const std::string* name = dict.FindString(keys_wa::kNameKey); + INPUT_FORMAT_VALIDATE(name); +- const std::string* value = dict.FindString(keys::kValueKey); ++ const std::string* value = dict.FindString(keys_wa::kValueKey); + if (!net::HttpUtil::IsValidHeaderName(*name)) { + *error = extension_web_request_api_constants::kInvalidHeaderName; + return scoped_refptr(nullptr); +@@ -244,15 +244,15 @@ scoped_refptr CreateIgnoreRulesAction( + bool has_parameter = false; + int minimum_priority = std::numeric_limits::min(); + std::string ignore_tag; +- if (value.Find(keys::kLowerPriorityThanKey)) { ++ if (value.Find(keys_wa::kLowerPriorityThanKey)) { + std::optional minimum_priority_value = +- value.FindInt(keys::kLowerPriorityThanKey); ++ value.FindInt(keys_wa::kLowerPriorityThanKey); + INPUT_FORMAT_VALIDATE(minimum_priority_value); + minimum_priority = *minimum_priority_value; + has_parameter = true; + } +- if (value.Find(keys::kHasTagKey)) { +- const std::string* tag = value.FindString(keys::kHasTagKey); ++ if (value.Find(keys_wa::kHasTagKey)) { ++ const std::string* tag = value.FindString(keys_wa::kHasTagKey); + INPUT_FORMAT_VALIDATE(tag); + ignore_tag = *tag; + has_parameter = true; +@@ -275,11 +275,11 @@ scoped_refptr CreateRequestCookieAction( + RequestCookieModification modification; + + // Get modification type. +- if (instance_type == keys::kAddRequestCookieType) ++ if (instance_type == keys_wa::kAddRequestCookieType) + modification.type = helpers::ADD; +- else if (instance_type == keys::kEditRequestCookieType) ++ else if (instance_type == keys_wa::kEditRequestCookieType) + modification.type = helpers::EDIT; +- else if (instance_type == keys::kRemoveRequestCookieType) ++ else if (instance_type == keys_wa::kRemoveRequestCookieType) + modification.type = helpers::REMOVE; + else + INPUT_FORMAT_VALIDATE(false); +@@ -287,19 +287,19 @@ scoped_refptr CreateRequestCookieAction( + // Get filter. + if (modification.type == helpers::EDIT || + modification.type == helpers::REMOVE) { +- const base::Value::Dict* filter = value.FindDict(keys::kFilterKey); ++ const base::Value::Dict* filter = value.FindDict(keys_wa::kFilterKey); + INPUT_FORMAT_VALIDATE(filter); + modification.filter = ParseRequestCookie(*filter); + } + + // Get new value. + if (modification.type == helpers::ADD) { +- const base::Value::Dict* cookie_dict = value.FindDict(keys::kCookieKey); ++ const base::Value::Dict* cookie_dict = value.FindDict(keys_wa::kCookieKey); + INPUT_FORMAT_VALIDATE(cookie_dict); + modification.modification = ParseRequestCookie(*cookie_dict); + } else if (modification.type == helpers::EDIT) { + const base::Value::Dict* modification_dict = +- value.FindDict(keys::kModificationKey); ++ value.FindDict(keys_wa::kModificationKey); + INPUT_FORMAT_VALIDATE(modification_dict); + modification.modification = ParseRequestCookie(*modification_dict); + } +@@ -318,11 +318,11 @@ scoped_refptr CreateResponseCookieAction( + ResponseCookieModification modification; + + // Get modification type. +- if (instance_type == keys::kAddResponseCookieType) ++ if (instance_type == keys_wa::kAddResponseCookieType) + modification.type = helpers::ADD; +- else if (instance_type == keys::kEditResponseCookieType) ++ else if (instance_type == keys_wa::kEditResponseCookieType) + modification.type = helpers::EDIT; +- else if (instance_type == keys::kRemoveResponseCookieType) ++ else if (instance_type == keys_wa::kRemoveResponseCookieType) + modification.type = helpers::REMOVE; + else + INPUT_FORMAT_VALIDATE(false); +@@ -330,19 +330,19 @@ scoped_refptr CreateResponseCookieAction( + // Get filter. + if (modification.type == helpers::EDIT || + modification.type == helpers::REMOVE) { +- const base::Value::Dict* filter = value.FindDict(keys::kFilterKey); ++ const base::Value::Dict* filter = value.FindDict(keys_wa::kFilterKey); + INPUT_FORMAT_VALIDATE(filter); + modification.filter = ParseFilterResponseCookie(*filter); + } + + // Get new value. + if (modification.type == helpers::ADD) { +- const base::Value::Dict* dict_value = value.FindDict(keys::kCookieKey); ++ const base::Value::Dict* dict_value = value.FindDict(keys_wa::kCookieKey); + INPUT_FORMAT_VALIDATE(dict_value); + modification.modification = ParseResponseCookie(*dict_value); + } else if (modification.type == helpers::EDIT) { + const base::Value::Dict* dict_value = +- value.FindDict(keys::kModificationKey); ++ value.FindDict(keys_wa::kModificationKey); + INPUT_FORMAT_VALIDATE(dict_value); + modification.modification = ParseResponseCookie(*dict_value); + } +@@ -356,7 +356,7 @@ scoped_refptr CreateSendMessageToExtensionAction( + const base::Value::Dict& value, + std::string* error, + bool* bad_message) { +- const std::string* message = value.FindString(keys::kMessageKey); ++ const std::string* message = value.FindString(keys_wa::kMessageKey); + INPUT_FORMAT_VALIDATE(message); + return base::MakeRefCounted(*message); + } +@@ -366,56 +366,56 @@ struct WebRequestActionFactory { + FactoryT factory; + + WebRequestActionFactory() : factory(5) { +- factory.RegisterFactoryMethod(keys::kAddRequestCookieType, ++ factory.RegisterFactoryMethod(keys_wa::kAddRequestCookieType, + FactoryT::IS_PARAMETERIZED, + &CreateRequestCookieAction); +- factory.RegisterFactoryMethod(keys::kAddResponseCookieType, ++ factory.RegisterFactoryMethod(keys_wa::kAddResponseCookieType, + FactoryT::IS_PARAMETERIZED, + &CreateResponseCookieAction); +- factory.RegisterFactoryMethod(keys::kAddResponseHeaderType, ++ factory.RegisterFactoryMethod(keys_wa::kAddResponseHeaderType, + FactoryT::IS_PARAMETERIZED, + &CreateAddResponseHeaderAction); + factory.RegisterFactoryMethod( +- keys::kCancelRequestType, FactoryT::IS_NOT_PARAMETERIZED, ++ keys_wa::kCancelRequestType, FactoryT::IS_NOT_PARAMETERIZED, + &CallConstructorFactoryMethod); +- factory.RegisterFactoryMethod(keys::kEditRequestCookieType, ++ factory.RegisterFactoryMethod(keys_wa::kEditRequestCookieType, + FactoryT::IS_PARAMETERIZED, + &CreateRequestCookieAction); +- factory.RegisterFactoryMethod(keys::kEditResponseCookieType, ++ factory.RegisterFactoryMethod(keys_wa::kEditResponseCookieType, + FactoryT::IS_PARAMETERIZED, + &CreateResponseCookieAction); +- factory.RegisterFactoryMethod(keys::kRedirectByRegExType, ++ factory.RegisterFactoryMethod(keys_wa::kRedirectByRegExType, + FactoryT::IS_PARAMETERIZED, + &CreateRedirectRequestByRegExAction); +- factory.RegisterFactoryMethod(keys::kRedirectRequestType, ++ factory.RegisterFactoryMethod(keys_wa::kRedirectRequestType, + FactoryT::IS_PARAMETERIZED, + &CreateRedirectRequestAction); + factory.RegisterFactoryMethod( +- keys::kRedirectToTransparentImageType, FactoryT::IS_NOT_PARAMETERIZED, ++ keys_wa::kRedirectToTransparentImageType, FactoryT::IS_NOT_PARAMETERIZED, + &CallConstructorFactoryMethod< + WebRequestRedirectToTransparentImageAction>); + factory.RegisterFactoryMethod( +- keys::kRedirectToEmptyDocumentType, FactoryT::IS_NOT_PARAMETERIZED, ++ keys_wa::kRedirectToEmptyDocumentType, FactoryT::IS_NOT_PARAMETERIZED, + &CallConstructorFactoryMethod); +- factory.RegisterFactoryMethod(keys::kRemoveRequestCookieType, ++ factory.RegisterFactoryMethod(keys_wa::kRemoveRequestCookieType, + FactoryT::IS_PARAMETERIZED, + &CreateRequestCookieAction); +- factory.RegisterFactoryMethod(keys::kRemoveResponseCookieType, ++ factory.RegisterFactoryMethod(keys_wa::kRemoveResponseCookieType, + FactoryT::IS_PARAMETERIZED, + &CreateResponseCookieAction); +- factory.RegisterFactoryMethod(keys::kSetRequestHeaderType, ++ factory.RegisterFactoryMethod(keys_wa::kSetRequestHeaderType, + FactoryT::IS_PARAMETERIZED, + &CreateSetRequestHeaderAction); +- factory.RegisterFactoryMethod(keys::kRemoveRequestHeaderType, ++ factory.RegisterFactoryMethod(keys_wa::kRemoveRequestHeaderType, + FactoryT::IS_PARAMETERIZED, + &CreateRemoveRequestHeaderAction); +- factory.RegisterFactoryMethod(keys::kRemoveResponseHeaderType, ++ factory.RegisterFactoryMethod(keys_wa::kRemoveResponseHeaderType, + FactoryT::IS_PARAMETERIZED, + &CreateRemoveResponseHeaderAction); +- factory.RegisterFactoryMethod(keys::kIgnoreRulesType, ++ factory.RegisterFactoryMethod(keys_wa::kIgnoreRulesType, + FactoryT::IS_PARAMETERIZED, + &CreateIgnoreRulesAction); +- factory.RegisterFactoryMethod(keys::kSendMessageToExtensionType, ++ factory.RegisterFactoryMethod(keys_wa::kSendMessageToExtensionType, + FactoryT::IS_PARAMETERIZED, + &CreateSendMessageToExtensionAction); + } +@@ -484,7 +484,7 @@ scoped_refptr WebRequestAction::Create( + *bad_message = false; + + const std::string* instance_type = +- json_action.FindString(keys::kInstanceTypeKey); ++ json_action.FindString(keys_wa::kInstanceTypeKey); + INPUT_FORMAT_VALIDATE(instance_type); + + WebRequestActionFactory& factory = g_web_request_action_factory.Get(); +@@ -534,7 +534,7 @@ WebRequestCancelAction::WebRequestCancelAction() + WebRequestCancelAction::~WebRequestCancelAction() = default; + + std::string WebRequestCancelAction::GetName() const { +- return keys::kCancelRequestType; ++ return keys_wa::kCancelRequestType; + } + + std::optional WebRequestCancelAction::CreateDelta( +@@ -567,7 +567,7 @@ bool WebRequestRedirectAction::Equals(const WebRequestAction* other) const { + } + + std::string WebRequestRedirectAction::GetName() const { +- return keys::kRedirectRequestType; ++ return keys_wa::kRedirectRequestType; + } + + std::optional WebRequestRedirectAction::CreateDelta( +@@ -597,7 +597,7 @@ WebRequestRedirectToTransparentImageAction:: + ~WebRequestRedirectToTransparentImageAction() {} + + std::string WebRequestRedirectToTransparentImageAction::GetName() const { +- return keys::kRedirectToTransparentImageType; ++ return keys_wa::kRedirectToTransparentImageType; + } + + std::optional +@@ -626,7 +626,7 @@ WebRequestRedirectToEmptyDocumentAction:: + ~WebRequestRedirectToEmptyDocumentAction() {} + + std::string WebRequestRedirectToEmptyDocumentAction::GetName() const { +- return keys::kRedirectToEmptyDocumentType; ++ return keys_wa::kRedirectToEmptyDocumentType; + } + + std::optional +@@ -720,7 +720,7 @@ bool WebRequestRedirectByRegExAction::Equals( + } + + std::string WebRequestRedirectByRegExAction::GetName() const { +- return keys::kRedirectByRegExType; ++ return keys_wa::kRedirectByRegExType; + } + + std::optional WebRequestRedirectByRegExAction::CreateDelta( +@@ -768,7 +768,7 @@ bool WebRequestSetRequestHeaderAction::Equals( + } + + std::string WebRequestSetRequestHeaderAction::GetName() const { +- return keys::kSetRequestHeaderType; ++ return keys_wa::kSetRequestHeaderType; + } + + std::optional WebRequestSetRequestHeaderAction::CreateDelta( +@@ -806,7 +806,7 @@ bool WebRequestRemoveRequestHeaderAction::Equals( + } + + std::string WebRequestRemoveRequestHeaderAction::GetName() const { +- return keys::kRemoveRequestHeaderType; ++ return keys_wa::kRemoveRequestHeaderType; + } + + std::optional +@@ -847,7 +847,7 @@ bool WebRequestAddResponseHeaderAction::Equals( + } + + std::string WebRequestAddResponseHeaderAction::GetName() const { +- return keys::kAddResponseHeaderType; ++ return keys_wa::kAddResponseHeaderType; + } + + std::optional +@@ -900,7 +900,7 @@ bool WebRequestRemoveResponseHeaderAction::Equals( + } + + std::string WebRequestRemoveResponseHeaderAction::GetName() const { +- return keys::kRemoveResponseHeaderType; ++ return keys_wa::kRemoveResponseHeaderType; + } + + std::optional +@@ -951,7 +951,7 @@ bool WebRequestIgnoreRulesAction::Equals(const WebRequestAction* other) const { + } + + std::string WebRequestIgnoreRulesAction::GetName() const { +- return keys::kIgnoreRulesType; ++ return keys_wa::kIgnoreRulesType; + } + + std::optional WebRequestIgnoreRulesAction::CreateDelta( +@@ -989,11 +989,11 @@ bool WebRequestRequestCookieAction::Equals( + std::string WebRequestRequestCookieAction::GetName() const { + switch (request_cookie_modification_.type) { + case helpers::ADD: +- return keys::kAddRequestCookieType; ++ return keys_wa::kAddRequestCookieType; + case helpers::EDIT: +- return keys::kEditRequestCookieType; ++ return keys_wa::kEditRequestCookieType; + case helpers::REMOVE: +- return keys::kRemoveRequestCookieType; ++ return keys_wa::kRemoveRequestCookieType; + } + NOTREACHED(); + return ""; +@@ -1037,11 +1037,11 @@ bool WebRequestResponseCookieAction::Equals( + std::string WebRequestResponseCookieAction::GetName() const { + switch (response_cookie_modification_.type) { + case helpers::ADD: +- return keys::kAddResponseCookieType; ++ return keys_wa::kAddResponseCookieType; + case helpers::EDIT: +- return keys::kEditResponseCookieType; ++ return keys_wa::kEditResponseCookieType; + case helpers::REMOVE: +- return keys::kRemoveResponseCookieType; ++ return keys_wa::kRemoveResponseCookieType; + } + NOTREACHED(); + return ""; +@@ -1084,7 +1084,7 @@ bool WebRequestSendMessageToExtensionAction::Equals( + } + + std::string WebRequestSendMessageToExtensionAction::GetName() const { +- return keys::kSendMessageToExtensionType; ++ return keys_wa::kSendMessageToExtensionType; + } + + std::optional +diff --git a/extensions/browser/api/declarative_webrequest/webrequest_condition.cc b/extensions/browser/api/declarative_webrequest/webrequest_condition.cc +index a3d3cc69ed..7d2a80d8ed 100644 +--- a/extensions/browser/api/declarative_webrequest/webrequest_condition.cc ++++ b/extensions/browser/api/declarative_webrequest/webrequest_condition.cc +@@ -18,8 +18,6 @@ using url_matcher::URLMatcherConditionFactory; + using url_matcher::URLMatcherConditionSet; + using url_matcher::URLMatcherFactory; + +-namespace keys = extensions::declarative_webrequest_constants; +- + namespace { + static base::MatcherStringPattern::ID g_next_id = 0; + +@@ -38,7 +36,7 @@ const char kConditionCannotBeFulfilled[] = "A condition can never be " + + namespace extensions { + +-namespace keys = declarative_webrequest_constants; ++namespace keys_wrc = declarative_webrequest_constants; + + // + // WebRequestData +@@ -128,12 +126,12 @@ std::unique_ptr WebRequestCondition::Create( + + // Verify that we are dealing with a Condition whose type we understand. + const std::string* instance_type = +- condition_dict->FindString(keys::kInstanceTypeKey); ++ condition_dict->FindString(keys_wrc::kInstanceTypeKey); + if (!instance_type) { + *error = kConditionWithoutInstanceType; + return nullptr; + } +- if (*instance_type != keys::kRequestMatcherType) { ++ if (*instance_type != keys_wrc::kRequestMatcherType) { + *error = kExpectedOtherConditionType; + return nullptr; + } +@@ -144,12 +142,12 @@ std::unique_ptr WebRequestCondition::Create( + for (const auto entry : *condition_dict) { + const std::string& condition_attribute_name = entry.first; + const base::Value& condition_attribute_value = entry.second; +- if (condition_attribute_name == keys::kInstanceTypeKey || ++ if (condition_attribute_name == keys_wrc::kInstanceTypeKey || + condition_attribute_name == +- keys::kDeprecatedFirstPartyForCookiesUrlKey || +- condition_attribute_name == keys::kDeprecatedThirdPartyKey) { ++ keys_wrc::kDeprecatedFirstPartyForCookiesUrlKey || ++ condition_attribute_name == keys_wrc::kDeprecatedThirdPartyKey) { + // Skip this. +- } else if (condition_attribute_name == keys::kUrlKey) { ++ } else if (condition_attribute_name == keys_wrc::kUrlKey) { + const base::Value::Dict* dict = condition_attribute_value.GetIfDict(); + if (!dict) { + *error = base::StringPrintf(kInvalidTypeOfParamter, +diff --git a/extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.cc b/extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.cc +index e92cb36031..48dfdd6f36 100644 +--- a/extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.cc ++++ b/extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.cc +@@ -35,7 +35,7 @@ using base::CaseInsensitiveCompareASCII; + using base::Value; + + namespace helpers = extension_web_request_api_helpers; +-namespace keys = extensions::declarative_webrequest_constants; ++namespace keys_wrca = extensions::declarative_webrequest_constants; + + namespace extensions { + +@@ -50,31 +50,31 @@ struct WebRequestConditionAttributeFactory { + + WebRequestConditionAttributeFactory() : factory(5) { + factory.RegisterFactoryMethod( +- keys::kResourceTypeKey, FactoryT::IS_PARAMETERIZED, ++ keys_wrca::kResourceTypeKey, FactoryT::IS_PARAMETERIZED, + &WebRequestConditionAttributeResourceType::Create); + + factory.RegisterFactoryMethod( +- keys::kContentTypeKey, FactoryT::IS_PARAMETERIZED, ++ keys_wrca::kContentTypeKey, FactoryT::IS_PARAMETERIZED, + &WebRequestConditionAttributeContentType::Create); + factory.RegisterFactoryMethod( +- keys::kExcludeContentTypeKey, FactoryT::IS_PARAMETERIZED, ++ keys_wrca::kExcludeContentTypeKey, FactoryT::IS_PARAMETERIZED, + &WebRequestConditionAttributeContentType::Create); + + factory.RegisterFactoryMethod( +- keys::kRequestHeadersKey, FactoryT::IS_PARAMETERIZED, ++ keys_wrca::kRequestHeadersKey, FactoryT::IS_PARAMETERIZED, + &WebRequestConditionAttributeRequestHeaders::Create); + factory.RegisterFactoryMethod( +- keys::kExcludeRequestHeadersKey, FactoryT::IS_PARAMETERIZED, ++ keys_wrca::kExcludeRequestHeadersKey, FactoryT::IS_PARAMETERIZED, + &WebRequestConditionAttributeRequestHeaders::Create); + + factory.RegisterFactoryMethod( +- keys::kResponseHeadersKey, FactoryT::IS_PARAMETERIZED, ++ keys_wrca::kResponseHeadersKey, FactoryT::IS_PARAMETERIZED, + &WebRequestConditionAttributeResponseHeaders::Create); + factory.RegisterFactoryMethod( +- keys::kExcludeResponseHeadersKey, FactoryT::IS_PARAMETERIZED, ++ keys_wrca::kExcludeResponseHeadersKey, FactoryT::IS_PARAMETERIZED, + &WebRequestConditionAttributeResponseHeaders::Create); + +- factory.RegisterFactoryMethod(keys::kStagesKey, FactoryT::IS_PARAMETERIZED, ++ factory.RegisterFactoryMethod(keys_wrca::kStagesKey, FactoryT::IS_PARAMETERIZED, + &WebRequestConditionAttributeStages::Create); + } + }; +@@ -128,10 +128,10 @@ WebRequestConditionAttributeResourceType::Create( + const base::Value* value, + std::string* error, + bool* bad_message) { +- DCHECK(instance_type == keys::kResourceTypeKey); ++ DCHECK(instance_type == keys_wrca::kResourceTypeKey); + if (!value->is_list()) { + *error = ErrorUtils::FormatErrorMessage(kInvalidValue, +- keys::kResourceTypeKey); ++ keys_wrca::kResourceTypeKey); + return nullptr; + } + const base::Value::List& list = value->GetList(); +@@ -147,7 +147,7 @@ WebRequestConditionAttributeResourceType::Create( + !ParseWebRequestResourceType(resource_type_string, + &passed_types.back())) { + *error = ErrorUtils::FormatErrorMessage(kInvalidValue, +- keys::kResourceTypeKey); ++ keys_wrca::kResourceTypeKey); + return nullptr; + } + } +@@ -175,7 +175,7 @@ WebRequestConditionAttributeResourceType::GetType() const { + } + + std::string WebRequestConditionAttributeResourceType::GetName() const { +- return keys::kResourceTypeKey; ++ return keys_wrca::kResourceTypeKey; + } + + bool WebRequestConditionAttributeResourceType::Equals( +@@ -208,7 +208,7 @@ WebRequestConditionAttributeContentType::Create( + const base::Value* value, + std::string* error, + bool* bad_message) { +- DCHECK(name == keys::kContentTypeKey || name == keys::kExcludeContentTypeKey); ++ DCHECK(name == keys_wrca::kContentTypeKey || name == keys_wrca::kExcludeContentTypeKey); + + if (!value->is_list()) { + *error = ErrorUtils::FormatErrorMessage(kInvalidValue, name); +@@ -225,7 +225,7 @@ WebRequestConditionAttributeContentType::Create( + + return scoped_refptr( + new WebRequestConditionAttributeContentType( +- content_types, name == keys::kContentTypeKey)); ++ content_types, name == keys_wrca::kContentTypeKey)); + } + + int WebRequestConditionAttributeContentType::GetStages() const { +@@ -259,7 +259,7 @@ WebRequestConditionAttributeContentType::GetType() const { + } + + std::string WebRequestConditionAttributeContentType::GetName() const { +- return (inclusive_ ? keys::kContentTypeKey : keys::kExcludeContentTypeKey); ++ return (inclusive_ ? keys_wrca::kContentTypeKey : keys_wrca::kExcludeContentTypeKey); + } + + bool WebRequestConditionAttributeContentType::Equals( +@@ -458,25 +458,25 @@ HeaderMatcher::HeaderMatchTest::Create(const base::Value::Dict& tests) { + for (const auto entry : tests) { + bool is_name = false; // Is this test for header name? + StringMatchTest::MatchType match_type; +- if (entry.first == keys::kNamePrefixKey) { ++ if (entry.first == keys_wrca::kNamePrefixKey) { + is_name = true; + match_type = StringMatchTest::kPrefix; +- } else if (entry.first == keys::kNameSuffixKey) { ++ } else if (entry.first == keys_wrca::kNameSuffixKey) { + is_name = true; + match_type = StringMatchTest::kSuffix; +- } else if (entry.first == keys::kNameContainsKey) { ++ } else if (entry.first == keys_wrca::kNameContainsKey) { + is_name = true; + match_type = StringMatchTest::kContains; +- } else if (entry.first == keys::kNameEqualsKey) { ++ } else if (entry.first == keys_wrca::kNameEqualsKey) { + is_name = true; + match_type = StringMatchTest::kEquals; +- } else if (entry.first == keys::kValuePrefixKey) { ++ } else if (entry.first == keys_wrca::kValuePrefixKey) { + match_type = StringMatchTest::kPrefix; +- } else if (entry.first == keys::kValueSuffixKey) { ++ } else if (entry.first == keys_wrca::kValueSuffixKey) { + match_type = StringMatchTest::kSuffix; +- } else if (entry.first == keys::kValueContainsKey) { ++ } else if (entry.first == keys_wrca::kValueContainsKey) { + match_type = StringMatchTest::kContains; +- } else if (entry.first == keys::kValueEqualsKey) { ++ } else if (entry.first == keys_wrca::kValueEqualsKey) { + match_type = StringMatchTest::kEquals; + } else { + NOTREACHED(); // JSON schema type checking should prevent this. +@@ -566,8 +566,8 @@ WebRequestConditionAttributeRequestHeaders::Create( + const base::Value* value, + std::string* error, + bool* bad_message) { +- DCHECK(name == keys::kRequestHeadersKey || +- name == keys::kExcludeRequestHeadersKey); ++ DCHECK(name == keys_wrca::kRequestHeadersKey || ++ name == keys_wrca::kExcludeRequestHeadersKey); + + std::unique_ptr header_matcher( + PrepareHeaderMatcher(name, value, error)); +@@ -576,7 +576,7 @@ WebRequestConditionAttributeRequestHeaders::Create( + + return scoped_refptr( + new WebRequestConditionAttributeRequestHeaders( +- std::move(header_matcher), name == keys::kRequestHeadersKey)); ++ std::move(header_matcher), name == keys_wrca::kRequestHeadersKey)); + } + + int WebRequestConditionAttributeRequestHeaders::GetStages() const { +@@ -609,8 +609,8 @@ WebRequestConditionAttributeRequestHeaders::GetType() const { + } + + std::string WebRequestConditionAttributeRequestHeaders::GetName() const { +- return (positive_ ? keys::kRequestHeadersKey +- : keys::kExcludeRequestHeadersKey); ++ return (positive_ ? keys_wrca::kRequestHeadersKey ++ : keys_wrca::kExcludeRequestHeadersKey); + } + + bool WebRequestConditionAttributeRequestHeaders::Equals( +@@ -639,8 +639,8 @@ WebRequestConditionAttributeResponseHeaders::Create( + const base::Value* value, + std::string* error, + bool* bad_message) { +- DCHECK(name == keys::kResponseHeadersKey || +- name == keys::kExcludeResponseHeadersKey); ++ DCHECK(name == keys_wrca::kResponseHeadersKey || ++ name == keys_wrca::kExcludeResponseHeadersKey); + + std::unique_ptr header_matcher( + PrepareHeaderMatcher(name, value, error)); +@@ -649,7 +649,7 @@ WebRequestConditionAttributeResponseHeaders::Create( + + return scoped_refptr( + new WebRequestConditionAttributeResponseHeaders( +- std::move(header_matcher), name == keys::kResponseHeadersKey)); ++ std::move(header_matcher), name == keys_wrca::kResponseHeadersKey)); + } + + int WebRequestConditionAttributeResponseHeaders::GetStages() const { +@@ -689,8 +689,8 @@ WebRequestConditionAttributeResponseHeaders::GetType() const { + } + + std::string WebRequestConditionAttributeResponseHeaders::GetName() const { +- return (positive_ ? keys::kResponseHeadersKey +- : keys::kExcludeResponseHeadersKey); ++ return (positive_ ? keys_wrca::kResponseHeadersKey ++ : keys_wrca::kExcludeResponseHeadersKey); + } + + bool WebRequestConditionAttributeResponseHeaders::Equals( +@@ -723,13 +723,13 @@ bool ParseListOfStages(const base::Value& value, int* out_stages) { + if (!entry.is_string()) + return false; + const std::string& stage_name = entry.GetString(); +- if (stage_name == keys::kOnBeforeRequestEnum) { ++ if (stage_name == keys_wrca::kOnBeforeRequestEnum) { + stages |= ON_BEFORE_REQUEST; +- } else if (stage_name == keys::kOnBeforeSendHeadersEnum) { ++ } else if (stage_name == keys_wrca::kOnBeforeSendHeadersEnum) { + stages |= ON_BEFORE_SEND_HEADERS; +- } else if (stage_name == keys::kOnHeadersReceivedEnum) { ++ } else if (stage_name == keys_wrca::kOnHeadersReceivedEnum) { + stages |= ON_HEADERS_RECEIVED; +- } else if (stage_name == keys::kOnAuthRequiredEnum) { ++ } else if (stage_name == keys_wrca::kOnAuthRequiredEnum) { + stages |= ON_AUTH_REQUIRED; + } else { + NOTREACHED(); // JSON schema checks prevent getting here. +@@ -749,12 +749,12 @@ WebRequestConditionAttributeStages::Create(const std::string& name, + const base::Value* value, + std::string* error, + bool* bad_message) { +- DCHECK(name == keys::kStagesKey); ++ DCHECK(name == keys_wrca::kStagesKey); + + int allowed_stages = 0; + if (!ParseListOfStages(*value, &allowed_stages)) { + *error = ErrorUtils::FormatErrorMessage(kInvalidValue, +- keys::kStagesKey); ++ keys_wrca::kStagesKey); + return nullptr; + } + +@@ -778,7 +778,7 @@ WebRequestConditionAttributeStages::GetType() const { + } + + std::string WebRequestConditionAttributeStages::GetName() const { +- return keys::kStagesKey; ++ return keys_wrca::kStagesKey; + } + + bool WebRequestConditionAttributeStages::Equals( +diff --git a/extensions/browser/api/hid/hid_connection_resource.cc b/extensions/browser/api/hid/hid_connection_resource.cc +index 3105a0d20c..337747d595 100644 +--- a/extensions/browser/api/hid/hid_connection_resource.cc ++++ b/extensions/browser/api/hid/hid_connection_resource.cc +@@ -13,14 +13,14 @@ + namespace extensions { + + static base::LazyInstance>>::DestructorAtExit g_factory = ++ ApiResourceManager>>::DestructorAtExit g_factoryHCR = + LAZY_INSTANCE_INITIALIZER; + + // static + template <> + BrowserContextKeyedAPIFactory >* + ApiResourceManager::GetFactoryInstance() { +- return &g_factory.Get(); ++ return &g_factoryHCR.Get(); + } + + HidConnectionResource::HidConnectionResource( +diff --git a/extensions/browser/api/hid/hid_device_manager.cc b/extensions/browser/api/hid/hid_device_manager.cc +index 7d1ae14c70..e0c2f11b9a 100644 +--- a/extensions/browser/api/hid/hid_device_manager.cc ++++ b/extensions/browser/api/hid/hid_device_manager.cc +@@ -135,7 +135,7 @@ bool WillDispatchDeviceEvent( + return false; + } + +-HidDeviceManager::HidManagerBinder& GetHidManagerBinderOverride() { ++HidDeviceManager::HidManagerBinder& GetHidDeviceManagerBinderOverride() { + static base::NoDestructor binder; + return *binder; + } +@@ -339,7 +339,7 @@ void HidDeviceManager::LazyInitialize() { + + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + auto receiver = hid_manager_.BindNewPipeAndPassReceiver(); +- const auto& binder = GetHidManagerBinderOverride(); ++ const auto& binder = GetHidDeviceManagerBinderOverride(); + if (binder) + binder.Run(std::move(receiver)); + else +@@ -360,7 +360,7 @@ void HidDeviceManager::LazyInitialize() { + // static + void HidDeviceManager::OverrideHidManagerBinderForTesting( + HidManagerBinder binder) { +- GetHidManagerBinderOverride() = std::move(binder); ++ GetHidDeviceManagerBinderOverride() = std::move(binder); + } + + base::Value::List HidDeviceManager::CreateApiDeviceList( +diff --git a/extensions/browser/api/usb/usb_device_manager.cc b/extensions/browser/api/usb/usb_device_manager.cc +index 2d4e7105ce..ca758f3911 100644 +--- a/extensions/browser/api/usb/usb_device_manager.cc ++++ b/extensions/browser/api/usb/usb_device_manager.cc +@@ -67,7 +67,7 @@ bool ShouldExposeDevice(const device::mojom::UsbDeviceInfo& device_info) { + + // Returns true if the given extension has permission to receive events + // regarding this device. +-bool WillDispatchDeviceEvent( ++bool MyWillDispatchDeviceEvent( + const device::mojom::UsbDeviceInfo& device_info, + content::BrowserContext* browser_context, + mojom::ContextType target_context, +@@ -389,7 +389,7 @@ void UsbDeviceManager::DispatchEvent( + } + + event->will_dispatch_callback = +- base::BindRepeating(&WillDispatchDeviceEvent, std::cref(device_info)); ++ base::BindRepeating(&MyWillDispatchDeviceEvent, std::cref(device_info)); + event_router->BroadcastEvent(std::move(event)); + } + } +diff --git a/extensions/browser/api/usb/usb_device_resource.cc b/extensions/browser/api/usb/usb_device_resource.cc +index 22b273b1a1..4f50b899a8 100644 +--- a/extensions/browser/api/usb/usb_device_resource.cc ++++ b/extensions/browser/api/usb/usb_device_resource.cc +@@ -18,14 +18,14 @@ using content::BrowserThread; + namespace extensions { + + static base::LazyInstance>>::DestructorAtExit g_factory = ++ ApiResourceManager>>::DestructorAtExit g_factory2 = + LAZY_INSTANCE_INITIALIZER; + + // static + template <> + BrowserContextKeyedAPIFactory >* + ApiResourceManager::GetFactoryInstance() { +- return g_factory.Pointer(); ++ return g_factory2.Pointer(); + } + + UsbDeviceResource::UsbDeviceResource( +diff --git a/extensions/browser/api/web_request/upload_data_presenter.cc b/extensions/browser/api/web_request/upload_data_presenter.cc +index 10c38c7b13..bf64fb4464 100644 +--- a/extensions/browser/api/web_request/upload_data_presenter.cc ++++ b/extensions/browser/api/web_request/upload_data_presenter.cc +@@ -16,7 +16,7 @@ + #include "extensions/browser/api/web_request/web_request_api_constants.h" + #include "net/base/upload_file_element_reader.h" + +-namespace keys = extension_web_request_api_constants; ++namespace keys_udp = extension_web_request_api_constants; + + namespace { + +@@ -70,13 +70,13 @@ std::optional RawDataPresenter::TakeResult() { + + void RawDataPresenter::FeedNextBytes(const char* bytes, size_t size) { + subtle::AppendKeyValuePair( +- keys::kRequestBodyRawBytesKey, ++ keys_udp::kRequestBodyRawBytesKey, + base::Value(base::as_bytes(base::make_span(bytes, size))), list_); + } + + void RawDataPresenter::FeedNextFile(const std::string& filename) { + // Insert the file path instead of the contents, which may be too large. +- subtle::AppendKeyValuePair(keys::kRequestBodyRawFileKey, ++ subtle::AppendKeyValuePair(keys_udp::kRequestBodyRawFileKey, + base::Value(filename), list_); + } + +diff --git a/extensions/browser/api/web_request/web_request_api.cc b/extensions/browser/api/web_request/web_request_api.cc +index 1428bb77b1..aa6feea0ee 100644 +--- a/extensions/browser/api/web_request/web_request_api.cc ++++ b/extensions/browser/api/web_request/web_request_api.cc +@@ -71,7 +71,7 @@ using extension_web_request_api_helpers::ExtraInfoSpec; + using extensions::mojom::APIPermissionID; + + namespace helpers = extension_web_request_api_helpers; +-namespace keys = extension_web_request_api_constants; ++namespace keys_wra = extension_web_request_api_constants; + using URLLoaderFactoryType = + content::ContentBrowserClient::URLLoaderFactoryType; + +@@ -86,15 +86,15 @@ namespace { + bool FromHeaderDictionary(const base::Value::Dict& header_value, + std::string* name, + std::string* out_value) { +- const std::string* name_ptr = header_value.FindString(keys::kHeaderNameKey); ++ const std::string* name_ptr = header_value.FindString(keys_wra::kHeaderNameKey); + if (!name) { + return false; + } + *name = *name_ptr; + +- const base::Value* value = header_value.Find(keys::kHeaderValueKey); ++ const base::Value* value = header_value.Find(keys_wra::kHeaderValueKey); + const base::Value* binary_value = +- header_value.Find(keys::kHeaderBinaryValueKey); ++ header_value.Find(keys_wra::kHeaderBinaryValueKey); + // We require either a "value" or a "binaryValue" entry, but not both. + if ((value == nullptr && binary_value == nullptr) || + (value != nullptr && binary_value != nullptr)) { +@@ -136,7 +136,7 @@ bool HasAnyWebRequestPermissions(const Extension* extension) { + + // Mirrors the histogram enum of the same name. DO NOT REORDER THESE VALUES OR + // CHANGE THEIR MEANING. +-enum class WebRequestEventListenerFlag { ++enum class WebRequestEventListenerFlagWRA { + kTotal, + kNone, + kRequestHeaders, +@@ -298,13 +298,13 @@ void WebRequestAPI::Shutdown() { + } + + static base::LazyInstance< +- BrowserContextKeyedAPIFactory>::DestructorAtExit g_factory = ++ BrowserContextKeyedAPIFactory>::DestructorAtExit g_factory_wra = + LAZY_INSTANCE_INITIALIZER; + + // static + BrowserContextKeyedAPIFactory* + WebRequestAPI::GetFactoryInstance() { +- return g_factory.Pointer(); ++ return g_factory_wra.Pointer(); + } + + void WebRequestAPI::OnListenerRemoved(const EventListenerInfo& details) { +@@ -786,7 +786,7 @@ WebRequestInternalAddEventListenerFunction::Run() { + return true; + } + +- return event_name == keys::kOnAuthRequiredEvent && ++ return event_name == keys_wra::kOnAuthRequiredEvent && + extension->permissions_data()->HasAPIPermission( + APIPermissionID::kWebRequestAuthProvider); + }; +@@ -797,7 +797,7 @@ WebRequestInternalAddEventListenerFunction::Run() { + bool is_blocking = extra_info_spec & (ExtraInfoSpec::BLOCKING | + ExtraInfoSpec::ASYNC_BLOCKING); + if (is_blocking && !has_blocking_permission()) { +- return RespondNow(Error(keys::kBlockingPermissionRequired)); ++ return RespondNow(Error(keys_wra::kBlockingPermissionRequired)); + } + + // We allow to subscribe to patterns that are broader than the host +@@ -813,7 +813,7 @@ WebRequestInternalAddEventListenerFunction::Run() { + ->withheld_permissions() + .explicit_hosts() + .is_empty()) { +- return RespondNow(Error(keys::kHostPermissionsRequired)); ++ return RespondNow(Error(keys_wra::kHostPermissionsRequired)); + } + } + +@@ -881,7 +881,7 @@ WebRequestInternalEventHandledFunction::Run() { + + const base::Value* redirect_url_value = dict_value.Find("redirectUrl"); + const base::Value* auth_credentials_value = +- dict_value.Find(keys::kAuthCredentialsKey); ++ dict_value.Find(keys_wra::kAuthCredentialsKey); + const base::Value* request_headers_value = + dict_value.Find("requestHeaders"); + const base::Value* response_headers_value = +@@ -893,7 +893,7 @@ WebRequestInternalEventHandledFunction::Run() { + if (dict_value.size() != 1) { + OnError(event_name, sub_event_name, request_id, render_process_id, + web_view_instance_id, std::move(response)); +- return RespondNow(Error(keys::kInvalidBlockingResponse)); ++ return RespondNow(Error(keys_wra::kInvalidBlockingResponse)); + } + + EXTENSION_FUNCTION_VALIDATE(cancel_value->is_bool()); +@@ -907,7 +907,7 @@ WebRequestInternalEventHandledFunction::Run() { + if (!response->new_url.is_valid()) { + OnError(event_name, sub_event_name, request_id, render_process_id, + web_view_instance_id, std::move(response)); +- return RespondNow(Error(keys::kInvalidRedirectUrl, new_url_str)); ++ return RespondNow(Error(keys_wra::kInvalidRedirectUrl, new_url_str)); + } + } + +@@ -918,7 +918,7 @@ WebRequestInternalEventHandledFunction::Run() { + // Allow only one of the keys, not both. + OnError(event_name, sub_event_name, request_id, render_process_id, + web_view_instance_id, std::move(response)); +- return RespondNow(Error(keys::kInvalidHeaderKeyCombination)); ++ return RespondNow(Error(keys_wra::kInvalidHeaderKeyCombination)); + } + + const base::Value::List* headers_value = nullptr; +@@ -926,10 +926,10 @@ WebRequestInternalEventHandledFunction::Run() { + std::unique_ptr response_headers; + if (has_request_headers) { + request_headers = std::make_unique(); +- headers_value = dict_value.FindList(keys::kRequestHeadersKey); ++ headers_value = dict_value.FindList(keys_wra::kRequestHeadersKey); + } else { + response_headers = std::make_unique(); +- headers_value = dict_value.FindList(keys::kResponseHeadersKey); ++ headers_value = dict_value.FindList(keys_wra::kResponseHeadersKey); + } + EXTENSION_FUNCTION_VALIDATE(headers_value); + +@@ -943,17 +943,17 @@ WebRequestInternalEventHandledFunction::Run() { + base::JSONWriter::Write(header_value, &serialized_header); + OnError(event_name, sub_event_name, request_id, render_process_id, + web_view_instance_id, std::move(response)); +- return RespondNow(Error(keys::kInvalidHeader, serialized_header)); ++ return RespondNow(Error(keys_wra::kInvalidHeader, serialized_header)); + } + if (!net::HttpUtil::IsValidHeaderName(name)) { + OnError(event_name, sub_event_name, request_id, render_process_id, + web_view_instance_id, std::move(response)); +- return RespondNow(Error(keys::kInvalidHeaderName)); ++ return RespondNow(Error(keys_wra::kInvalidHeaderName)); + } + if (!net::HttpUtil::IsValidHeaderValue(value)) { + OnError(event_name, sub_event_name, request_id, render_process_id, + web_view_instance_id, std::move(response)); +- return RespondNow(Error(keys::kInvalidHeaderValue, name)); ++ return RespondNow(Error(keys_wra::kInvalidHeaderValue, name)); + } + if (has_request_headers) { + request_headers->SetHeader(name, value); +@@ -973,9 +973,9 @@ WebRequestInternalEventHandledFunction::Run() { + auth_credentials_value->GetIfDict(); + EXTENSION_FUNCTION_VALIDATE(credentials_value); + const std::string* username = +- credentials_value->FindString(keys::kUsernameKey); ++ credentials_value->FindString(keys_wra::kUsernameKey); + const std::string* password = +- credentials_value->FindString(keys::kPasswordKey); ++ credentials_value->FindString(keys_wra::kPasswordKey); + EXTENSION_FUNCTION_VALIDATE(username); + EXTENSION_FUNCTION_VALIDATE(password); + response->auth_credentials = net::AuthCredentials( +diff --git a/extensions/browser/api/web_request/web_request_info.cc b/extensions/browser/api/web_request/web_request_info.cc +index 3c4ba5fe4a..f7d5f3769f 100644 +--- a/extensions/browser/api/web_request/web_request_info.cc ++++ b/extensions/browser/api/web_request/web_request_info.cc +@@ -29,7 +29,7 @@ + #include "services/network/public/mojom/url_response_head.mojom.h" + #include "services/network/url_loader.h" + +-namespace keys = extension_web_request_api_constants; ++namespace keys_wri = extension_web_request_api_constants; + + namespace extensions { + +@@ -129,8 +129,8 @@ std::optional CreateRequestBodyData( + &raw_data_presenter // 2: any data at all? (Non-specific.) + }; + // Keys for the results of the corresponding presenters. +- static const char* const kKeys[] = {keys::kRequestBodyFormDataKey, +- keys::kRequestBodyRawKey}; ++ static const char* const kKeys[] = {keys_wri::kRequestBodyFormDataKey, ++ keys_wri::kRequestBodyRawKey}; + bool some_succeeded = false; + if (!data_sources.empty()) { + for (size_t i = 0; i < std::size(presenters); ++i) { +@@ -145,7 +145,7 @@ std::optional CreateRequestBodyData( + } + + if (!some_succeeded) { +- request_body_data.Set(keys::kRequestBodyErrorKey, "Unknown error."); ++ request_body_data.Set(keys_wri::kRequestBodyErrorKey, "Unknown error."); + } + + return request_body_data; +diff --git a/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.cc b/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.cc +index 2d870df9cc..e2703df591 100644 +--- a/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.cc ++++ b/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.cc +@@ -79,26 +79,26 @@ constexpr char kWebRequestProxyingURLLoaderFactoryScope[] = + // This shutdown notifier makes sure the proxy is destroyed if an incognito + // browser context is destroyed. This is needed because WebRequestAPI only + // clears the proxies when the original browser context is destroyed. +-class ShutdownNotifierFactory ++class ShutdownNotifierFactory2 + : public BrowserContextKeyedServiceShutdownNotifierFactory { + public: +- ShutdownNotifierFactory(const ShutdownNotifierFactory&) = delete; +- ShutdownNotifierFactory& operator=(const ShutdownNotifierFactory&) = delete; ++ ShutdownNotifierFactory2(const ShutdownNotifierFactory2&) = delete; ++ ShutdownNotifierFactory2& operator=(const ShutdownNotifierFactory2&) = delete; + +- static ShutdownNotifierFactory* GetInstance() { +- static base::NoDestructor factory; ++ static ShutdownNotifierFactory2* GetInstance() { ++ static base::NoDestructor factory; + return factory.get(); + } + + private: +- friend class base::NoDestructor; ++ friend class base::NoDestructor; + +- ShutdownNotifierFactory() ++ ShutdownNotifierFactory2() + : BrowserContextKeyedServiceShutdownNotifierFactory( + "WebRequestProxyingURLLoaderFactory") { + DependsOn(PermissionHelper::GetFactoryInstance()); + } +- ~ShutdownNotifierFactory() override {} ++ ~ShutdownNotifierFactory2() override {} + + content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* context) const override { +@@ -1463,7 +1463,7 @@ WebRequestProxyingURLLoaderFactory::WebRequestProxyingURLLoaderFactory( + // canceled when |shutdown_notifier_subscription_| is destroyed, and + // |proxies_| owns this. + shutdown_notifier_subscription_ = +- ShutdownNotifierFactory::GetInstance() ++ ShutdownNotifierFactory2::GetInstance() + ->Get(browser_context) + ->Subscribe(base::BindRepeating(&WebRequestAPI::ProxySet::RemoveProxy, + base::Unretained(proxies_), this)); +@@ -1659,7 +1659,7 @@ void WebRequestProxyingURLLoaderFactory::MaybeRemoveProxy() { + + // static + void WebRequestProxyingURLLoaderFactory::EnsureAssociatedFactoryBuilt() { +- ShutdownNotifierFactory::GetInstance(); ++ ShutdownNotifierFactory2::GetInstance(); + } + + } // namespace extensions +diff --git a/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.h b/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.h +index 318a63073f..12aff0ff2e 100644 +--- a/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.h ++++ b/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.h +@@ -39,7 +39,7 @@ + #include "url/gurl.h" + #include "url/origin.h" + +-namespace { ++namespace content { + class BrowserContext; + } + +diff --git a/extensions/browser/app_window/app_window.cc b/extensions/browser/app_window/app_window.cc +index 224e2acfb7..c813a524e2 100644 +--- a/extensions/browser/app_window/app_window.cc ++++ b/extensions/browser/app_window/app_window.cc +@@ -233,7 +233,7 @@ gfx::Size AppWindow::CreateParams::GetWindowMaximumSize( + + // AppWindow + +-AppWindow::AppWindow(BrowserContext* context, ++AppWindow::AppWindow(content::BrowserContext* context, + std::unique_ptr app_delegate, + const Extension* extension) + : browser_context_(context), +@@ -946,7 +946,7 @@ content::WebContents* AppWindow::GetAssociatedWebContents() const { + return web_contents(); + } + +-void AppWindow::OnExtensionUnloaded(BrowserContext* browser_context, ++void AppWindow::OnExtensionUnloaded(content::BrowserContext* browser_context, + const Extension* extension, + UnloadedExtensionReason reason) { + if (extension_id_ == extension->id()) +@@ -976,7 +976,7 @@ void AppWindow::SaveWindowPosition() { + + gfx::Rect bounds = native_app_window_->GetRestoredBounds(); + gfx::Rect screen_bounds = +- display::Screen::GetScreen()->GetDisplayMatching(bounds).work_area(); ++ ::display::Screen::GetScreen()->GetDisplayMatching(bounds).work_area(); + ui::WindowShowState window_state = native_app_window_->GetRestoredState(); + cache->SaveGeometry(extension_id(), window_key_, bounds, screen_bounds, + window_state); +@@ -1037,8 +1037,8 @@ AppWindow::CreateParams AppWindow::LoadDefaults(CreateParams params) const { + &cached_screen_bounds, &cached_state)) { + // App window has cached screen bounds, make sure it fits on screen in + // case the screen resolution changed. +- display::Screen* screen = display::Screen::GetScreen(); +- display::Display display = screen->GetDisplayMatching(cached_bounds); ++ ::display::Screen* screen = ::display::Screen::GetScreen(); ++ ::display::Display display = screen->GetDisplayMatching(cached_bounds); + gfx::Rect current_screen_bounds = display.work_area(); + SizeConstraints constraints(params.GetWindowMinimumSize(gfx::Insets()), + params.GetWindowMaximumSize(gfx::Insets())); +diff --git a/extensions/browser/extension_message_filter.cc b/extensions/browser/extension_message_filter.cc +index 3c2fc6ddef..c08c4b885b 100644 +--- a/extensions/browser/extension_message_filter.cc ++++ b/extensions/browser/extension_message_filter.cc +@@ -20,25 +20,25 @@ namespace extensions { + + namespace { + +-class ShutdownNotifierFactory ++class ShutdownNotifierFactoryForExtensionMessageFilter + : public BrowserContextKeyedServiceShutdownNotifierFactory { + public: +- ShutdownNotifierFactory(const ShutdownNotifierFactory&) = delete; +- ShutdownNotifierFactory& operator=(const ShutdownNotifierFactory&) = delete; ++ ShutdownNotifierFactoryForExtensionMessageFilter(const ShutdownNotifierFactoryForExtensionMessageFilter&) = delete; ++ ShutdownNotifierFactoryForExtensionMessageFilter& operator=(const ShutdownNotifierFactoryForExtensionMessageFilter&) = delete; + +- static ShutdownNotifierFactory* GetInstance() { +- return base::Singleton::get(); ++ static ShutdownNotifierFactoryForExtensionMessageFilter* GetInstance() { ++ return base::Singleton::get(); + } + + private: +- friend struct base::DefaultSingletonTraits; ++ friend struct base::DefaultSingletonTraits; + +- ShutdownNotifierFactory() ++ ShutdownNotifierFactoryForExtensionMessageFilter() + : BrowserContextKeyedServiceShutdownNotifierFactory( + "ExtensionMessageFilter") { + DependsOn(ProcessManagerFactory::GetInstance()); + } +- ~ShutdownNotifierFactory() override {} ++ ~ShutdownNotifierFactoryForExtensionMessageFilter() override {} + + content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* context) const override { +@@ -56,13 +56,13 @@ ExtensionMessageFilter::ExtensionMessageFilter(int render_process_id, + browser_context_(context) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + shutdown_notifier_subscription_ = +- ShutdownNotifierFactory::GetInstance()->Get(context)->Subscribe( ++ ShutdownNotifierFactoryForExtensionMessageFilter::GetInstance()->Get(context)->Subscribe( + base::BindRepeating(&ExtensionMessageFilter::ShutdownOnUIThread, + base::Unretained(this))); + } + + void ExtensionMessageFilter::EnsureShutdownNotifierFactoryBuilt() { +- ShutdownNotifierFactory::GetInstance(); ++ ShutdownNotifierFactoryForExtensionMessageFilter::GetInstance(); + } + + ExtensionMessageFilter::~ExtensionMessageFilter() { +diff --git a/extensions/browser/extension_service_worker_message_filter.cc b/extensions/browser/extension_service_worker_message_filter.cc +index cfe76daffb..66c2ce53b8 100644 +--- a/extensions/browser/extension_service_worker_message_filter.cc ++++ b/extensions/browser/extension_service_worker_message_filter.cc +@@ -26,27 +26,27 @@ namespace extensions { + + namespace { + +-class ShutdownNotifierFactory ++class ShutdownNotifierFactoryForExtensionServiceWorkerMessageFilter + : public BrowserContextKeyedServiceShutdownNotifierFactory { + public: +- ShutdownNotifierFactory(const ShutdownNotifierFactory&) = delete; +- ShutdownNotifierFactory& operator=(const ShutdownNotifierFactory&) = delete; ++ ShutdownNotifierFactoryForExtensionServiceWorkerMessageFilter(const ShutdownNotifierFactoryForExtensionServiceWorkerMessageFilter&) = delete; ++ ShutdownNotifierFactoryForExtensionServiceWorkerMessageFilter& operator=(const ShutdownNotifierFactoryForExtensionServiceWorkerMessageFilter&) = delete; + +- static ShutdownNotifierFactory* GetInstance() { +- return base::Singleton::get(); ++ static ShutdownNotifierFactoryForExtensionServiceWorkerMessageFilter* GetInstance() { ++ return base::Singleton::get(); + } + + private: +- friend struct base::DefaultSingletonTraits; ++ friend struct base::DefaultSingletonTraits; + +- ShutdownNotifierFactory() ++ ShutdownNotifierFactoryForExtensionServiceWorkerMessageFilter() + : BrowserContextKeyedServiceShutdownNotifierFactory( + "ExtensionServiceWorkerMessageFilter") { + DependsOn(ExtensionRegistryFactory::GetInstance()); + DependsOn(EventRouterFactory::GetInstance()); + DependsOn(ProcessManagerFactory::GetInstance()); + } +- ~ShutdownNotifierFactory() override = default; ++ ~ShutdownNotifierFactoryForExtensionServiceWorkerMessageFilter() override = default; + + content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* context) const override { +@@ -67,7 +67,7 @@ ExtensionServiceWorkerMessageFilter::ExtensionServiceWorkerMessageFilter( + service_worker_context_(service_worker_context) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + shutdown_notifier_subscription_ = +- ShutdownNotifierFactory::GetInstance()->Get(context)->Subscribe( ++ ShutdownNotifierFactoryForExtensionServiceWorkerMessageFilter::GetInstance()->Get(context)->Subscribe( + base::BindRepeating( + &ExtensionServiceWorkerMessageFilter::ShutdownOnUIThread, + base::Unretained(this))); +@@ -83,7 +83,7 @@ void ExtensionServiceWorkerMessageFilter::OnDestruct() const { + } + + void ExtensionServiceWorkerMessageFilter::EnsureShutdownNotifierFactoryBuilt() { +- ShutdownNotifierFactory::GetInstance(); ++ ShutdownNotifierFactoryForExtensionServiceWorkerMessageFilter::GetInstance(); + } + + ExtensionServiceWorkerMessageFilter::~ExtensionServiceWorkerMessageFilter() = +diff --git a/extensions/browser/guest_view/web_view/web_view_guest.cc b/extensions/browser/guest_view/web_view/web_view_guest.cc +index c50c7822d6..9fe5b9c9ce 100644 +--- a/extensions/browser/guest_view/web_view/web_view_guest.cc ++++ b/extensions/browser/guest_view/web_view/web_view_guest.cc +@@ -810,7 +810,7 @@ WebViewGuest::WebViewGuest(content::RenderFrameHost* owner_rfh) + ExtensionsAPIClient::Get()->CreateWebViewGuestDelegate(this))), + is_spatial_navigation_enabled_( + base::CommandLine::ForCurrentProcess()->HasSwitch( +- switches::kEnableSpatialNavigation)) {} ++ ::switches::kEnableSpatialNavigation)) {} + + WebViewGuest::~WebViewGuest() { + if (!attached() && GetOpener()) +diff --git a/extensions/common/BUILD.gn b/extensions/common/BUILD.gn +index f25d861b3c..e4257b3e85 100644 +--- a/extensions/common/BUILD.gn ++++ b/extensions/common/BUILD.gn +@@ -489,6 +489,11 @@ jumbo_static_library("common") { + # from mojom/permission_set_mojom_traits.cc. + allow_circular_includes_from = [ ":mojom" ] + ++ jumbo_excluded_sources = [ ++ "manifest_handlers/file_handler_info.cc", ++ "manifest_handlers/permissions_parser.cc", ++ ] ++ + deps = [ + "//base", + "//build:branding_buildflags", +diff --git a/extensions/common/manifest_handlers/shared_module_info.cc b/extensions/common/manifest_handlers/shared_module_info.cc +index d7687e5982..92d665fd30 100644 +--- a/extensions/common/manifest_handlers/shared_module_info.cc ++++ b/extensions/common/manifest_handlers/shared_module_info.cc +@@ -37,7 +37,7 @@ namespace { + const char kSharedModule[] = "shared_module"; + const char kAllowlist[] = "allowlist"; + +-using ManifestKeys = api::shared_module::ManifestKeys; ++using ManifestKeys2 = api::shared_module::ManifestKeys; + + static base::LazyInstance::DestructorAtExit + g_empty_shared_module_info = LAZY_INSTANCE_INITIALIZER; +@@ -132,8 +132,8 @@ SharedModuleHandler::~SharedModuleHandler() = default; + bool SharedModuleHandler::Parse(Extension* extension, std::u16string* error) { + CHECK(extension); + CHECK(error); +- ManifestKeys manifest_keys; +- if (!ManifestKeys::ParseFromDictionary( ++ ManifestKeys2 manifest_keys; ++ if (!ManifestKeys2::ParseFromDictionary( + extension->manifest()->available_values(), manifest_keys, *error)) { + return false; + } +@@ -241,8 +241,8 @@ bool SharedModuleHandler::Validate( + } + + base::span SharedModuleHandler::Keys() const { +- static constexpr const char* kKeys[] = {ManifestKeys::kImport, +- ManifestKeys::kExport}; ++ static constexpr const char* kKeys[] = {ManifestKeys2::kImport, ++ ManifestKeys2::kExport}; + return kKeys; + } + +diff --git a/extensions/renderer/extension_url_loader_throttle.cc b/extensions/renderer/extension_url_loader_throttle.cc +index 1f61f2b45a..d8151c3c40 100644 +--- a/extensions/renderer/extension_url_loader_throttle.cc ++++ b/extensions/renderer/extension_url_loader_throttle.cc +@@ -12,7 +12,7 @@ namespace extensions { + + namespace { + +-const char kCancelReason[] = "ExtensionURLLoaderThrottle"; ++const char kCancelReasonEULT[] = "ExtensionURLLoaderThrottle"; + + } // anonymous namespace + +@@ -29,7 +29,7 @@ void ExtensionURLLoaderThrottle::WillStartRequest( + bool* defer) { + start_request_url_ = request->url; + if (manager_->ShouldRejectRequest(start_request_url_)) +- delegate_->CancelWithError(net::ERR_TEMPORARILY_THROTTLED, kCancelReason); ++ delegate_->CancelWithError(net::ERR_TEMPORARILY_THROTTLED, kCancelReasonEULT); + } + + void ExtensionURLLoaderThrottle::WillRedirectRequest( +@@ -40,7 +40,7 @@ void ExtensionURLLoaderThrottle::WillRedirectRequest( + net::HttpRequestHeaders* /* modified_request_headers */, + net::HttpRequestHeaders* /* modified_cors_exempt_request_headers */) { + if (manager_->ShouldRejectRedirect(start_request_url_, *redirect_info)) { +- delegate_->CancelWithError(net::ERR_TEMPORARILY_THROTTLED, kCancelReason); ++ delegate_->CancelWithError(net::ERR_TEMPORARILY_THROTTLED, kCancelReasonEULT); + } + } + +diff --git a/gpu/command_buffer/service/BUILD.gn b/gpu/command_buffer/service/BUILD.gn +index 084a2f6fc5..72eab27b6d 100644 +--- a/gpu/command_buffer/service/BUILD.gn ++++ b/gpu/command_buffer/service/BUILD.gn +@@ -2,7 +2,6 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//gpu/vulkan/features.gni") + import("//skia/features.gni") +@@ -27,9 +26,9 @@ group("gles2") { + } + + if (is_component_build) { +- link_target_type = "jumbo_source_set" ++ link_target_type = "source_set" + } else { +- link_target_type = "jumbo_static_library" ++ link_target_type = "static_library" + } + target(link_target_type, "service_sources") { + # External code should depend on this via //gpu/command_buffer/service above +@@ -650,7 +649,7 @@ proto_library("disk_cache_proto") { + } + + if (is_android) { +- jumbo_static_library("android_texture_owner_test_support") { ++ static_library("android_texture_owner_test_support") { + testonly = true + sources = [ + "mock_texture_owner.cc", +diff --git a/gpu/config/BUILD.gn b/gpu/config/BUILD.gn +index 277227449f..4ff377cd8e 100644 +--- a/gpu/config/BUILD.gn ++++ b/gpu/config/BUILD.gn +@@ -5,7 +5,6 @@ + import("//build/config/cast.gni") + import("//build/config/chrome_build.gni") + import("//build/config/chromeos/ui_mode.gni") +-import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//gpu/vulkan/features.gni") + import("//skia/features.gni") +@@ -125,7 +124,7 @@ source_set("webgpu_blocklist_impl") { + public_deps = [ "//third_party/dawn/include/dawn:headers" ] + } + +-jumbo_source_set("config_sources") { ++source_set("config_sources") { + # External code should depend on this via //gpu/config above rather than + # depending on this directly or the component build will break. + visibility = [ "//gpu/*" ] +diff --git a/gpu/ipc/service/BUILD.gn b/gpu/ipc/service/BUILD.gn +index f3b0ecccad..e321b406a8 100644 +--- a/gpu/ipc/service/BUILD.gn ++++ b/gpu/ipc/service/BUILD.gn +@@ -2,7 +2,6 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//gpu/vulkan/features.gni") + import("//testing/test.gni") +@@ -15,7 +14,7 @@ declare_args() { + subpixel_font_rendering_disabled = false + } + +-jumbo_component("service") { ++component("service") { + output_name = "gpu_ipc_service" + sources = [ + "command_buffer_stub.cc", +diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn +index b3c80d0943..9dfd58e5d7 100644 +--- a/media/audio/BUILD.gn ++++ b/media/audio/BUILD.gn +@@ -3,6 +3,7 @@ + # found in the LICENSE file. + + import("//build/config/chromeos/ui_mode.gni") ++import("//build/config/jumbo.gni") + import("//build/config/linux/pkg_config.gni") + import("//media/media_options.gni") + import("//testing/libfuzzer/fuzzer_test.gni") +@@ -26,7 +27,7 @@ config("platform_config") { + } + } + +-source_set("audio") { ++jumbo_source_set("audio") { + # Do not expand the visibility here without double-checking with OWNERS, this + # is a roll-up target which is part of the //media component. Most other DEPs + # should be using //media and not directly DEP this roll-up target. +diff --git a/media/audio/alsa/alsa_input.cc b/media/audio/alsa/alsa_input.cc +index 5694b8aefa..8d06635dbe 100644 +--- a/media/audio/alsa/alsa_input.cc ++++ b/media/audio/alsa/alsa_input.cc +@@ -18,8 +18,8 @@ + + namespace media { + +-static const SampleFormat kSampleFormat = kSampleFormatS16; +-static const snd_pcm_format_t kAlsaSampleFormat = SND_PCM_FORMAT_S16; ++static const SampleFormat kSampleFormatAI = kSampleFormatS16; ++static const snd_pcm_format_t kAlsaSampleFormatAI = SND_PCM_FORMAT_S16; + + static const int kNumPacketsInRingBuffer = 3; + +@@ -35,7 +35,7 @@ AlsaPcmInputStream::AlsaPcmInputStream(AudioManagerBase* audio_manager, + : audio_manager_(audio_manager), + device_name_(device_name), + params_(params), +- bytes_per_buffer_(params.GetBytesPerBuffer(kSampleFormat)), ++ bytes_per_buffer_(params.GetBytesPerBuffer(kSampleFormatAI)), + wrapper_(wrapper), + buffer_duration_(base::Microseconds( + params.frames_per_buffer() * base::Time::kMicrosecondsPerSecond / +@@ -66,7 +66,7 @@ AudioInputStream::OpenOutcome AlsaPcmInputStream::Open() { + for (size_t i = 0; i < std::size(device_names); ++i) { + device_handle_ = alsa_util::OpenCaptureDevice( + wrapper_, device_names[i], params_.channels(), params_.sample_rate(), +- kAlsaSampleFormat, buffer_us, packet_us); ++ kAlsaSampleFormatAI, buffer_us, packet_us); + + if (device_handle_) { + device_name_ = device_names[i]; +@@ -76,7 +76,7 @@ AudioInputStream::OpenOutcome AlsaPcmInputStream::Open() { + } else { + device_handle_ = alsa_util::OpenCaptureDevice( + wrapper_, device_name_.c_str(), params_.channels(), +- params_.sample_rate(), kAlsaSampleFormat, buffer_us, packet_us); ++ params_.sample_rate(), kAlsaSampleFormatAI, buffer_us, packet_us); + } + + if (device_handle_) { +diff --git a/media/audio/alsa/alsa_output.cc b/media/audio/alsa/alsa_output.cc +index 3eaef18ab6..ba6693559e 100644 +--- a/media/audio/alsa/alsa_output.cc ++++ b/media/audio/alsa/alsa_output.cc +@@ -133,8 +133,8 @@ std::ostream& operator<<(std::ostream& os, + return os; + } + +-static const SampleFormat kSampleFormat = kSampleFormatS16; +-static const snd_pcm_format_t kAlsaSampleFormat = SND_PCM_FORMAT_S16; ++static const SampleFormat kSampleFormatAO = kSampleFormatS16; ++static const snd_pcm_format_t kAlsaSampleFormatAO = SND_PCM_FORMAT_S16; + + const char AlsaPcmOutputStream::kDefaultDevice[] = "default"; + const char AlsaPcmOutputStream::kAutoSelectDevice[] = ""; +@@ -149,13 +149,13 @@ AlsaPcmOutputStream::AlsaPcmOutputStream(const std::string& device_name, + AlsaWrapper* wrapper, + AudioManagerBase* manager) + : requested_device_name_(device_name), +- pcm_format_(kAlsaSampleFormat), ++ pcm_format_(kAlsaSampleFormatAO), + channels_(params.channels()), + channel_layout_(params.channel_layout()), + sample_rate_(params.sample_rate()), +- bytes_per_sample_(SampleFormatToBytesPerChannel(kSampleFormat)), +- bytes_per_frame_(params.GetBytesPerFrame(kSampleFormat)), +- packet_size_(params.GetBytesPerBuffer(kSampleFormat)), ++ bytes_per_sample_(SampleFormatToBytesPerChannel(kSampleFormatAO)), ++ bytes_per_frame_(params.GetBytesPerFrame(kSampleFormatAO)), ++ packet_size_(params.GetBytesPerBuffer(kSampleFormatAO)), + latency_(std::max( + base::Microseconds(kMinLatencyMicros), + AudioTimestampHelper::FramesToTime(params.frames_per_buffer() * 2, +diff --git a/media/audio/alsa/audio_manager_alsa.cc b/media/audio/alsa/audio_manager_alsa.cc +index af69ccd4c8..f2f0222fef 100644 +--- a/media/audio/alsa/audio_manager_alsa.cc ++++ b/media/audio/alsa/audio_manager_alsa.cc +@@ -29,7 +29,7 @@ namespace media { + static const int kMaxOutputStreams = 50; + + // Default sample rate for input and output streams. +-static const int kDefaultSampleRate = 48000; ++static const int kDefaultSampleRateAMA = 48000; + + // Since "default", "pulse" and "dmix" devices are virtual devices mapped to + // real devices, we remove them from the list to avoiding duplicate counting. +@@ -73,7 +73,7 @@ AudioParameters AudioManagerAlsa::GetInputStreamParameters( + static const int kDefaultInputBufferSize = 1024; + + return AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, +- ChannelLayoutConfig::Stereo(), kDefaultSampleRate, ++ ChannelLayoutConfig::Stereo(), kDefaultSampleRateAMA, + kDefaultInputBufferSize); + } + +@@ -273,7 +273,7 @@ AudioParameters AudioManagerAlsa::GetPreferredOutputStreamParameters( + DLOG_IF(ERROR, !output_device_id.empty()) << "Not implemented!"; + static const int kDefaultOutputBufferSize = 2048; + ChannelLayoutConfig channel_layout_config = ChannelLayoutConfig::Stereo(); +- int sample_rate = kDefaultSampleRate; ++ int sample_rate = kDefaultSampleRateAMA; + int buffer_size = kDefaultOutputBufferSize; + if (input_params.IsValid()) { + // Some clients, such as WebRTC, have a more limited use case and work +diff --git a/media/audio/pulse/audio_manager_pulse.cc b/media/audio/pulse/audio_manager_pulse.cc +index 743e374c56..3992b2c571 100644 +--- a/media/audio/pulse/audio_manager_pulse.cc ++++ b/media/audio/pulse/audio_manager_pulse.cc +@@ -26,13 +26,13 @@ using pulse::AutoPulseLock; + using pulse::WaitForOperationCompletion; + + // Maximum number of output streams that can be open simultaneously. +-constexpr int kMaxOutputStreams = 50; ++constexpr int kMaxOutputStreamsAMP = 50; + + constexpr int kMinimumOutputBufferSize = 512; + constexpr int kMaximumOutputBufferSize = 8192; +-constexpr int kDefaultInputBufferSize = 1024; +-constexpr int kDefaultSampleRate = 48000; +-constexpr int kDefaultChannelCount = 2; ++constexpr int kDefaultInputBufferSizeAMP = 1024; ++constexpr int kDefaultSampleRateAMP = 48000; ++constexpr int kDefaultChannelCountAMP = 2; + + AudioManagerPulse::AudioManagerPulse(std::unique_ptr audio_thread, + AudioLogFactory* audio_log_factory, +@@ -42,12 +42,12 @@ AudioManagerPulse::AudioManagerPulse(std::unique_ptr audio_thread, + input_mainloop_(pa_mainloop), + input_context_(pa_context), + devices_(nullptr), +- native_input_sample_rate_(kDefaultSampleRate), +- native_channel_count_(kDefaultChannelCount), ++ native_input_sample_rate_(kDefaultSampleRateAMP), ++ native_channel_count_(kDefaultChannelCountAMP), + default_source_is_monitor_(false) { + DCHECK(input_mainloop_); + DCHECK(input_context_); +- SetMaxOutputStreamsAllowed(kMaxOutputStreams); ++ SetMaxOutputStreamsAllowed(kMaxOutputStreamsAMP); + } + + AudioManagerPulse::~AudioManagerPulse() = default; +@@ -126,11 +126,11 @@ AudioParameters AudioManagerPulse::GetInputStreamParameters( + + const int user_buffer_size = GetUserBufferSize(); + const int buffer_size = +- user_buffer_size ? user_buffer_size : kDefaultInputBufferSize; ++ user_buffer_size ? user_buffer_size : kDefaultInputBufferSizeAMP; + return AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, + ChannelLayoutConfig::Stereo(), + native_input_sample_rate_ ? native_input_sample_rate_ +- : kDefaultSampleRate, ++ : kDefaultSampleRateAMP, + buffer_size); + } + +@@ -221,7 +221,7 @@ AudioParameters AudioManagerPulse::GetPreferredOutputStreamParameters( + // be respected though, so prefer the input parameters for channel count. + UpdateNativeAudioHardwareInfo(); + int sample_rate = native_input_sample_rate_ ? native_input_sample_rate_ +- : kDefaultSampleRate; ++ : kDefaultSampleRateAMP; + ChannelLayoutConfig channel_layout_config = ChannelLayoutConfig::Guess( + native_channel_count_ ? native_channel_count_ : 2); + +diff --git a/media/audio/win/audio_device_listener_win.cc b/media/audio/win/audio_device_listener_win.cc +index c83f212896..4f95ad467b 100644 +--- a/media/audio/win/audio_device_listener_win.cc ++++ b/media/audio/win/audio_device_listener_win.cc +@@ -22,7 +22,7 @@ static std::string FlowToString(EDataFlow flow) { + return flow == eRender ? "eRender" : "eCapture"; + } + +-static std::string RoleToString(ERole role) { ++static std::string RoleToStringADLW(ERole role) { + switch (role) { + case eConsole: + return "eConsole"; +@@ -151,7 +151,7 @@ HRESULT AudioDeviceListenerWin::OnDefaultDeviceChanged( + ? CoreAudioUtil::GetFriendlyName(new_device_id, flow, role) + : "no device") + << ", flow: " << FlowToString(flow) +- << ", role: " << RoleToString(role) ++ << ", role: " << RoleToStringADLW(role) + << ", notified manager: " << (did_run_listener_cb ? "Yes" : "No"); + + return S_OK; +diff --git a/media/audio/win/audio_low_latency_output_win.cc b/media/audio/win/audio_low_latency_output_win.cc +index 1435a43834..e77696815e 100644 +--- a/media/audio/win/audio_low_latency_output_win.cc ++++ b/media/audio/win/audio_low_latency_output_win.cc +@@ -54,7 +54,7 @@ void RecordAudioFailure(const char* histogram, HRESULT hr) { + } + + // Converts a COM error into a human-readable string. +-std::string ErrorToString(HRESULT hresult) { ++std::string ErrorToStringALLOW(HRESULT hresult) { + return CoreAudioUtil::ErrorToString(hresult); + } + +@@ -241,7 +241,7 @@ bool WASAPIAudioOutputStream::Open() { + if (FAILED(hr)) { + RecordAudioFailure(kOpenFailureHistogram, hr); + SendLogMessage("%s => (ERROR: IAudioClient::SharedModeInitialize=[%s])", +- __func__, ErrorToString(hr).c_str()); ++ __func__, ErrorToStringALLOW(hr).c_str()); + return false; + } + +@@ -324,7 +324,7 @@ bool WASAPIAudioOutputStream::Open() { + if (FAILED(hr)) { + RecordAudioFailure(kOpenFailureHistogram, hr); + SendLogMessage("%s => (ERROR: IAudioClient::GetService(IAudioClock)=[%s])", +- __func__, ErrorToString(hr).c_str()); ++ __func__, ErrorToStringALLOW(hr).c_str()); + return false; + } + +@@ -415,7 +415,7 @@ void WASAPIAudioOutputStream::Start(AudioSourceCallback* callback) { + if (FAILED(hr)) { + RecordAudioFailure(kStartFailureHistogram, hr); + SendLogMessage("%s => (ERROR: IAudioClient::Start=[%s])", __func__, +- ErrorToString(hr).c_str()); ++ ErrorToStringALLOW(hr).c_str()); + StopThread(); + callback->OnError(AudioSourceCallback::ErrorType::kUnknown); + } +@@ -435,7 +435,7 @@ void WASAPIAudioOutputStream::Stop() { + if (FAILED(hr)) { + RecordAudioFailure(kStopFailureHistogram, hr); + SendLogMessage("%s => (ERROR: IAudioClient::Stop=[%s])", __func__, +- ErrorToString(hr).c_str()); ++ ErrorToStringALLOW(hr).c_str()); + source_->OnError(AudioSourceCallback::ErrorType::kUnknown); + } + +@@ -448,7 +448,7 @@ void WASAPIAudioOutputStream::Stop() { + if (FAILED(hr)) { + RecordAudioFailure(kStopFailureHistogram, hr); + SendLogMessage("%s => (ERROR: IAudioClient::Reset=[%s])", __func__, +- ErrorToString(hr).c_str()); ++ ErrorToStringALLOW(hr).c_str()); + callback->OnError(AudioSourceCallback::ErrorType::kUnknown); + } + +@@ -552,7 +552,7 @@ void WASAPIAudioOutputStream::Run() { + RecordAudioFailure(kRunFailureHistogram, hr); + LOG(ERROR) << "WAOS::" << __func__ + << " => (ERROR: IAudioClock::GetFrequency=[" +- << ErrorToString(hr).c_str() << "])"; ++ << ErrorToStringALLOW(hr).c_str() << "])"; + } + + // Keep rendering audio until the stop event or the stream-switch event +@@ -628,7 +628,7 @@ bool WASAPIAudioOutputStream::RenderAudioFromSource(UINT64 device_frequency) { + RecordAudioFailure(kRenderFailureHistogram, hr); + LOG(ERROR) << "WAOS::" << __func__ + << " => (ERROR: IAudioClient::GetCurrentPadding=[" +- << ErrorToString(hr).c_str() << "])"; ++ << ErrorToStringALLOW(hr).c_str() << "])"; + return false; + } + TRACE_COUNTER_ID1(TRACE_DISABLED_BY_DEFAULT("audio"), +@@ -651,13 +651,13 @@ bool WASAPIAudioOutputStream::RenderAudioFromSource(UINT64 device_frequency) { + num_available_frames = endpoint_buffer_size_frames_; + } + +- TRACE_EVENT( +- TRACE_DISABLED_BY_DEFAULT("audio"), "IAudioClient frames", +- [&](perfetto::EventContext ctx) { +- auto* event = ctx.event(); +- auto* data = event->set_win_render_audio_from_source(); +- data->set_iaudioclient_buffer_unfilled_frames(num_available_frames); +- }); ++// TRACE_EVENT( ++// TRACE_DISABLED_BY_DEFAULT("audio"), "IAudioClient frames", ++// [&](perfetto::EventContext ctx) { ++// auto* event = ctx.event(); ++// auto* data = event->set_win_render_audio_from_source(); ++// data->set_iaudioclient_buffer_unfilled_frames(num_available_frames); ++// }); + + // Check if there is enough available space to fit the packet size + // specified by the client. If not, wait until a future callback. +@@ -695,7 +695,7 @@ bool WASAPIAudioOutputStream::RenderAudioFromSource(UINT64 device_frequency) { + RecordAudioFailure(kRenderFailureHistogram, hr); + LOG(ERROR) << "WAOS::" << __func__ + << " => (ERROR: IAudioRenderClient::GetBuffer=[" +- << ErrorToString(hr).c_str() << "])"; ++ << ErrorToStringALLOW(hr).c_str() << "])"; + return false; + } + +@@ -839,7 +839,7 @@ bool WASAPIAudioOutputStream::RenderAudioFromSource(UINT64 device_frequency) { + RecordAudioFailure(kRenderFailureHistogram, hr); + LOG(ERROR) << "WAOS::" << __func__ + << " => (ERROR: IAudioClock::GetPosition=[" +- << ErrorToString(hr).c_str() << "])"; ++ << ErrorToStringALLOW(hr).c_str() << "])"; + // Use a delay of zero. + delay_timestamp = base::TimeTicks::Now(); + } +diff --git a/media/audio/win/core_audio_util_win.cc b/media/audio/win/core_audio_util_win.cc +index d4c94d3c06..21179478eb 100644 +--- a/media/audio/win/core_audio_util_win.cc ++++ b/media/audio/win/core_audio_util_win.cc +@@ -42,10 +42,10 @@ const GUID kCommunicationsSessionId = { + + namespace { + +-constexpr uint32_t KSAUDIO_SPEAKER_UNSUPPORTED = 0xFFFFFFFF; ++constexpr uint32_t KSAUDIO_SPEAKER_UNSUPPORTED_COUW = 0xFFFFFFFF; + + // TODO(henrika): add mapping for all types in the ChannelLayout enumerator. +-ChannelConfig ChannelLayoutToChannelConfig(ChannelLayout layout) { ++ChannelConfig ChannelLayoutToChannelConfigCOUW(ChannelLayout layout) { + switch (layout) { + case CHANNEL_LAYOUT_DISCRETE: + DVLOG(2) << "CHANNEL_LAYOUT_DISCRETE=>KSAUDIO_SPEAKER_DIRECTOUT"; +@@ -76,7 +76,7 @@ ChannelConfig ChannelLayoutToChannelConfig(ChannelLayout layout) { + return KSAUDIO_SPEAKER_7POINT1_SURROUND; + default: + DVLOG(2) << "Unsupported channel layout: " << layout; +- return KSAUDIO_SPEAKER_UNSUPPORTED; ++ return KSAUDIO_SPEAKER_UNSUPPORTED_COUW; + } + } + +@@ -910,8 +910,8 @@ bool CoreAudioUtil::IsChannelLayoutSupported(const std::string& device_id, + // but only if the wave format is extended (can contain a channel mask). + WaveFormatWrapper format(&mix_format); + if (format.IsExtensible()) { +- ChannelConfig new_config = ChannelLayoutToChannelConfig(channel_layout); +- if (new_config == KSAUDIO_SPEAKER_UNSUPPORTED) { ++ ChannelConfig new_config = ChannelLayoutToChannelConfigCOUW(channel_layout); ++ if (new_config == KSAUDIO_SPEAKER_UNSUPPORTED_COUW) { + return false; + } + format.GetExtensible()->dwChannelMask = new_config; +diff --git a/media/base/BUILD.gn b/media/base/BUILD.gn +index b5e5cefea6..4b531c1ce2 100644 +--- a/media/base/BUILD.gn ++++ b/media/base/BUILD.gn +@@ -438,6 +438,8 @@ jumbo_source_set("base") { + "libaom_thread_wrapper.cc", + "libaom_thread_wrapper.h", + ] ++ jumbo_excluded_sources = [ "libaom_thread_wrapper.cc"] ++ + deps += [ "//third_party/libaom" ] + } + +diff --git a/media/filters/h265_to_annex_b_bitstream_converter.cc b/media/filters/h265_to_annex_b_bitstream_converter.cc +index 60af198f91..4bc2033a1e 100644 +--- a/media/filters/h265_to_annex_b_bitstream_converter.cc ++++ b/media/filters/h265_to_annex_b_bitstream_converter.cc +@@ -14,12 +14,12 @@ + namespace media { + namespace { + +-static const uint8_t kStartCodePrefix[3] = {0, 0, 1}; +-static const uint32_t kParamSetStartCodeSize = 1 + sizeof(kStartCodePrefix); ++static const uint8_t kStartCodePrefix2[3] = {0, 0, 1}; ++static const uint32_t kParamSetStartCodeSize2 = 1 + sizeof(kStartCodePrefix2); + + // Helper function which determines whether NAL unit of given type marks + // access unit boundary. +-static bool IsAccessUnitBoundaryNal(int nal_unit_type) { ++static bool IsAccessUnitBoundaryNal2(int nal_unit_type) { + // Spec 7.4.2.4.4 + // Check if this packet marks access unit boundary by checking the + // packet type. +@@ -64,7 +64,7 @@ uint32_t H265ToAnnexBBitstreamConverter::GetConfigSize( + + for (auto& nalu_array : hevc_config.arrays) { + for (auto& nalu : nalu_array.units) { +- config_size += kParamSetStartCodeSize + nalu.size(); ++ config_size += kParamSetStartCodeSize2 + nalu.size(); + } + } + return config_size; +@@ -118,12 +118,12 @@ uint32_t H265ToAnnexBBitstreamConverter::CalculateNeededOutputBufferSize( + // nal_unit_type. + int nal_unit_type = (*input >> 1) & 0x3F; + if (first_nal_in_this_access_unit || +- IsAccessUnitBoundaryNal(nal_unit_type)) { ++ IsAccessUnitBoundaryNal2(nal_unit_type)) { + output_size += 1; // Extra zero_byte for these nal units + first_nal_in_this_access_unit = false; + } + // Start code prefix +- output_size += sizeof(kStartCodePrefix); ++ output_size += sizeof(kStartCodePrefix2); + // Actual NAL unit size + output_size += nal_unit_length; + input += nal_unit_length; +@@ -218,8 +218,8 @@ bool H265ToAnnexBBitstreamConverter::ConvertNalUnitStreamToByteStream( + } + uint32_t start_code_len; + first_nal_unit_in_access_unit_ +- ? start_code_len = sizeof(kStartCodePrefix) + 1 +- : start_code_len = sizeof(kStartCodePrefix); ++ ? start_code_len = sizeof(kStartCodePrefix2) + 1 ++ : start_code_len = sizeof(kStartCodePrefix2); + if (static_cast(outscan - output) + start_code_len + + nal_unit_length > + *output_size) { +@@ -229,7 +229,7 @@ bool H265ToAnnexBBitstreamConverter::ConvertNalUnitStreamToByteStream( + + // Check if this packet marks access unit boundary by checking the + // packet type. +- if (IsAccessUnitBoundaryNal(nal_unit_type)) { ++ if (IsAccessUnitBoundaryNal2(nal_unit_type)) { + first_nal_unit_in_access_unit_ = true; + } + +@@ -243,8 +243,8 @@ bool H265ToAnnexBBitstreamConverter::ConvertNalUnitStreamToByteStream( + + // No need to write leading zero bits. + // Write start-code prefix. +- memcpy(outscan, kStartCodePrefix, sizeof(kStartCodePrefix)); +- outscan += sizeof(kStartCodePrefix); ++ memcpy(outscan, kStartCodePrefix2, sizeof(kStartCodePrefix2)); ++ outscan += sizeof(kStartCodePrefix2); + // Then write the actual NAL unit from the input buffer. + memcpy(outscan, inscan, nal_unit_length); + inscan += nal_unit_length; +@@ -270,8 +270,8 @@ bool H265ToAnnexBBitstreamConverter::WriteParamSet( + + // Verify space. + uint32_t bytes_left = *out_size; +- if (bytes_left < kParamSetStartCodeSize || +- bytes_left - kParamSetStartCodeSize < size) { ++ if (bytes_left < kParamSetStartCodeSize2 || ++ bytes_left - kParamSetStartCodeSize2 < size) { + return false; + } + +@@ -280,8 +280,8 @@ bool H265ToAnnexBBitstreamConverter::WriteParamSet( + + // Write the 4 byte Annex B start code. + *buf++ = 0; // zero byte +- memcpy(buf, kStartCodePrefix, sizeof(kStartCodePrefix)); +- buf += sizeof(kStartCodePrefix); ++ memcpy(buf, kStartCodePrefix2, sizeof(kStartCodePrefix2)); ++ buf += sizeof(kStartCodePrefix2); + + // Copy the data. + memcpy(buf, ¶m_set[0], size); +diff --git a/media/filters/mac/audio_toolbox_audio_encoder.cc b/media/filters/mac/audio_toolbox_audio_encoder.cc +index 0cb7636f92..d6f7968b88 100644 +--- a/media/filters/mac/audio_toolbox_audio_encoder.cc ++++ b/media/filters/mac/audio_toolbox_audio_encoder.cc +@@ -21,7 +21,7 @@ namespace media { + + namespace { + +-struct InputData { ++struct InputData2 { + raw_ptr bus = nullptr; + bool flushing = false; + }; +@@ -29,12 +29,12 @@ struct InputData { + constexpr int kAacFramesPerBuffer = 1024; + + // Callback used to provide input data to the AudioConverter. +-OSStatus ProvideInputCallback(AudioConverterRef decoder, ++OSStatus ProvideInputCallback2(AudioConverterRef decoder, + UInt32* num_packets, + AudioBufferList* buffer_list, + AudioStreamPacketDescription** packets, + void* user_data) { +- auto* input_data = reinterpret_cast(user_data); ++ auto* input_data = reinterpret_cast(user_data); + if (input_data->flushing) { + *num_packets = 0; + return noErr; +@@ -318,7 +318,7 @@ void AudioToolboxAudioEncoder::DrainFifoOutput() { + void AudioToolboxAudioEncoder::DoEncode(const AudioBus* input_bus) { + bool is_flushing = !input_bus; + +- InputData input_data; ++ InputData2 input_data; + input_data.bus = input_bus; + input_data.flushing = is_flushing; + +@@ -337,7 +337,7 @@ void AudioToolboxAudioEncoder::DoEncode(const AudioBus* input_bus) { + UInt32 num_packets = 1; + AudioStreamPacketDescription packet_description = {}; + auto result = AudioConverterFillComplexBuffer( +- encoder_, ProvideInputCallback, &input_data, &num_packets, ++ encoder_, ProvideInputCallback2, &input_data, &num_packets, + &output_buffer_list, &packet_description); + + // We expect "1 in, 1 out" when feeding packets into the encoder, except +diff --git a/media/filters/media_file_checker.cc b/media/filters/media_file_checker.cc +index dca328bc69..a2d4757587 100644 +--- a/media/filters/media_file_checker.cc ++++ b/media/filters/media_file_checker.cc +@@ -29,7 +29,7 @@ void OnMediaFileCheckerError(bool* called) { + *called = false; + } + +-struct Decoder { ++struct DecoderStruct { + std::unique_ptr context; + std::unique_ptr loop; + }; +@@ -59,7 +59,7 @@ bool MediaFileChecker::Start(base::TimeDelta check_time) { + + // Remember the codec context for any decodable audio or video streams. + bool found_streams = false; +- std::vector stream_contexts(format_context->nb_streams); ++ std::vector stream_contexts(format_context->nb_streams); + for (size_t i = 0; i < format_context->nb_streams; ++i) { + AVCodecParameters* cp = format_context->streams[i]->codecpar; + +diff --git a/media/mojo/services/gpu_mojo_media_client_cros.cc b/media/mojo/services/gpu_mojo_media_client_cros.cc +index 1b540be8c9..574dbd7603 100644 +--- a/media/mojo/services/gpu_mojo_media_client_cros.cc ++++ b/media/mojo/services/gpu_mojo_media_client_cros.cc +@@ -9,6 +9,7 @@ + #include "chromeos/components/cdm_factory_daemon/chromeos_cdm_factory.h" + #include "media/base/audio_decoder.h" + #include "media/base/audio_encoder.h" ++#include "media/base/cdm_factory.h" + #include "media/base/media_switches.h" + #include "media/gpu/chromeos/mailbox_video_frame_converter.h" + #include "media/gpu/chromeos/platform_video_frame_pool.h" +diff --git a/media/mojo/services/gpu_mojo_media_client_linux.cc b/media/mojo/services/gpu_mojo_media_client_linux.cc +index e383fbeb24..6b50726398 100644 +--- a/media/mojo/services/gpu_mojo_media_client_linux.cc ++++ b/media/mojo/services/gpu_mojo_media_client_linux.cc +@@ -8,6 +8,7 @@ + #include "base/task/sequenced_task_runner.h" + #include "media/base/audio_decoder.h" + #include "media/base/audio_encoder.h" ++#include "media/base/cdm_factory.h" + #include "media/base/media_log.h" + #include "media/base/media_switches.h" + #include "media/gpu/chromeos/mailbox_video_frame_converter.h" +@@ -220,7 +221,7 @@ std::unique_ptr CreatePlatformAudioEncoder( + return nullptr; + } + +-class CdmFactory {}; ++// class CdmFactory {}; + + std::unique_ptr CreatePlatformCdmFactory( + mojom::FrameInterfaceFactory* frame_interfaces) { +diff --git a/media/mojo/services/gpu_mojo_media_client_mac.cc b/media/mojo/services/gpu_mojo_media_client_mac.cc +index 18d0b20cfc..5aa105c893 100644 +--- a/media/mojo/services/gpu_mojo_media_client_mac.cc ++++ b/media/mojo/services/gpu_mojo_media_client_mac.cc +@@ -8,6 +8,7 @@ + #include "base/task/single_thread_task_runner.h" + #include "base/task/thread_pool.h" + #include "media/base/audio_decoder.h" ++#include "media/base/cdm_factory.h" + #include "media/base/media_switches.h" + #include "media/base/offloading_audio_encoder.h" + #include "media/filters/mac/audio_toolbox_audio_decoder.h" +@@ -71,7 +72,7 @@ std::unique_ptr CreatePlatformAudioEncoder( + } + + // This class doesn't exist on mac, so we need a stub for unique_ptr. +-class CdmFactory {}; ++//class CdmFactory {}; + + std::unique_ptr CreatePlatformCdmFactory( + mojom::FrameInterfaceFactory* frame_interfaces) { +diff --git a/media/mojo/services/gpu_mojo_media_client_stubs.cc b/media/mojo/services/gpu_mojo_media_client_stubs.cc +index d829b6bc63..aec02643a8 100644 +--- a/media/mojo/services/gpu_mojo_media_client_stubs.cc ++++ b/media/mojo/services/gpu_mojo_media_client_stubs.cc +@@ -6,6 +6,7 @@ + #include "base/task/single_thread_task_runner.h" + #include "media/base/audio_decoder.h" + #include "media/base/audio_encoder.h" ++#include "media/base/cdm_factory.h" + #include "media/base/media_log.h" + #include "media/base/video_decoder.h" + #include "media/mojo/services/gpu_mojo_media_client.h" +@@ -38,9 +39,6 @@ std::unique_ptr CreatePlatformAudioEncoder( + return nullptr; + } + +-// This class doesn't exist on any of the platforms that use the stubs. +-class CdmFactory {}; +- + std::unique_ptr CreatePlatformCdmFactory( + mojom::FrameInterfaceFactory* frame_interfaces) { + return nullptr; +diff --git a/media/mojo/services/gpu_mojo_media_client_win.cc b/media/mojo/services/gpu_mojo_media_client_win.cc +index e50e62add8..ea7c9cb66a 100644 +--- a/media/mojo/services/gpu_mojo_media_client_win.cc ++++ b/media/mojo/services/gpu_mojo_media_client_win.cc +@@ -11,6 +11,7 @@ + #include "gpu/ipc/service/gpu_channel.h" + #include "gpu/ipc/service/gpu_channel_manager.h" + #include "media/base/audio_decoder.h" ++#include "media/base/cdm_factory.h" + #include "media/base/media_switches.h" + #include "media/base/offloading_audio_encoder.h" + #include "media/filters/win/media_foundation_audio_decoder.h" +@@ -106,7 +107,7 @@ VideoDecoderType GetPlatformDecoderImplementationType( + } + + // There is no CdmFactory on windows, so just stub it out. +-class CdmFactory {}; ++//class CdmFactory {}; + std::unique_ptr CreatePlatformCdmFactory( + mojom::FrameInterfaceFactory* frame_interfaces) { + return nullptr; +diff --git a/mojo/public/tools/bindings/mojom.gni b/mojo/public/tools/bindings/mojom.gni +index ff06adb348..fd58e51f25 100644 +--- a/mojo/public/tools/bindings/mojom.gni ++++ b/mojo/public/tools/bindings/mojom.gni +@@ -1202,6 +1202,13 @@ template("mojom") { + } else { + enabled_configurations = [ default_variant ] + } ++ ++ if (defined(invoker.disable_jumbo) && invoker.disable_jumbo) { ++ disable_jumbo = true ++ } else { ++ disable_jumbo = false ++ } ++ + foreach(bindings_configuration, enabled_configurations) { + cpp_only = false + if (defined(invoker.cpp_only)) { +@@ -1564,6 +1571,10 @@ template("mojom") { + sources_target_type = "source_set" + } + ++ if (!disable_jumbo) { ++ sources_target_type = "jumbo_" + sources_target_type ++ } ++ + output_target_name = "${target_name}${variant_suffix}" + if (proxy_target != "") { + group(output_target_name) { +@@ -1578,8 +1589,9 @@ template("mojom") { + sources_target_name = output_target_name + } + +- target("jumbo_" + sources_target_type, sources_target_name) { ++ target(sources_target_type, sources_target_name) { + if (defined(output_name_override)) { ++ + output_name = output_name_override + } + visibility = output_visibility + [ +@@ -1686,7 +1698,7 @@ template("mojom") { + + mojolpm_target_name = "${target_name}_mojolpm" + mojolpm_generator_target_name = "${target_name}__generator" +- source_set(mojolpm_target_name) { ++ jumbo_source_set(mojolpm_target_name) { + # There are still a few missing header dependencies between mojo targets + # with typemaps and the dependencies of their typemap headers. It would + # be good to enable include checking for these in the future though. +diff --git a/services/network/public/cpp/BUILD.gn b/services/network/public/cpp/BUILD.gn +index 7fb4c40124..08bffc5d4e 100644 +--- a/services/network/public/cpp/BUILD.gn ++++ b/services/network/public/cpp/BUILD.gn +@@ -442,6 +442,10 @@ jumbo_component("cpp_base") { + "web_transport_error_mojom_traits.cc", + "web_transport_error_mojom_traits.h", + ] ++ jumbo_excluded_sources = [ ++ "network_ipc_param_traits.cc", ++ "url_request_mojom_traits.cc" ++ ] + + configs += [ "//build/config/compiler:wexit_time_destructors" ] + +@@ -481,6 +485,7 @@ jumbo_component("cpp_base") { + "p2p_param_traits.h", + "p2p_socket_type.h", + ] ++ jumbo_excluded_sources += [ "p2p_param_traits.cc" ] + + public_deps += [ "//third_party/webrtc_overrides:webrtc_component" ] + } +diff --git a/services/network/web_bundle/web_bundle_url_loader_factory.cc b/services/network/web_bundle/web_bundle_url_loader_factory.cc +index 70bdf18613..48bde4e182 100644 +--- a/services/network/web_bundle/web_bundle_url_loader_factory.cc ++++ b/services/network/web_bundle/web_bundle_url_loader_factory.cc +@@ -35,7 +35,7 @@ namespace network { + + namespace { + +-constexpr size_t kBlockedBodyAllocationSize = 1; ++constexpr size_t kBlockedBodyAllocationSize2 = 1; + + void DeleteProducerAndRunCallback( + std::unique_ptr producer, +@@ -87,7 +87,7 @@ class WebBundleURLLoaderClient : public network::mojom::URLLoaderClient { + options.struct_size = sizeof(MojoCreateDataPipeOptions); + options.flags = MOJO_CREATE_DATA_PIPE_FLAG_NONE; + options.element_num_bytes = 1; +- options.capacity_num_bytes = kBlockedBodyAllocationSize; ++ options.capacity_num_bytes = kBlockedBodyAllocationSize2; + mojo::ScopedDataPipeProducerHandle producer; + mojo::ScopedDataPipeConsumerHandle consumer; + MojoResult result = mojo::CreateDataPipe(&options, producer, consumer); +diff --git a/storage/browser/BUILD.gn b/storage/browser/BUILD.gn +index a4a350ed4f..088fb5cbe0 100644 +--- a/storage/browser/BUILD.gn ++++ b/storage/browser/BUILD.gn +@@ -224,6 +224,10 @@ jumbo_component("browser") { + "quota/usage_tracker.h", + ] + ++ jumbo_excluded_sources = [ ++ "file_system/local_file_stream_reader.cc", ++ ] ++ + defines = [ "IS_STORAGE_BROWSER_IMPL" ] + configs += [ + "//build/config:precompiled_headers", +diff --git a/storage/browser/blob/blob_url_registry.cc b/storage/browser/blob/blob_url_registry.cc +index 6b8fee3fbd..7cd518e3e0 100644 +--- a/storage/browser/blob/blob_url_registry.cc ++++ b/storage/browser/blob/blob_url_registry.cc +@@ -16,7 +16,7 @@ namespace storage { + + namespace { + +-BlobUrlRegistry::URLStoreCreationHook* g_url_store_creation_hook = nullptr; ++BlobUrlRegistry::URLStoreCreationHook* g_url_store_creation_hook2 = nullptr; + + } + +@@ -36,8 +36,8 @@ void BlobUrlRegistry::AddReceiver( + std::make_unique(storage_key, AsWeakPtr()), + std::move(receiver)); + +- if (g_url_store_creation_hook) { +- g_url_store_creation_hook->Run(this, receiver_id); ++ if (g_url_store_creation_hook2) { ++ g_url_store_creation_hook2->Run(this, receiver_id); + } + } + +@@ -183,7 +183,7 @@ void BlobUrlRegistry::SetURLStoreCreationHookForTesting( + URLStoreCreationHook* hook) { + DCHECK( + base::FeatureList::IsEnabled(net::features::kSupportPartitionedBlobUrl)); +- g_url_store_creation_hook = hook; ++ g_url_store_creation_hook2 = hook; + } + + } // namespace storage +diff --git a/storage/browser/quota/quota_settings.cc b/storage/browser/quota/quota_settings.cc +index e53053151f..3042d96083 100644 +--- a/storage/browser/quota/quota_settings.cc ++++ b/storage/browser/quota/quota_settings.cc +@@ -24,14 +24,14 @@ namespace storage { + + namespace { + +-const int64_t kMBytes = 1024 * 1024; ++const int64_t _kMBytes = 1024 * 1024; + const int kRandomizedPercentage = 10; + const double kDefaultPerStorageKeyRatio = 0.75; + const double kIncognitoQuotaRatioLowerBound = 0.15; + const double kIncognitoQuotaRatioUpperBound = 0.2; + + // Skews |value| by +/- |percent|. +-int64_t RandomizeByPercent(int64_t value, int percent) { ++int64_t MyRandomizeByPercent(int64_t value, int percent) { + double random_percent = (base::RandDouble() - 0.5) * percent * 2; + return value + (value * (random_percent / 100.0)); + } +@@ -117,7 +117,7 @@ std::optional CalculateNominalDynamicSettings( + // SessionOnly (or ephemeral) origins are allotted a fraction of what + // normal origins are provided, and the amount is capped to a hard limit. + const double kSessionOnlyStorageKeyQuotaRatio = 0.1; // 10% +- const int64_t kMaxSessionOnlyStorageKeyQuota = 300 * kMBytes; ++ const int64_t kMaxSessionOnlyStorageKeyQuota = 300 * _kMBytes; + + QuotaSettings settings; + +@@ -144,10 +144,9 @@ std::optional CalculateNominalDynamicSettings( + static_cast(total * kMustRemainAvailableRatio)); + settings.per_storage_key_quota = pool_size * kPerStorageKeyTemporaryRatio; + settings.session_only_per_storage_key_quota = std::min( +- RandomizeByPercent(kMaxSessionOnlyStorageKeyQuota, kRandomizedPercentage), ++ MyRandomizeByPercent(kMaxSessionOnlyStorageKeyQuota, kRandomizedPercentage), + static_cast(settings.per_storage_key_quota * + kSessionOnlyStorageKeyQuotaRatio)); +- settings.refresh_interval = base::Seconds(60); + return settings; + } + +diff --git a/third_party/blink/common/user_agent/user_agent_metadata.cc b/third_party/blink/common/user_agent/user_agent_metadata.cc +index d327adda3d..baf405fe99 100644 +--- a/third_party/blink/common/user_agent/user_agent_metadata.cc ++++ b/third_party/blink/common/user_agent/user_agent_metadata.cc +@@ -14,7 +14,7 @@ + namespace blink { + + namespace { +-constexpr uint32_t kVersion = 3u; ++constexpr uint32_t kVersionUA = 3u; + } // namespace + + UserAgentBrandVersion::UserAgentBrandVersion(const std::string& ua_brand, +@@ -69,7 +69,7 @@ absl::optional UserAgentMetadata::Marshal( + return absl::nullopt; + } + base::Pickle out; +- out.WriteUInt32(kVersion); ++ out.WriteUInt32(kVersionUA); + + out.WriteUInt32(base::checked_cast(in->brand_version_list.size())); + for (const auto& brand_version : in->brand_version_list) { +@@ -111,7 +111,7 @@ absl::optional UserAgentMetadata::Demarshal( + + uint32_t version; + UserAgentMetadata out; +- if (!in.ReadUInt32(&version) || version != kVersion) ++ if (!in.ReadUInt32(&version) || version != kVersionUA) + return absl::nullopt; + + uint32_t brand_version_size; +diff --git a/third_party/blink/renderer/bindings/scripts/bind_gen/callback_interface.py b/third_party/blink/renderer/bindings/scripts/bind_gen/callback_interface.py +index 6703feeb0c..7478af1ef4 100644 +--- a/third_party/blink/renderer/bindings/scripts/bind_gen/callback_interface.py ++++ b/third_party/blink/renderer/bindings/scripts/bind_gen/callback_interface.py +@@ -185,6 +185,7 @@ def generate_callback_interface(callback_interface_identifier): + cg_context, + FN_INSTALL_INTERFACE_TEMPLATE, + class_name=class_name, ++ api_class_name=class_name, + trampoline_var_name=None, + constructor_entries=[], + supplemental_install_node=SequenceNode(), +diff --git a/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py b/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py +index cc5687a3b6..19c1d5b468 100644 +--- a/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py ++++ b/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py +@@ -5247,7 +5247,7 @@ ${prototype_object}->Delete( + return SequenceNode(nodes) if nodes else None + + +-def make_install_interface_template(cg_context, function_name, class_name, ++def make_install_interface_template(cg_context, function_name, class_name, api_class_name, + trampoline_var_name, constructor_entries, + supplemental_install_node, + install_unconditional_func_name, +@@ -5380,7 +5380,7 @@ def make_install_interface_template(cg_context, function_name, class_name, + for entry in constructor_entries: + nodes = [ + FormatNode("${interface_function_template}->SetCallHandler({});", +- entry.ctor_callback_name), ++ api_class_name + "Callbacks::" + entry.ctor_callback_name), + FormatNode("${interface_function_template}->SetLength({});", + entry.ctor_func_length), + ] +@@ -5428,7 +5428,7 @@ def make_install_interface_template(cg_context, function_name, class_name, + T("""\ + // HTMLAllCollection-specific settings + // https://html.spec.whatwg.org/C/#the-htmlallcollection-interface +-${instance_object_template}->SetCallAsFunctionHandler(ItemOperationCallback); ++${instance_object_template}->SetCallAsFunctionHandler(${class_name}Callbacks::ItemOperationCallback); + ${instance_object_template}->MarkAsUndetectable(); + """)) + +@@ -5715,6 +5715,7 @@ ${instance_object} = ${v8_context}->Global()->GetPrototype().As();\ + if unconditional_entries: + body.append( + CxxBlockNode([ ++ TextNode("using namespace ${class_name}Callbacks;"), + make_table_func(table_name, unconditional_entries), + TextNode(installer_call_text), + ])) +@@ -5724,6 +5725,7 @@ ${instance_object} = ${v8_context}->Global()->GetPrototype().As();\ + CxxUnlikelyIfNode( + cond=conditional, + body=[ ++ TextNode("using namespace ${class_name}Callbacks;"), + make_table_func(table_name, entries), + TextNode(installer_call_text), + ])) +@@ -5901,6 +5903,8 @@ def make_indexed_and_named_property_callbacks_and_install_node(cg_context): + map(lambda flag: "int32_t({})".format(flag), flags)))) + pattern = """\ + // Named interceptors ++{{ ++using namespace ${class_name}Callbacks; + {interceptor_template}->SetHandler( + v8::NamedPropertyHandlerConfiguration( + {impl_bridge}::NamedPropertyGetterCallback, +@@ -5921,7 +5925,9 @@ interface.indexed_and_named_properties.named_getter.extended_attributes: + {impl_bridge}::NamedPropertyDefinerCallback, + {impl_bridge}::NamedPropertyDescriptorCallback, + v8::Local(), +- {property_handler_flags}));""" ++ {property_handler_flags})); ++}} ++""" + install_node.append( + F(pattern, + interceptor_template=interceptor_template, +@@ -5968,6 +5974,8 @@ interface.indexed_and_named_properties.named_getter.extended_attributes: + property_handler_flags = flags[0] + pattern = """\ + // Indexed interceptors ++{{ ++using namespace ${class_name}Callbacks; + {interceptor_template}->SetHandler( + v8::IndexedPropertyHandlerConfiguration( + {impl_bridge}::IndexedPropertyGetterCallback, +@@ -5982,7 +5990,8 @@ interface.indexed_and_named_properties.named_getter.extended_attributes: + {impl_bridge}::IndexedPropertyDefinerCallback, + {impl_bridge}::IndexedPropertyDescriptorCallback, + v8::Local(), +- {property_handler_flags}));""" ++ {property_handler_flags})); ++}}""" + install_node.append( + F(pattern, + interceptor_template=interceptor_template, +@@ -6138,6 +6147,8 @@ def make_cross_origin_property_callbacks_and_install_node( + + text = """\ + // Cross origin properties ++{{ ++using namespace ${class_name}Callbacks; + ${instance_object_template}->SetAccessCheckCallbackAndHandler( + CrossOriginAccessCheckCallback, + v8::NamedPropertyHandlerConfiguration( +@@ -6163,6 +6174,7 @@ ${instance_object_template}->SetAccessCheckCallbackAndHandler( + v8::External::New( + ${isolate}, + const_cast(${class_name}::GetWrapperTypeInfo()))); ++}} + """ + install_node.append(TextNode(text)) + install_node.accumulate( +@@ -6337,6 +6349,7 @@ def make_wrapper_type_info(cg_context, function_name, + ])) + + pattern = """\ ++namespace ${class_name}Callbacks {{ }} + // Construction of WrapperTypeInfo may require non-trivial initialization due + // to cross-component address resolution in order to load the pointer to the + // parent interface's WrapperTypeInfo. We ignore this issue because the issue +@@ -6544,6 +6557,7 @@ def _make_v8_context_snapshot_get_reference_table_function( + )), + filter(None, callback_names))) + table_node = ListNode([ ++ TextNode("using namespace ${class_name}Callbacks;"), + TextNode("static const intptr_t kReferenceTable[] = {"), + ListNode(entry_nodes), + TextNode("};"), +@@ -6919,6 +6933,7 @@ def generate_class_like(class_like, + cg_context, + FN_INSTALL_INTERFACE_TEMPLATE, + class_name=impl_class_name, ++ api_class_name=api_class_name, + trampoline_var_name=tp_install_interface_template, + constructor_entries=constructor_entries, + supplemental_install_node=supplemental_install_node, +@@ -7166,7 +7181,7 @@ def generate_class_like(class_like, + class_like.identifier) + impl_source_blink_ns.body.extend([ + CxxNamespaceNode( +- name="", ++ name=api_class_name + "Callbacks", + body=[ + # Enclose the implementations with a namespace just in order to + # include the class_like name in a stacktrace, such as +diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn +index 3fc03437c0..c1f26ba885 100644 +--- a/third_party/blink/renderer/core/BUILD.gn ++++ b/third_party/blink/renderer/core/BUILD.gn +@@ -6,6 +6,7 @@ import("//build/config/cast.gni") + import("//build/config/compiler/compiler.gni") + import("//build/config/dcheck_always_on.gni") + import("//build/config/python.gni") ++import("//build/config/jumbo.gni") + import("//build/config/ui.gni") + import("//build/nocompile.gni") + import("//build/toolchain/toolchain.gni") +@@ -153,7 +154,7 @@ source_set("core_common") { + sources = [ "core_export.h" ] + } + +-source_set("prerequisites") { ++jumbo_source_set("prerequisites") { + public_deps = [ + "//services/network/public/cpp:cpp", + "//services/network/public/mojom", +@@ -213,7 +214,7 @@ blink_python_runner("make_deprecation_info") { + ] + } + +-component("core") { ++jumbo_component("core") { + output_name = "blink_core" + + visibility = [] # Allow re-assignment of list. +@@ -397,6 +398,13 @@ component("core") { + "//third_party/blink/renderer/core/url_pattern", + "//third_party/blink/renderer/core/xml:xpath_generated", + ] ++ jumbo_excluded_sources = [ ] ++ jumbo_excluded_sources += rebase_path([ "attribution_reporting_to_mojom.cc" ], "", "fetch") ++ jumbo_excluded_sources += rebase_path([ "frame_fetch_context.cc" ], "", "loader") ++ jumbo_excluded_sources += rebase_path([ "image_loader.cc" ], "", "loader") ++ jumbo_excluded_sources += rebase_path([ "create_window.cc" ], "", "page") ++ jumbo_excluded_sources += rebase_path([ "link_highlight_impl.cc" ], "", "paint") ++ jumbo_excluded_sources += rebase_path([ "scroll_animator.cc" ], "", "scroll") + + public_configs = [ ":core_include_dirs" ] + +diff --git a/third_party/blink/renderer/core/animation/BUILD.gn b/third_party/blink/renderer/core/animation/BUILD.gn +index 50c635aff2..1f00596f83 100644 +--- a/third_party/blink/renderer/core/animation/BUILD.gn ++++ b/third_party/blink/renderer/core/animation/BUILD.gn +@@ -331,6 +331,9 @@ blink_core_sources("animation") { + "worklet_animation_controller.cc", + "worklet_animation_controller.h", + ] ++ jumbo_excluded_sources = [ ++ "css_transform_interpolation_type.cc", ++ ] + + deps = [ + ":buildflags", +diff --git a/third_party/blink/renderer/core/animation/compositor_animations.cc b/third_party/blink/renderer/core/animation/compositor_animations.cc +index 794a31810f..e627aaeffa 100644 +--- a/third_party/blink/renderer/core/animation/compositor_animations.cc ++++ b/third_party/blink/renderer/core/animation/compositor_animations.cc +@@ -789,7 +789,7 @@ bool CompositorAnimations::ConvertTimingForCompositor( + // after finishing until it is removed by a subsequent main thread commit. + // This allows developers to apply a post animation style or start a + // subsequent animation without flicker. +- if ((base::FeatureList::IsEnabled(features::kNoPreserveLastMutation) && ++ if ((base::FeatureList::IsEnabled(::features::kNoPreserveLastMutation) && + is_monotonic_timeline) || + is_boundary_aligned) { + if (animation_playback_rate >= 0) { +diff --git a/third_party/blink/renderer/core/animation/css_shadow_list_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_shadow_list_interpolation_type.cc +index b1ddb85a77..caaa5f4b86 100644 +--- a/third_party/blink/renderer/core/animation/css_shadow_list_interpolation_type.cc ++++ b/third_party/blink/renderer/core/animation/css_shadow_list_interpolation_type.cc +@@ -207,7 +207,7 @@ CSSShadowListInterpolationType::PreInterpolationCompositeIfNeeded( + // to disable that caching in this case. + // TODO(crbug.com/1009230): Remove this once our interpolation code isn't + // caching composited values. +- conversion_checkers.push_back(std::make_unique()); ++ conversion_checkers.push_back(std::make_unique()); + auto* interpolable_list = + To(value.interpolable_value.Release()); + if (composite == EffectModel::CompositeOperation::kCompositeAdd) { +diff --git a/third_party/blink/renderer/core/css/box_shadow_paint_image_generator.cc b/third_party/blink/renderer/core/css/box_shadow_paint_image_generator.cc +index 8554ef0667..50ad55bc81 100644 +--- a/third_party/blink/renderer/core/css/box_shadow_paint_image_generator.cc ++++ b/third_party/blink/renderer/core/css/box_shadow_paint_image_generator.cc +@@ -11,22 +11,22 @@ namespace blink { + namespace { + + BoxShadowPaintImageGenerator::BoxShadowPaintImageGeneratorCreateFunction* +- g_create_function = nullptr; ++ g_create_function_bspig = nullptr; + + } // namespace + + // static + void BoxShadowPaintImageGenerator::Init( + BoxShadowPaintImageGeneratorCreateFunction* create_function) { +- DCHECK(!g_create_function); +- g_create_function = create_function; ++ DCHECK(!g_create_function_bspig); ++ g_create_function_bspig = create_function; + } + + BoxShadowPaintImageGenerator* BoxShadowPaintImageGenerator::Create( + LocalFrame& local_root) { +- DCHECK(g_create_function); ++ DCHECK(g_create_function_bspig); + DCHECK(local_root.IsLocalRoot()); +- return g_create_function(local_root); ++ return g_create_function_bspig(local_root); + } + + } // namespace blink +diff --git a/third_party/blink/renderer/core/css/clip_path_paint_image_generator.cc b/third_party/blink/renderer/core/css/clip_path_paint_image_generator.cc +index 84cae256f6..f365766ddd 100644 +--- a/third_party/blink/renderer/core/css/clip_path_paint_image_generator.cc ++++ b/third_party/blink/renderer/core/css/clip_path_paint_image_generator.cc +@@ -11,22 +11,22 @@ namespace blink { + namespace { + + ClipPathPaintImageGenerator::ClipPathPaintImageGeneratorCreateFunction* +- g_create_function = nullptr; ++ g_create_function2 = nullptr; + + } // namespace + + // static + void ClipPathPaintImageGenerator::Init( + ClipPathPaintImageGeneratorCreateFunction* create_function) { +- DCHECK(!g_create_function); +- g_create_function = create_function; ++ DCHECK(!g_create_function2); ++ g_create_function2 = create_function; + } + + ClipPathPaintImageGenerator* ClipPathPaintImageGenerator::Create( + LocalFrame& local_root) { +- DCHECK(g_create_function); ++ DCHECK(g_create_function2); + DCHECK(local_root.IsLocalRoot()); +- return g_create_function(local_root); ++ return g_create_function2(local_root); + } + + } // namespace blink +diff --git a/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc b/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc +index 52a729a6a0..321da3248e 100644 +--- a/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc ++++ b/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc +@@ -94,8 +94,8 @@ + + namespace blink { + +-const double kFinalStatePercentage = 100.0; +-const double kMiddleStatePercentage = 50.0; ++const double kFinalStatePercentage2 = 100.0; ++const double kMiddleStatePercentage2 = 50.0; + + namespace { + +@@ -584,18 +584,18 @@ scoped_refptr StyleBuilderConverterBase::ConvertPaletteMix( + if (cssvalue::CSSColorMixValue::NormalizePercentages( + palette_mix_value->Percentage1(), palette_mix_value->Percentage2(), + normalized_percentage, alpha_multiplier)) { +- double percentage1 = kMiddleStatePercentage; +- double percentage2 = kMiddleStatePercentage; ++ double percentage1 = kMiddleStatePercentage2; ++ double percentage2 = kMiddleStatePercentage2; + if (palette_mix_value->Percentage1() && + palette_mix_value->Percentage2()) { + percentage1 = palette_mix_value->Percentage1()->GetDoubleValue(); + percentage2 = palette_mix_value->Percentage2()->GetDoubleValue(); + } else if (palette_mix_value->Percentage1()) { + percentage1 = palette_mix_value->Percentage1()->GetDoubleValue(); +- percentage2 = kFinalStatePercentage - percentage1; ++ percentage2 = kFinalStatePercentage2 - percentage1; + } else if (palette_mix_value->Percentage2()) { + percentage2 = palette_mix_value->Percentage2()->GetDoubleValue(); +- percentage1 = kFinalStatePercentage - percentage2; ++ percentage1 = kFinalStatePercentage2 - percentage2; + } + return FontPalette::Mix(palette1, palette2, percentage1, percentage2, + normalized_percentage, alpha_multiplier, +diff --git a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc +index b7c195a1ff..363b096af1 100644 +--- a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc ++++ b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc +@@ -95,7 +95,7 @@ size_t GetCurrentCursorPositionInFrame(LocalFrame* local_frame) { + } + #endif + +-RemoteFrame* SourceFrameForOptionalToken( ++RemoteFrame* SourceFrameForOptionalToken2( + const absl::optional& source_frame_token) { + if (!source_frame_token) + return nullptr; +@@ -729,7 +729,7 @@ void LocalFrameMojoHandler::AdvanceFocusInFrame( + mojom::blink::FocusType focus_type, + const absl::optional& source_frame_token) { + RemoteFrame* source_frame = +- source_frame_token ? SourceFrameForOptionalToken(*source_frame_token) ++ source_frame_token ? SourceFrameForOptionalToken2(*source_frame_token) + : nullptr; + if (!source_frame) { + SetInitialFocus(focus_type == mojom::blink::FocusType::kBackward); +diff --git a/third_party/blink/renderer/core/frame/sticky_ad_detector.cc b/third_party/blink/renderer/core/frame/sticky_ad_detector.cc +index 8fd250065c..2e96e6a773 100644 +--- a/third_party/blink/renderer/core/frame/sticky_ad_detector.cc ++++ b/third_party/blink/renderer/core/frame/sticky_ad_detector.cc +@@ -22,8 +22,8 @@ namespace blink { + + namespace { + +-constexpr base::TimeDelta kFireInterval = base::Seconds(1); +-constexpr double kLargeAdSizeToViewportSizeThreshold = 0.3; ++constexpr base::TimeDelta kFireInterval2 = base::Seconds(1); ++constexpr double kLargeAdSizeToViewportSizeThreshold2 = 0.3; + + // An sticky element should have a non-default position w.r.t. the viewport. The + // main page should also be scrollable. +@@ -71,7 +71,7 @@ void StickyAdDetector::MaybeFireDetection(LocalFrame* outermost_main_frame) { + if (last_detection_time_.has_value() && + base::FeatureList::IsEnabled( + features::kFrequencyCappingForLargeStickyAdDetection) && +- current_time < last_detection_time_.value() + kFireInterval) { ++ current_time < last_detection_time_.value() + kFireInterval2) { + return; + } + +@@ -127,7 +127,7 @@ void StickyAdDetector::MaybeFireDetection(LocalFrame* outermost_main_frame) { + + bool is_large = + (overlay_rect.size().Area64() > outermost_main_frame_size.Area64() * +- kLargeAdSizeToViewportSizeThreshold); ++ kLargeAdSizeToViewportSizeThreshold2); + + bool is_main_page_scrollable = + element->GetDocument().GetLayoutView()->HasScrollableOverflowY(); +diff --git a/third_party/blink/renderer/core/html/forms/html_input_element.cc b/third_party/blink/renderer/core/html/forms/html_input_element.cc +index 59b54b4c45..8dc3cb42d4 100644 +--- a/third_party/blink/renderer/core/html/forms/html_input_element.cc ++++ b/third_party/blink/renderer/core/html/forms/html_input_element.cc +@@ -110,7 +110,7 @@ const unsigned kMaxEmailFieldLength = 254; + + const unsigned kMinStrongPasswordLabelWidth = 220; + +-static bool is_default_font_prewarmed_ = false; ++static bool is_default_font_prewarmed_hie = false; + + } // namespace + +@@ -413,10 +413,10 @@ void HTMLInputElement::InitializeTypeInParsing() { + // Prewarm the default font family. Do this while parsing because the style + // recalc calls |TextControlInnerEditorElement::CreateInnerEditorStyle| which + // needs the primary font. +- if (!is_default_font_prewarmed_ && new_type_name == input_type_names::kText) { ++ if (!is_default_font_prewarmed_hie && new_type_name == input_type_names::kText) { + FontCache::PrewarmFamily(LayoutThemeFontProvider::SystemFontFamily( + CSSValueID::kWebkitSmallControl)); +- is_default_font_prewarmed_ = true; ++ is_default_font_prewarmed_hie = true; + } + } + +diff --git a/third_party/blink/renderer/core/html/forms/html_text_area_element.cc b/third_party/blink/renderer/core/html/forms/html_text_area_element.cc +index eaa960ad7e..426fded75a 100644 +--- a/third_party/blink/renderer/core/html/forms/html_text_area_element.cc ++++ b/third_party/blink/renderer/core/html/forms/html_text_area_element.cc +@@ -70,7 +70,7 @@ using mojom::blink::FormControlType; + static const unsigned kDefaultRows = 2; + static const unsigned kDefaultCols = 20; + +-static bool is_default_font_prewarmed_ = false; ++static bool is_default_font_prewarmed_htae = false; + + static inline unsigned ComputeLengthForAPIValue(const String& text) { + unsigned length = text.length(); +@@ -96,14 +96,14 @@ HTMLTextAreaElement::HTMLTextAreaElement(Document& document) + is_placeholder_visible_(false) { + EnsureUserAgentShadowRoot(); + +- if (!is_default_font_prewarmed_) { ++ if (!is_default_font_prewarmed_htae) { + if (Settings* settings = document.GetSettings()) { + // Prewarm 'monospace', the default font family for `