diff --git a/BUILD.gn b/BUILD.gn index ba04c669a50..2a93b2a90e5 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -767,24 +767,34 @@ if (is_redirect_cc_build) { } if (is_win && enable_resource_allowlist_generation) { # Merge chrome_resource_allowlist and wireguard resources allowlist to keep - # wireguard resources in pak files. - action("merge_allowlists") { - deps = [ - "//brave/browser/brave_vpn/win/brave_vpn_wireguard_service:wireguard_resource_allowlist", - "//chrome:resource_allowlist", - ] + # wireguard resources in pak files. When VPN is disabled, just copy the chrome + # allowlist. + if (enable_brave_vpn) { + action("merge_allowlists") { + deps = [ + "//brave/browser/brave_vpn/win/brave_vpn_wireguard_service:wireguard_resource_allowlist", + "//chrome:resource_allowlist", + ] - script = "//brave//resources/brave_allowlist.py" - source_allowlist = "$root_gen_dir/chrome/chrome_resource_allowlist.txt" - args = [ - "--repack_allowlist", - rebase_path(source_allowlist, root_build_dir), - "--brave_allowlist", - rebase_path(wireguard_resource_allowlist_file, root_build_dir), - "--output", - rebase_path(brave_allowlist_file, root_build_dir), - ] + script = "//brave//resources/brave_allowlist.py" + source_allowlist = "$root_gen_dir/chrome/chrome_resource_allowlist.txt" + args = [ + "--repack_allowlist", + rebase_path(source_allowlist, root_build_dir), + "--brave_allowlist", + rebase_path(wireguard_resource_allowlist_file, root_build_dir), + "--output", + rebase_path(brave_allowlist_file, root_build_dir), + ] - outputs = [ brave_allowlist_file ] + outputs = [ brave_allowlist_file ] + } + } else { + # When VPN is disabled, just copy the chrome resource allowlist. + copy("merge_allowlists") { + deps = [ "//chrome:resource_allowlist" ] + sources = [ "$root_gen_dir/chrome/chrome_resource_allowlist.txt" ] + outputs = [ brave_allowlist_file ] + } } } diff --git a/build/commands/lib/branding.js b/build/commands/lib/branding.js index 1cdc0756aec..28937dc16e6 100644 --- a/build/commands/lib/branding.js +++ b/build/commands/lib/branding.js @@ -164,26 +164,26 @@ exports.update = () => { path.join(braveAppVectorIconsDir, 'vector_icons', branding), path.join(chromeComponentsDir, 'vector_icons', branding), ]) - } - // Copy to make our ${branding_path_product}_behaviors.cc - fileMap.add([ - path.join( - config.braveCoreDir, - 'chromium_src', - 'chrome', - 'installer', - 'setup', - 'brave_behaviors.cc', - ), - path.join( - config.srcDir, - 'chrome', - 'installer', - 'setup', - 'brave_behaviors.cc', - ), - ]) + // Copy to make our ${branding_path_product}_behaviors.cc + fileMap.add([ + path.join( + config.braveCoreDir, + 'chromium_src', + 'chrome', + 'installer', + 'setup', + `${branding}_behaviors.cc`, + ), + path.join( + config.srcDir, + 'chrome', + 'installer', + 'setup', + `${branding}_behaviors.cc`, + ), + ]) + } // Replace webui CSS to use our fonts. fileMap.add([ path.join( diff --git a/chromium_src/check_chromium_src_config.json5 b/chromium_src/check_chromium_src_config.json5 index 6934614a675..6343f162e4b 100644 --- a/chromium_src/check_chromium_src_config.json5 +++ b/chromium_src/check_chromium_src_config.json5 @@ -29,6 +29,7 @@ "chrome/common/chrome_constants_unittest_mac.cc", "chrome/installer/mini_installer/brave_mini_installer_unittest.cc", "chrome/installer/setup/brave_behaviors.cc", + "chrome/installer/setup/brave_origin_behaviors.cc", "chrome/installer/setup/test/install_worker_vpn_unittest.cc", "chrome/install_static/brave_install_details_unittest.cc", "chrome/install_static/brave_install_modes_unittest.cc", diff --git a/chromium_src/chrome/installer/setup/brave_origin_behaviors.cc b/chromium_src/chrome/installer/setup/brave_origin_behaviors.cc new file mode 100644 index 00000000000..440246c830e --- /dev/null +++ b/chromium_src/chrome/installer/setup/brave_origin_behaviors.cc @@ -0,0 +1,7 @@ +/* Copyright (c) 2026 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at https://mozilla.org/MPL/2.0/. */ + +// Brave Origin uses the same installer behaviors as Brave. +#include "brave_behaviors.cc"