pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Add chromium-wip to test hid services



Module Name:	pkgsrc-wip
Committed By:	kikadf <kikadf.01%gmail.com@localhost>
Pushed By:	kikadf
Date:		Wed Aug 13 09:19:38 2025 +0200
Changeset:	9c9261a5d4efc8708c86c8406cc632e8cab105e2

Modified Files:
	Makefile
Added Files:
	chromium-wip/COMMIT_MSG
	chromium-wip/DESCR
	chromium-wip/Makefile
	chromium-wip/PLIST
	chromium-wip/TODO
	chromium-wip/distinfo
	chromium-wip/files/README
	chromium-wip/files/chromium-browser.desktop
	chromium-wip/files/chromium.sh.in
	chromium-wip/options.mk
	chromium-wip/patches/patch-BUILD.gn
	chromium-wip/patches/patch-apps_ui_views_app__window__frame__view.cc
	chromium-wip/patches/patch-base_BUILD.gn
	chromium-wip/patches/patch-base_allocator_dispatcher_tls.h
	chromium-wip/patches/patch-base_allocator_partition__alloc__features.cc
	chromium-wip/patches/patch-base_allocator_partition__allocator_partition__alloc.gni
	chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn
	chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h
	chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator.h
	chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h
	chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.cc
	chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h
	chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_proc__maps__linux.cc
	chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_stack__trace__posix.cc
	chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_rand__util__posix.cc
	chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread.h
	chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__internal__posix.h
	chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__posix.cc
	chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h
	chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h
	chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__forward.h
	chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc
	chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_spinning__mutex.cc
	chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_stack_stack.cc
	chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_thread__isolation_pkey.cc
	chromium-wip/patches/patch-base_atomicops.h
	chromium-wip/patches/patch-base_base__paths__posix.cc
	chromium-wip/patches/patch-base_compiler__specific.h
	chromium-wip/patches/patch-base_debug_debugger__posix.cc
	chromium-wip/patches/patch-base_debug_elf__reader.cc
	chromium-wip/patches/patch-base_debug_proc__maps__linux.cc
	chromium-wip/patches/patch-base_debug_stack__trace.cc
	chromium-wip/patches/patch-base_debug_stack__trace__posix.cc
	chromium-wip/patches/patch-base_files_dir__reader__linux.h
	chromium-wip/patches/patch-base_files_dir__reader__posix.h
	chromium-wip/patches/patch-base_files_drive__info.h
	chromium-wip/patches/patch-base_files_drive__info__posix.cc
	chromium-wip/patches/patch-base_files_file__path__watcher.h
	chromium-wip/patches/patch-base_files_file__path__watcher__bsd.cc
	chromium-wip/patches/patch-base_files_file__path__watcher__kqueue.h
	chromium-wip/patches/patch-base_files_file__path__watcher__unittest.cc
	chromium-wip/patches/patch-base_files_file__util__posix.cc
	chromium-wip/patches/patch-base_files_file__util__unittest.cc
	chromium-wip/patches/patch-base_files_important__file__writer__cleaner.cc
	chromium-wip/patches/patch-base_files_scoped__file.cc
	chromium-wip/patches/patch-base_functional_unretained__traits.h
	chromium-wip/patches/patch-base_i18n_icu__util.cc
	chromium-wip/patches/patch-base_linux__util.cc
	chromium-wip/patches/patch-base_logging__unittest.cc
	chromium-wip/patches/patch-base_memory_discardable__memory.cc
	chromium-wip/patches/patch-base_memory_discardable__memory__internal.h
	chromium-wip/patches/patch-base_memory_madv__free__discardable__memory__posix.cc
	chromium-wip/patches/patch-base_memory_platform__shared__memory__region.h
	chromium-wip/patches/patch-base_memory_platform__shared__memory__region__posix.cc
	chromium-wip/patches/patch-base_memory_protected__memory.h
	chromium-wip/patches/patch-base_memory_protected__memory__posix.cc
	chromium-wip/patches/patch-base_message__loop_message__pump__epoll.cc
	chromium-wip/patches/patch-base_message__loop_message__pump__epoll.h
	chromium-wip/patches/patch-base_message__loop_message__pump__glib.cc
	chromium-wip/patches/patch-base_native__library__posix.cc
	chromium-wip/patches/patch-base_native__library__unittest.cc
	chromium-wip/patches/patch-base_posix_can__lower__nice__to.cc
	chromium-wip/patches/patch-base_posix_file__descriptor__shuffle.h
	chromium-wip/patches/patch-base_posix_sysctl.cc
	chromium-wip/patches/patch-base_posix_unix__domain__socket.cc
	chromium-wip/patches/patch-base_posix_unix__domain__socket__unittest.cc
	chromium-wip/patches/patch-base_process_internal__linux.h
	chromium-wip/patches/patch-base_process_kill.h
	chromium-wip/patches/patch-base_process_kill__posix.cc
	chromium-wip/patches/patch-base_process_launch.h
	chromium-wip/patches/patch-base_process_launch__posix.cc
	chromium-wip/patches/patch-base_process_memory__linux.cc
	chromium-wip/patches/patch-base_process_process__handle.cc
	chromium-wip/patches/patch-base_process_process__handle.h
	chromium-wip/patches/patch-base_process_process__handle__freebsd.cc
	chromium-wip/patches/patch-base_process_process__handle__netbsd.cc
	chromium-wip/patches/patch-base_process_process__handle__openbsd.cc
	chromium-wip/patches/patch-base_process_process__iterator.h
	chromium-wip/patches/patch-base_process_process__iterator__freebsd.cc
	chromium-wip/patches/patch-base_process_process__iterator__netbsd.cc
	chromium-wip/patches/patch-base_process_process__iterator__openbsd.cc
	chromium-wip/patches/patch-base_process_process__metrics.cc
	chromium-wip/patches/patch-base_process_process__metrics.h
	chromium-wip/patches/patch-base_process_process__metrics__freebsd.cc
	chromium-wip/patches/patch-base_process_process__metrics__netbsd.cc
	chromium-wip/patches/patch-base_process_process__metrics__openbsd.cc
	chromium-wip/patches/patch-base_process_process__metrics__posix.cc
	chromium-wip/patches/patch-base_process_process__metrics__unittest.cc
	chromium-wip/patches/patch-base_process_process__posix.cc
	chromium-wip/patches/patch-base_process_process__unittest.cc
	chromium-wip/patches/patch-base_profiler_module__cache.cc
	chromium-wip/patches/patch-base_profiler_sampling__profiler__thread__token.cc
	chromium-wip/patches/patch-base_profiler_sampling__profiler__thread__token.h
	chromium-wip/patches/patch-base_profiler_stack__base__address__posix.cc
	chromium-wip/patches/patch-base_profiler_stack__sampling__profiler__test__util.cc
	chromium-wip/patches/patch-base_profiler_stack__sampling__profiler__unittest.cc
	chromium-wip/patches/patch-base_profiler_thread__delegate__posix.cc
	chromium-wip/patches/patch-base_rand__util.h
	chromium-wip/patches/patch-base_rand__util__posix.cc
	chromium-wip/patches/patch-base_strings_safe__sprintf__unittest.cc
	chromium-wip/patches/patch-base_synchronization_cancelable__event.h
	chromium-wip/patches/patch-base_synchronization_lock__impl.h
	chromium-wip/patches/patch-base_syslog__logging.cc
	chromium-wip/patches/patch-base_system_sys__info.cc
	chromium-wip/patches/patch-base_system_sys__info.h
	chromium-wip/patches/patch-base_system_sys__info__freebsd.cc
	chromium-wip/patches/patch-base_system_sys__info__netbsd.cc
	chromium-wip/patches/patch-base_system_sys__info__openbsd.cc
	chromium-wip/patches/patch-base_system_sys__info__posix.cc
	chromium-wip/patches/patch-base_system_sys__info__unittest.cc
	chromium-wip/patches/patch-base_task_thread__pool_environment__config__unittest.cc
	chromium-wip/patches/patch-base_test_launcher_test__launcher.cc
	chromium-wip/patches/patch-base_test_test__file__util__linux.cc
	chromium-wip/patches/patch-base_test_test__file__util__posix.cc
	chromium-wip/patches/patch-base_threading_platform__thread.h
	chromium-wip/patches/patch-base_threading_platform__thread__bsd.cc
	chromium-wip/patches/patch-base_threading_platform__thread__internal__posix.cc
	chromium-wip/patches/patch-base_threading_platform__thread__metrics.cc
	chromium-wip/patches/patch-base_threading_platform__thread__metrics.h
	chromium-wip/patches/patch-base_threading_platform__thread__posix.cc
	chromium-wip/patches/patch-base_threading_platform__thread__unittest.cc
	chromium-wip/patches/patch-base_time_time__now__posix.cc
	chromium-wip/patches/patch-base_trace__event_malloc__dump__provider.cc
	chromium-wip/patches/patch-base_trace__event_memory__dump__manager.cc
	chromium-wip/patches/patch-base_trace__event_process__memory__dump.cc
	chromium-wip/patches/patch-base_tracing_trace__time.cc
	chromium-wip/patches/patch-base_tracing_trace__time.h
	chromium-wip/patches/patch-base_version__info_version__info.h
	chromium-wip/patches/patch-build_config_BUILD.gn
	chromium-wip/patches/patch-build_config_BUILDCONFIG.gn
	chromium-wip/patches/patch-build_config_clang_BUILD.gn
	chromium-wip/patches/patch-build_config_compiler_BUILD.gn
	chromium-wip/patches/patch-build_config_gcc_BUILD.gn
	chromium-wip/patches/patch-build_config_linux_BUILD.gn
	chromium-wip/patches/patch-build_config_linux_libdrm_BUILD.gn
	chromium-wip/patches/patch-build_config_linux_pkg-config.py
	chromium-wip/patches/patch-build_config_ozone.gni
	chromium-wip/patches/patch-build_config_rust.gni
	chromium-wip/patches/patch-build_config_v8__target__cpu.gni
	chromium-wip/patches/patch-build_detect__host__arch.py
	chromium-wip/patches/patch-build_gn__run__binary.py
	chromium-wip/patches/patch-build_linux_chrome.map
	chromium-wip/patches/patch-build_linux_strip__binary.py
	chromium-wip/patches/patch-build_linux_unbundle_icu.gn
	chromium-wip/patches/patch-build_linux_unbundle_libusb.gn
	chromium-wip/patches/patch-build_nocompile.gni
	chromium-wip/patches/patch-build_rust_rust__bindgen.gni
	chromium-wip/patches/patch-build_rust_rust__bindgen__generator.gni
	chromium-wip/patches/patch-build_rust_std_BUILD.gn
	chromium-wip/patches/patch-build_toolchain_freebsd_BUILD.gn
	chromium-wip/patches/patch-build_toolchain_gcc__solink__wrapper.py
	chromium-wip/patches/patch-build_toolchain_gcc__toolchain.gni
	chromium-wip/patches/patch-build_toolchain_netbsd_BUILD.gn
	chromium-wip/patches/patch-build_toolchain_openbsd_BUILD.gn
	chromium-wip/patches/patch-build_toolchain_toolchain.gni
	chromium-wip/patches/patch-cc_base_features.cc
	chromium-wip/patches/patch-chrome_app_chrome__command__ids.h
	chromium-wip/patches/patch-chrome_app_chrome__main.cc
	chromium-wip/patches/patch-chrome_app_chrome__main__delegate.cc
	chromium-wip/patches/patch-chrome_browser_BUILD.gn
	chromium-wip/patches/patch-chrome_browser_about__flags.cc
	chromium-wip/patches/patch-chrome_browser_accessibility_page__colors.cc
	chromium-wip/patches/patch-chrome_browser_after__startup__task__utils.cc
	chromium-wip/patches/patch-chrome_browser_apps_app__service_publishers_extension__apps.cc
	chromium-wip/patches/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc
	chromium-wip/patches/patch-chrome_browser_apps_platform__apps_platform__app__launch.h
	chromium-wip/patches/patch-chrome_browser_autocomplete_chrome__autocomplete__scheme__classifier.cc
	chromium-wip/patches/patch-chrome_browser_background_extensions_background__mode__manager.cc
	chromium-wip/patches/patch-chrome_browser_background_extensions_background__mode__optimizer.cc
	chromium-wip/patches/patch-chrome_browser_background_glic_glic__status__icon.cc
	chromium-wip/patches/patch-chrome_browser_browser__features.cc
	chromium-wip/patches/patch-chrome_browser_browser__features.h
	chromium-wip/patches/patch-chrome_browser_browser__process__impl.cc
	chromium-wip/patches/patch-chrome_browser_browser__process__impl.h
	chromium-wip/patches/patch-chrome_browser_chrome__browser__field__trials.cc
	chromium-wip/patches/patch-chrome_browser_chrome__browser__interface__binders.cc
	chromium-wip/patches/patch-chrome_browser_chrome__browser__interface__binders__webui.cc
	chromium-wip/patches/patch-chrome_browser_chrome__browser__main.cc
	chromium-wip/patches/patch-chrome_browser_chrome__browser__main__extra__parts__linux.cc
	chromium-wip/patches/patch-chrome_browser_chrome__browser__main__extra__parts__ozone.cc
	chromium-wip/patches/patch-chrome_browser_chrome__browser__main__linux.cc
	chromium-wip/patches/patch-chrome_browser_chrome__browser__main__linux.h
	chromium-wip/patches/patch-chrome_browser_chrome__browser__main__posix.cc
	chromium-wip/patches/patch-chrome_browser_chrome__content__browser__client.cc
	chromium-wip/patches/patch-chrome_browser_chrome__content__browser__client.h
	chromium-wip/patches/patch-chrome_browser_chrome__content__browser__client__navigation__throttles.cc
	chromium-wip/patches/patch-chrome_browser_collaboration_messaging_messaging__backend__service__factory.cc
	chromium-wip/patches/patch-chrome_browser_component__updater_iwa__key__distribution__component__installer.cc
	chromium-wip/patches/patch-chrome_browser_component__updater_iwa__key__distribution__component__installer.h
	chromium-wip/patches/patch-chrome_browser_component__updater_registration.cc
	chromium-wip/patches/patch-chrome_browser_component__updater_wasm__tts__engine__component__installer.cc
	chromium-wip/patches/patch-chrome_browser_component__updater_widevine__cdm__component__installer.cc
	chromium-wip/patches/patch-chrome_browser_custom__handlers_chrome__protocol__handler__registry__delegate.cc
	chromium-wip/patches/patch-chrome_browser_defaults.cc
	chromium-wip/patches/patch-chrome_browser_device__identity_device__oauth2__token__service__factory.cc
	chromium-wip/patches/patch-chrome_browser_devtools_features.cc
	chromium-wip/patches/patch-chrome_browser_devtools_features.h
	chromium-wip/patches/patch-chrome_browser_devtools_remote__debugging__server.cc
	chromium-wip/patches/patch-chrome_browser_diagnostics_diagnostics__writer.h
	chromium-wip/patches/patch-chrome_browser_download_chrome__download__manager__delegate.cc
	chromium-wip/patches/patch-chrome_browser_download_download__commands.cc
	chromium-wip/patches/patch-chrome_browser_download_download__commands.h
	chromium-wip/patches/patch-chrome_browser_download_download__file__picker.cc
	chromium-wip/patches/patch-chrome_browser_download_download__item__model.cc
	chromium-wip/patches/patch-chrome_browser_download_download__prefs.cc
	chromium-wip/patches/patch-chrome_browser_download_download__prefs.h
	chromium-wip/patches/patch-chrome_browser_enterprise_browser__management_browser__management__service.cc
	chromium-wip/patches/patch-chrome_browser_enterprise_browser__management_browser__management__service.h
	chromium-wip/patches/patch-chrome_browser_enterprise_connectors_analysis_analysis__service__settings.cc
	chromium-wip/patches/patch-chrome_browser_enterprise_connectors_common.cc
	chromium-wip/patches/patch-chrome_browser_enterprise_connectors_connectors__service.cc
	chromium-wip/patches/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc
	chromium-wip/patches/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc
	chromium-wip/patches/patch-chrome_browser_enterprise_connectors_device__trust_key__management_browser_commands_key__rotation__command__factory.cc
	chromium-wip/patches/patch-chrome_browser_enterprise_connectors_device__trust_key__management_core_persistence_key__persistence__delegate__factory.cc
	chromium-wip/patches/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc
	chromium-wip/patches/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc
	chromium-wip/patches/patch-chrome_browser_enterprise_connectors_reporting_crash__reporting__context.cc
	chromium-wip/patches/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.cc
	chromium-wip/patches/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.h
	chromium-wip/patches/patch-chrome_browser_enterprise_profile__management_profile__management__navigation__throttle.cc
	chromium-wip/patches/patch-chrome_browser_enterprise_remote__commands_cbcm__remote__commands__factory.cc
	chromium-wip/patches/patch-chrome_browser_enterprise_reporting_cloud__profile__reporting__service.cc
	chromium-wip/patches/patch-chrome_browser_enterprise_reporting_cloud__profile__reporting__service__factory.cc
	chromium-wip/patches/patch-chrome_browser_enterprise_signals_context__info__fetcher.cc
	chromium-wip/patches/patch-chrome_browser_enterprise_signals_device__info__fetcher.cc
	chromium-wip/patches/patch-chrome_browser_enterprise_signin_enterprise__signin__service.h
	chromium-wip/patches/patch-chrome_browser_enterprise_signin_interstitials_managed__profile__required__page.cc
	chromium-wip/patches/patch-chrome_browser_enterprise_util_managed__browser__utils.cc
	chromium-wip/patches/patch-chrome_browser_extensions_BUILD.gn
	chromium-wip/patches/patch-chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc
	chromium-wip/patches/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc
	chromium-wip/patches/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h
	chromium-wip/patches/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc
	chromium-wip/patches/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h
	chromium-wip/patches/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc
	chromium-wip/patches/patch-chrome_browser_extensions_api_messaging_launch__context__posix.cc
	chromium-wip/patches/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc
	chromium-wip/patches/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc
	chromium-wip/patches/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc
	chromium-wip/patches/patch-chrome_browser_extensions_api_tabs_tabs__api.cc
	chromium-wip/patches/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc
	chromium-wip/patches/patch-chrome_browser_extensions_api_webstore__private_webstore__private__api.cc
	chromium-wip/patches/patch-chrome_browser_extensions_component__extensions__allowlist_allowlist.cc
	chromium-wip/patches/patch-chrome_browser_extensions_external__provider__impl.cc
	chromium-wip/patches/patch-chrome_browser_feedback_system__logs_about__system__logs__fetcher.cc
	chromium-wip/patches/patch-chrome_browser_feedback_system__logs_chrome__system__logs__fetcher.cc
	chromium-wip/patches/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc
	chromium-wip/patches/patch-chrome_browser_first__run_first__run__dialog.h
	chromium-wip/patches/patch-chrome_browser_first__run_first__run__internal.h
	chromium-wip/patches/patch-chrome_browser_flag__descriptions.cc
	chromium-wip/patches/patch-chrome_browser_flag__descriptions.h
	chromium-wip/patches/patch-chrome_browser_gcm_gcm__profile__service__factory.cc
	chromium-wip/patches/patch-chrome_browser_gcm_instance__id_instance__id__profile__service__factory.cc
	chromium-wip/patches/patch-chrome_browser_global__features.cc
	chromium-wip/patches/patch-chrome_browser_global__features.h
	chromium-wip/patches/patch-chrome_browser_headless_headless__mode__util.cc
	chromium-wip/patches/patch-chrome_browser_intranet__redirect__detector.h
	chromium-wip/patches/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc
	chromium-wip/patches/patch-chrome_browser_media__galleries_media__file__system__registry.cc
	chromium-wip/patches/patch-chrome_browser_media_audio__service__util.cc
	chromium-wip/patches/patch-chrome_browser_media_router_discovery_BUILD.gn
	chromium-wip/patches/patch-chrome_browser_media_router_discovery_discovery__network__list__posix.cc
	chromium-wip/patches/patch-chrome_browser_media_router_discovery_discovery__network__list__wifi__linux.cc
	chromium-wip/patches/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.cc
	chromium-wip/patches/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.h
	chromium-wip/patches/patch-chrome_browser_media_webrtc_desktop__media__picker__controller.cc
	chromium-wip/patches/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc
	chromium-wip/patches/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc
	chromium-wip/patches/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h
	chromium-wip/patches/patch-chrome_browser_memory__details.cc
	chromium-wip/patches/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc
	chromium-wip/patches/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.h
	chromium-wip/patches/patch-chrome_browser_metrics_chrome__metrics__service__client.cc
	chromium-wip/patches/patch-chrome_browser_metrics_perf_cpu__identity.cc
	chromium-wip/patches/patch-chrome_browser_metrics_power_process__metrics__recorder__util.cc
	chromium-wip/patches/patch-chrome_browser_metrics_power_process__monitor.cc
	chromium-wip/patches/patch-chrome_browser_metrics_power_process__monitor.h
	chromium-wip/patches/patch-chrome_browser_net_profile__network__context__service.cc
	chromium-wip/patches/patch-chrome_browser_net_profile__network__context__service__factory.cc
	chromium-wip/patches/patch-chrome_browser_net_system__network__context__manager.cc
	chromium-wip/patches/patch-chrome_browser_net_system__network__context__manager.h
	chromium-wip/patches/patch-chrome_browser_new__tab__page_modules_file__suggestion_drive__service.cc
	chromium-wip/patches/patch-chrome_browser_new__tab__page_new__tab__page__util.cc
	chromium-wip/patches/patch-chrome_browser_notifications_notification__display__service__impl.cc
	chromium-wip/patches/patch-chrome_browser_notifications_notification__platform__bridge__delegator.cc
	chromium-wip/patches/patch-chrome_browser_password__manager_chrome__password__manager__client.cc
	chromium-wip/patches/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc
	chromium-wip/patches/patch-chrome_browser_platform__util__linux.cc
	chromium-wip/patches/patch-chrome_browser_policy_browser__signin__policy__handler.cc
	chromium-wip/patches/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc
	chromium-wip/patches/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc
	chromium-wip/patches/patch-chrome_browser_policy_device__management__service__configuration.cc
	chromium-wip/patches/patch-chrome_browser_policy_policy__value__and__status__aggregator.cc
	chromium-wip/patches/patch-chrome_browser_prefs_browser__prefs.cc
	chromium-wip/patches/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc
	chromium-wip/patches/patch-chrome_browser_printing_print__backend__service__manager.cc
	chromium-wip/patches/patch-chrome_browser_printing_printer__query.cc
	chromium-wip/patches/patch-chrome_browser_process__singleton__posix.cc
	chromium-wip/patches/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc
	chromium-wip/patches/patch-chrome_browser_profiles_profile__impl.cc
	chromium-wip/patches/patch-chrome_browser_profiles_profiles__state.cc
	chromium-wip/patches/patch-chrome_browser_regional__capabilities_regional__capabilities__service__factory.cc
	chromium-wip/patches/patch-chrome_browser_renderer__preferences__util.cc
	chromium-wip/patches/patch-chrome_browser_resources_settings_autofill__page_passwords__shared.css
	chromium-wip/patches/patch-chrome_browser_resources_signin_signin__shared.css
	chromium-wip/patches/patch-chrome_browser_safe__browsing_chrome__password__protection__service.cc
	chromium-wip/patches/patch-chrome_browser_safe__browsing_cloud__content__scanning_binary__upload__service.cc
	chromium-wip/patches/patch-chrome_browser_safe__browsing_incident__reporting_incident__reporting__service.cc
	chromium-wip/patches/patch-chrome_browser_safe__browsing_safe__browsing__pref__change__handler.cc
	chromium-wip/patches/patch-chrome_browser_screen__ai_screen__ai__install__state.cc
	chromium-wip/patches/patch-chrome_browser_screen__ai_screen__ai__service__handler__base.cc
	chromium-wip/patches/patch-chrome_browser_sessions_session__restore.cc
	chromium-wip/patches/patch-chrome_browser_sharing_sharing__handler__registry__impl.cc
	chromium-wip/patches/patch-chrome_browser_shortcuts_icon__badging.cc
	chromium-wip/patches/patch-chrome_browser_signin_accounts__policy__manager.cc
	chromium-wip/patches/patch-chrome_browser_signin_accounts__policy__manager.h
	chromium-wip/patches/patch-chrome_browser_signin_signin__util.cc
	chromium-wip/patches/patch-chrome_browser_signin_signin__util.h
	chromium-wip/patches/patch-chrome_browser_supervised__user_classify__url__navigation__throttle.cc
	chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__browser__utils.cc
	chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__browser__utils.h
	chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__extensions__delegate__impl.cc
	chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.cc
	chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.h
	chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__google__auth__navigation__throttle.cc
	chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__metrics__service__factory.cc
	chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__navigation__observer.cc
	chromium-wip/patches/patch-chrome_browser_sync_chrome__sync__controller__builder.cc
	chromium-wip/patches/patch-chrome_browser_sync_device__info__sync__client__impl.cc
	chromium-wip/patches/patch-chrome_browser_sync_sync__service__factory.cc
	chromium-wip/patches/patch-chrome_browser_task__manager_sampling_task__group.cc
	chromium-wip/patches/patch-chrome_browser_task__manager_sampling_task__group.h
	chromium-wip/patches/patch-chrome_browser_task__manager_sampling_task__group__sampler.cc
	chromium-wip/patches/patch-chrome_browser_task__manager_sampling_task__group__sampler.h
	chromium-wip/patches/patch-chrome_browser_task__manager_sampling_task__manager__impl.cc
	chromium-wip/patches/patch-chrome_browser_task__manager_task__manager__observer.h
	chromium-wip/patches/patch-chrome_browser_themes_theme__helper.cc
	chromium-wip/patches/patch-chrome_browser_themes_theme__service.cc
	chromium-wip/patches/patch-chrome_browser_themes_theme__service__aura__linux.cc
	chromium-wip/patches/patch-chrome_browser_themes_theme__service__factory.cc
	chromium-wip/patches/patch-chrome_browser_ui_actions_chrome__action__id.h
	chromium-wip/patches/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.cc
	chromium-wip/patches/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.h
	chromium-wip/patches/patch-chrome_browser_ui_browser.h
	chromium-wip/patches/patch-chrome_browser_ui_browser__command__controller.cc
	chromium-wip/patches/patch-chrome_browser_ui_browser__commands.cc
	chromium-wip/patches/patch-chrome_browser_ui_browser__ui__prefs.cc
	chromium-wip/patches/patch-chrome_browser_ui_browser__view__prefs.cc
	chromium-wip/patches/patch-chrome_browser_ui_chrome__pages.cc
	chromium-wip/patches/patch-chrome_browser_ui_chrome__pages.h
	chromium-wip/patches/patch-chrome_browser_ui_color_native__chrome__color__mixer.cc
	chromium-wip/patches/patch-chrome_browser_ui_managed__ui.cc
	chromium-wip/patches/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc
	chromium-wip/patches/patch-chrome_browser_ui_passwords_bubble__controllers_relaunch__chrome__bubble__controller.cc
	chromium-wip/patches/patch-chrome_browser_ui_passwords_manage__passwords__ui__controller.cc
	chromium-wip/patches/patch-chrome_browser_ui_prefs_prefs__tab__helper.cc
	chromium-wip/patches/patch-chrome_browser_ui_sad__tab.cc
	chromium-wip/patches/patch-chrome_browser_ui_sharing__hub_sharing__hub__bubble__controller.h
	chromium-wip/patches/patch-chrome_browser_ui_signin_signin__view__controller.cc
	chromium-wip/patches/patch-chrome_browser_ui_signin_signin__view__controller.h
	chromium-wip/patches/patch-chrome_browser_ui_signin_signin__view__controller__delegate.h
	chromium-wip/patches/patch-chrome_browser_ui_startup_bad__flags__prompt.cc
	chromium-wip/patches/patch-chrome_browser_ui_startup_startup__browser__creator.cc
	chromium-wip/patches/patch-chrome_browser_ui_startup_startup__browser__creator__impl.cc
	chromium-wip/patches/patch-chrome_browser_ui_startup_startup__tab__provider.cc
	chromium-wip/patches/patch-chrome_browser_ui_tab__helpers.cc
	chromium-wip/patches/patch-chrome_browser_ui_tabs_features.cc
	chromium-wip/patches/patch-chrome_browser_ui_tabs_tab__dialog__manager.cc
	chromium-wip/patches/patch-chrome_browser_ui_tabs_tab__features.cc
	chromium-wip/patches/patch-chrome_browser_ui_tabs_tab__strip__prefs.cc
	chromium-wip/patches/patch-chrome_browser_ui_task__manager_task__manager__columns.h
	chromium-wip/patches/patch-chrome_browser_ui_task__manager_task__manager__table__model.cc
	chromium-wip/patches/patch-chrome_browser_ui_test_popup__browsertest.cc
	chromium-wip/patches/patch-chrome_browser_ui_test_test__browser__ui.cc
	chromium-wip/patches/patch-chrome_browser_ui_ui__features.cc
	chromium-wip/patches/patch-chrome_browser_ui_ui__features.h
	chromium-wip/patches/patch-chrome_browser_ui_views_accelerator__table.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_chrome__browser__main__extra__parts__views.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_chrome__views__delegate.h
	chromium-wip/patches/patch-chrome_browser_ui_views_chrome__views__delegate__linux.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_compose_compose__dialog__view.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__frame.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__frame.h
	chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__frame__view__layout__linux.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__frame__view__layout__linux__native.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__frame__view__linux.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__non__client__frame__view__factory__views.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__view.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.h
	chromium-wip/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout__delegate.h
	chromium-wip/patches/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_frame_tab__strip__region__view.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_hung__renderer__view.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_new__tab__footer_footer__controller.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_omnibox_omnibox__view__views.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_passwords_password__bubble__view__base.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_profiles_avatar__toolbar__button.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_profiles_avatar__toolbar__button.h
	chromium-wip/patches/patch-chrome_browser_ui_views_profiles_profile__menu__coordinator.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_profiles_profile__menu__view.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_profiles_profile__picker__view.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.h
	chromium-wip/patches/patch-chrome_browser_ui_views_tabs_dragging_tab__drag__controller.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_tabs_tab.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_tabs_tab__hover__card__bubble__view.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_tabs_tab__strip__combo__button.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_tabs_tab__style__views.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_task__manager__search__bar__view.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_user__education_browser__user__education__service.cc
	chromium-wip/patches/patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc
	chromium-wip/patches/patch-chrome_browser_ui_web__applications_web__app__dialogs.h
	chromium-wip/patches/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.cc
	chromium-wip/patches/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.h
	chromium-wip/patches/patch-chrome_browser_ui_webui_about_about__ui.cc
	chromium-wip/patches/patch-chrome_browser_ui_webui_about_about__ui.h
	chromium-wip/patches/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.cc
	chromium-wip/patches/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.h
	chromium-wip/patches/patch-chrome_browser_ui_webui_app__settings_web__app__settings__ui.h
	chromium-wip/patches/patch-chrome_browser_ui_webui_certificate__manager_certificate__manager__handler.cc
	chromium-wip/patches/patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.cc
	chromium-wip/patches/patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.h
	chromium-wip/patches/patch-chrome_browser_ui_webui_chrome__web__ui__configs.cc
	chromium-wip/patches/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc
	chromium-wip/patches/patch-chrome_browser_ui_webui_connectors__internals_connectors__internals__page__handler.cc
	chromium-wip/patches/patch-chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc
	chromium-wip/patches/patch-chrome_browser_ui_webui_interstitials_interstitial__ui.cc
	chromium-wip/patches/patch-chrome_browser_ui_webui_management_management__ui.cc
	chromium-wip/patches/patch-chrome_browser_ui_webui_management_management__ui__constants.cc
	chromium-wip/patches/patch-chrome_browser_ui_webui_management_management__ui__constants.h
	chromium-wip/patches/patch-chrome_browser_ui_webui_management_management__ui__handler.cc
	chromium-wip/patches/patch-chrome_browser_ui_webui_management_management__ui__handler.h
	chromium-wip/patches/patch-chrome_browser_ui_webui_new__tab__page_new__tab__page__handler.cc
	chromium-wip/patches/patch-chrome_browser_ui_webui_password__manager_promo__cards__handler.cc
	chromium-wip/patches/patch-chrome_browser_ui_webui_password__manager_promo__cards_relaunch__chrome__promo.cc
	chromium-wip/patches/patch-chrome_browser_ui_webui_searchbox_searchbox__handler.cc
	chromium-wip/patches/patch-chrome_browser_ui_webui_settings_appearance__handler.cc
	chromium-wip/patches/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc
	chromium-wip/patches/patch-chrome_browser_ui_webui_side__panel_customize__chrome_customize__chrome__page__handler.cc
	chromium-wip/patches/patch-chrome_browser_ui_webui_side__panel_customize__chrome_customize__chrome__page__handler.h
	chromium-wip/patches/patch-chrome_browser_ui_webui_signin_profile__picker__handler.cc
	chromium-wip/patches/patch-chrome_browser_ui_webui_user__education__internals_user__education__internals__page__handler__impl.cc
	chromium-wip/patches/patch-chrome_browser_ui_window__sizer_window__sizer.cc
	chromium-wip/patches/patch-chrome_browser_upgrade__detector_version__history__client.cc
	chromium-wip/patches/patch-chrome_browser_visited__url__ranking_visited__url__ranking__service__factory.cc
	chromium-wip/patches/patch-chrome_browser_web__applications_commands_launch__web__app__command.cc
	chromium-wip/patches/patch-chrome_browser_web__applications_commands_set__user__display__mode__command.cc
	chromium-wip/patches/patch-chrome_browser_web__applications_extension__status__utils.h
	chromium-wip/patches/patch-chrome_browser_web__applications_extensions_extension__status__utils.cc
	chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_os__integration__manager.cc
	chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_os__integration__test__override.h
	chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_run__on__os__login__sub__manager.cc
	chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_shortcut__sub__manager.cc
	chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h
	chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.cc
	chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.h
	chromium-wip/patches/patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc
	chromium-wip/patches/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.cc
	chromium-wip/patches/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.h
	chromium-wip/patches/patch-chrome_browser_web__applications_web__app__helpers.cc
	chromium-wip/patches/patch-chrome_browser_web__applications_web__app__install__info.h
	chromium-wip/patches/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc
	chromium-wip/patches/patch-chrome_browser_webauthn_enclave__manager.cc
	chromium-wip/patches/patch-chrome_browser_webauthn_gpm__user__verification__policy.cc
	chromium-wip/patches/patch-chrome_browser_webauthn_password__credential__controller.cc
	chromium-wip/patches/patch-chrome_browser_webauthn_unexportable__key__utils.cc
	chromium-wip/patches/patch-chrome_common_channel__info.h
	chromium-wip/patches/patch-chrome_common_channel__info__posix.cc
	chromium-wip/patches/patch-chrome_common_chrome__features.cc
	chromium-wip/patches/patch-chrome_common_chrome__features.h
	chromium-wip/patches/patch-chrome_common_chrome__paths.cc
	chromium-wip/patches/patch-chrome_common_chrome__paths.h
	chromium-wip/patches/patch-chrome_common_chrome__paths__internal.h
	chromium-wip/patches/patch-chrome_common_chrome__switches.cc
	chromium-wip/patches/patch-chrome_common_chrome__switches.h
	chromium-wip/patches/patch-chrome_common_crash__keys.cc
	chromium-wip/patches/patch-chrome_common_extensions_extension__constants.cc
	chromium-wip/patches/patch-chrome_common_extensions_extension__constants.h
	chromium-wip/patches/patch-chrome_common_extensions_permissions_chrome__permission__message__rules.cc
	chromium-wip/patches/patch-chrome_common_media_cdm__host__file__path.cc
	chromium-wip/patches/patch-chrome_common_media_cdm__registration.cc
	chromium-wip/patches/patch-chrome_common_media_cdm__registration.h
	chromium-wip/patches/patch-chrome_common_media_component__widevine__cdm__hint__file__linux.h
	chromium-wip/patches/patch-chrome_common_pref__names.h
	chromium-wip/patches/patch-chrome_common_url__constants.h
	chromium-wip/patches/patch-chrome_common_webui__url__constants.cc
	chromium-wip/patches/patch-chrome_common_webui__url__constants.h
	chromium-wip/patches/patch-chrome_enterprise__companion_enterprise__companion__client.cc
	chromium-wip/patches/patch-chrome_enterprise__companion_event__logger.cc
	chromium-wip/patches/patch-chrome_enterprise__companion_lock.cc
	chromium-wip/patches/patch-chrome_services_printing_print__backend__service__impl.cc
	chromium-wip/patches/patch-chrome_services_speech_audio__source__fetcher__impl.cc
	chromium-wip/patches/patch-chrome_test_base_scoped__channel__override__posix.cc
	chromium-wip/patches/patch-chrome_test_chromedriver_chrome__launcher.cc
	chromium-wip/patches/patch-chrome_test_chromedriver_chrome_chrome__finder.cc
	chromium-wip/patches/patch-chrome_test_chromedriver_key__converter__unittest.cc
	chromium-wip/patches/patch-chrome_test_chromedriver_keycode__text__conversion__unittest.cc
	chromium-wip/patches/patch-chrome_test_supervised__user_google__auth__state__waiter__mixin.cc
	chromium-wip/patches/patch-chrome_updater_app_app__uninstall.cc
	chromium-wip/patches/patch-chrome_updater_configurator.cc
	chromium-wip/patches/patch-chrome_updater_lock.cc
	chromium-wip/patches/patch-chrome_updater_util_posix__util.cc
	chromium-wip/patches/patch-chrome_utility_services.cc
	chromium-wip/patches/patch-chromecast_browser_cast__browser__main__parts.cc
	chromium-wip/patches/patch-chromecast_browser_cast__content__browser__client.cc
	chromium-wip/patches/patch-chromecast_cast__core_runtime_browser_runtime__application__service__impl.cc
	chromium-wip/patches/patch-chromecast_media_base_default__monotonic__clock.cc
	chromium-wip/patches/patch-components_BUILD.gn
	chromium-wip/patches/patch-components_autofill_core_browser_data__manager_payments_payments__data__manager.cc
	chromium-wip/patches/patch-components_autofill_core_browser_data__manager_payments_payments__data__manager.h
	chromium-wip/patches/patch-components_autofill_core_browser_foundations_browser__autofill__manager.cc
	chromium-wip/patches/patch-components_autofill_core_browser_integrators_optimization__guide_autofill__optimization__guide.cc
	chromium-wip/patches/patch-components_autofill_core_browser_payments_amount__extraction__manager.cc
	chromium-wip/patches/patch-components_autofill_core_browser_payments_bnpl__manager.cc
	chromium-wip/patches/patch-components_autofill_core_browser_webdata_payments_payments__sync__bridge__util.cc
	chromium-wip/patches/patch-components_autofill_core_common_autofill__payments__features.cc
	chromium-wip/patches/patch-components_autofill_core_common_autofill__prefs.cc
	chromium-wip/patches/patch-components_autofill_core_common_autofill__prefs.h
	chromium-wip/patches/patch-components_commerce_core_commerce__feature__list.cc
	chromium-wip/patches/patch-components_constrained__window_constrained__window__views.cc
	chromium-wip/patches/patch-components_content__settings_core_browser_website__settings__registry.cc
	chromium-wip/patches/patch-components_cookie__config_cookie__store__util.cc
	chromium-wip/patches/patch-components_crash_core_app_BUILD.gn
	chromium-wip/patches/patch-components_crash_core_app_chrome__crashpad__handler.cc
	chromium-wip/patches/patch-components_crash_core_app_crashpad__handler__main.cc
	chromium-wip/patches/patch-components_crash_core_browser_crash__upload__list__crashpad.cc
	chromium-wip/patches/patch-components_crash_core_common_BUILD.gn
	chromium-wip/patches/patch-components_device__signals_core_browser_browser__utils.h
	chromium-wip/patches/patch-components_device__signals_core_browser_mock__signals__aggregator.h
	chromium-wip/patches/patch-components_device__signals_core_browser_signals__aggregator.h
	chromium-wip/patches/patch-components_device__signals_core_browser_signals__aggregator__impl.cc
	chromium-wip/patches/patch-components_device__signals_core_browser_signals__aggregator__impl.h
	chromium-wip/patches/patch-components_device__signals_core_browser_user__permission__service.h
	chromium-wip/patches/patch-components_device__signals_core_browser_user__permission__service__impl.cc
	chromium-wip/patches/patch-components_device__signals_core_browser_user__permission__service__impl.h
	chromium-wip/patches/patch-components_device__signals_core_common_linux_platform__utils__linux.cc
	chromium-wip/patches/patch-components_device__signals_core_common_signals__features.cc
	chromium-wip/patches/patch-components_device__signals_core_common_signals__features.h
	chromium-wip/patches/patch-components_device__signals_core_system__signals_platform__delegate.cc
	chromium-wip/patches/patch-components_device__signals_test_signals__contract.cc
	chromium-wip/patches/patch-components_discardable__memory_service_discardable__shared__memory__manager.cc
	chromium-wip/patches/patch-components_embedder__support_user__agent__utils.cc
	chromium-wip/patches/patch-components_embedder__support_user__agent__utils__unittest.cc
	chromium-wip/patches/patch-components_enterprise_connectors_core_realtime__reporting__client__base.cc
	chromium-wip/patches/patch-components_enterprise_watermarking_watermark.cc
	chromium-wip/patches/patch-components_error__page_common_localized__error.cc
	chromium-wip/patches/patch-components_eye__dropper_eye__dropper__view.cc
	chromium-wip/patches/patch-components_feature__engagement_public_event__constants.cc
	chromium-wip/patches/patch-components_feature__engagement_public_event__constants.h
	chromium-wip/patches/patch-components_feature__engagement_public_feature__configurations.cc
	chromium-wip/patches/patch-components_feature__engagement_public_feature__constants.cc
	chromium-wip/patches/patch-components_feature__engagement_public_feature__constants.h
	chromium-wip/patches/patch-components_feature__engagement_public_feature__list.cc
	chromium-wip/patches/patch-components_feature__engagement_public_feature__list.h
	chromium-wip/patches/patch-components_feed_core_proto_v2_wire_version.proto
	chromium-wip/patches/patch-components_feed_core_v2_feed__network__impl__unittest.cc
	chromium-wip/patches/patch-components_feed_core_v2_proto__util.cc
	chromium-wip/patches/patch-components_feed_core_v2_proto__util__unittest.cc
	chromium-wip/patches/patch-components_feed_core_v2_test_proto__printer.cc
	chromium-wip/patches/patch-components_gcm__driver_gcm__desktop__utils.cc
	chromium-wip/patches/patch-components_gwp__asan_BUILD.gn
	chromium-wip/patches/patch-components_gwp__asan_buildflags_buildflags.gni
	chromium-wip/patches/patch-components_gwp__asan_client_guarded__page__allocator__posix.cc
	chromium-wip/patches/patch-components_gwp__asan_client_gwp__asan.cc
	chromium-wip/patches/patch-components_gwp__asan_client_gwp__asan__features.cc
	chromium-wip/patches/patch-components_gwp__asan_crash__handler_crash__analyzer.cc
	chromium-wip/patches/patch-components_live__caption_caption__util.cc
	chromium-wip/patches/patch-components_live__caption_caption__util.h
	chromium-wip/patches/patch-components_media__router_common_media__source.cc
	chromium-wip/patches/patch-components_media__router_common_providers_cast_channel_cast__message__util.cc
	chromium-wip/patches/patch-components_media__router_common_providers_cast_channel_enum__table.h
	chromium-wip/patches/patch-components_metrics_drive__metrics__provider.cc
	chromium-wip/patches/patch-components_metrics_dwa_dwa__service.cc
	chromium-wip/patches/patch-components_metrics_metrics__log.cc
	chromium-wip/patches/patch-components_metrics_motherboard.cc
	chromium-wip/patches/patch-components_named__mojo__ipc__server_connection__info.h
	chromium-wip/patches/patch-components_named__mojo__ipc__server_named__mojo__ipc__server__client__util.cc
	chromium-wip/patches/patch-components_named__mojo__ipc__server_named__mojo__server__endpoint__connector__linux.cc
	chromium-wip/patches/patch-components_named__system__lock_BUILD.gn
	chromium-wip/patches/patch-components_named__system__lock_lock.h
	chromium-wip/patches/patch-components_named__system__lock_lock__unittest.cc
	chromium-wip/patches/patch-components_optimization__guide_core_optimization__guide__features.cc
	chromium-wip/patches/patch-components_optimization__guide_core_optimization__guide__util.cc
	chromium-wip/patches/patch-components_os__crypt_async_browser_secret__portal__key__provider.cc
	chromium-wip/patches/patch-components_os__crypt_sync_libsecret__util__linux.cc
	chromium-wip/patches/patch-components_os__crypt_sync_os__crypt.h
	chromium-wip/patches/patch-components_paint__preview_browser_paint__preview__client.cc
	chromium-wip/patches/patch-components_paint__preview_browser_paint__preview__client__unittest.cc
	chromium-wip/patches/patch-components_paint__preview_common_proto_paint__preview.proto
	chromium-wip/patches/patch-components_paint__preview_player_player__compositor__delegate.cc
	chromium-wip/patches/patch-components_password__manager_core_browser_features_password__features.cc
	chromium-wip/patches/patch-components_password__manager_core_browser_features_password__features.h
	chromium-wip/patches/patch-components_password__manager_core_browser_password__autofill__manager.cc
	chromium-wip/patches/patch-components_password__manager_core_browser_password__autofill__manager.h
	chromium-wip/patches/patch-components_password__manager_core_browser_password__form__filling.cc
	chromium-wip/patches/patch-components_password__manager_core_browser_password__form__manager.cc
	chromium-wip/patches/patch-components_password__manager_core_browser_password__manager.cc
	chromium-wip/patches/patch-components_password__manager_core_browser_password__manager__client.h
	chromium-wip/patches/patch-components_password__manager_core_browser_password__manager__switches.cc
	chromium-wip/patches/patch-components_password__manager_core_browser_password__manager__switches.h
	chromium-wip/patches/patch-components_password__manager_core_browser_password__manual__fallback__flow.cc
	chromium-wip/patches/patch-components_password__manager_core_browser_password__manual__fallback__flow.h
	chromium-wip/patches/patch-components_password__manager_core_browser_password__store__factory__util.cc
	chromium-wip/patches/patch-components_password__manager_core_browser_password__store_login__database.cc
	chromium-wip/patches/patch-components_password__manager_core_browser_password__store_login__database__async__helper.cc
	chromium-wip/patches/patch-components_password__manager_core_browser_password__store_login__database__unittest.cc
	chromium-wip/patches/patch-components_password__manager_core_browser_stub__password__manager__client.cc
	chromium-wip/patches/patch-components_password__manager_core_browser_stub__password__manager__client.h
	chromium-wip/patches/patch-components_password__manager_core_common_password__manager__pref__names.h
	chromium-wip/patches/patch-components_performance__manager_decorators_process__metrics__decorator.cc
	chromium-wip/patches/patch-components_performance__manager_public_features.h
	chromium-wip/patches/patch-components_permissions_prediction__service_prediction__common.cc
	chromium-wip/patches/patch-components_policy_core_browser_policy__pref__mapping__test.cc
	chromium-wip/patches/patch-components_policy_core_browser_url__blocklist__manager.cc
	chromium-wip/patches/patch-components_policy_core_common_cloud_cloud__policy__client.cc
	chromium-wip/patches/patch-components_policy_core_common_cloud_cloud__policy__refresh__scheduler.cc
	chromium-wip/patches/patch-components_policy_core_common_cloud_cloud__policy__util.cc
	chromium-wip/patches/patch-components_policy_core_common_policy__loader__common.cc
	chromium-wip/patches/patch-components_policy_core_common_policy__paths.cc
	chromium-wip/patches/patch-components_policy_core_common_policy__pref__names.cc
	chromium-wip/patches/patch-components_policy_core_common_policy__pref__names.h
	chromium-wip/patches/patch-components_policy_tools_generate__policy__source.py
	chromium-wip/patches/patch-components_power__metrics_BUILD.gn
	chromium-wip/patches/patch-components_power__metrics_energy__metrics__provider.cc
	chromium-wip/patches/patch-components_regional__capabilities_regional__capabilities__service.cc
	chromium-wip/patches/patch-components_regional__capabilities_regional__capabilities__switches.cc
	chromium-wip/patches/patch-components_regional__capabilities_regional__capabilities__switches.h
	chromium-wip/patches/patch-components_safe__browsing_content_common_file__type__policies__unittest.cc
	chromium-wip/patches/patch-components_safe__browsing_content_resources_gen__file__type__proto.py
	chromium-wip/patches/patch-components_safe__browsing_core_browser_db_v4__protocol__manager__util.cc
	chromium-wip/patches/patch-components_safe__browsing_core_browser_realtime_url__lookup__service__base.cc
	chromium-wip/patches/patch-components_search__engines_template__url__service.cc
	chromium-wip/patches/patch-components_security__interstitials_content_utils.cc
	chromium-wip/patches/patch-components_segmentation__platform_embedder_default__model_cross__device__user__segment.cc
	chromium-wip/patches/patch-components_services_on__device__translation_sandbox__hook.cc
	chromium-wip/patches/patch-components_services_on__device__translation_sandbox__hook.h
	chromium-wip/patches/patch-components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.cc
	chromium-wip/patches/patch-components_signin_public_base_signin__switches.cc
	chromium-wip/patches/patch-components_signin_public_base_signin__switches.h
	chromium-wip/patches/patch-components_soda_soda__util.cc
	chromium-wip/patches/patch-components_startup__metric__utils_common_startup__metric__utils.cc
	chromium-wip/patches/patch-components_storage__monitor_BUILD.gn
	chromium-wip/patches/patch-components_storage__monitor_removable__device__constants.cc
	chromium-wip/patches/patch-components_storage__monitor_removable__device__constants.h
	chromium-wip/patches/patch-components_supervised__user_core_browser_kids__chrome__management__url__checker__client.cc
	chromium-wip/patches/patch-components_supervised__user_core_browser_list__family__members__service.h
	chromium-wip/patches/patch-components_supervised__user_core_browser_supervised__user__metrics__service.cc
	chromium-wip/patches/patch-components_supervised__user_core_browser_supervised__user__preferences.cc
	chromium-wip/patches/patch-components_supervised__user_core_common_features.cc
	chromium-wip/patches/patch-components_supervised__user_core_common_features.h
	chromium-wip/patches/patch-components_supervised__user_core_common_pref__names.h
	chromium-wip/patches/patch-components_sync__device__info_local__device__info__util.cc
	chromium-wip/patches/patch-components_sync__device__info_local__device__info__util__linux.cc
	chromium-wip/patches/patch-components_sync__preferences_common__syncable__prefs__database.cc
	chromium-wip/patches/patch-components_sync_base_sync__util.cc
	chromium-wip/patches/patch-components_system__cpu_cpu__probe.cc
	chromium-wip/patches/patch-components_translate_core_common_translate__util.cc
	chromium-wip/patches/patch-components_trusted__vault_trusted__vault__connection__impl.cc
	chromium-wip/patches/patch-components_update__client_update__query__params.cc
	chromium-wip/patches/patch-components_url__formatter_spoof__checks_idn__spoof__checker.cc
	chromium-wip/patches/patch-components_user__education_views_help__bubble__view.cc
	chromium-wip/patches/patch-components_user__education_views_help__bubble__view.h
	chromium-wip/patches/patch-components_variations_service_variations__service.cc
	chromium-wip/patches/patch-components_visited__url__ranking_public_url__visit__util.cc
	chromium-wip/patches/patch-components_viz_host_gpu__host__impl.cc
	chromium-wip/patches/patch-components_viz_host_host__display__client.cc
	chromium-wip/patches/patch-components_viz_host_host__display__client.h
	chromium-wip/patches/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc
	chromium-wip/patches/patch-components_viz_service_display__embedder_software__output__surface.cc
	chromium-wip/patches/patch-components_viz_service_display__embedder_software__output__surface.h
	chromium-wip/patches/patch-components_viz_service_display_skia__renderer.cc
	chromium-wip/patches/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc
	chromium-wip/patches/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h
	chromium-wip/patches/patch-components_viz_service_gl_gpu__service__impl.cc
	chromium-wip/patches/patch-components_viz_service_gl_gpu__service__impl.h
	chromium-wip/patches/patch-components_viz_test_fake__display__client.cc
	chromium-wip/patches/patch-components_viz_test_fake__display__client.h
	chromium-wip/patches/patch-components_viz_test_mock__display__client.h
	chromium-wip/patches/patch-components_webui_flags_flags__state.cc
	chromium-wip/patches/patch-content_app_BUILD.gn
	chromium-wip/patches/patch-content_app_content__main.cc
	chromium-wip/patches/patch-content_app_content__main__runner__impl.cc
	chromium-wip/patches/patch-content_browser_BUILD.gn
	chromium-wip/patches/patch-content_browser_accessibility_browser__accessibility__state__impl.cc
	chromium-wip/patches/patch-content_browser_accessibility_browser__accessibility__state__impl__auralinux.cc
	chromium-wip/patches/patch-content_browser_audio_audio__service.cc
	chromium-wip/patches/patch-content_browser_browser__child__process__host__impl.cc
	chromium-wip/patches/patch-content_browser_browser__child__process__host__impl.h
	chromium-wip/patches/patch-content_browser_browser__child__process__host__impl__receiver__bindings.cc
	chromium-wip/patches/patch-content_browser_browser__main__loop.cc
	chromium-wip/patches/patch-content_browser_child__process__launcher__helper__linux.cc
	chromium-wip/patches/patch-content_browser_child__thread__type__switcher__linux.cc
	chromium-wip/patches/patch-content_browser_child__thread__type__switcher__linux.h
	chromium-wip/patches/patch-content_browser_compositor_viz__process__transport__factory.cc
	chromium-wip/patches/patch-content_browser_devtools_devtools__frontend__host__impl.cc
	chromium-wip/patches/patch-content_browser_devtools_devtools__frontend__host__impl.h
	chromium-wip/patches/patch-content_browser_devtools_protocol_system__info__handler.cc
	chromium-wip/patches/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher.h
	chromium-wip/patches/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher__bsd.cc
	chromium-wip/patches/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher__kqueue.h
	chromium-wip/patches/patch-content_browser_file__system__access_file__system__access__local__path__watcher.cc
	chromium-wip/patches/patch-content_browser_font__access_font__enumeration__data__source.cc
	chromium-wip/patches/patch-content_browser_gpu_compositor__util.cc
	chromium-wip/patches/patch-content_browser_gpu_gpu__data__manager__impl.cc
	chromium-wip/patches/patch-content_browser_gpu_gpu__data__manager__impl.h
	chromium-wip/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.cc
	chromium-wip/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.h
	chromium-wip/patches/patch-content_browser_gpu_gpu__process__host.cc
	chromium-wip/patches/patch-content_browser_media_frameless__media__interface__proxy.h
	chromium-wip/patches/patch-content_browser_media_media__keys__listener__manager__impl.cc
	chromium-wip/patches/patch-content_browser_network__service__instance__impl.cc
	chromium-wip/patches/patch-content_browser_ppapi__plugin__process__host__receiver__bindings.cc
	chromium-wip/patches/patch-content_browser_renderer__host_delegated__frame__host.cc
	chromium-wip/patches/patch-content_browser_renderer__host_media_service__video__capture__device__launcher.cc
	chromium-wip/patches/patch-content_browser_renderer__host_pepper_pepper__file__io__host.cc
	chromium-wip/patches/patch-content_browser_renderer__host_render__process__host__impl.cc
	chromium-wip/patches/patch-content_browser_renderer__host_render__process__host__impl.h
	chromium-wip/patches/patch-content_browser_renderer__host_render__process__host__impl__receiver__bindings.cc
	chromium-wip/patches/patch-content_browser_renderer__host_render__view__host__impl.cc
	chromium-wip/patches/patch-content_browser_renderer__host_render__widget__host__view__aura.cc
	chromium-wip/patches/patch-content_browser_renderer__host_render__widget__host__view__aura.h
	chromium-wip/patches/patch-content_browser_renderer__host_render__widget__host__view__event__handler.cc
	chromium-wip/patches/patch-content_browser_sandbox__host__linux.cc
	chromium-wip/patches/patch-content_browser_scheduler_responsiveness_jank__monitor__impl.cc
	chromium-wip/patches/patch-content_browser_scheduler_responsiveness_native__event__observer.cc
	chromium-wip/patches/patch-content_browser_scheduler_responsiveness_native__event__observer.h
	chromium-wip/patches/patch-content_browser_service__host_utility__process__host.cc
	chromium-wip/patches/patch-content_browser_service__host_utility__process__host__receiver__bindings.cc
	chromium-wip/patches/patch-content_browser_service__host_utility__sandbox__delegate.cc
	chromium-wip/patches/patch-content_browser_v8__snapshot__files.cc
	chromium-wip/patches/patch-content_browser_web__contents_slow__web__preference__cache.cc
	chromium-wip/patches/patch-content_browser_web__contents_web__contents__view__aura.cc
	chromium-wip/patches/patch-content_browser_web__contents_web__contents__view__aura__unittest.cc
	chromium-wip/patches/patch-content_browser_webui_web__ui__main__frame__observer.cc
	chromium-wip/patches/patch-content_browser_zygote__host_zygote__host__impl__linux.cc
	chromium-wip/patches/patch-content_browser_zygote__host_zygote__host__impl__linux.h
	chromium-wip/patches/patch-content_child_BUILD.gn
	chromium-wip/patches/patch-content_child_child__process.cc
	chromium-wip/patches/patch-content_child_child__process.h
	chromium-wip/patches/patch-content_common_BUILD.gn
	chromium-wip/patches/patch-content_common_features.cc
	chromium-wip/patches/patch-content_common_features.h
	chromium-wip/patches/patch-content_common_font__list__unittest.cc
	chromium-wip/patches/patch-content_common_gpu__pre__sandbox__hook__bsd.cc
	chromium-wip/patches/patch-content_common_gpu__pre__sandbox__hook__bsd.h
	chromium-wip/patches/patch-content_common_gpu__pre__sandbox__hook__linux.h
	chromium-wip/patches/patch-content_common_thread__type__switcher.mojom
	chromium-wip/patches/patch-content_gpu_gpu__child__thread.cc
	chromium-wip/patches/patch-content_gpu_gpu__main.cc
	chromium-wip/patches/patch-content_ppapi__plugin_ppapi__blink__platform__impl.cc
	chromium-wip/patches/patch-content_ppapi__plugin_ppapi__blink__platform__impl.h
	chromium-wip/patches/patch-content_ppapi__plugin_ppapi__plugin__main.cc
	chromium-wip/patches/patch-content_public_browser_content__browser__client.cc
	chromium-wip/patches/patch-content_public_browser_zygote__host_zygote__host__linux.h
	chromium-wip/patches/patch-content_public_common_content__features.cc
	chromium-wip/patches/patch-content_public_common_content__switches.cc
	chromium-wip/patches/patch-content_public_common_content__switches.h
	chromium-wip/patches/patch-content_public_common_zygote_features.gni
	chromium-wip/patches/patch-content_renderer_render__thread__impl.cc
	chromium-wip/patches/patch-content_renderer_renderer__blink__platform__impl.cc
	chromium-wip/patches/patch-content_renderer_renderer__blink__platform__impl.h
	chromium-wip/patches/patch-content_renderer_renderer__main__platform__delegate__linux.cc
	chromium-wip/patches/patch-content_shell_BUILD.gn
	chromium-wip/patches/patch-content_shell_app_shell__main__delegate.cc
	chromium-wip/patches/patch-content_shell_browser_shell__browser__main__parts.cc
	chromium-wip/patches/patch-content_shell_browser_shell__platform__delegate__views.cc
	chromium-wip/patches/patch-content_shell_renderer_shell__content__renderer__client.cc
	chromium-wip/patches/patch-content_shell_utility_shell__content__utility__client.cc
	chromium-wip/patches/patch-content_test_BUILD.gn
	chromium-wip/patches/patch-content_utility_services.cc
	chromium-wip/patches/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.cc
	chromium-wip/patches/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.h
	chromium-wip/patches/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.cc
	chromium-wip/patches/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.h
	chromium-wip/patches/patch-content_utility_utility__main.cc
	chromium-wip/patches/patch-content_utility_utility__thread__impl.cc
	chromium-wip/patches/patch-content_zygote_BUILD.gn
	chromium-wip/patches/patch-content_zygote_zygote__linux.cc
	chromium-wip/patches/patch-content_zygote_zygote__main__linux.cc
	chromium-wip/patches/patch-device_bluetooth_bluetooth__adapter.cc
	chromium-wip/patches/patch-device_bluetooth_cast__bluetooth.gni
	chromium-wip/patches/patch-device_gamepad_BUILD.gn
	chromium-wip/patches/patch-device_gamepad_gamepad__provider.cc
	chromium-wip/patches/patch-device_gamepad_hid__writer__linux.cc
	chromium-wip/patches/patch-extensions_browser_api_api__browser__context__keyed__service__factories.cc
	chromium-wip/patches/patch-extensions_browser_api_management_management__api.cc
	chromium-wip/patches/patch-extensions_browser_api_messaging_message__service.cc
	chromium-wip/patches/patch-extensions_browser_api_networking__private_networking__private__delegate__factory.cc
	chromium-wip/patches/patch-extensions_common_api___permission__features.json
	chromium-wip/patches/patch-extensions_common_api_runtime.json
	chromium-wip/patches/patch-extensions_common_command.cc
	chromium-wip/patches/patch-extensions_common_features_feature.cc
	chromium-wip/patches/patch-extensions_renderer_bindings_api__binding__util.cc
	chromium-wip/patches/patch-extensions_renderer_bindings_argument__spec.cc
	chromium-wip/patches/patch-extensions_shell_app_shell__main__delegate.cc
	chromium-wip/patches/patch-extensions_shell_browser_api_runtime_shell__runtime__api__delegate.cc
	chromium-wip/patches/patch-extensions_shell_browser_shell__browser__main__parts.cc
	chromium-wip/patches/patch-extensions_shell_browser_shell__extensions__api__client.cc
	chromium-wip/patches/patch-extensions_shell_browser_shell__extensions__api__client.h
	chromium-wip/patches/patch-google__apis_gcm_engine_heartbeat__manager.cc
	chromium-wip/patches/patch-gpu_command__buffer_client_fake__gpu__memory__buffer.cc
	chromium-wip/patches/patch-gpu_command__buffer_client_fake__gpu__memory__buffer.h
	chromium-wip/patches/patch-gpu_command__buffer_service_dawn__context__provider.cc
	chromium-wip/patches/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc
	chromium-wip/patches/patch-gpu_command__buffer_service_raster__decoder__unittest__context__lost.cc
	chromium-wip/patches/patch-gpu_command__buffer_service_shared__context__state.cc
	chromium-wip/patches/patch-gpu_command__buffer_service_shared__context__state.h
	chromium-wip/patches/patch-gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc
	chromium-wip/patches/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing.cc
	chromium-wip/patches/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc
	chromium-wip/patches/patch-gpu_command__buffer_service_shared__image_shared__image__factory.cc
	chromium-wip/patches/patch-gpu_command__buffer_service_shared__image_shared__image__manager.cc
	chromium-wip/patches/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc
	chromium-wip/patches/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc
	chromium-wip/patches/patch-gpu_command__buffer_tests_gl__gpu__memory__buffer__unittest.cc
	chromium-wip/patches/patch-gpu_config_gpu__control__list.cc
	chromium-wip/patches/patch-gpu_config_gpu__finch__features.cc
	chromium-wip/patches/patch-gpu_config_gpu__info__collector.cc
	chromium-wip/patches/patch-gpu_config_gpu__test__config.cc
	chromium-wip/patches/patch-gpu_ipc_common_gpu__memory__buffer__support.h
	chromium-wip/patches/patch-gpu_ipc_service_gpu__init.cc
	chromium-wip/patches/patch-gpu_ipc_service_gpu__memory__buffer__factory.cc
	chromium-wip/patches/patch-gpu_ipc_service_x__util.h
	chromium-wip/patches/patch-gpu_vulkan_generate__bindings.py
	chromium-wip/patches/patch-gpu_vulkan_semaphore__handle.cc
	chromium-wip/patches/patch-gpu_vulkan_vulkan__device__queue.cc
	chromium-wip/patches/patch-gpu_vulkan_vulkan__device__queue.h
	chromium-wip/patches/patch-gpu_vulkan_vulkan__function__pointers.cc
	chromium-wip/patches/patch-gpu_vulkan_vulkan__function__pointers.h
	chromium-wip/patches/patch-gpu_vulkan_vulkan__image.h
	chromium-wip/patches/patch-gpu_vulkan_vulkan__util.cc
	chromium-wip/patches/patch-headless_BUILD.gn
	chromium-wip/patches/patch-headless_lib_browser_headless__browser__main__parts__posix.cc
	chromium-wip/patches/patch-headless_lib_browser_headless__content__browser__client.cc
	chromium-wip/patches/patch-headless_lib_browser_headless__content__browser__client.h
	chromium-wip/patches/patch-headless_lib_browser_headless__web__contents__impl.cc
	chromium-wip/patches/patch-headless_lib_headless__content__main__delegate.cc
	chromium-wip/patches/patch-ipc_ipc__channel.h
	chromium-wip/patches/patch-ipc_ipc__channel__common.cc
	chromium-wip/patches/patch-ipc_ipc__channel__mojo.cc
	chromium-wip/patches/patch-ipc_ipc__message__utils.cc
	chromium-wip/patches/patch-ipc_ipc__message__utils.h
	chromium-wip/patches/patch-media_BUILD.gn
	chromium-wip/patches/patch-media_audio_BUILD.gn
	chromium-wip/patches/patch-media_audio_alsa_audio__manager__alsa.cc
	chromium-wip/patches/patch-media_audio_audio__input__device.cc
	chromium-wip/patches/patch-media_audio_audio__output__proxy__unittest.cc
	chromium-wip/patches/patch-media_audio_pulse_pulse__util.cc
	chromium-wip/patches/patch-media_audio_sndio_audio__manager__sndio.cc
	chromium-wip/patches/patch-media_audio_sndio_audio__manager__sndio.h
	chromium-wip/patches/patch-media_audio_sndio_sndio__input.cc
	chromium-wip/patches/patch-media_audio_sndio_sndio__input.h
	chromium-wip/patches/patch-media_audio_sndio_sndio__output.cc
	chromium-wip/patches/patch-media_audio_sndio_sndio__output.h
	chromium-wip/patches/patch-media_base_audio__latency.cc
	chromium-wip/patches/patch-media_base_libaom__thread__wrapper.cc
	chromium-wip/patches/patch-media_base_libvpx__thread__wrapper.cc
	chromium-wip/patches/patch-media_base_media__switches.cc
	chromium-wip/patches/patch-media_base_media__switches.h
	chromium-wip/patches/patch-media_base_video__frame.cc
	chromium-wip/patches/patch-media_base_video__frame.h
	chromium-wip/patches/patch-media_capture_video_create__video__capture__device__factory.cc
	chromium-wip/patches/patch-media_capture_video_fake__video__capture__device__factory.cc
	chromium-wip/patches/patch-media_capture_video_file__video__capture__device__factory.cc
	chromium-wip/patches/patch-media_capture_video_linux_fake__v4l2__impl.cc
	chromium-wip/patches/patch-media_capture_video_linux_fake__v4l2__impl.h
	chromium-wip/patches/patch-media_capture_video_linux_v4l2__capture__delegate.cc
	chromium-wip/patches/patch-media_capture_video_linux_v4l2__capture__delegate.h
	chromium-wip/patches/patch-media_capture_video_linux_v4l2__capture__device.h
	chromium-wip/patches/patch-media_capture_video_linux_v4l2__capture__device__impl.cc
	chromium-wip/patches/patch-media_capture_video_linux_v4l2__capture__device__impl.h
	chromium-wip/patches/patch-media_capture_video_linux_video__capture__device__factory__v4l2.cc
	chromium-wip/patches/patch-media_capture_video_linux_video__capture__device__factory__v4l2.h
	chromium-wip/patches/patch-media_capture_video_linux_video__capture__device__linux.cc
	chromium-wip/patches/patch-media_capture_video_video__capture__buffer__tracker__factory__impl.cc
	chromium-wip/patches/patch-media_capture_video_video__capture__device__client.cc
	chromium-wip/patches/patch-media_cdm_cdm__paths__unittest.cc
	chromium-wip/patches/patch-media_cdm_library__cdm_cdm__paths.gni
	chromium-wip/patches/patch-media_ffmpeg_scripts_build__ffmpeg.py
	chromium-wip/patches/patch-media_ffmpeg_scripts_robo__lib_config.py
	chromium-wip/patches/patch-media_gpu_chromeos_gl__image__processor__backend.cc
	chromium-wip/patches/patch-media_gpu_chromeos_libyuv__image__processor__backend.cc
	chromium-wip/patches/patch-media_gpu_chromeos_mailbox__video__frame__converter.cc
	chromium-wip/patches/patch-media_gpu_chromeos_platform__video__frame__utils.cc
	chromium-wip/patches/patch-media_gpu_chromeos_video__decoder__pipeline.cc
	chromium-wip/patches/patch-media_gpu_gpu__video__decode__accelerator__factory.cc
	chromium-wip/patches/patch-media_gpu_gpu__video__encode__accelerator__factory.cc
	chromium-wip/patches/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc
	chromium-wip/patches/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.h
	chromium-wip/patches/patch-media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.cc
	chromium-wip/patches/patch-media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.h
	chromium-wip/patches/patch-media_gpu_test_raw__video.cc
	chromium-wip/patches/patch-media_gpu_test_video__frame__file__writer.cc
	chromium-wip/patches/patch-media_gpu_test_video__frame__helpers.cc
	chromium-wip/patches/patch-media_gpu_test_video__frame__validator.cc
	chromium-wip/patches/patch-media_gpu_vaapi_vaapi__video__decoder.cc
	chromium-wip/patches/patch-media_gpu_vaapi_vaapi__wrapper.cc
	chromium-wip/patches/patch-media_media__options.gni
	chromium-wip/patches/patch-media_mojo_mojom_BUILD.gn
	chromium-wip/patches/patch-media_mojo_mojom_video__frame__mojom__traits.cc
	chromium-wip/patches/patch-media_mojo_mojom_video__frame__mojom__traits.h
	chromium-wip/patches/patch-media_video_gpu__memory__buffer__video__frame__pool.cc
	chromium-wip/patches/patch-media_video_video__encode__accelerator__adapter.cc
	chromium-wip/patches/patch-media_video_video__encode__accelerator__adapter__test.cc
	chromium-wip/patches/patch-media_webrtc_audio__processor.cc
	chromium-wip/patches/patch-media_webrtc_helpers.cc
	chromium-wip/patches/patch-media_webrtc_helpers__unittests.cc
	chromium-wip/patches/patch-mojo_core_BUILD.gn
	chromium-wip/patches/patch-mojo_core_channel.cc
	chromium-wip/patches/patch-mojo_core_embedder_features.h
	chromium-wip/patches/patch-mojo_public_cpp_platform_socket__utils__posix.cc
	chromium-wip/patches/patch-mojo_public_tools_bindings_mojom.gni
	chromium-wip/patches/patch-net_BUILD.gn
	chromium-wip/patches/patch-net_base_features.cc
	chromium-wip/patches/patch-net_base_network__change__notifier.cc
	chromium-wip/patches/patch-net_base_network__change__notifier.h
	chromium-wip/patches/patch-net_base_network__change__notifier__passive.cc
	chromium-wip/patches/patch-net_base_network__interfaces__posix.h
	chromium-wip/patches/patch-net_base_sockaddr__util__posix.cc
	chromium-wip/patches/patch-net_base_sockaddr__util__posix__unittest.cc
	chromium-wip/patches/patch-net_disk__cache_backend__experiment.h
	chromium-wip/patches/patch-net_disk__cache_simple_simple__file__tracker.cc
	chromium-wip/patches/patch-net_dns_BUILD.gn
	chromium-wip/patches/patch-net_dns_address__info.cc
	chromium-wip/patches/patch-net_dns_address__sorter__posix.cc
	chromium-wip/patches/patch-net_dns_dns__config__service__posix.cc
	chromium-wip/patches/patch-net_dns_dns__reloader.cc
	chromium-wip/patches/patch-net_dns_dns__util.cc
	chromium-wip/patches/patch-net_dns_host__resolver__proc.cc
	chromium-wip/patches/patch-net_dns_public_BUILD.gn
	chromium-wip/patches/patch-net_dns_public_resolv__reader.cc
	chromium-wip/patches/patch-net_dns_public_resolv__reader.h
	chromium-wip/patches/patch-net_dns_public_scoped__res__state.cc
	chromium-wip/patches/patch-net_dns_public_scoped__res__state.h
	chromium-wip/patches/patch-net_filter_zstd__source__stream.cc
	chromium-wip/patches/patch-net_http_http__auth__gssapi__posix.cc
	chromium-wip/patches/patch-net_http_http__auth__gssapi__posix.h
	chromium-wip/patches/patch-net_http_http__auth__handler__negotiate.cc
	chromium-wip/patches/patch-net_http_http__auth__preferences.cc
	chromium-wip/patches/patch-net_http_http__auth__preferences.h
	chromium-wip/patches/patch-net_http_http__network__session.cc
	chromium-wip/patches/patch-net_proxy__resolution_proxy__config__service.cc
	chromium-wip/patches/patch-net_proxy__resolution_proxy__config__service__linux.cc
	chromium-wip/patches/patch-net_quic_quic__network__transaction__unittest.cc
	chromium-wip/patches/patch-net_socket_socks5__client__socket.cc
	chromium-wip/patches/patch-net_socket_tcp__socket__posix.cc
	chromium-wip/patches/patch-net_socket_udp__socket__posix.cc
	chromium-wip/patches/patch-net_socket_udp__socket__unittest.cc
	chromium-wip/patches/patch-net_third__party_quiche_BUILD.gn
	chromium-wip/patches/patch-net_tools_cert__verify__tool_cert__verify__tool.cc
	chromium-wip/patches/patch-net_tools_net__watcher_net__watcher.cc
	chromium-wip/patches/patch-net_traffic__annotation_network__traffic__annotation.h
	chromium-wip/patches/patch-net_url__request_url__request__context.cc
	chromium-wip/patches/patch-net_url__request_url__request__context.h
	chromium-wip/patches/patch-net_url__request_url__request__context__builder.cc
	chromium-wip/patches/patch-net_websockets_websocket__basic__stream__adapters__test.cc
	chromium-wip/patches/patch-pdf_pdfium_pdfium__engine.cc
	chromium-wip/patches/patch-ppapi_tests_test__utils.h
	chromium-wip/patches/patch-printing_backend_cups__ipp__helper.cc
	chromium-wip/patches/patch-printing_backend_print__backend__cups.cc
	chromium-wip/patches/patch-printing_mojom_printing__context__mojom__traits.cc
	chromium-wip/patches/patch-printing_mojom_printing__context__mojom__traits.h
	chromium-wip/patches/patch-printing_mojom_printing__context__mojom__traits__unittest.cc
	chromium-wip/patches/patch-printing_print__settings.cc
	chromium-wip/patches/patch-printing_print__settings.h
	chromium-wip/patches/patch-printing_print__settings__conversion.cc
	chromium-wip/patches/patch-printing_printing__context__linux.cc
	chromium-wip/patches/patch-printing_printing__features.cc
	chromium-wip/patches/patch-printing_printing__features.h
	chromium-wip/patches/patch-printing_sandbox_print__backend__sandbox__hook__linux.cc
	chromium-wip/patches/patch-printing_sandbox_print__backend__sandbox__hook__linux.h
	chromium-wip/patches/patch-remoting_base_constants.h
	chromium-wip/patches/patch-remoting_base_host__settings.cc
	chromium-wip/patches/patch-remoting_codec_webrtc__video__encoder__vpx.cc
	chromium-wip/patches/patch-remoting_host_base_desktop__environment__options.cc
	chromium-wip/patches/patch-remoting_host_base_switches.cc
	chromium-wip/patches/patch-remoting_host_base_switches.h
	chromium-wip/patches/patch-remoting_host_chromoting__host.cc
	chromium-wip/patches/patch-remoting_host_chromoting__host.h
	chromium-wip/patches/patch-remoting_host_chromoting__host__context.cc
	chromium-wip/patches/patch-remoting_host_chromoting__host__services__client.cc
	chromium-wip/patches/patch-remoting_host_client__session.cc
	chromium-wip/patches/patch-remoting_host_crash_crash__file__uploader.cc
	chromium-wip/patches/patch-remoting_host_create__desktop__interaction__strategy__factory.cc
	chromium-wip/patches/patch-remoting_host_evaluate__capability.cc
	chromium-wip/patches/patch-remoting_host_host__attributes.cc
	chromium-wip/patches/patch-remoting_host_host__details.cc
	chromium-wip/patches/patch-remoting_host_host__main.cc
	chromium-wip/patches/patch-remoting_host_ipc__constants.cc
	chromium-wip/patches/patch-remoting_host_it2me_it2me__native__messaging__host__main.cc
	chromium-wip/patches/patch-remoting_host_me2me__desktop__environment.cc
	chromium-wip/patches/patch-remoting_host_mojo__caller__security__checker.cc
	chromium-wip/patches/patch-remoting_host_policy__watcher.cc
	chromium-wip/patches/patch-remoting_host_remote__open__url_remote__open__url__client.cc
	chromium-wip/patches/patch-remoting_host_remote__open__url_remote__open__url__main.cc
	chromium-wip/patches/patch-remoting_host_remote__open__url_remote__open__url__util.cc
	chromium-wip/patches/patch-remoting_host_remote__open__url_url__forwarder__configurator.cc
	chromium-wip/patches/patch-remoting_host_remoting__me2me__host.cc
	chromium-wip/patches/patch-remoting_host_security__key_remote__security__key__main.cc
	chromium-wip/patches/patch-remoting_host_session__policies__from__dict.cc
	chromium-wip/patches/patch-remoting_host_setup_me2me__native__messaging__host__main.cc
	chromium-wip/patches/patch-remoting_host_setup_start__host__main.cc
	chromium-wip/patches/patch-remoting_host_webauthn_desktop__session__type__util.cc
	chromium-wip/patches/patch-remoting_host_webauthn_remote__webauthn__caller__security__utils.cc
	chromium-wip/patches/patch-remoting_host_webauthn_remote__webauthn__extension__notifier.cc
	chromium-wip/patches/patch-remoting_host_webauthn_remote__webauthn__main.cc
	chromium-wip/patches/patch-remoting_protocol_webrtc__video__stream.cc
	chromium-wip/patches/patch-remoting_signaling_ftl__host__device__id__provider.cc
	chromium-wip/patches/patch-sandbox_BUILD.gn
	chromium-wip/patches/patch-sandbox_features.gni
	chromium-wip/patches/patch-sandbox_linux_BUILD.gn
	chromium-wip/patches/patch-sandbox_linux_services_init__process__reaper.cc
	chromium-wip/patches/patch-sandbox_linux_services_libc__interceptor.cc
	chromium-wip/patches/patch-sandbox_policy_BUILD.gn
	chromium-wip/patches/patch-sandbox_policy_features.cc
	chromium-wip/patches/patch-sandbox_policy_freebsd_sandbox__freebsd.cc
	chromium-wip/patches/patch-sandbox_policy_freebsd_sandbox__freebsd.h
	chromium-wip/patches/patch-sandbox_policy_mojom_sandbox.mojom
	chromium-wip/patches/patch-sandbox_policy_netbsd_sandbox__netbsd.cc
	chromium-wip/patches/patch-sandbox_policy_netbsd_sandbox__netbsd.h
	chromium-wip/patches/patch-sandbox_policy_openbsd_sandbox__openbsd.cc
	chromium-wip/patches/patch-sandbox_policy_openbsd_sandbox__openbsd.h
	chromium-wip/patches/patch-sandbox_policy_sandbox.cc
	chromium-wip/patches/patch-sandbox_policy_sandbox.h
	chromium-wip/patches/patch-sandbox_policy_sandbox__type.cc
	chromium-wip/patches/patch-sandbox_policy_switches.cc
	chromium-wip/patches/patch-sandbox_policy_switches.h
	chromium-wip/patches/patch-services_audio_audio__sandbox__hook__linux.cc
	chromium-wip/patches/patch-services_audio_audio__sandbox__hook__linux.h
	chromium-wip/patches/patch-services_device_BUILD.gn
	chromium-wip/patches/patch-services_device_geolocation_location__provider__manager.cc
	chromium-wip/patches/patch-services_device_hid_BUILD.gn
	chromium-wip/patches/patch-services_device_hid_hid__connection__fido.cc
	chromium-wip/patches/patch-services_device_hid_hid__connection__fido.h
	chromium-wip/patches/patch-services_device_hid_hid__connection__freebsd.cc
	chromium-wip/patches/patch-services_device_hid_hid__connection__freebsd.h
	chromium-wip/patches/patch-services_device_hid_hid__service.cc
	chromium-wip/patches/patch-services_device_hid_hid__service__fido.cc
	chromium-wip/patches/patch-services_device_hid_hid__service__fido.h
	chromium-wip/patches/patch-services_device_hid_hid__service__freebsd.cc
	chromium-wip/patches/patch-services_device_hid_hid__service__freebsd.h
	chromium-wip/patches/patch-services_device_hid_hid__service__netbsd.cc
	chromium-wip/patches/patch-services_device_hid_hid__service__netbsd.h
	chromium-wip/patches/patch-services_device_public_cpp_device__features.cc
	chromium-wip/patches/patch-services_device_public_cpp_device__features.h
	chromium-wip/patches/patch-services_device_public_cpp_generic__sensor_sensor__reading.h
	chromium-wip/patches/patch-services_device_public_mojom_BUILD.gn
	chromium-wip/patches/patch-services_device_serial_BUILD.gn
	chromium-wip/patches/patch-services_device_serial_serial__device__enumerator.cc
	chromium-wip/patches/patch-services_device_serial_serial__io__handler__posix.cc
	chromium-wip/patches/patch-services_device_time__zone__monitor_time__zone__monitor__linux.cc
	chromium-wip/patches/patch-services_device_usb_BUILD.gn
	chromium-wip/patches/patch-services_device_usb_usb__device__handle__usbfs.cc
	chromium-wip/patches/patch-services_device_usb_usb__device__handle__usbfs.h
	chromium-wip/patches/patch-services_device_usb_usb__service.cc
	chromium-wip/patches/patch-services_device_usb_usb__service__fake.cc
	chromium-wip/patches/patch-services_device_usb_usb__service__fake.h
	chromium-wip/patches/patch-services_network_BUILD.gn
	chromium-wip/patches/patch-services_network_network__context.cc
	chromium-wip/patches/patch-services_network_network__context.h
	chromium-wip/patches/patch-services_network_network__sandbox__hook__linux.cc
	chromium-wip/patches/patch-services_network_network__sandbox__hook__linux.h
	chromium-wip/patches/patch-services_network_network__service.cc
	chromium-wip/patches/patch-services_network_network__service.h
	chromium-wip/patches/patch-services_network_public_cpp_BUILD.gn
	chromium-wip/patches/patch-services_network_public_cpp_features.cc
	chromium-wip/patches/patch-services_network_public_mojom_BUILD.gn
	chromium-wip/patches/patch-services_network_shared__dictionary_shared__dictionary__writer__in__memory.h
	chromium-wip/patches/patch-services_on__device__model_on__device__model__service.h
	chromium-wip/patches/patch-services_on__device__model_pre__sandbox__init.cc
	chromium-wip/patches/patch-services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc
	chromium-wip/patches/patch-services_resource__coordinator_public_cpp_memory__instrumentation_BUILD.gn
	chromium-wip/patches/patch-services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics.h
	chromium-wip/patches/patch-services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics__bsd.cc
	chromium-wip/patches/patch-services_screen__ai_public_cpp_utilities.cc
	chromium-wip/patches/patch-services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.cc
	chromium-wip/patches/patch-services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.h
	chromium-wip/patches/patch-services_screen__ai_screen__ai__service__impl.cc
	chromium-wip/patches/patch-services_service__manager_BUILD.gn
	chromium-wip/patches/patch-services_service__manager_public_cpp_service__executable_BUILD.gn
	chromium-wip/patches/patch-services_tracing_public_cpp_stack__sampling_tracing__sampler__profiler.cc
	chromium-wip/patches/patch-services_tracing_public_cpp_system__metrics__sampler.cc
	chromium-wip/patches/patch-services_tracing_public_cpp_trace__startup.cc
	chromium-wip/patches/patch-services_video__capture_public_mojom_video__capture__service.mojom
	chromium-wip/patches/patch-services_video__effects_video__effects__sandbox__hook__linux.cc
	chromium-wip/patches/patch-services_video__effects_video__effects__sandbox__hook__linux.h
	chromium-wip/patches/patch-services_viz_public_mojom_BUILD.gn
	chromium-wip/patches/patch-skia_ext_SkMemory__new__handler.cpp
	chromium-wip/patches/patch-skia_ext_font__utils.cc
	chromium-wip/patches/patch-skia_ext_skcolorspace__trfn.cc
	chromium-wip/patches/patch-third__party_abseil-cpp_absl_base_config.h
	chromium-wip/patches/patch-third__party_abseil-cpp_absl_base_internal_raw__logging.cc
	chromium-wip/patches/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc
	chromium-wip/patches/patch-third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.h
	chromium-wip/patches/patch-third__party_abseil-cpp_absl_time_internal_cctz_src_time__zone__format.cc
	chromium-wip/patches/patch-third__party_afl_src_afl-fuzz.c
	chromium-wip/patches/patch-third__party_angle_BUILD.gn
	chromium-wip/patches/patch-third__party_angle_src_common_platform.h
	chromium-wip/patches/patch-third__party_angle_src_common_platform__helpers.h
	chromium-wip/patches/patch-third__party_angle_src_common_system__utils.cpp
	chromium-wip/patches/patch-third__party_angle_src_common_system__utils__linux.cpp
	chromium-wip/patches/patch-third__party_angle_src_gpu__info__util_SystemInfo__internal.h
	chromium-wip/patches/patch-third__party_angle_src_gpu__info__util_SystemInfo__libpci.cpp
	chromium-wip/patches/patch-third__party_angle_src_gpu__info__util_SystemInfo__linux.cpp
	chromium-wip/patches/patch-third__party_angle_src_gpu__info__util_SystemInfo__x11.cpp
	chromium-wip/patches/patch-third__party_angle_src_libANGLE_Display.cpp
	chromium-wip/patches/patch-third__party_angle_src_libANGLE_renderer_gl_glx_FunctionsGLX.cpp
	chromium-wip/patches/patch-third__party_angle_src_libANGLE_renderer_vulkan_DisplayVk__api.h
	chromium-wip/patches/patch-third__party_angle_util_BUILD.gn
	chromium-wip/patches/patch-third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc
	chromium-wip/patches/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences.h
	chromium-wip/patches/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h
	chromium-wip/patches/patch-third__party_blink_public_platform_platform.h
	chromium-wip/patches/patch-third__party_blink_renderer_bindings_scripts_bind__gen_style__format.py
	chromium-wip/patches/patch-third__party_blink_renderer_build_scripts_gperf.py
	chromium-wip/patches/patch-third__party_blink_renderer_build_scripts_run__with__pythonpath.py
	chromium-wip/patches/patch-third__party_blink_renderer_controller_blink__initializer.cc
	chromium-wip/patches/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.cc
	chromium-wip/patches/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.h
	chromium-wip/patches/patch-third__party_blink_renderer_core_editing_editing__behavior.cc
	chromium-wip/patches/patch-third__party_blink_renderer_core_execution__context_navigator__base.cc
	chromium-wip/patches/patch-third__party_blink_renderer_core_exported_web__view__impl.cc
	chromium-wip/patches/patch-third__party_blink_renderer_core_frame_web__frame__test.cc
	chromium-wip/patches/patch-third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc
	chromium-wip/patches/patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc
	chromium-wip/patches/patch-third__party_blink_renderer_core_layout_layout__view.cc
	chromium-wip/patches/patch-third__party_blink_renderer_core_loader_mixed__content__checker.cc
	chromium-wip/patches/patch-third__party_blink_renderer_core_origin__trials_origin__trial__context.cc
	chromium-wip/patches/patch-third__party_blink_renderer_core_page_context__menu__controller.cc
	chromium-wip/patches/patch-third__party_blink_renderer_core_paint_paint__layer.cc
	chromium-wip/patches/patch-third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc
	chromium-wip/patches/patch-third__party_blink_renderer_core_xml_xslt__processor.h
	chromium-wip/patches/patch-third__party_blink_renderer_core_xml_xslt__processor__libxslt.cc
	chromium-wip/patches/patch-third__party_blink_renderer_modules_media_audio_audio__device__factory.cc
	chromium-wip/patches/patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc
	chromium-wip/patches/patch-third__party_blink_renderer_modules_peerconnection_rtc__data__channel.cc
	chromium-wip/patches/patch-third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc
	chromium-wip/patches/patch-third__party_blink_renderer_modules_webaudio_audio__worklet__thread__test.cc
	chromium-wip/patches/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc
	chromium-wip/patches/patch-third__party_blink_renderer_modules_webgpu_gpu__canvas__context.cc
	chromium-wip/patches/patch-third__party_blink_renderer_modules_webgpu_gpu__queue.cc
	chromium-wip/patches/patch-third__party_blink_renderer_platform_BUILD.gn
	chromium-wip/patches/patch-third__party_blink_renderer_platform_fonts_font__cache.cc
	chromium-wip/patches/patch-third__party_blink_renderer_platform_fonts_font__cache.h
	chromium-wip/patches/patch-third__party_blink_renderer_platform_fonts_font__description.cc
	chromium-wip/patches/patch-third__party_blink_renderer_platform_fonts_font__metrics.cc
	chromium-wip/patches/patch-third__party_blink_renderer_platform_fonts_font__unique__name__lookup.cc
	chromium-wip/patches/patch-third__party_blink_renderer_platform_fonts_skia_font__cache__skia.cc
	chromium-wip/patches/patch-third__party_blink_renderer_platform_graphics_begin__frame__provider.cc
	chromium-wip/patches/patch-third__party_blink_renderer_platform_graphics_gpu_image__layer__bridge.cc
	chromium-wip/patches/patch-third__party_blink_renderer_platform_graphics_video__frame__submitter.cc
	chromium-wip/patches/patch-third__party_blink_renderer_platform_instrumentation_partition__alloc__memory__dump__provider.cc
	chromium-wip/patches/patch-third__party_blink_renderer_platform_peerconnection_rtc__video__encoder__factory.cc
	chromium-wip/patches/patch-third__party_blink_renderer_platform_runtime__enabled__features.json5
	chromium-wip/patches/patch-third__party_blink_renderer_platform_scheduler_common_thread.cc
	chromium-wip/patches/patch-third__party_blink_renderer_platform_widget_compositing_blink__categorized__worker__pool__delegate.cc
	chromium-wip/patches/patch-third__party_blink_renderer_platform_wtf_container__annotations.h
	chromium-wip/patches/patch-third__party_blink_renderer_platform_wtf_math__extras.h
	chromium-wip/patches/patch-third__party_blink_renderer_platform_wtf_stack__util.cc
	chromium-wip/patches/patch-third__party_brotli_common_platform.h
	chromium-wip/patches/patch-third__party_cpuinfo_cpuinfo.gni
	chromium-wip/patches/patch-third__party_crashpad_crashpad_build_crashpad__buildconfig.gni
	chromium-wip/patches/patch-third__party_crashpad_crashpad_client_BUILD.gn
	chromium-wip/patches/patch-third__party_crashpad_crashpad_client_crashpad__client__posix.cc
	chromium-wip/patches/patch-third__party_crashpad_crashpad_minidump_minidump__misc__info__writer.cc
	chromium-wip/patches/patch-third__party_crashpad_crashpad_util_misc_address__types.h
	chromium-wip/patches/patch-third__party_crashpad_crashpad_util_misc_capture__context.h
	chromium-wip/patches/patch-third__party_crashpad_crashpad_util_misc_metrics.cc
	chromium-wip/patches/patch-third__party_crashpad_crashpad_util_misc_uuid.cc
	chromium-wip/patches/patch-third__party_crashpad_crashpad_util_posix_close__multiple.cc
	chromium-wip/patches/patch-third__party_crashpad_crashpad_util_posix_drop__privileges.cc
	chromium-wip/patches/patch-third__party_crashpad_crashpad_util_posix_signals.cc
	chromium-wip/patches/patch-third__party_crashpad_crashpad_util_posix_symbolic__constants__posix.cc
	chromium-wip/patches/patch-third__party_crc32c_BUILD.gn
	chromium-wip/patches/patch-third__party_dawn_include_dawn_native_VulkanBackend.h
	chromium-wip/patches/patch-third__party_dawn_src_dawn_common_Platform.h
	chromium-wip/patches/patch-third__party_dawn_src_dawn_native_vulkan_BackendVk.cpp
	chromium-wip/patches/patch-third__party_ffmpeg_BUILD.gn
	chromium-wip/patches/patch-third__party_ffmpeg_libavcodec_x86_cabac.h
	chromium-wip/patches/patch-third__party_ffmpeg_libavutil_cpu.c
	chromium-wip/patches/patch-third__party_ffmpeg_libavutil_mem.c
	chromium-wip/patches/patch-third__party_ffmpeg_libavutil_random__seed.c
	chromium-wip/patches/patch-third__party_ffmpeg_libavutil_x86_x86inc.asm
	chromium-wip/patches/patch-third__party_fontconfig_include_meson-config.h
	chromium-wip/patches/patch-third__party_fontconfig_src_src_fccompat.c
	chromium-wip/patches/patch-third__party_ipcz_src_BUILD.gn
	chromium-wip/patches/patch-third__party_ipcz_src_reference__drivers_random.cc
	chromium-wip/patches/patch-third__party_ipcz_src_standalone_base_logging.cc
	chromium-wip/patches/patch-third__party_leveldatabase_env__chromium.cc
	chromium-wip/patches/patch-third__party_libaom_source_libaom_aom__ports_aarch64__cpudetect.c
	chromium-wip/patches/patch-third__party_libc++_src_include_____locale__dir_locale__base__api.h
	chromium-wip/patches/patch-third__party_libc++_src_include_____locale__dir_support_bsd__like.h
	chromium-wip/patches/patch-third__party_libc++_src_src_chrono.cpp
	chromium-wip/patches/patch-third__party_libc++_src_src_filesystem_filesystem__clock.cpp
	chromium-wip/patches/patch-third__party_libc++abi_src_src_cxa__guard__impl.h
	chromium-wip/patches/patch-third__party_libdrm_src_xf86drmMode.c
	chromium-wip/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_memory_singleton.h
	chromium-wip/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_synchronization_lock.h
	chromium-wip/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_thread__checker.h
	chromium-wip/patches/patch-third__party_libsync_src_include_sync_sync.h
	chromium-wip/patches/patch-third__party_libsync_src_sync.c
	chromium-wip/patches/patch-third__party_libusb_BUILD.gn
	chromium-wip/patches/patch-third__party_libusb_src_libusb_core.c
	chromium-wip/patches/patch-third__party_libusb_src_libusb_os_threads__posix.c
	chromium-wip/patches/patch-third__party_libvpx_source_libvpx_vpx__ports_aarch64__cpudetect.c
	chromium-wip/patches/patch-third__party_lzma__sdk_C_CpuArch.c
	chromium-wip/patches/patch-third__party_material__color__utilities_src_cpp_palettes_tones.cc
	chromium-wip/patches/patch-third__party_nasm_BUILD.gn
	chromium-wip/patches/patch-third__party_nasm_config_config-linux.h
	chromium-wip/patches/patch-third__party_node_check__version.py
	chromium-wip/patches/patch-third__party_node_node.gni
	chromium-wip/patches/patch-third__party_node_node.py
	chromium-wip/patches/patch-third__party_pdfium_core_fxge_cfx__fontmapper.cpp
	chromium-wip/patches/patch-third__party_pdfium_core_fxge_linux_fx__linux__impl.cpp
	chromium-wip/patches/patch-third__party_pdfium_fxjs_fx__date__helpers.cpp
	chromium-wip/patches/patch-third__party_pdfium_pdfium.gni
	chromium-wip/patches/patch-third__party_pdfium_xfa_fxfa_parser_cxfa__timezoneprovider.cpp
	chromium-wip/patches/patch-third__party_perfetto_include_perfetto_base_build__config.h
	chromium-wip/patches/patch-third__party_perfetto_include_perfetto_base_thread__utils.h
	chromium-wip/patches/patch-third__party_perfetto_include_perfetto_base_time.h
	chromium-wip/patches/patch-third__party_perfetto_include_perfetto_ext_base_event__fd.h
	chromium-wip/patches/patch-third__party_perfetto_include_perfetto_ext_base_thread__utils.h
	chromium-wip/patches/patch-third__party_perfetto_include_perfetto_tracing_internal_track__event__legacy.h
	chromium-wip/patches/patch-third__party_perfetto_protos_perfetto_trace_ftrace_v4l2.proto
	chromium-wip/patches/patch-third__party_perfetto_src_base_clock__snapshots.cc
	chromium-wip/patches/patch-third__party_perfetto_src_base_event__fd.cc
	chromium-wip/patches/patch-third__party_perfetto_src_base_periodic__task.cc
	chromium-wip/patches/patch-third__party_perfetto_src_base_string__utils.cc
	chromium-wip/patches/patch-third__party_perfetto_src_base_subprocess__posix.cc
	chromium-wip/patches/patch-third__party_perfetto_src_base_test_vm__test__utils.cc
	chromium-wip/patches/patch-third__party_perfetto_src_base_thread__task__runner.cc
	chromium-wip/patches/patch-third__party_perfetto_src_base_unix__socket.cc
	chromium-wip/patches/patch-third__party_perfetto_src_base_utils.cc
	chromium-wip/patches/patch-third__party_perfetto_src_trace__processor_importers_ftrace_v4l2__tracker.cc
	chromium-wip/patches/patch-third__party_perfetto_src_tracing_ipc_memfd.cc
	chromium-wip/patches/patch-third__party_perfetto_src_tracing_platform__posix.cc
	chromium-wip/patches/patch-third__party_perfetto_src_tracing_track.cc
	chromium-wip/patches/patch-third__party_protobuf_src_google_protobuf_stubs_platform__macros.h
	chromium-wip/patches/patch-third__party_skia_src_gpu_ganesh_GrAutoLocaleSetter.h
	chromium-wip/patches/patch-third__party_skia_src_ports_SkMemory__malloc.cpp
	chromium-wip/patches/patch-third__party_skia_src_ports_SkOSFile__posix.cpp
	chromium-wip/patches/patch-third__party_speech-dispatcher_libspeechd__version.h
	chromium-wip/patches/patch-third__party_speech-dispatcher_speechd__types.h
	chromium-wip/patches/patch-third__party_sqlite_BUILD.gn
	chromium-wip/patches/patch-third__party_sqlite_src_amalgamation__dev_sqlite3.c
	chromium-wip/patches/patch-third__party_sqlite_src_amalgamation_sqlite3.c
	chromium-wip/patches/patch-third__party_swiftshader_src_Reactor_Debug.cpp
	chromium-wip/patches/patch-third__party_swiftshader_src_System_Configurator.cpp
	chromium-wip/patches/patch-third__party_swiftshader_src_System_Linux_MemFd.cpp
	chromium-wip/patches/patch-third__party_swiftshader_src_Vulkan_VkSemaphoreExternalLinux.hpp
	chromium-wip/patches/patch-third__party_swiftshader_src_WSI_libXCB.cpp
	chromium-wip/patches/patch-third__party_swiftshader_third__party_llvm-10.0_configs_linux_include_llvm_Config_config.h
	chromium-wip/patches/patch-third__party_swiftshader_third__party_llvm-subzero_build_Linux_include_llvm_Config_config.h
	chromium-wip/patches/patch-third__party_swiftshader_third__party_marl_src_memory.cpp
	chromium-wip/patches/patch-third__party_swiftshader_third__party_marl_src_thread.cpp
	chromium-wip/patches/patch-third__party_test__fonts_fontconfig_BUILD.gn
	chromium-wip/patches/patch-third__party_test__fonts_fontconfig_fontconfig__util__linux.cc
	chromium-wip/patches/patch-third__party_test__fonts_fontconfig_generate__fontconfig__caches.cc
	chromium-wip/patches/patch-third__party_tflite_features.gni
	chromium-wip/patches/patch-third__party_unrar_src_crypt.cpp
	chromium-wip/patches/patch-third__party_vulkan-validation-layers_src_layers_external_vma_vk__mem__alloc.h
	chromium-wip/patches/patch-third__party_vulkan-validation-layers_src_layers_vulkan_generated_vk__function__pointers.cpp
	chromium-wip/patches/patch-third__party_vulkan__memory__allocator_include_vk__mem__alloc.h
	chromium-wip/patches/patch-third__party_wayland_BUILD.gn
	chromium-wip/patches/patch-third__party_wayland_include_config.h
	chromium-wip/patches/patch-third__party_webrtc_BUILD.gn
	chromium-wip/patches/patch-third__party_webrtc_modules_audio__device_BUILD.gn
	chromium-wip/patches/patch-third__party_webrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc
	chromium-wip/patches/patch-third__party_webrtc_modules_desktop__capture_linux_x11_x__server__pixel__buffer.cc
	chromium-wip/patches/patch-third__party_webrtc_rtc__base_byte__order.h
	chromium-wip/patches/patch-third__party_webrtc_rtc__base_cpu__info.cc
	chromium-wip/patches/patch-third__party_webrtc_rtc__base_ip__address.cc
	chromium-wip/patches/patch-third__party_webrtc_rtc__base_net__helpers.cc
	chromium-wip/patches/patch-third__party_webrtc_rtc__base_network.cc
	chromium-wip/patches/patch-third__party_webrtc_rtc__base_physical__socket__server.cc
	chromium-wip/patches/patch-third__party_webrtc_rtc__base_physical__socket__server.h
	chromium-wip/patches/patch-third__party_webrtc_rtc__base_platform__thread__types.cc
	chromium-wip/patches/patch-third__party_webrtc_rtc__base_third__party_sigslot_sigslot.h
	chromium-wip/patches/patch-third__party_widevine_cdm_widevine.gni
	chromium-wip/patches/patch-third__party_zlib_BUILD.gn
	chromium-wip/patches/patch-third__party_zlib_cpu__features.c
	chromium-wip/patches/patch-tools_code__cache__generator_BUILD.gn
	chromium-wip/patches/patch-tools_generate__shim__headers_generate__shim__headers.py
	chromium-wip/patches/patch-tools_generate__stubs_rules.gni
	chromium-wip/patches/patch-tools_gn_build_build__linux.ninja.template
	chromium-wip/patches/patch-tools_gn_build_gen.py
	chromium-wip/patches/patch-tools_gn_src_base_files_file__posix.cc
	chromium-wip/patches/patch-tools_gn_src_gn_version.h
	chromium-wip/patches/patch-tools_gn_src_util_exe__path.cc
	chromium-wip/patches/patch-tools_grit_grit_node_base.py
	chromium-wip/patches/patch-tools_json__schema__compiler_cpp__bundle__generator.py
	chromium-wip/patches/patch-tools_json__schema__compiler_feature__compiler.py
	chromium-wip/patches/patch-tools_memory_partition__allocator_inspect__utils.h
	chromium-wip/patches/patch-tools_perf_chrome__telemetry__build_BUILD.gn
	chromium-wip/patches/patch-tools_protoc__wrapper_protoc__wrapper.py
	chromium-wip/patches/patch-tools_v8__context__snapshot_BUILD.gn
	chromium-wip/patches/patch-tools_variations_fieldtrial__to__struct.py
	chromium-wip/patches/patch-ui_accessibility_accessibility__features.cc
	chromium-wip/patches/patch-ui_accessibility_accessibility__features.h
	chromium-wip/patches/patch-ui_accessibility_ax__node.cc
	chromium-wip/patches/patch-ui_accessibility_ax__node.h
	chromium-wip/patches/patch-ui_accessibility_ax__tree.cc
	chromium-wip/patches/patch-ui_accessibility_ax__tree.h
	chromium-wip/patches/patch-ui_aura_client_drag__drop__client.h
	chromium-wip/patches/patch-ui_aura_screen__ozone.cc
	chromium-wip/patches/patch-ui_aura_screen__ozone.h
	chromium-wip/patches/patch-ui_base_accelerators_accelerator.cc
	chromium-wip/patches/patch-ui_base_accelerators_command.cc
	chromium-wip/patches/patch-ui_base_accelerators_global__accelerator__listener_global__accelerator__listener__ozone.cc
	chromium-wip/patches/patch-ui_base_clipboard_clipboard__constants.h
	chromium-wip/patches/patch-ui_base_clipboard_clipboard__non__backed.cc
	chromium-wip/patches/patch-ui_base_cursor_cursor__factory.cc
	chromium-wip/patches/patch-ui_base_cursor_cursor__factory.h
	chromium-wip/patches/patch-ui_base_dragdrop_os__exchange__data__provider__factory.cc
	chromium-wip/patches/patch-ui_base_dragdrop_os__exchange__data__provider__non__backed.cc
	chromium-wip/patches/patch-ui_base_ime_dummy__text__input__client.cc
	chromium-wip/patches/patch-ui_base_ime_dummy__text__input__client.h
	chromium-wip/patches/patch-ui_base_ime_fake__text__input__client.cc
	chromium-wip/patches/patch-ui_base_ime_fake__text__input__client.h
	chromium-wip/patches/patch-ui_base_ime_init_input__method__initializer.cc
	chromium-wip/patches/patch-ui_base_ime_linux_linux__input__method__context__factory.cc
	chromium-wip/patches/patch-ui_base_ime_text__input__client.h
	chromium-wip/patches/patch-ui_base_resource_resource__bundle.cc
	chromium-wip/patches/patch-ui_base_test_skia__gold__pixel__diff.cc
	chromium-wip/patches/patch-ui_base_test_ui__controls.h
	chromium-wip/patches/patch-ui_base_ui__base__features.cc
	chromium-wip/patches/patch-ui_base_ui__base__features.h
	chromium-wip/patches/patch-ui_base_ui__base__switches.cc
	chromium-wip/patches/patch-ui_base_ui__base__switches.h
	chromium-wip/patches/patch-ui_base_webui_web__ui__util.cc
	chromium-wip/patches/patch-ui_base_x_x11__cursor__factory.cc
	chromium-wip/patches/patch-ui_base_x_x11__cursor__factory.h
	chromium-wip/patches/patch-ui_base_x_x11__cursor__loader.cc
	chromium-wip/patches/patch-ui_base_x_x11__display__manager.cc
	chromium-wip/patches/patch-ui_base_x_x11__shm__image__pool.cc
	chromium-wip/patches/patch-ui_color_color__id.h
	chromium-wip/patches/patch-ui_color_color__provider__utils.cc
	chromium-wip/patches/patch-ui_color_system__theme.h
	chromium-wip/patches/patch-ui_compositor_compositor.cc
	chromium-wip/patches/patch-ui_compositor_compositor.h
	chromium-wip/patches/patch-ui_compositor_compositor__observer.h
	chromium-wip/patches/patch-ui_display_screen.cc
	chromium-wip/patches/patch-ui_display_screen.h
	chromium-wip/patches/patch-ui_events_event.cc
	chromium-wip/patches/patch-ui_events_event__switches.cc
	chromium-wip/patches/patch-ui_events_event__switches.h
	chromium-wip/patches/patch-ui_events_keycodes_dom_keycode__converter.cc
	chromium-wip/patches/patch-ui_events_keycodes_dom_keycode__converter.h
	chromium-wip/patches/patch-ui_gfx_BUILD.gn
	chromium-wip/patches/patch-ui_gfx_canvas__skia.cc
	chromium-wip/patches/patch-ui_gfx_font__fallback__linux.cc
	chromium-wip/patches/patch-ui_gfx_font__render__params.h
	chromium-wip/patches/patch-ui_gfx_font__render__params__linux.cc
	chromium-wip/patches/patch-ui_gfx_font__util.cc
	chromium-wip/patches/patch-ui_gfx_gpu__extra__info.h
	chromium-wip/patches/patch-ui_gfx_linux_dmabuf__uapi.h
	chromium-wip/patches/patch-ui_gfx_linux_gbm__wrapper.cc
	chromium-wip/patches/patch-ui_gfx_mojom_native__handle__types__mojom__traits.cc
	chromium-wip/patches/patch-ui_gfx_mojom_native__handle__types__mojom__traits.h
	chromium-wip/patches/patch-ui_gfx_native__pixmap__handle.cc
	chromium-wip/patches/patch-ui_gfx_native__pixmap__handle.h
	chromium-wip/patches/patch-ui_gfx_native__widget__types.h
	chromium-wip/patches/patch-ui_gfx_platform__font__skia.cc
	chromium-wip/patches/patch-ui_gfx_render__text__api__fuzzer.cc
	chromium-wip/patches/patch-ui_gfx_render__text__fuzzer.cc
	chromium-wip/patches/patch-ui_gfx_switches.cc
	chromium-wip/patches/patch-ui_gfx_switches.h
	chromium-wip/patches/patch-ui_gfx_x_atom__cache.cc
	chromium-wip/patches/patch-ui_gfx_x_generated__protos_dri3.cc
	chromium-wip/patches/patch-ui_gfx_x_generated__protos_shm.cc
	chromium-wip/patches/patch-ui_gfx_x_xlib__support.cc
	chromium-wip/patches/patch-ui_gl_gl__context.cc
	chromium-wip/patches/patch-ui_gl_gl__fence.cc
	chromium-wip/patches/patch-ui_gl_gl__implementation.cc
	chromium-wip/patches/patch-ui_gl_gl__switches.cc
	chromium-wip/patches/patch-ui_gl_sync__control__vsync__provider.cc
	chromium-wip/patches/patch-ui_gl_sync__control__vsync__provider.h
	chromium-wip/patches/patch-ui_gtk_gtk__compat.cc
	chromium-wip/patches/patch-ui_gtk_printing_print__dialog__gtk.cc
	chromium-wip/patches/patch-ui_message__center_views_message__popup__view.cc
	chromium-wip/patches/patch-ui_native__theme_features_native__theme__features.cc
	chromium-wip/patches/patch-ui_native__theme_native__theme.h
	chromium-wip/patches/patch-ui_native__theme_native__theme__base.cc
	chromium-wip/patches/patch-ui_ozone_common_egl__util.cc
	chromium-wip/patches/patch-ui_ozone_platform_headless_headless__surface__factory.cc
	chromium-wip/patches/patch-ui_ozone_platform_headless_ozone__platform__headless.cc
	chromium-wip/patches/patch-ui_ozone_platform_headless_vulkan__implementation__headless.cc
	chromium-wip/patches/patch-ui_ozone_platform_wayland_common_wayland__util.cc
	chromium-wip/patches/patch-ui_ozone_platform_wayland_gpu_vulkan__implementation__wayland.cc
	chromium-wip/patches/patch-ui_ozone_platform_wayland_host_wayland__frame__manager.cc
	chromium-wip/patches/patch-ui_ozone_platform_x11_vulkan__implementation__x11.cc
	chromium-wip/patches/patch-ui_ozone_platform_x11_x11__screen__ozone.cc
	chromium-wip/patches/patch-ui_ozone_platform_x11_x11__screen__ozone.h
	chromium-wip/patches/patch-ui_ozone_platform_x11_x11__window.cc
	chromium-wip/patches/patch-ui_ozone_public_ozone__ui__controls__test__helper.h
	chromium-wip/patches/patch-ui_ozone_test_mock__platform__window__delegate.h
	chromium-wip/patches/patch-ui_platform__window_platform__window__delegate.cc
	chromium-wip/patches/patch-ui_platform__window_platform__window__delegate.h
	chromium-wip/patches/patch-ui_platform__window_platform__window__init__properties.h
	chromium-wip/patches/patch-ui_qt_BUILD.gn
	chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__bn.xtb
	chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__ja.xtb
	chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__ko.xtb
	chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__ml.xtb
	chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__th.xtb
	chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__zh-CN.xtb
	chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__zh-TW.xtb
	chromium-wip/patches/patch-ui_views_BUILD.gn
	chromium-wip/patches/patch-ui_views_accessibility_view__accessibility.cc
	chromium-wip/patches/patch-ui_views_controls_prefix__selector.cc
	chromium-wip/patches/patch-ui_views_controls_prefix__selector.h
	chromium-wip/patches/patch-ui_views_controls_textfield_textfield.cc
	chromium-wip/patches/patch-ui_views_controls_textfield_textfield.h
	chromium-wip/patches/patch-ui_views_examples_widget__example.cc
	chromium-wip/patches/patch-ui_views_focus_focus__manager.cc
	chromium-wip/patches/patch-ui_views_style_platform__style.cc
	chromium-wip/patches/patch-ui_views_style_platform__style.h
	chromium-wip/patches/patch-ui_views_test_ui__controls__factory__desktop__aura__ozone.cc
	chromium-wip/patches/patch-ui_views_views__delegate.cc
	chromium-wip/patches/patch-ui_views_views__delegate.h
	chromium-wip/patches/patch-ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.cc
	chromium-wip/patches/patch-ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.h
	chromium-wip/patches/patch-ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc
	chromium-wip/patches/patch-ui_views_widget_root__view.cc
	chromium-wip/patches/patch-ui_views_widget_widget.cc
	chromium-wip/patches/patch-ui_views_widget_widget.h
	chromium-wip/patches/patch-ui_views_window_default__frame__view.cc
	chromium-wip/patches/patch-ui_views_window_dialog__delegate.cc
	chromium-wip/patches/patch-ui_views_window_frame__background.cc
	chromium-wip/patches/patch-v8_BUILD.gn
	chromium-wip/patches/patch-v8_include_v8-internal.h
	chromium-wip/patches/patch-v8_include_v8config.h
	chromium-wip/patches/patch-v8_src_api_api.cc
	chromium-wip/patches/patch-v8_src_base_atomicops.h
	chromium-wip/patches/patch-v8_src_base_platform_memory.h
	chromium-wip/patches/patch-v8_src_base_platform_platform-freebsd.cc
	chromium-wip/patches/patch-v8_src_base_platform_platform-openbsd.cc
	chromium-wip/patches/patch-v8_src_base_platform_platform-posix.cc
	chromium-wip/patches/patch-v8_src_base_strings.h
	chromium-wip/patches/patch-v8_src_base_sys-info.cc
	chromium-wip/patches/patch-v8_src_base_utils_random-number-generator.cc
	chromium-wip/patches/patch-v8_src_diagnostics_perf-jit.cc
	chromium-wip/patches/patch-v8_src_diagnostics_perf-jit.h
	chromium-wip/patches/patch-v8_src_execution_isolate.cc
	chromium-wip/patches/patch-v8_src_flags_flags.cc
	chromium-wip/patches/patch-v8_src_libsampler_sampler.cc
	chromium-wip/patches/patch-v8_src_sandbox_sandbox.cc
	chromium-wip/patches/patch-v8_src_snapshot_embedded_platform-embedded-file-writer-base.cc
	chromium-wip/patches/patch-v8_src_snapshot_embedded_platform-embedded-file-writer-base.h
	chromium-wip/patches/patch-v8_src_snapshot_embedded_platform-embedded-file-writer-generic.cc
	chromium-wip/patches/patch-v8_src_trap-handler_handler-inside-posix.cc
	chromium-wip/patches/patch-v8_src_trap-handler_handler-inside-posix.h
	chromium-wip/patches/patch-v8_src_trap-handler_trap-handler.h
	chromium-wip/patches/patch-v8_src_wasm_baseline_ia32_liftoff-assembler-ia32-inl.h
	chromium-wip/patches/patch-v8_tools_run-paxctl.py
	chromium-wip/patches/patch-v8_tools_run.py
	chromium-wip/tests.mk

Log Message:
Add chromium-wip to test hid services

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=9c9261a5d4efc8708c86c8406cc632e8cab105e2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                           |    1 +
 chromium-wip/COMMIT_MSG                            |   22 +
 chromium-wip/DESCR                                 |    3 +
 chromium-wip/Makefile                              |  373 +++++
 chromium-wip/PLIST                                 |  140 ++
 chromium-wip/TODO                                  |   17 +
 chromium-wip/distinfo                              | 1472 ++++++++++++++++++++
 chromium-wip/files/README                          |   29 +
 chromium-wip/files/chromium-browser.desktop        |  220 +++
 chromium-wip/files/chromium.sh.in                  |   80 ++
 chromium-wip/options.mk                            |   51 +
 chromium-wip/patches/patch-BUILD.gn                |  104 ++
 ...patch-apps_ui_views_app__window__frame__view.cc |   17 +
 chromium-wip/patches/patch-base_BUILD.gn           |  172 +++
 .../patches/patch-base_allocator_dispatcher_tls.h  |   17 +
 ...ch-base_allocator_partition__alloc__features.cc |   26 +
 ...cator_partition__allocator_partition__alloc.gni |   35 +
 ...tition__allocator_src_partition__alloc_BUILD.gn |   17 +
 ...artition__alloc_address__space__randomization.h |   26 +
 ...llocator_src_partition__alloc_page__allocator.h |   17 +
 ...c_partition__alloc_page__allocator__constants.h |   19 +
 ...ion__alloc_page__allocator__internals__posix.cc |   17 +
 ...tion__alloc_page__allocator__internals__posix.h |   22 +
 ...rtition__alloc__base_debug_proc__maps__linux.cc |   17 +
 ...ition__alloc__base_debug_stack__trace__posix.cc |   40 +
 ...loc_partition__alloc__base_rand__util__posix.cc |   19 +
 ...ition__alloc__base_threading_platform__thread.h |   17 +
 ...e_threading_platform__thread__internal__posix.h |   17 +
 ...lloc__base_threading_platform__thread__posix.cc |   17 +
 ...src_partition__alloc_partition__alloc__config.h |   37 +
 ..._partition__alloc_partition__alloc__constants.h |   26 +
 ...rc_partition__alloc_partition__alloc__forward.h |   22 +
 ...locator_src_partition__alloc_partition__root.cc |   35 +
 ...locator_src_partition__alloc_spinning__mutex.cc |   45 +
 ...__allocator_src_partition__alloc_stack_stack.cc |   56 +
 ..._src_partition__alloc_thread__isolation_pkey.cc |   17 +
 chromium-wip/patches/patch-base_atomicops.h        |   20 +
 .../patches/patch-base_base__paths__posix.cc       |  128 ++
 .../patches/patch-base_compiler__specific.h        |   16 +
 .../patches/patch-base_debug_debugger__posix.cc    |  106 ++
 .../patches/patch-base_debug_elf__reader.cc        |   19 +
 .../patches/patch-base_debug_proc__maps__linux.cc  |   17 +
 .../patches/patch-base_debug_stack__trace.cc       |   45 +
 .../patch-base_debug_stack__trace__posix.cc        |  109 ++
 .../patches/patch-base_files_dir__reader__linux.h  |   45 +
 .../patches/patch-base_files_dir__reader__posix.h  |   26 +
 .../patches/patch-base_files_drive__info.h         |   17 +
 .../patches/patch-base_files_drive__info__posix.cc |   17 +
 .../patches/patch-base_files_file__path__watcher.h |   17 +
 .../patch-base_files_file__path__watcher__bsd.cc   |   63 +
 .../patch-base_files_file__path__watcher__kqueue.h |   16 +
 ...tch-base_files_file__path__watcher__unittest.cc |   35 +
 .../patches/patch-base_files_file__util__posix.cc  |   54 +
 .../patch-base_files_file__util__unittest.cc       |   46 +
 ...-base_files_important__file__writer__cleaner.cc |   18 +
 .../patches/patch-base_files_scoped__file.cc       |   17 +
 .../patch-base_functional_unretained__traits.h     |   17 +
 chromium-wip/patches/patch-base_i18n_icu__util.cc  |   26 +
 chromium-wip/patches/patch-base_linux__util.cc     |   23 +
 .../patches/patch-base_logging__unittest.cc        |   37 +
 .../patch-base_memory_discardable__memory.cc       |   44 +
 ...tch-base_memory_discardable__memory__internal.h |   17 +
 ...emory_madv__free__discardable__memory__posix.cc |   27 +
 ...-base_memory_platform__shared__memory__region.h |   44 +
 ...mory_platform__shared__memory__region__posix.cc |   35 +
 .../patches/patch-base_memory_protected__memory.h  |   50 +
 .../patch-base_memory_protected__memory__posix.cc  |   26 +
 ...atch-base_message__loop_message__pump__epoll.cc |   17 +
 ...patch-base_message__loop_message__pump__epoll.h |   20 +
 ...patch-base_message__loop_message__pump__glib.cc |   44 +
 .../patches/patch-base_native__library__posix.cc   |   17 +
 .../patch-base_native__library__unittest.cc        |   17 +
 .../patch-base_posix_can__lower__nice__to.cc       |   22 +
 .../patch-base_posix_file__descriptor__shuffle.h   |   17 +
 chromium-wip/patches/patch-base_posix_sysctl.cc    |   38 +
 .../patch-base_posix_unix__domain__socket.cc       |   71 +
 ...ch-base_posix_unix__domain__socket__unittest.cc |   17 +
 .../patches/patch-base_process_internal__linux.h   |   26 +
 chromium-wip/patches/patch-base_process_kill.h     |   17 +
 .../patches/patch-base_process_kill__posix.cc      |   17 +
 chromium-wip/patches/patch-base_process_launch.h   |   31 +
 .../patches/patch-base_process_launch__posix.cc    |   27 +
 .../patches/patch-base_process_memory__linux.cc    |   50 +
 .../patches/patch-base_process_process__handle.cc  |   17 +
 .../patches/patch-base_process_process__handle.h   |   17 +
 .../patch-base_process_process__handle__freebsd.cc |   32 +
 .../patch-base_process_process__handle__netbsd.cc  |   65 +
 .../patch-base_process_process__handle__openbsd.cc |  145 ++
 .../patches/patch-base_process_process__iterator.h |   29 +
 ...atch-base_process_process__iterator__freebsd.cc |   58 +
 ...patch-base_process_process__iterator__netbsd.cc |  143 ++
 ...atch-base_process_process__iterator__openbsd.cc |   52 +
 .../patches/patch-base_process_process__metrics.cc |   55 +
 .../patches/patch-base_process_process__metrics.h  |  112 ++
 ...patch-base_process_process__metrics__freebsd.cc |  287 ++++
 .../patch-base_process_process__metrics__netbsd.cc |  237 ++++
 ...patch-base_process_process__metrics__openbsd.cc |  247 ++++
 .../patch-base_process_process__metrics__posix.cc  |   26 +
 ...atch-base_process_process__metrics__unittest.cc |   18 +
 .../patches/patch-base_process_process__posix.cc   |  100 ++
 .../patch-base_process_process__unittest.cc        |   17 +
 .../patches/patch-base_profiler_module__cache.cc   |   17 +
 ...e_profiler_sampling__profiler__thread__token.cc |   26 +
 ...se_profiler_sampling__profiler__thread__token.h |   26 +
 ...ch-base_profiler_stack__base__address__posix.cc |   69 +
 ...ofiler_stack__sampling__profiler__test__util.cc |   17 +
 ...profiler_stack__sampling__profiler__unittest.cc |   17 +
 .../patch-base_profiler_thread__delegate__posix.cc |   26 +
 chromium-wip/patches/patch-base_rand__util.h       |   17 +
 .../patches/patch-base_rand__util__posix.cc        |   66 +
 .../patch-base_strings_safe__sprintf__unittest.cc  |   24 +
 .../patch-base_synchronization_cancelable__event.h |   26 +
 .../patch-base_synchronization_lock__impl.h        |   29 +
 chromium-wip/patches/patch-base_syslog__logging.cc |   26 +
 .../patches/patch-base_system_sys__info.cc         |   17 +
 chromium-wip/patches/patch-base_system_sys__info.h |   26 +
 .../patch-base_system_sys__info__freebsd.cc        |  118 ++
 .../patches/patch-base_system_sys__info__netbsd.cc |  107 ++
 .../patch-base_system_sys__info__openbsd.cc        |   88 ++
 .../patches/patch-base_system_sys__info__posix.cc  |   35 +
 .../patch-base_system_sys__info__unittest.cc       |   26 +
 ...k_thread__pool_environment__config__unittest.cc |   26 +
 .../patch-base_test_launcher_test__launcher.cc     |   27 +
 .../patch-base_test_test__file__util__linux.cc     |   20 +
 .../patch-base_test_test__file__util__posix.cc     |   17 +
 .../patch-base_threading_platform__thread.h        |   17 +
 .../patch-base_threading_platform__thread__bsd.cc  |   40 +
 ..._threading_platform__thread__internal__posix.cc |   17 +
 ...tch-base_threading_platform__thread__metrics.cc |   17 +
 ...atch-base_threading_platform__thread__metrics.h |   26 +
 ...patch-base_threading_platform__thread__posix.cc |   59 +
 ...ch-base_threading_platform__thread__unittest.cc |   44 +
 .../patches/patch-base_time_time__now__posix.cc    |   17 +
 ...tch-base_trace__event_malloc__dump__provider.cc |   36 +
 ...atch-base_trace__event_memory__dump__manager.cc |   17 +
 ...atch-base_trace__event_process__memory__dump.cc |   35 +
 .../patches/patch-base_tracing_trace__time.cc      |   28 +
 .../patches/patch-base_tracing_trace__time.h       |   17 +
 .../patch-base_version__info_version__info.h       |   17 +
 chromium-wip/patches/patch-build_config_BUILD.gn   |   19 +
 .../patches/patch-build_config_BUILDCONFIG.gn      |   54 +
 .../patches/patch-build_config_clang_BUILD.gn      |   22 +
 .../patches/patch-build_config_compiler_BUILD.gn   |  164 +++
 .../patches/patch-build_config_gcc_BUILD.gn        |   19 +
 .../patches/patch-build_config_linux_BUILD.gn      |   17 +
 .../patch-build_config_linux_libdrm_BUILD.gn       |   17 +
 .../patches/patch-build_config_linux_pkg-config.py |   17 +
 chromium-wip/patches/patch-build_config_ozone.gni  |   29 +
 chromium-wip/patches/patch-build_config_rust.gni   |   30 +
 .../patches/patch-build_config_v8__target__cpu.gni |   19 +
 .../patches/patch-build_detect__host__arch.py      |   17 +
 .../patches/patch-build_gn__run__binary.py         |   17 +
 chromium-wip/patches/patch-build_linux_chrome.map  |   19 +
 .../patches/patch-build_linux_strip__binary.py     |   16 +
 .../patches/patch-build_linux_unbundle_icu.gn      |   49 +
 .../patches/patch-build_linux_unbundle_libusb.gn   |   36 +
 chromium-wip/patches/patch-build_nocompile.gni     |   17 +
 .../patches/patch-build_rust_rust__bindgen.gni     |   25 +
 .../patch-build_rust_rust__bindgen__generator.gni  |   25 +
 chromium-wip/patches/patch-build_rust_std_BUILD.gn |   38 +
 .../patches/patch-build_toolchain_freebsd_BUILD.gn |   75 +
 .../patch-build_toolchain_gcc__solink__wrapper.py  |   17 +
 .../patch-build_toolchain_gcc__toolchain.gni       |   59 +
 .../patches/patch-build_toolchain_netbsd_BUILD.gn  |   75 +
 .../patches/patch-build_toolchain_openbsd_BUILD.gn |   75 +
 .../patches/patch-build_toolchain_toolchain.gni    |   17 +
 chromium-wip/patches/patch-cc_base_features.cc     |   17 +
 .../patch-chrome_app_chrome__command__ids.h        |   22 +
 .../patches/patch-chrome_app_chrome__main.cc       |   49 +
 .../patch-chrome_app_chrome__main__delegate.cc     |  153 ++
 chromium-wip/patches/patch-chrome_browser_BUILD.gn |   22 +
 .../patches/patch-chrome_browser_about__flags.cc   |  426 ++++++
 ...ch-chrome_browser_accessibility_page__colors.cc |   26 +
 ...h-chrome_browser_after__startup__task__utils.cc |   17 +
 ...apps_app__service_publishers_extension__apps.cc |   17 +
 ...er_apps_platform__apps_platform__app__launch.cc |   71 +
 ...ser_apps_platform__apps_platform__app__launch.h |   17 +
 ...ete_chrome__autocomplete__scheme__classifier.cc |   17 +
 ...kground_extensions_background__mode__manager.cc |   17 +
 ...round_extensions_background__mode__optimizer.cc |   17 +
 ...e_browser_background_glic_glic__status__icon.cc |   44 +
 .../patch-chrome_browser_browser__features.cc      |   35 +
 .../patch-chrome_browser_browser__features.h       |   26 +
 .../patch-chrome_browser_browser__process__impl.cc |   53 +
 .../patch-chrome_browser_browser__process__impl.h  |   17 +
 ...hrome_browser_chrome__browser__field__trials.cc |   26 +
 ..._browser_chrome__browser__interface__binders.cc |   35 +
 ...r_chrome__browser__interface__binders__webui.cc |   76 +
 .../patch-chrome_browser_chrome__browser__main.cc  |  121 ++
 ...r_chrome__browser__main__extra__parts__linux.cc |   17 +
 ...r_chrome__browser__main__extra__parts__ozone.cc |   17 +
 ...-chrome_browser_chrome__browser__main__linux.cc |   45 +
 ...h-chrome_browser_chrome__browser__main__linux.h |   17 +
 ...-chrome_browser_chrome__browser__main__posix.cc |   17 +
 ...ome_browser_chrome__content__browser__client.cc |  153 ++
 ...rome_browser_chrome__content__browser__client.h |   17 +
 ...tent__browser__client__navigation__throttles.cc |   44 +
 ...ssaging_messaging__backend__service__factory.cc |   17 +
 ...iwa__key__distribution__component__installer.cc |   26 +
 ..._iwa__key__distribution__component__installer.h |   17 +
 ...rome_browser_component__updater_registration.cc |   44 +
 ...ater_wasm__tts__engine__component__installer.cc |   62 +
 ..._updater_widevine__cdm__component__installer.cc |   44 +
 ...hrome__protocol__handler__registry__delegate.cc |   17 +
 .../patches/patch-chrome_browser_defaults.cc       |   17 +
 ...tity_device__oauth2__token__service__factory.cc |   17 +
 .../patch-chrome_browser_devtools_features.cc      |   17 +
 .../patch-chrome_browser_devtools_features.h       |   17 +
 ...e_browser_devtools_remote__debugging__server.cc |   17 +
 ...hrome_browser_diagnostics_diagnostics__writer.h |   17 +
 ...download_chrome__download__manager__delegate.cc |   35 +
 ...h-chrome_browser_download_download__commands.cc |   26 +
 ...ch-chrome_browser_download_download__commands.h |   17 +
 ...rome_browser_download_download__file__picker.cc |   26 +
 ...hrome_browser_download_download__item__model.cc |   35 +
 ...atch-chrome_browser_download_download__prefs.cc |   96 ++
 ...patch-chrome_browser_download_download__prefs.h |   26 +
 ...ser__management_browser__management__service.cc |   53 +
 ...wser__management_browser__management__service.h |   26 +
 ...nectors_analysis_analysis__service__settings.cc |   17 +
 ...-chrome_browser_enterprise_connectors_common.cc |   26 +
 ...er_enterprise_connectors_connectors__service.cc |   17 +
 ...t_device__trust__connector__service__factory.cc |   35 +
 ...evice__trust_device__trust__service__factory.cc |   35 +
 ...ser_commands_key__rotation__command__factory.cc |   26 +
 ...sistence_key__persistence__delegate__factory.cc |   26 +
 ...ice__trust_signals_signals__service__factory.cc |   26 +
 ...tors_reporting_browser__crash__event__router.cc |   26 +
 ...nnectors_reporting_crash__reporting__context.cc |   17 +
 ...ectors_reporting_realtime__reporting__client.cc |   44 +
 ...nectors_reporting_realtime__reporting__client.h |   35 +
 ...nt_profile__management__navigation__throttle.cc |   19 +
 ...te__commands_cbcm__remote__commands__factory.cc |   26 +
 ...reporting_cloud__profile__reporting__service.cc |   26 +
 ..._cloud__profile__reporting__service__factory.cc |   26 +
 ...er_enterprise_signals_context__info__fetcher.cc |   26 +
 ...ser_enterprise_signals_device__info__fetcher.cc |   26 +
 ...enterprise_signin_enterprise__signin__service.h |   17 +
 ...terstitials_managed__profile__required__page.cc |   17 +
 ...wser_enterprise_util_managed__browser__utils.cc |   35 +
 .../patch-chrome_browser_extensions_BUILD.gn       |   19 +
 ...ate_chrome__desktop__report__request__helper.cc |   35 +
 ...rprise__reporting__private_conversion__utils.cc |   17 +
 ...erprise__reporting__private_conversion__utils.h |   17 +
 ..._private_enterprise__reporting__private__api.cc |   53 +
 ...__private_enterprise__reporting__private__api.h |   35 +
 ...writer__private_removable__storage__provider.cc |   35 +
 ...ensions_api_messaging_launch__context__posix.cc |   17 +
 ...__private_passwords__private__delegate__impl.cc |   17 +
 ...s_api_runtime_chrome__runtime__api__delegate.cc |   21 +
 ...extensions_api_settings__private_prefs__util.cc |   35 +
 ...chrome_browser_extensions_api_tabs_tabs__api.cc |   17 +
 ...gging__private_webrtc__logging__private__api.cc |   35 +
 ...api_webstore__private_webstore__private__api.cc |   17 +
 ...s_component__extensions__allowlist_allowlist.cc |   26 +
 ..._browser_extensions_external__provider__impl.cc |   26 +
 ...ck_system__logs_about__system__logs__fetcher.cc |   26 +
 ...k_system__logs_chrome__system__logs__fetcher.cc |   26 +
 ...e__file__system__access__permission__context.cc |   17 +
 ...-chrome_browser_first__run_first__run__dialog.h |   17 +
 ...hrome_browser_first__run_first__run__internal.h |   17 +
 .../patch-chrome_browser_flag__descriptions.cc     |  200 +++
 .../patch-chrome_browser_flag__descriptions.h      |  188 +++
 ...e_browser_gcm_gcm__profile__service__factory.cc |   26 +
 ...__id_instance__id__profile__service__factory.cc |   26 +
 .../patch-chrome_browser_global__features.cc       |   35 +
 .../patch-chrome_browser_global__features.h        |   44 +
 ...chrome_browser_headless_headless__mode__util.cc |   35 +
 ...h-chrome_browser_intranet__redirect__detector.h |   17 +
 ..._galleries_fileapi_mtp__device__map__service.cc |   21 +
 ...dia__galleries_media__file__system__registry.cc |   22 +
 ...ch-chrome_browser_media_audio__service__util.cc |   26 +
 ...-chrome_browser_media_router_discovery_BUILD.gn |   17 +
 ...er_discovery_discovery__network__list__posix.cc |   54 +
 ...covery_discovery__network__list__wifi__linux.cc |   36 +
 ...wser_media_webrtc_chrome__screen__enumerator.cc |   53 +
 ...owser_media_webrtc_chrome__screen__enumerator.h |   26 +
 ...ia_webrtc_desktop__media__picker__controller.cc |   17 +
 ...e_browser_media_webrtc_webrtc__log__uploader.cc |   17 +
 ...ser_media_webrtc_webrtc__logging__controller.cc |   26 +
 ...wser_media_webrtc_webrtc__logging__controller.h |   26 +
 .../patch-chrome_browser_memory__details.cc        |   17 +
 ...chrome__browser__main__extra__parts__metrics.cc |   58 +
 ..._chrome__browser__main__extra__parts__metrics.h |   26 +
 ...ser_metrics_chrome__metrics__service__client.cc |  103 ++
 ...ch-chrome_browser_metrics_perf_cpu__identity.cc |   17 +
 ...trics_power_process__metrics__recorder__util.cc |   17 +
 ...hrome_browser_metrics_power_process__monitor.cc |   35 +
 ...chrome_browser_metrics_power_process__monitor.h |   17 +
 ...owser_net_profile__network__context__service.cc |   35 +
 ..._profile__network__context__service__factory.cc |   26 +
 ...rowser_net_system__network__context__manager.cc |  144 ++
 ...browser_net_system__network__context__manager.h |   26 +
 ...page_modules_file__suggestion_drive__service.cc |   17 +
 ..._browser_new__tab__page_new__tab__page__util.cc |   17 +
 ...cations_notification__display__service__impl.cc |   44 +
 ...ns_notification__platform__bridge__delegator.cc |   17 +
 ...d__manager_chrome__password__manager__client.cc |   44 +
 ...d__manager_password__reuse__manager__factory.cc |   17 +
 .../patch-chrome_browser_platform__util__linux.cc  |   18 +
 ...wser_policy_browser__signin__policy__handler.cc |   17 +
 ...wser__cloud__management__controller__desktop.cc |   53 +
 ...onfiguration__policy__handler__list__factory.cc |  212 +++
 ...y_device__management__service__configuration.cc |   17 +
 ...olicy_policy__value__and__status__aggregator.cc |   17 +
 .../patch-chrome_browser_prefs_browser__prefs.cc   |   73 +
 ...er_prefs_pref__service__incognito__allowlist.cc |   17 +
 ...er_printing_print__backend__service__manager.cc |   35 +
 ...patch-chrome_browser_printing_printer__query.cc |   17 +
 ...tch-chrome_browser_process__singleton__posix.cc |   26 +
 ...hrome__browser__main__extra__parts__profiles.cc |  143 ++
 .../patch-chrome_browser_profiles_profile__impl.cc |   46 +
 ...atch-chrome_browser_profiles_profiles__state.cc |   35 +
 ...ies_regional__capabilities__service__factory.cc |   26 +
 ...h-chrome_browser_renderer__preferences__util.cc |   35 +
 ...s_settings_autofill__page_passwords__shared.css |   17 +
 ...ome_browser_resources_signin_signin__shared.css |   17 +
 ...owsing_chrome__password__protection__service.cc |   17 +
 ...d__content__scanning_binary__upload__service.cc |   17 +
 ...dent__reporting_incident__reporting__service.cc |   17 +
 ...owsing_safe__browsing__pref__change__handler.cc |   26 +
 ...rowser_screen__ai_screen__ai__install__state.cc |   17 +
 ...creen__ai_screen__ai__service__handler__base.cc |   26 +
 ...tch-chrome_browser_sessions_session__restore.cc |   26 +
 ...ser_sharing_sharing__handler__registry__impl.cc |   26 +
 ...patch-chrome_browser_shortcuts_icon__badging.cc |   17 +
 ...ome_browser_signin_accounts__policy__manager.cc |   44 +
 ...rome_browser_signin_accounts__policy__manager.h |   35 +
 .../patch-chrome_browser_signin_signin__util.cc    |   26 +
 .../patch-chrome_browser_signin_signin__util.h     |   17 +
 ...ed__user_classify__url__navigation__throttle.cc |   26 +
 ...vised__user_supervised__user__browser__utils.cc |   26 +
 ...rvised__user_supervised__user__browser__utils.h |   17 +
 ...supervised__user__extensions__delegate__impl.cc |   17 +
 ...__user_supervised__user__extensions__manager.cc |   26 +
 ...d__user_supervised__user__extensions__manager.h |   17 +
 ...ed__user__google__auth__navigation__throttle.cc |   32 +
 ..._supervised__user__metrics__service__factory.cc |   26 +
 ..._user_supervised__user__navigation__observer.cc |   26 +
 ...owser_sync_chrome__sync__controller__builder.cc |   17 +
 ...rowser_sync_device__info__sync__client__impl.cc |   17 +
 ...h-chrome_browser_sync_sync__service__factory.cc |   44 +
 ...e_browser_task__manager_sampling_task__group.cc |   44 +
 ...me_browser_task__manager_sampling_task__group.h |   44 +
 ..._task__manager_sampling_task__group__sampler.cc |   53 +
 ...r_task__manager_sampling_task__group__sampler.h |   44 +
 ...r_task__manager_sampling_task__manager__impl.cc |   17 +
 ...browser_task__manager_task__manager__observer.h |   17 +
 .../patch-chrome_browser_themes_theme__helper.cc   |   17 +
 .../patch-chrome_browser_themes_theme__service.cc  |   26 +
 ...e_browser_themes_theme__service__aura__linux.cc |   17 +
 ...hrome_browser_themes_theme__service__factory.cc |   35 +
 ...-chrome_browser_ui_actions_chrome__action__id.h |   17 +
 ..._payments_desktop__payments__window__manager.cc |   26 +
 ...l_payments_desktop__payments__window__manager.h |   44 +
 .../patches/patch-chrome_browser_ui_browser.h      |   17 +
 ...rome_browser_ui_browser__command__controller.cc |   80 ++
 .../patch-chrome_browser_ui_browser__commands.cc   |   17 +
 .../patch-chrome_browser_ui_browser__ui__prefs.cc  |   26 +
 ...patch-chrome_browser_ui_browser__view__prefs.cc |   26 +
 .../patch-chrome_browser_ui_chrome__pages.cc       |   35 +
 .../patch-chrome_browser_ui_chrome__pages.h        |   26 +
 ...rowser_ui_color_native__chrome__color__mixer.cc |   17 +
 .../patches/patch-chrome_browser_ui_managed__ui.cc |   26 +
 ...r_ui_omnibox_omnibox__pedal__implementations.cc |   17 +
 ...rollers_relaunch__chrome__bubble__controller.cc |   26 +
 ..._passwords_manage__passwords__ui__controller.cc |   26 +
 ...h-chrome_browser_ui_prefs_prefs__tab__helper.cc |   17 +
 .../patches/patch-chrome_browser_ui_sad__tab.cc    |   17 +
 ...sharing__hub_sharing__hub__bubble__controller.h |   17 +
 ...e_browser_ui_signin_signin__view__controller.cc |   26 +
 ...me_browser_ui_signin_signin__view__controller.h |   17 +
 ..._ui_signin_signin__view__controller__delegate.h |   26 +
 ...chrome_browser_ui_startup_bad__flags__prompt.cc |   17 +
 ...browser_ui_startup_startup__browser__creator.cc |   44 +
 ...r_ui_startup_startup__browser__creator__impl.cc |   35 +
 ...me_browser_ui_startup_startup__tab__provider.cc |   26 +
 .../patch-chrome_browser_ui_tab__helpers.cc        |   32 +
 .../patch-chrome_browser_ui_tabs_features.cc       |   17 +
 ...-chrome_browser_ui_tabs_tab__dialog__manager.cc |   17 +
 .../patch-chrome_browser_ui_tabs_tab__features.cc  |   17 +
 ...tch-chrome_browser_ui_tabs_tab__strip__prefs.cc |   17 +
 ...owser_ui_task__manager_task__manager__columns.h |   17 +
 ...ui_task__manager_task__manager__table__model.cc |   44 +
 ...ch-chrome_browser_ui_test_popup__browsertest.cc |   26 +
 ...tch-chrome_browser_ui_test_test__browser__ui.cc |   26 +
 .../patch-chrome_browser_ui_ui__features.cc        |   26 +
 .../patches/patch-chrome_browser_ui_ui__features.h |   26 +
 ...h-chrome_browser_ui_views_accelerator__table.cc |   40 +
 ...pps_chrome__native__app__window__views__aura.cc |   26 +
 ...s_chrome__browser__main__extra__parts__views.cc |   26 +
 ...rome_browser_ui_views_chrome__views__delegate.h |   17 +
 ...wser_ui_views_chrome__views__delegate__linux.cc |   26 +
 ...owser_ui_views_compose_compose__dialog__view.cc |   17 +
 ...chrome_browser_ui_views_frame_browser__frame.cc |   71 +
 ...-chrome_browser_ui_views_frame_browser__frame.h |   26 +
 ...ws_frame_browser__frame__view__layout__linux.cc |   17 +
 ..._browser__frame__view__layout__linux__native.cc |   17 +
 ...r_ui_views_frame_browser__frame__view__linux.cc |   26 +
 ...er__non__client__frame__view__factory__views.cc |   35 +
 ...-chrome_browser_ui_views_frame_browser__view.cc |   26 +
 ..._ui_views_frame_opaque__browser__frame__view.cc |   44 +
 ...r_ui_views_frame_opaque__browser__frame__view.h |   26 +
 ...paque__browser__frame__view__layout__delegate.h |   26 +
 ...e_picture__in__picture__browser__frame__view.cc |   17 +
 ..._ui_views_frame_system__menu__model__builder.cc |   35 +
 ...ui_views_frame_system__menu__model__delegate.cc |   35 +
 ...wser_ui_views_frame_tab__strip__region__view.cc |   17 +
 ...chrome_browser_ui_views_hung__renderer__view.cc |   17 +
 ...ui_views_new__tab__footer_footer__controller.cc |   17 +
 ...rowser_ui_views_omnibox_omnibox__view__views.cc |   17 +
 ...views_passwords_password__bubble__view__base.cc |   26 +
 ...er_ui_views_profiles_avatar__toolbar__button.cc |   17 +
 ...ser_ui_views_profiles_avatar__toolbar__button.h |   17 +
 ...ui_views_profiles_profile__menu__coordinator.cc |   17 +
 ...rowser_ui_views_profiles_profile__menu__view.cc |   35 +
 ...wser_ui_views_profiles_profile__picker__view.cc |   26 +
 ...es_signin__view__controller__delegate__views.cc |   79 ++
 ...les_signin__view__controller__delegate__views.h |   35 +
 ...ui_views_tabs_dragging_tab__drag__controller.cc |   53 +
 .../patch-chrome_browser_ui_views_tabs_tab.cc      |   17 +
 ...ui_views_tabs_tab__hover__card__bubble__view.cc |   17 +
 ...wser_ui_views_tabs_tab__strip__combo__button.cc |   17 +
 ...rome_browser_ui_views_tabs_tab__style__views.cc |   17 +
 ...er_ui_views_task__manager__search__bar__view.cc |   17 +
 ..._education_browser__user__education__service.cc |   26 +
 ...eb__apps_web__app__integration__test__driver.cc |   89 ++
 ...rowser_ui_web__applications_web__app__dialogs.h |   17 +
 ...eb__applications_web__app__ui__manager__impl.cc |   26 +
 ...web__applications_web__app__ui__manager__impl.h |   17 +
 ...atch-chrome_browser_ui_webui_about_about__ui.cc |   35 +
 ...patch-chrome_browser_ui_webui_about_about__ui.h |   17 +
 ..._ui_webui_app__home_app__home__page__handler.cc |   17 +
 ...r_ui_webui_app__home_app__home__page__handler.h |   17 +
 ...ui_webui_app__settings_web__app__settings__ui.h |   24 +
 ...icate__manager_certificate__manager__handler.cc |   17 +
 ...i_certificate__manager_client__cert__sources.cc |   71 +
 ...ui_certificate__manager_client__cert__sources.h |   26 +
 ...me_browser_ui_webui_chrome__web__ui__configs.cc |   91 ++
 ...i_webui_chrome__web__ui__controller__factory.cc |   46 +
 ...ternals_connectors__internals__page__handler.cc |   26 +
 ...i_connectors__internals_device__trust__utils.cc |   35 +
 ...wser_ui_webui_interstitials_interstitial__ui.cc |   35 +
 ...e_browser_ui_webui_management_management__ui.cc |   22 +
 ...i_webui_management_management__ui__constants.cc |   23 +
 ...ui_webui_management_management__ui__constants.h |   25 +
 ..._ui_webui_management_management__ui__handler.cc |   44 +
 ...r_ui_webui_management_management__ui__handler.h |   26 +
 ...webui_new__tab__page_new__tab__page__handler.cc |   17 +
 ...ebui_password__manager_promo__cards__handler.cc |   26 +
 ...manager_promo__cards_relaunch__chrome__promo.cc |   26 +
 ...rowser_ui_webui_searchbox_searchbox__handler.cc |   35 +
 ...rowser_ui_webui_settings_appearance__handler.cc |   17 +
 ...tings_settings__localized__strings__provider.cc |   71 +
 ...ize__chrome_customize__chrome__page__handler.cc |   17 +
 ...mize__chrome_customize__chrome__page__handler.h |   17 +
 ...ser_ui_webui_signin_profile__picker__handler.cc |   17 +
 ...r__education__internals__page__handler__impl.cc |   35 +
 ...hrome_browser_ui_window__sizer_window__sizer.cc |   17 +
 ...r_upgrade__detector_version__history__client.cc |   17 +
 ...king_visited__url__ranking__service__factory.cc |   26 +
 ...lications_commands_launch__web__app__command.cc |   17 +
 ...s_commands_set__user__display__mode__command.cc |   17 +
 ...er_web__applications_extension__status__utils.h |   17 +
 ...ications_extensions_extension__status__utils.cc |   17 +
 ...ons_os__integration_os__integration__manager.cc |   17 +
 ...__integration_os__integration__test__override.h |   17 +
 ...integration_run__on__os__login__sub__manager.cc |   17 +
 ...tions_os__integration_shortcut__sub__manager.cc |   17 +
 ...gration_web__app__file__handler__registration.h |   17 +
 ...lications_os__integration_web__app__shortcut.cc |   26 +
 ...plications_os__integration_web__app__shortcut.h |   26 +
 ...pplications_policy_web__app__policy__manager.cc |   17 +
 ...s_test_os__integration__test__override__impl.cc |  125 ++
 ...ns_test_os__integration__test__override__impl.h |   44 +
 ..._browser_web__applications_web__app__helpers.cc |   17 +
 ...ser_web__applications_web__app__install__info.h |   17 +
 ...thn_chrome__authenticator__request__delegate.cc |   17 +
 ...tch-chrome_browser_webauthn_enclave__manager.cc |   26 +
 ...ser_webauthn_gpm__user__verification__policy.cc |   17 +
 ...er_webauthn_password__credential__controller.cc |   17 +
 ...me_browser_webauthn_unexportable__key__utils.cc |   17 +
 .../patches/patch-chrome_common_channel__info.h    |   26 +
 .../patch-chrome_common_channel__info__posix.cc    |   26 +
 .../patch-chrome_common_chrome__features.cc        |   62 +
 .../patches/patch-chrome_common_chrome__features.h |   51 +
 .../patches/patch-chrome_common_chrome__paths.cc   |   88 ++
 .../patches/patch-chrome_common_chrome__paths.h    |   35 +
 .../patch-chrome_common_chrome__paths__internal.h  |   17 +
 .../patch-chrome_common_chrome__switches.cc        |   26 +
 .../patches/patch-chrome_common_chrome__switches.h |   26 +
 .../patches/patch-chrome_common_crash__keys.cc     |   34 +
 ...hrome_common_extensions_extension__constants.cc |   17 +
 ...chrome_common_extensions_extension__constants.h |   17 +
 ...rmissions_chrome__permission__message__rules.cc |   17 +
 ...ch-chrome_common_media_cdm__host__file__path.cc |   17 +
 .../patch-chrome_common_media_cdm__registration.cc |   62 +
 .../patch-chrome_common_media_cdm__registration.h  |   17 +
 ...a_component__widevine__cdm__hint__file__linux.h |   17 +
 .../patches/patch-chrome_common_pref__names.h      |   97 ++
 .../patches/patch-chrome_common_url__constants.h   |   17 +
 .../patch-chrome_common_webui__url__constants.cc   |   34 +
 .../patch-chrome_common_webui__url__constants.h    |   53 +
 ...ise__companion_enterprise__companion__client.cc |   17 +
 ...h-chrome_enterprise__companion_event__logger.cc |   17 +
 .../patch-chrome_enterprise__companion_lock.cc     |   26 +
 ...vices_printing_print__backend__service__impl.cc |   53 +
 ...services_speech_audio__source__fetcher__impl.cc |   17 +
 ...e_test_base_scoped__channel__override__posix.cc |   17 +
 ...ch-chrome_test_chromedriver_chrome__launcher.cc |   16 +
 ...rome_test_chromedriver_chrome_chrome__finder.cc |   35 +
 ...e_test_chromedriver_key__converter__unittest.cc |   26 +
 ...medriver_keycode__text__conversion__unittest.cc |   26 +
 ...sed__user_google__auth__state__waiter__mixin.cc |   17 +
 .../patch-chrome_updater_app_app__uninstall.cc     |   17 +
 .../patches/patch-chrome_updater_configurator.cc   |   17 +
 chromium-wip/patches/patch-chrome_updater_lock.cc  |   17 +
 .../patch-chrome_updater_util_posix__util.cc       |   17 +
 .../patches/patch-chrome_utility_services.cc       |   35 +
 ...hromecast_browser_cast__browser__main__parts.cc |   44 +
 ...ecast_browser_cast__content__browser__client.cc |   17 +
 ..._browser_runtime__application__service__impl.cc |   17 +
 ...omecast_media_base_default__monotonic__clock.cc |   26 +
 chromium-wip/patches/patch-components_BUILD.gn     |   34 +
 ...ta__manager_payments_payments__data__manager.cc |   53 +
 ...ata__manager_payments_payments__data__manager.h |   26 +
 ...owser_foundations_browser__autofill__manager.cc |   17 +
 ...ization__guide_autofill__optimization__guide.cc |   17 +
 ...browser_payments_amount__extraction__manager.cc |   35 +
 ...autofill_core_browser_payments_bnpl__manager.cc |   17 +
 ...ebdata_payments_payments__sync__bridge__util.cc |   17 +
 ...ill_core_common_autofill__payments__features.cc |   17 +
 ...ponents_autofill_core_common_autofill__prefs.cc |   44 +
 ...mponents_autofill_core_common_autofill__prefs.h |   35 +
 ...onents_commerce_core_commerce__feature__list.cc |   45 +
 ...nstrained__window_constrained__window__views.cc |   17 +
 ...ngs_core_browser_website__settings__registry.cc |   17 +
 ...omponents_cookie__config_cookie__store__util.cc |   17 +
 .../patch-components_crash_core_app_BUILD.gn       |   49 +
 ...nts_crash_core_app_chrome__crashpad__handler.cc |   18 +
 ...nents_crash_core_app_crashpad__handler__main.cc |   26 +
 ...h_core_browser_crash__upload__list__crashpad.cc |   32 +
 .../patch-components_crash_core_common_BUILD.gn    |   17 +
 ...s_device__signals_core_browser_browser__utils.h |   26 +
 ...ignals_core_browser_mock__signals__aggregator.h |   17 +
 ...ice__signals_core_browser_signals__aggregator.h |   17 +
 ...gnals_core_browser_signals__aggregator__impl.cc |   17 +
 ...ignals_core_browser_signals__aggregator__impl.h |   17 +
 ...ignals_core_browser_user__permission__service.h |   17 +
 ...core_browser_user__permission__service__impl.cc |   17 +
 ..._core_browser_user__permission__service__impl.h |   17 +
 ...als_core_common_linux_platform__utils__linux.cc |   83 ++
 ...evice__signals_core_common_signals__features.cc |   17 +
 ...device__signals_core_common_signals__features.h |   17 +
 ...nals_core_system__signals_platform__delegate.cc |   17 +
 ...nents_device__signals_test_signals__contract.cc |   17 +
 ...service_discardable__shared__memory__manager.cc |   17 +
 ...ponents_embedder__support_user__agent__utils.cc |   62 +
 ...bedder__support_user__agent__utils__unittest.cc |   35 +
 ...ctors_core_realtime__reporting__client__base.cc |   26 +
 ...components_enterprise_watermarking_watermark.cc |   26 +
 ...mponents_error__page_common_localized__error.cc |   17 +
 ...h-components_eye__dropper_eye__dropper__view.cc |   17 +
 ..._feature__engagement_public_event__constants.cc |   17 +
 ...s_feature__engagement_public_event__constants.h |   17 +
 ...e__engagement_public_feature__configurations.cc |   36 +
 ...eature__engagement_public_feature__constants.cc |   35 +
 ...feature__engagement_public_feature__constants.h |   35 +
 ...nts_feature__engagement_public_feature__list.cc |   35 +
 ...ents_feature__engagement_public_feature__list.h |   64 +
 ...omponents_feed_core_proto_v2_wire_version.proto |   19 +
 ...s_feed_core_v2_feed__network__impl__unittest.cc |   19 +
 .../patch-components_feed_core_v2_proto__util.cc   |   30 +
 ...omponents_feed_core_v2_proto__util__unittest.cc |   19 +
 ...-components_feed_core_v2_test_proto__printer.cc |   19 +
 ...h-components_gcm__driver_gcm__desktop__utils.cc |   17 +
 .../patches/patch-components_gwp__asan_BUILD.gn    |   17 +
 ...-components_gwp__asan_buildflags_buildflags.gni |   20 +
 ..._asan_client_guarded__page__allocator__posix.cc |   19 +
 .../patch-components_gwp__asan_client_gwp__asan.cc |   17 +
 ...ponents_gwp__asan_client_gwp__asan__features.cc |   17 +
 ...nts_gwp__asan_crash__handler_crash__analyzer.cc |   26 +
 ...patch-components_live__caption_caption__util.cc |   17 +
 .../patch-components_live__caption_caption__util.h |   17 +
 ...omponents_media__router_common_media__source.cc |   17 +
 ...n_providers_cast_channel_cast__message__util.cc |   17 +
 ...ter_common_providers_cast_channel_enum__table.h |   21 +
 ...-components_metrics_drive__metrics__provider.cc |   26 +
 .../patch-components_metrics_dwa_dwa__service.cc   |   17 +
 .../patch-components_metrics_metrics__log.cc       |   44 +
 .../patch-components_metrics_motherboard.cc        |   16 +
 ...nts_named__mojo__ipc__server_connection__info.h |   36 +
 ...erver_named__mojo__ipc__server__client__util.cc |   17 +
 ...ed__mojo__server__endpoint__connector__linux.cc |   18 +
 .../patch-components_named__system__lock_BUILD.gn  |   26 +
 .../patch-components_named__system__lock_lock.h    |   17 +
 ...omponents_named__system__lock_lock__unittest.cc |   35 +
 ...on__guide_core_optimization__guide__features.cc |   17 +
 ...zation__guide_core_optimization__guide__util.cc |   17 +
 ..._async_browser_secret__portal__key__provider.cc |   18 +
 ...onents_os__crypt_sync_libsecret__util__linux.cc |   33 +
 .../patch-components_os__crypt_sync_os__crypt.h    |   69 +
 ...aint__preview_browser_paint__preview__client.cc |   19 +
 ...iew_browser_paint__preview__client__unittest.cc |   19 +
 ...aint__preview_common_proto_paint__preview.proto |   19 +
 ..._preview_player_player__compositor__delegate.cc |   19 +
 ...ger_core_browser_features_password__features.cc |   26 +
 ...ager_core_browser_features_password__features.h |   17 +
 ...ger_core_browser_password__autofill__manager.cc |   26 +
 ...ager_core_browser_password__autofill__manager.h |   17 +
 ...manager_core_browser_password__form__filling.cc |   17 +
 ...manager_core_browser_password__form__manager.cc |   35 +
 ...word__manager_core_browser_password__manager.cc |   26 +
 ...anager_core_browser_password__manager__client.h |   26 +
 ...ger_core_browser_password__manager__switches.cc |   17 +
 ...ager_core_browser_password__manager__switches.h |   17 +
 ...ore_browser_password__manual__fallback__flow.cc |   35 +
 ...core_browser_password__manual__fallback__flow.h |   26 +
 ..._core_browser_password__store__factory__util.cc |   17 +
 ...core_browser_password__store_login__database.cc |   26 +
 ...ssword__store_login__database__async__helper.cc |   17 +
 ...er_password__store_login__database__unittest.cc |   17 +
 ...core_browser_stub__password__manager__client.cc |   17 +
 ..._core_browser_stub__password__manager__client.h |   17 +
 ...er_core_common_password__manager__pref__names.h |   26 +
 ...nager_decorators_process__metrics__decorator.cc |   17 +
 ...mponents_performance__manager_public_features.h |   17 +
 ...sions_prediction__service_prediction__common.cc |   26 +
 ...icy_core_browser_policy__pref__mapping__test.cc |   17 +
 ..._policy_core_browser_url__blocklist__manager.cc |   17 +
 ...licy_core_common_cloud_cloud__policy__client.cc |   17 +
 ...mmon_cloud_cloud__policy__refresh__scheduler.cc |   26 +
 ...policy_core_common_cloud_cloud__policy__util.cc |   61 +
 ...ts_policy_core_common_policy__loader__common.cc |   26 +
 ...-components_policy_core_common_policy__paths.cc |   19 +
 ...nents_policy_core_common_policy__pref__names.cc |   17 +
 ...onents_policy_core_common_policy__pref__names.h |   17 +
 ...onents_policy_tools_generate__policy__source.py |   20 +
 .../patch-components_power__metrics_BUILD.gn       |   17 +
 ...nts_power__metrics_energy__metrics__provider.cc |   27 +
 ...capabilities_regional__capabilities__service.cc |   17 +
 ...apabilities_regional__capabilities__switches.cc |   24 +
 ...capabilities_regional__capabilities__switches.h |   25 +
 ...ontent_common_file__type__policies__unittest.cc |   17 +
 ...ing_content_resources_gen__file__type__proto.py |   26 +
 ..._core_browser_db_v4__protocol__manager__util.cc |   17 +
 ..._browser_realtime_url__lookup__service__base.cc |   17 +
 ...nents_search__engines_template__url__service.cc |   17 +
 ...onents_security__interstitials_content_utils.cc |   17 +
 ..._default__model_cross__device__user__segment.cc |   17 +
 ...rvices_on__device__translation_sandbox__hook.cc |   49 +
 ...ervices_on__device__translation_sandbox__hook.h |   22 +
 ...paint__preview__compositor__collection__impl.cc |   35 +
 ...mponents_signin_public_base_signin__switches.cc |   26 +
 ...omponents_signin_public_base_signin__switches.h |   26 +
 .../patches/patch-components_soda_soda__util.cc    |   35 +
 ..._metric__utils_common_startup__metric__utils.cc |   17 +
 .../patch-components_storage__monitor_BUILD.gn     |   26 +
 ...torage__monitor_removable__device__constants.cc |   17 +
 ...storage__monitor_removable__device__constants.h |   17 +
 ...ds__chrome__management__url__checker__client.cc |   17 +
 ...r_core_browser_list__family__members__service.h |   17 +
 ...e_browser_supervised__user__metrics__service.cc |   17 +
 ...r_core_browser_supervised__user__preferences.cc |   17 +
 ...onents_supervised__user_core_common_features.cc |   51 +
 ...ponents_supervised__user_core_common_features.h |   41 +
 ...ents_supervised__user_core_common_pref__names.h |   17 +
 ...sync__device__info_local__device__info__util.cc |   35 +
 ...evice__info_local__device__info__util__linux.cc |   20 +
 ...references_common__syncable__prefs__database.cc |   17 +
 .../patch-components_sync_base_sync__util.cc       |   17 +
 .../patch-components_system__cpu_cpu__probe.cc     |   29 +
 ...onents_translate_core_common_translate__util.cc |   17 +
 ...sted__vault_trusted__vault__connection__impl.cc |   17 +
 ...ponents_update__client_update__query__params.cc |   19 +
 ..._formatter_spoof__checks_idn__spoof__checker.cc |   17 +
 ...nts_user__education_views_help__bubble__view.cc |   35 +
 ...ents_user__education_views_help__bubble__view.h |   17 +
 ...nents_variations_service_variations__service.cc |   17 +
 ...isited__url__ranking_public_url__visit__util.cc |   17 +
 .../patch-components_viz_host_gpu__host__impl.cc   |   17 +
 ...ch-components_viz_host_host__display__client.cc |   20 +
 ...tch-components_viz_host_host__display__client.h |   17 +
 ...isplay__embedder_skia__output__surface__impl.cc |   17 +
 ..._display__embedder_software__output__surface.cc |   26 +
 ...e_display__embedder_software__output__surface.h |   26 +
 ...omponents_viz_service_display_skia__renderer.cc |   17 +
 ...e__sinks_root__compositor__frame__sink__impl.cc |   26 +
 ...me__sinks_root__compositor__frame__sink__impl.h |   17 +
 ...components_viz_service_gl_gpu__service__impl.cc |   26 +
 ...-components_viz_service_gl_gpu__service__impl.h |   17 +
 ...ch-components_viz_test_fake__display__client.cc |   17 +
 ...tch-components_viz_test_fake__display__client.h |   17 +
 ...tch-components_viz_test_mock__display__client.h |   17 +
 .../patch-components_webui_flags_flags__state.cc   |   17 +
 chromium-wip/patches/patch-content_app_BUILD.gn    |   21 +
 .../patches/patch-content_app_content__main.cc     |   26 +
 ...atch-content_app_content__main__runner__impl.cc |  137 ++
 .../patches/patch-content_browser_BUILD.gn         |   39 +
 ...sibility_browser__accessibility__state__impl.cc |   17 +
 ...owser__accessibility__state__impl__auralinux.cc |   52 +
 .../patch-content_browser_audio_audio__service.cc  |   26 +
 ..._browser_browser__child__process__host__impl.cc |   25 +
 ...t_browser_browser__child__process__host__impl.h |   26 +
 ...ild__process__host__impl__receiver__bindings.cc |   17 +
 .../patch-content_browser_browser__main__loop.cc   |   43 +
 ...wser_child__process__launcher__helper__linux.cc |  131 ++
 ...browser_child__thread__type__switcher__linux.cc |   43 +
 ..._browser_child__thread__type__switcher__linux.h |   17 +
 ..._compositor_viz__process__transport__factory.cc |   17 +
 ...wser_devtools_devtools__frontend__host__impl.cc |   44 +
 ...owser_devtools_devtools__frontend__host__impl.h |   17 +
 ...wser_devtools_protocol_system__info__handler.cc |   17 +
 ...ccess_file__path__watcher_file__path__watcher.h |   17 +
 ...file__path__watcher_file__path__watcher__bsd.cc |   69 +
 ...le__path__watcher_file__path__watcher__kqueue.h |   16 +
 ...s_file__system__access__local__path__watcher.cc |   17 +
 ...font__access_font__enumeration__data__source.cc |   35 +
 .../patch-content_browser_gpu_compositor__util.cc  |   26 +
 ...content_browser_gpu_gpu__data__manager__impl.cc |   17 +
 ...-content_browser_gpu_gpu__data__manager__impl.h |   17 +
 ...rowser_gpu_gpu__data__manager__impl__private.cc |   17 +
 ...browser_gpu_gpu__data__manager__impl__private.h |   26 +
 ...patch-content_browser_gpu_gpu__process__host.cc |   25 +
 ...wser_media_frameless__media__interface__proxy.h |   26 +
 ...r_media_media__keys__listener__manager__impl.cc |   17 +
 ...ent_browser_network__service__instance__impl.cc |   35 +
 ...i__plugin__process__host__receiver__bindings.cc |   26 +
 ...rowser_renderer__host_delegated__frame__host.cc |   17 +
 ...ia_service__video__capture__device__launcher.cc |   26 +
 ...renderer__host_pepper_pepper__file__io__host.cc |   26 +
 ...r_renderer__host_render__process__host__impl.cc |   61 +
 ...er_renderer__host_render__process__host__impl.h |   35 +
 ...der__process__host__impl__receiver__bindings.cc |   35 +
 ...wser_renderer__host_render__view__host__impl.cc |   17 +
 ...derer__host_render__widget__host__view__aura.cc |   53 +
 ...nderer__host_render__widget__host__view__aura.h |   17 +
 ...t_render__widget__host__view__event__handler.cc |   17 +
 .../patch-content_browser_sandbox__host__linux.cc  |   24 +
 ...scheduler_responsiveness_jank__monitor__impl.cc |   17 +
 ...duler_responsiveness_native__event__observer.cc |   26 +
 ...eduler_responsiveness_native__event__observer.h |   53 +
 ...browser_service__host_utility__process__host.cc |   44 +
 ...t_utility__process__host__receiver__bindings.cc |   26 +
 ...ser_service__host_utility__sandbox__delegate.cc |   40 +
 .../patch-content_browser_v8__snapshot__files.cc   |   17 +
 ...r_web__contents_slow__web__preference__cache.cc |   35 +
 ...wser_web__contents_web__contents__view__aura.cc |   35 +
 ...contents_web__contents__view__aura__unittest.cc |   80 ++
 ...browser_webui_web__ui__main__frame__observer.cc |   17 +
 ...owser_zygote__host_zygote__host__impl__linux.cc |   87 ++
 ...rowser_zygote__host_zygote__host__impl__linux.h |   35 +
 chromium-wip/patches/patch-content_child_BUILD.gn  |   22 +
 .../patches/patch-content_child_child__process.cc  |   26 +
 .../patches/patch-content_child_child__process.h   |   17 +
 chromium-wip/patches/patch-content_common_BUILD.gn |   42 +
 .../patches/patch-content_common_features.cc       |   17 +
 .../patches/patch-content_common_features.h        |   17 +
 .../patch-content_common_font__list__unittest.cc   |   17 +
 ...-content_common_gpu__pre__sandbox__hook__bsd.cc |   77 +
 ...h-content_common_gpu__pre__sandbox__hook__bsd.h |   29 +
 ...content_common_gpu__pre__sandbox__hook__linux.h |   22 +
 ...tch-content_common_thread__type__switcher.mojom |   16 +
 .../patch-content_gpu_gpu__child__thread.cc        |   27 +
 .../patches/patch-content_gpu_gpu__main.cc         |   79 ++
 ...t_ppapi__plugin_ppapi__blink__platform__impl.cc |   35 +
 ...nt_ppapi__plugin_ppapi__blink__platform__impl.h |   17 +
 ...ch-content_ppapi__plugin_ppapi__plugin__main.cc |   29 +
 ...tent_public_browser_content__browser__client.cc |   17 +
 ...blic_browser_zygote__host_zygote__host__linux.h |   22 +
 ...atch-content_public_common_content__features.cc |   41 +
 ...atch-content_public_common_content__switches.cc |   26 +
 ...patch-content_public_common_content__switches.h |   25 +
 ...patch-content_public_common_zygote_features.gni |   14 +
 .../patch-content_renderer_render__thread__impl.cc |   44 +
 ...ent_renderer_renderer__blink__platform__impl.cc |   51 +
 ...tent_renderer_renderer__blink__platform__impl.h |   17 +
 ...er_renderer__main__platform__delegate__linux.cc |   24 +
 chromium-wip/patches/patch-content_shell_BUILD.gn  |   17 +
 ...atch-content_shell_app_shell__main__delegate.cc |   17 +
 ...nt_shell_browser_shell__browser__main__parts.cc |   53 +
 ...ell_browser_shell__platform__delegate__views.cc |   17 +
 ...ll_renderer_shell__content__renderer__client.cc |   17 +
 ...hell_utility_shell__content__utility__client.cc |   26 +
 chromium-wip/patches/patch-content_test_BUILD.gn   |   17 +
 .../patches/patch-content_utility_services.cc      |   26 +
 ...ch_speech__recognition__sandbox__hook__linux.cc |   43 +
 ...ech_speech__recognition__sandbox__hook__linux.h |   22 +
 ...link__platform__with__sandbox__support__impl.cc |   35 +
 ...blink__platform__with__sandbox__support__impl.h |   17 +
 .../patches/patch-content_utility_utility__main.cc |  118 ++
 .../patch-content_utility_utility__thread__impl.cc |   27 +
 chromium-wip/patches/patch-content_zygote_BUILD.gn |   17 +
 .../patches/patch-content_zygote_zygote__linux.cc  |   21 +
 .../patch-content_zygote_zygote__main__linux.cc    |   64 +
 .../patch-device_bluetooth_bluetooth__adapter.cc   |   17 +
 .../patch-device_bluetooth_cast__bluetooth.gni     |   15 +
 chromium-wip/patches/patch-device_gamepad_BUILD.gn |   17 +
 .../patch-device_gamepad_gamepad__provider.cc      |   17 +
 .../patch-device_gamepad_hid__writer__linux.cc     |   17 +
 ..._browser__context__keyed__service__factories.cc |   17 +
 ...sions_browser_api_management_management__api.cc |   17 +
 ...sions_browser_api_messaging_message__service.cc |   26 +
 ...ivate_networking__private__delegate__factory.cc |   35 +
 ...tensions_common_api___permission__features.json |   35 +
 .../patch-extensions_common_api_runtime.json       |   17 +
 .../patches/patch-extensions_common_command.cc     |   17 +
 .../patch-extensions_common_features_feature.cc    |   17 +
 ...ensions_renderer_bindings_api__binding__util.cc |   17 +
 ...-extensions_renderer_bindings_argument__spec.cc |   17 +
 ...h-extensions_shell_app_shell__main__delegate.cc |   26 +
 ...er_api_runtime_shell__runtime__api__delegate.cc |   17 +
 ...ns_shell_browser_shell__browser__main__parts.cc |   17 +
 ...shell_browser_shell__extensions__api__client.cc |   26 +
 ..._shell_browser_shell__extensions__api__client.h |   25 +
 ...h-google__apis_gcm_engine_heartbeat__manager.cc |   35 +
 ...and__buffer_client_fake__gpu__memory__buffer.cc |   35 +
 ...mand__buffer_client_fake__gpu__memory__buffer.h |   17 +
 ...mand__buffer_service_dawn__context__provider.cc |   17 +
 ..._command__buffer_service_gles2__cmd__decoder.cc |   17 +
 ...ice_raster__decoder__unittest__context__lost.cc |   27 +
 ...mmand__buffer_service_shared__context__state.cc |   35 +
 ...ommand__buffer_service_shared__context__state.h |   26 +
 ...image_angle__vulkan__image__backing__factory.cc |   26 +
 ...e_shared__image_external__vk__image__backing.cc |   26 +
 ..._image_external__vk__image__backing__factory.cc |   17 +
 ...service_shared__image_shared__image__factory.cc |   44 +
 ...service_shared__image_shared__image__manager.cc |   17 +
 ...ce_shared__image_wrapped__sk__image__backing.cc |   17 +
 ...ommand__buffer_service_webgpu__decoder__impl.cc |   26 +
 ...ffer_tests_gl__gpu__memory__buffer__unittest.cc |   26 +
 .../patches/patch-gpu_config_gpu__control__list.cc |   17 +
 .../patch-gpu_config_gpu__finch__features.cc       |   18 +
 .../patch-gpu_config_gpu__info__collector.cc       |   17 +
 .../patches/patch-gpu_config_gpu__test__config.cc  |   17 +
 ...h-gpu_ipc_common_gpu__memory__buffer__support.h |   17 +
 .../patches/patch-gpu_ipc_service_gpu__init.cc     |   89 ++
 ...gpu_ipc_service_gpu__memory__buffer__factory.cc |   26 +
 .../patches/patch-gpu_ipc_service_x__util.h        |   17 +
 .../patches/patch-gpu_vulkan_generate__bindings.py |   17 +
 .../patches/patch-gpu_vulkan_semaphore__handle.cc  |   26 +
 .../patch-gpu_vulkan_vulkan__device__queue.cc      |   26 +
 .../patch-gpu_vulkan_vulkan__device__queue.h       |   17 +
 .../patch-gpu_vulkan_vulkan__function__pointers.cc |   26 +
 .../patch-gpu_vulkan_vulkan__function__pointers.h  |   33 +
 .../patches/patch-gpu_vulkan_vulkan__image.h       |   26 +
 .../patches/patch-gpu_vulkan_vulkan__util.cc       |   17 +
 chromium-wip/patches/patch-headless_BUILD.gn       |   17 +
 ...rowser_headless__browser__main__parts__posix.cc |   45 +
 ...b_browser_headless__content__browser__client.cc |   26 +
 ...ib_browser_headless__content__browser__client.h |   17 +
 ...ss_lib_browser_headless__web__contents__impl.cc |   17 +
 ...adless_lib_headless__content__main__delegate.cc |   17 +
 chromium-wip/patches/patch-ipc_ipc__channel.h      |   17 +
 .../patches/patch-ipc_ipc__channel__common.cc      |   17 +
 .../patches/patch-ipc_ipc__channel__mojo.cc        |   17 +
 .../patches/patch-ipc_ipc__message__utils.cc       |   17 +
 .../patches/patch-ipc_ipc__message__utils.h        |   17 +
 chromium-wip/patches/patch-media_BUILD.gn          |   21 +
 chromium-wip/patches/patch-media_audio_BUILD.gn    |   45 +
 .../patch-media_audio_alsa_audio__manager__alsa.cc |   60 +
 .../patch-media_audio_audio__input__device.cc      |   17 +
 ...h-media_audio_audio__output__proxy__unittest.cc |   20 +
 .../patches/patch-media_audio_pulse_pulse__util.cc |   21 +
 ...atch-media_audio_sndio_audio__manager__sndio.cc |  222 +++
 ...patch-media_audio_sndio_audio__manager__sndio.h |   75 +
 .../patch-media_audio_sndio_sndio__input.cc        |  209 +++
 .../patches/patch-media_audio_sndio_sndio__input.h |  100 ++
 .../patch-media_audio_sndio_sndio__output.cc       |  196 +++
 .../patch-media_audio_sndio_sndio__output.h        |   97 ++
 .../patches/patch-media_base_audio__latency.cc     |   17 +
 .../patch-media_base_libaom__thread__wrapper.cc    |   30 +
 .../patch-media_base_libvpx__thread__wrapper.cc    |   31 +
 .../patches/patch-media_base_media__switches.cc    |  132 ++
 .../patches/patch-media_base_media__switches.h     |   73 +
 .../patches/patch-media_base_video__frame.cc       |   53 +
 .../patches/patch-media_base_video__frame.h        |   53 +
 ...ideo_create__video__capture__device__factory.cc |   26 +
 ..._video_fake__video__capture__device__factory.cc |   17 +
 ..._video_file__video__capture__device__factory.cc |   17 +
 ...h-media_capture_video_linux_fake__v4l2__impl.cc |   17 +
 ...ch-media_capture_video_linux_fake__v4l2__impl.h |   31 +
 ..._capture_video_linux_v4l2__capture__delegate.cc |  183 +++
 ...a_capture_video_linux_v4l2__capture__delegate.h |   66 +
 ...dia_capture_video_linux_v4l2__capture__device.h |   17 +
 ...ture_video_linux_v4l2__capture__device__impl.cc |   17 +
 ...pture_video_linux_v4l2__capture__device__impl.h |   17 +
 ..._linux_video__capture__device__factory__v4l2.cc |  107 ++
 ...o_linux_video__capture__device__factory__v4l2.h |   17 +
 ...re_video_linux_video__capture__device__linux.cc |   17 +
 ...deo__capture__buffer__tracker__factory__impl.cc |   26 +
 ...capture_video_video__capture__device__client.cc |   17 +
 .../patch-media_cdm_cdm__paths__unittest.cc        |   17 +
 .../patch-media_cdm_library__cdm_cdm__paths.gni    |   17 +
 .../patch-media_ffmpeg_scripts_build__ffmpeg.py    |   82 ++
 .../patch-media_ffmpeg_scripts_robo__lib_config.py |   64 +
 ...a_gpu_chromeos_gl__image__processor__backend.cc |   19 +
 ...u_chromeos_libyuv__image__processor__backend.cc |   35 +
 ...pu_chromeos_mailbox__video__frame__converter.cc |   17 +
 ...a_gpu_chromeos_platform__video__frame__utils.cc |   26 +
 ...-media_gpu_chromeos_video__decoder__pipeline.cc |   35 +
 ...gpu_gpu__video__decode__accelerator__factory.cc |   26 +
 ...gpu_gpu__video__encode__accelerator__factory.cc |   26 +
 ...dware__video__decoding__sandbox__hook__linux.cc |   50 +
 ...rdware__video__decoding__sandbox__hook__linux.h |   22 +
 ...dware__video__encoding__sandbox__hook__linux.cc |   32 +
 ...rdware__video__encoding__sandbox__hook__linux.h |   29 +
 .../patches/patch-media_gpu_test_raw__video.cc     |   17 +
 ...ch-media_gpu_test_video__frame__file__writer.cc |   17 +
 .../patch-media_gpu_test_video__frame__helpers.cc  |   17 +
 ...patch-media_gpu_test_video__frame__validator.cc |   17 +
 .../patch-media_gpu_vaapi_vaapi__video__decoder.cc |   17 +
 .../patch-media_gpu_vaapi_vaapi__wrapper.cc        |   17 +
 .../patches/patch-media_media__options.gni         |   28 +
 .../patches/patch-media_mojo_mojom_BUILD.gn        |   17 +
 ...media_mojo_mojom_video__frame__mojom__traits.cc |   44 +
 ...-media_mojo_mojom_video__frame__mojom__traits.h |   17 +
 ...ideo_gpu__memory__buffer__video__frame__pool.cc |   35 +
 ...ia_video_video__encode__accelerator__adapter.cc |   17 +
 ...eo_video__encode__accelerator__adapter__test.cc |   44 +
 .../patches/patch-media_webrtc_audio__processor.cc |   17 +
 chromium-wip/patches/patch-media_webrtc_helpers.cc |   25 +
 .../patch-media_webrtc_helpers__unittests.cc       |   44 +
 chromium-wip/patches/patch-mojo_core_BUILD.gn      |   17 +
 chromium-wip/patches/patch-mojo_core_channel.cc    |   20 +
 .../patches/patch-mojo_core_embedder_features.h    |   17 +
 ...ojo_public_cpp_platform_socket__utils__posix.cc |   17 +
 .../patch-mojo_public_tools_bindings_mojom.gni     |   30 +
 chromium-wip/patches/patch-net_BUILD.gn            |  101 ++
 chromium-wip/patches/patch-net_base_features.cc    |   17 +
 .../patch-net_base_network__change__notifier.cc    |   45 +
 .../patch-net_base_network__change__notifier.h     |   35 +
 ...-net_base_network__change__notifier__passive.cc |   17 +
 .../patch-net_base_network__interfaces__posix.h    |   17 +
 .../patch-net_base_sockaddr__util__posix.cc        |   18 +
 ...tch-net_base_sockaddr__util__posix__unittest.cc |   18 +
 .../patch-net_disk__cache_backend__experiment.h    |   17 +
 ...net_disk__cache_simple_simple__file__tracker.cc |   26 +
 chromium-wip/patches/patch-net_dns_BUILD.gn        |   49 +
 .../patches/patch-net_dns_address__info.cc         |   22 +
 .../patch-net_dns_address__sorter__posix.cc        |   16 +
 .../patch-net_dns_dns__config__service__posix.cc   |   32 +
 .../patches/patch-net_dns_dns__reloader.cc         |   25 +
 chromium-wip/patches/patch-net_dns_dns__util.cc    |   17 +
 .../patches/patch-net_dns_host__resolver__proc.cc  |   19 +
 chromium-wip/patches/patch-net_dns_public_BUILD.gn |   17 +
 .../patches/patch-net_dns_public_resolv__reader.cc |   17 +
 .../patches/patch-net_dns_public_resolv__reader.h  |   16 +
 .../patch-net_dns_public_scoped__res__state.cc     |   17 +
 .../patch-net_dns_public_scoped__res__state.h      |   16 +
 .../patch-net_filter_zstd__source__stream.cc       |   16 +
 .../patch-net_http_http__auth__gssapi__posix.cc    |   19 +
 .../patch-net_http_http__auth__gssapi__posix.h     |   18 +
 ...atch-net_http_http__auth__handler__negotiate.cc |   17 +
 .../patch-net_http_http__auth__preferences.cc      |   17 +
 .../patch-net_http_http__auth__preferences.h       |   35 +
 .../patch-net_http_http__network__session.cc       |   18 +
 ...net_proxy__resolution_proxy__config__service.cc |   41 +
 ...xy__resolution_proxy__config__service__linux.cc |   46 +
 ...et_quic_quic__network__transaction__unittest.cc |   34 +
 .../patch-net_socket_socks5__client__socket.cc     |   18 +
 .../patches/patch-net_socket_tcp__socket__posix.cc |   26 +
 .../patches/patch-net_socket_udp__socket__posix.cc |  132 ++
 .../patch-net_socket_udp__socket__unittest.cc      |   53 +
 .../patches/patch-net_third__party_quiche_BUILD.gn |   17 +
 ..._tools_cert__verify__tool_cert__verify__tool.cc |   26 +
 .../patch-net_tools_net__watcher_net__watcher.cc   |   44 +
 ...ffic__annotation_network__traffic__annotation.h |   26 +
 ...patch-net_url__request_url__request__context.cc |   17 +
 .../patch-net_url__request_url__request__context.h |   17 +
 ..._url__request_url__request__context__builder.cc |   17 +
 ...ets_websocket__basic__stream__adapters__test.cc |   21 +
 .../patches/patch-pdf_pdfium_pdfium__engine.cc     |   26 +
 .../patches/patch-ppapi_tests_test__utils.h        |   27 +
 .../patch-printing_backend_cups__ipp__helper.cc    |   17 +
 .../patch-printing_backend_print__backend__cups.cc |   35 +
 ...nting_mojom_printing__context__mojom__traits.cc |   35 +
 ...inting_mojom_printing__context__mojom__traits.h |   17 +
 ...m_printing__context__mojom__traits__unittest.cc |   71 +
 .../patches/patch-printing_print__settings.cc      |   44 +
 .../patches/patch-printing_print__settings.h       |   53 +
 .../patch-printing_print__settings__conversion.cc  |   17 +
 .../patch-printing_printing__context__linux.cc     |   44 +
 .../patches/patch-printing_printing__features.cc   |   32 +
 .../patches/patch-printing_printing__features.h    |   17 +
 ...sandbox_print__backend__sandbox__hook__linux.cc |   56 +
 ..._sandbox_print__backend__sandbox__hook__linux.h |   22 +
 .../patches/patch-remoting_base_constants.h        |   17 +
 .../patches/patch-remoting_base_host__settings.cc  |   26 +
 ...h-remoting_codec_webrtc__video__encoder__vpx.cc |   17 +
 ...ting_host_base_desktop__environment__options.cc |   17 +
 .../patches/patch-remoting_host_base_switches.cc   |   24 +
 .../patches/patch-remoting_host_base_switches.h    |   24 +
 .../patch-remoting_host_chromoting__host.cc        |   17 +
 .../patches/patch-remoting_host_chromoting__host.h |   35 +
 ...atch-remoting_host_chromoting__host__context.cc |   17 +
 ...ting_host_chromoting__host__services__client.cc |   17 +
 .../patches/patch-remoting_host_client__session.cc |   17 +
 ...ch-remoting_host_crash_crash__file__uploader.cc |   17 +
 ...ate__desktop__interaction__strategy__factory.cc |   26 +
 .../patch-remoting_host_evaluate__capability.cc    |   17 +
 .../patch-remoting_host_host__attributes.cc        |   17 +
 .../patches/patch-remoting_host_host__details.cc   |   35 +
 .../patches/patch-remoting_host_host__main.cc      |   44 +
 .../patches/patch-remoting_host_ipc__constants.cc  |   26 +
 ...t_it2me_it2me__native__messaging__host__main.cc |   71 +
 ...ch-remoting_host_me2me__desktop__environment.cc |   35 +
 ...emoting_host_mojo__caller__security__checker.cc |   35 +
 .../patches/patch-remoting_host_policy__watcher.cc |   17 +
 ..._remote__open__url_remote__open__url__client.cc |   26 +
 ...st_remote__open__url_remote__open__url__main.cc |   26 +
 ...st_remote__open__url_remote__open__url__util.cc |   17 +
 ...mote__open__url_url__forwarder__configurator.cc |   17 +
 .../patch-remoting_host_remoting__me2me__host.cc   |  152 ++
 ...st_security__key_remote__security__key__main.cc |   26 +
 ...-remoting_host_session__policies__from__dict.cc |   17 +
 ...t_setup_me2me__native__messaging__host__main.cc |   26 +
 .../patch-remoting_host_setup_start__host__main.cc |   44 +
 ...g_host_webauthn_desktop__session__type__util.cc |   26 +
 ...hn_remote__webauthn__caller__security__utils.cc |   35 +
 ...bauthn_remote__webauthn__extension__notifier.cc |   34 +
 ...emoting_host_webauthn_remote__webauthn__main.cc |   26 +
 ...atch-remoting_protocol_webrtc__video__stream.cc |   17 +
 ...ng_signaling_ftl__host__device__id__provider.cc |   17 +
 chromium-wip/patches/patch-sandbox_BUILD.gn        |   17 +
 chromium-wip/patches/patch-sandbox_features.gni    |   17 +
 chromium-wip/patches/patch-sandbox_linux_BUILD.gn  |   41 +
 ...sandbox_linux_services_init__process__reaper.cc |   21 +
 ...tch-sandbox_linux_services_libc__interceptor.cc |   27 +
 chromium-wip/patches/patch-sandbox_policy_BUILD.gn |   56 +
 .../patches/patch-sandbox_policy_features.cc       |   20 +
 ...atch-sandbox_policy_freebsd_sandbox__freebsd.cc |  220 +++
 ...patch-sandbox_policy_freebsd_sandbox__freebsd.h |  285 ++++
 .../patch-sandbox_policy_mojom_sandbox.mojom       |   24 +
 .../patch-sandbox_policy_netbsd_sandbox__netbsd.cc |  220 +++
 .../patch-sandbox_policy_netbsd_sandbox__netbsd.h  |  285 ++++
 ...atch-sandbox_policy_openbsd_sandbox__openbsd.cc |  409 ++++++
 ...patch-sandbox_policy_openbsd_sandbox__openbsd.h |  289 ++++
 .../patches/patch-sandbox_policy_sandbox.cc        |   28 +
 .../patches/patch-sandbox_policy_sandbox.h         |   32 +
 .../patches/patch-sandbox_policy_sandbox__type.cc  |  190 +++
 .../patches/patch-sandbox_policy_switches.cc       |   19 +
 .../patches/patch-sandbox_policy_switches.h        |   18 +
 ...h-services_audio_audio__sandbox__hook__linux.cc |   37 +
 ...ch-services_audio_audio__sandbox__hook__linux.h |   22 +
 .../patches/patch-services_device_BUILD.gn         |   17 +
 ...vice_geolocation_location__provider__manager.cc |   17 +
 .../patches/patch-services_device_hid_BUILD.gn     |   43 +
 ...ch-services_device_hid_hid__connection__fido.cc |  225 +++
 ...tch-services_device_hid_hid__connection__fido.h |   69 +
 ...services_device_hid_hid__connection__freebsd.cc |  249 ++++
 ...-services_device_hid_hid__connection__freebsd.h |   76 +
 .../patch-services_device_hid_hid__service.cc      |   46 +
 ...patch-services_device_hid_hid__service__fido.cc |  405 ++++++
 .../patch-services_device_hid_hid__service__fido.h |   74 +
 ...ch-services_device_hid_hid__service__freebsd.cc |  404 ++++++
 ...tch-services_device_hid_hid__service__freebsd.h |   58 +
 ...tch-services_device_hid_hid__service__netbsd.cc |   36 +
 ...atch-services_device_hid_hid__service__netbsd.h |   42 +
 ...-services_device_public_cpp_device__features.cc |   17 +
 ...h-services_device_public_cpp_device__features.h |   17 +
 ...ce_public_cpp_generic__sensor_sensor__reading.h |   17 +
 .../patch-services_device_public_mojom_BUILD.gn    |   17 +
 .../patches/patch-services_device_serial_BUILD.gn  |   17 +
 ...ces_device_serial_serial__device__enumerator.cc |   26 +
 ...ces_device_serial_serial__io__handler__posix.cc |   17 +
 ...me__zone__monitor_time__zone__monitor__linux.cc |   22 +
 .../patches/patch-services_device_usb_BUILD.gn     |   40 +
 ...rvices_device_usb_usb__device__handle__usbfs.cc |   53 +
 ...ervices_device_usb_usb__device__handle__usbfs.h |   44 +
 .../patch-services_device_usb_usb__service.cc      |   42 +
 ...patch-services_device_usb_usb__service__fake.cc |   59 +
 .../patch-services_device_usb_usb__service__fake.h |   57 +
 .../patches/patch-services_network_BUILD.gn        |   16 +
 .../patch-services_network_network__context.cc     |   26 +
 .../patch-services_network_network__context.h      |   17 +
 ...rvices_network_network__sandbox__hook__linux.cc |   43 +
 ...ervices_network_network__sandbox__hook__linux.h |   20 +
 .../patch-services_network_network__service.cc     |   40 +
 .../patch-services_network_network__service.h      |   35 +
 .../patch-services_network_public_cpp_BUILD.gn     |   26 +
 .../patch-services_network_public_cpp_features.cc  |   26 +
 .../patch-services_network_public_mojom_BUILD.gn   |   31 +
 ...ionary_shared__dictionary__writer__in__memory.h |   17 +
 ..._on__device__model_on__device__model__service.h |   28 +
 ...ervices_on__device__model_pre__sandbox__init.cc |   44 +
 ..._instrumentation_queued__request__dispatcher.cc |   71 +
 ...tor_public_cpp_memory__instrumentation_BUILD.gn |   24 +
 ...ublic_cpp_memory__instrumentation_os__metrics.h |   26 +
 ...cpp_memory__instrumentation_os__metrics__bsd.cc |   78 ++
 ...tch-services_screen__ai_public_cpp_utilities.cc |   35 +
 ..._ai_sandbox_screen__ai__sandbox__hook__linux.cc |   24 +
 ...__ai_sandbox_screen__ai__sandbox__hook__linux.h |   22 +
 ...ervices_screen__ai_screen__ai__service__impl.cc |   26 +
 .../patch-services_service__manager_BUILD.gn       |   17 +
 ...manager_public_cpp_service__executable_BUILD.gn |   17 +
 ...p_stack__sampling_tracing__sampler__profiler.cc |   17 +
 ..._tracing_public_cpp_system__metrics__sampler.cc |   19 +
 ...h-services_tracing_public_cpp_trace__startup.cc |   17 +
 ...ture_public_mojom_video__capture__service.mojom |   21 +
 ...effects_video__effects__sandbox__hook__linux.cc |   33 +
 ..._effects_video__effects__sandbox__hook__linux.h |   22 +
 .../patch-services_viz_public_mojom_BUILD.gn       |   17 +
 .../patch-skia_ext_SkMemory__new__handler.cpp      |   26 +
 chromium-wip/patches/patch-skia_ext_font__utils.cc |   26 +
 .../patches/patch-skia_ext_skcolorspace__trfn.cc   |   17 +
 ...atch-third__party_abseil-cpp_absl_base_config.h |   28 +
 ...y_abseil-cpp_absl_base_internal_raw__logging.cc |   17 +
 ..._party_abseil-cpp_absl_base_internal_sysinfo.cc |   71 +
 ...l-cpp_absl_debugging_internal_elf__mem__image.h |   18 +
 ...sl_time_internal_cctz_src_time__zone__format.cc |   18 +
 .../patches/patch-third__party_afl_src_afl-fuzz.c  |   48 +
 .../patches/patch-third__party_angle_BUILD.gn      |   35 +
 .../patch-third__party_angle_src_common_platform.h |   30 +
 ...ird__party_angle_src_common_platform__helpers.h |   17 +
 ...third__party_angle_src_common_system__utils.cpp |   17 +
 ...party_angle_src_common_system__utils__linux.cpp |   47 +
 ...ngle_src_gpu__info__util_SystemInfo__internal.h |   22 +
 ...ngle_src_gpu__info__util_SystemInfo__libpci.cpp |   96 ++
 ...angle_src_gpu__info__util_SystemInfo__linux.cpp |   41 +
 ...y_angle_src_gpu__info__util_SystemInfo__x11.cpp |   67 +
 ...tch-third__party_angle_src_libANGLE_Display.cpp |   62 +
 ...e_src_libANGLE_renderer_gl_glx_FunctionsGLX.cpp |   21 +
 ...e_src_libANGLE_renderer_vulkan_DisplayVk__api.h |   17 +
 .../patches/patch-third__party_angle_util_BUILD.gn |   17 +
 ...erences_renderer__preferences__mojom__traits.cc |   17 +
 ...n_renderer__preferences_renderer__preferences.h |   17 +
 ...ferences_renderer__preferences__mojom__traits.h |   17 +
 ...h-third__party_blink_public_platform_platform.h |   17 +
 ...rer_bindings_scripts_bind__gen_style__format.py |   17 +
 ...rd__party_blink_renderer_build_scripts_gperf.py |   36 +
 ...renderer_build_scripts_run__with__pythonpath.py |   16 +
 ...blink_renderer_controller_blink__initializer.cc |   41 +
 ...rer_controller_memory__usage__monitor__posix.cc |   27 +
 ...erer_controller_memory__usage__monitor__posix.h |   53 +
 ...link_renderer_core_editing_editing__behavior.cc |   17 +
 ...erer_core_execution__context_navigator__base.cc |   17 +
 ...blink_renderer_core_exported_web__view__impl.cc |   26 +
 ...y_blink_renderer_core_frame_web__frame__test.cc |   26 +
 ...ore_html_canvas_canvas__async__blob__creator.cc |   17 +
 ...erer_core_inspector_inspector__memory__agent.cc |   17 +
 ...arty_blink_renderer_core_layout_layout__view.cc |   26 +
 ...renderer_core_loader_mixed__content__checker.cc |   17 +
 ...r_core_origin__trials_origin__trial__context.cc |   17 +
 ...renderer_core_page_context__menu__controller.cc |   17 +
 ...party_blink_renderer_core_paint_paint__layer.cc |   17 +
 ..._renderer_core_scroll_scrollbar__theme__aura.cc |   26 +
 ...party_blink_renderer_core_xml_xslt__processor.h |   20 +
 ...k_renderer_core_xml_xslt__processor__libxslt.cc |   20 +
 ...r_modules_media_audio_audio__device__factory.cc |   17 +
 ..._audio_audio__renderer__mixer__manager__test.cc |   17 +
 ...er_modules_peerconnection_rtc__data__channel.cc |   16 +
 ...peerconnection_webrtc__audio__renderer__test.cc |   17 +
 ...odules_webaudio_audio__worklet__thread__test.cc |   17 +
 ...odules_webgl_webgl__rendering__context__base.cc |   17 +
 ...renderer_modules_webgpu_gpu__canvas__context.cc |   17 +
 ...rty_blink_renderer_modules_webgpu_gpu__queue.cc |   17 +
 ...h-third__party_blink_renderer_platform_BUILD.gn |   17 +
 ...ty_blink_renderer_platform_fonts_font__cache.cc |   26 +
 ...rty_blink_renderer_platform_fonts_font__cache.h |   53 +
 ...nk_renderer_platform_fonts_font__description.cc |   26 +
 ..._blink_renderer_platform_fonts_font__metrics.cc |   35 +
 ...er_platform_fonts_font__unique__name__lookup.cc |   26 +
 ...nderer_platform_fonts_skia_font__cache__skia.cc |   26 +
 ...rer_platform_graphics_begin__frame__provider.cc |   21 +
 ...r_platform_graphics_gpu_image__layer__bridge.cc |   17 +
 ...er_platform_graphics_video__frame__submitter.cc |   17 +
 ...ion_partition__alloc__memory__dump__provider.cc |   34 +
 ..._peerconnection_rtc__video__encoder__factory.cc |   23 +
 ...derer_platform_runtime__enabled__features.json5 |   80 ++
 ...nk_renderer_platform_scheduler_common_thread.cc |   17 +
 ...g_blink__categorized__worker__pool__delegate.cc |   17 +
 ..._renderer_platform_wtf_container__annotations.h |   17 +
 ...arty_blink_renderer_platform_wtf_math__extras.h |   29 +
 ...arty_blink_renderer_platform_wtf_stack__util.cc |   82 ++
 .../patch-third__party_brotli_common_platform.h    |   17 +
 .../patches/patch-third__party_cpuinfo_cpuinfo.gni |   17 +
 ...ashpad_crashpad_build_crashpad__buildconfig.gni |   17 +
 ...-third__party_crashpad_crashpad_client_BUILD.gn |   22 +
 ...hpad_crashpad_client_crashpad__client__posix.cc |   49 +
 ...ashpad_minidump_minidump__misc__info__writer.cc |   21 +
 ...ty_crashpad_crashpad_util_misc_address__types.h |   26 +
 ..._crashpad_crashpad_util_misc_capture__context.h |   31 +
 ...d__party_crashpad_crashpad_util_misc_metrics.cc |   17 +
 ...hird__party_crashpad_crashpad_util_misc_uuid.cc |   17 +
 ...crashpad_crashpad_util_posix_close__multiple.cc |   17 +
 ...rashpad_crashpad_util_posix_drop__privileges.cc |   17 +
 ...__party_crashpad_crashpad_util_posix_signals.cc |   39 +
 ...ashpad_util_posix_symbolic__constants__posix.cc |   26 +
 .../patches/patch-third__party_crc32c_BUILD.gn     |   17 +
 ..._party_dawn_include_dawn_native_VulkanBackend.h |   18 +
 ...ch-third__party_dawn_src_dawn_common_Platform.h |   20 +
 ...party_dawn_src_dawn_native_vulkan_BackendVk.cpp |   17 +
 .../patches/patch-third__party_ffmpeg_BUILD.gn     |   16 +
 ...atch-third__party_ffmpeg_libavcodec_x86_cabac.h |   18 +
 .../patch-third__party_ffmpeg_libavutil_cpu.c      |   20 +
 .../patch-third__party_ffmpeg_libavutil_mem.c      |   18 +
 ...ch-third__party_ffmpeg_libavutil_random__seed.c |   31 +
 ...ch-third__party_ffmpeg_libavutil_x86_x86inc.asm |   29 +
 ...-third__party_fontconfig_include_meson-config.h |   50 +
 ...atch-third__party_fontconfig_src_src_fccompat.c |   19 +
 .../patches/patch-third__party_ipcz_src_BUILD.gn   |   17 +
 ...rd__party_ipcz_src_reference__drivers_random.cc |   26 +
 ...hird__party_ipcz_src_standalone_base_logging.cc |   18 +
 ...tch-third__party_leveldatabase_env__chromium.cc |   18 +
 ...m_source_libaom_aom__ports_aarch64__cpudetect.c |   56 +
 ...src_include_____locale__dir_locale__base__api.h |   17 +
 ...src_include_____locale__dir_support_bsd__like.h |   20 +
 .../patch-third__party_libc++_src_src_chrono.cpp   |   17 +
 ...libc++_src_src_filesystem_filesystem__clock.cpp |   17 +
 ...ird__party_libc++abi_src_src_cxa__guard__impl.h |   26 +
 .../patch-third__party_libdrm_src_xf86drmMode.c    |   29 +
 ...st_cpp_src_phonenumbers_base_memory_singleton.h |   18 +
 ...pp_src_phonenumbers_base_synchronization_lock.h |   18 +
 ...ist_cpp_src_phonenumbers_base_thread__checker.h |   29 +
 ...ch-third__party_libsync_src_include_sync_sync.h |   18 +
 .../patches/patch-third__party_libsync_src_sync.c  |   31 +
 .../patches/patch-third__party_libusb_BUILD.gn     |   58 +
 .../patch-third__party_libusb_src_libusb_core.c    |   17 +
 ...rd__party_libusb_src_libusb_os_threads__posix.c |   30 +
 ...x_source_libvpx_vpx__ports_aarch64__cpudetect.c |   34 +
 .../patch-third__party_lzma__sdk_C_CpuArch.c       |   43 +
 ...ial__color__utilities_src_cpp_palettes_tones.cc |   17 +
 .../patches/patch-third__party_nasm_BUILD.gn       |   22 +
 .../patch-third__party_nasm_config_config-linux.h  |   78 ++
 .../patch-third__party_node_check__version.py      |   20 +
 .../patches/patch-third__party_node_node.gni       |   17 +
 .../patches/patch-third__party_node_node.py        |   18 +
 ...ird__party_pdfium_core_fxge_cfx__fontmapper.cpp |   17 +
 ...arty_pdfium_core_fxge_linux_fx__linux__impl.cpp |   31 +
 ...-third__party_pdfium_fxjs_fx__date__helpers.cpp |   28 +
 .../patches/patch-third__party_pdfium_pdfium.gni   |   17 +
 ...fium_xfa_fxfa_parser_cxfa__timezoneprovider.cpp |   47 +
 ..._perfetto_include_perfetto_base_build__config.h |   76 +
 ..._perfetto_include_perfetto_base_thread__utils.h |   28 +
 ...rd__party_perfetto_include_perfetto_base_time.h |   40 +
 ..._perfetto_include_perfetto_ext_base_event__fd.h |   17 +
 ...fetto_include_perfetto_ext_base_thread__utils.h |   21 +
 ...erfetto_tracing_internal_track__event__legacy.h |   17 +
 ...erfetto_protos_perfetto_trace_ftrace_v4l2.proto |   62 +
 ...rd__party_perfetto_src_base_clock__snapshots.cc |   16 +
 ...tch-third__party_perfetto_src_base_event__fd.cc |   28 +
 ...hird__party_perfetto_src_base_periodic__task.cc |   26 +
 ...third__party_perfetto_src_base_string__utils.cc |   18 +
 ...d__party_perfetto_src_base_subprocess__posix.cc |   28 +
 ...party_perfetto_src_base_test_vm__test__utils.cc |   17 +
 ...party_perfetto_src_base_thread__task__runner.cc |   18 +
 ...-third__party_perfetto_src_base_unix__socket.cc |   46 +
 .../patch-third__party_perfetto_src_base_utils.cc  |   53 +
 ...ce__processor_importers_ftrace_v4l2__tracker.cc |   62 +
 ...-third__party_perfetto_src_tracing_ipc_memfd.cc |   18 +
 ...__party_perfetto_src_tracing_platform__posix.cc |   25 +
 ...atch-third__party_perfetto_src_tracing_track.cc |   29 +
 ...uf_src_google_protobuf_stubs_platform__macros.h |   17 +
 ..._party_skia_src_gpu_ganesh_GrAutoLocaleSetter.h |   17 +
 ...hird__party_skia_src_ports_SkMemory__malloc.cpp |   27 +
 ...third__party_skia_src_ports_SkOSFile__posix.cpp |   17 +
 ...__party_speech-dispatcher_libspeechd__version.h |   38 +
 ...third__party_speech-dispatcher_speechd__types.h |  148 ++
 .../patches/patch-third__party_sqlite_BUILD.gn     |   17 +
 ...d__party_sqlite_src_amalgamation__dev_sqlite3.c |   27 +
 ...-third__party_sqlite_src_amalgamation_sqlite3.c |   47 +
 ...-third__party_swiftshader_src_Reactor_Debug.cpp |   18 +
 ...__party_swiftshader_src_System_Configurator.cpp |   18 +
 ...d__party_swiftshader_src_System_Linux_MemFd.cpp |   43 +
 ...tshader_src_Vulkan_VkSemaphoreExternalLinux.hpp |   26 +
 ...tch-third__party_swiftshader_src_WSI_libXCB.cpp |   26 +
 ...10.0_configs_linux_include_llvm_Config_config.h |  180 +++
 ...ubzero_build_Linux_include_llvm_Config_config.h |   53 +
 ...ty_swiftshader_third__party_marl_src_memory.cpp |   18 +
 ...ty_swiftshader_third__party_marl_src_thread.cpp |   29 +
 ...ch-third__party_test__fonts_fontconfig_BUILD.gn |   34 +
 ...st__fonts_fontconfig_fontconfig__util__linux.cc |   33 +
 ...onts_fontconfig_generate__fontconfig__caches.cc |   26 +
 .../patches/patch-third__party_tflite_features.gni |   17 +
 .../patches/patch-third__party_unrar_src_crypt.cpp |   17 +
 ...layers_src_layers_external_vma_vk__mem__alloc.h |   17 +
 ...ers_vulkan_generated_vk__function__pointers.cpp |   18 +
 ...kan__memory__allocator_include_vk__mem__alloc.h |   17 +
 .../patches/patch-third__party_wayland_BUILD.gn    |   20 +
 .../patch-third__party_wayland_include_config.h    |   35 +
 .../patches/patch-third__party_webrtc_BUILD.gn     |   18 +
 ...rd__party_webrtc_modules_audio__device_BUILD.gn |   17 +
 ...s_desktop__capture_linux_wayland_egl__dmabuf.cc |   18 +
 ...__capture_linux_x11_x__server__pixel__buffer.cc |   21 +
 ...tch-third__party_webrtc_rtc__base_byte__order.h |   17 +
 ...atch-third__party_webrtc_rtc__base_cpu__info.cc |   18 +
 ...ch-third__party_webrtc_rtc__base_ip__address.cc |   18 +
 ...h-third__party_webrtc_rtc__base_net__helpers.cc |   16 +
 .../patch-third__party_webrtc_rtc__base_network.cc |   21 +
 ...ty_webrtc_rtc__base_physical__socket__server.cc |  120 ++
 ...rty_webrtc_rtc__base_physical__socket__server.h |   17 +
 ...rty_webrtc_rtc__base_platform__thread__types.cc |   43 +
 ...webrtc_rtc__base_third__party_sigslot_sigslot.h |   29 +
 .../patch-third__party_widevine_cdm_widevine.gni   |   18 +
 .../patches/patch-third__party_zlib_BUILD.gn       |   37 +
 .../patch-third__party_zlib_cpu__features.c        |   57 +
 .../patch-tools_code__cache__generator_BUILD.gn    |   44 +
 ...erate__shim__headers_generate__shim__headers.py |   27 +
 .../patches/patch-tools_generate__stubs_rules.gni  |   16 +
 ...atch-tools_gn_build_build__linux.ninja.template |   17 +
 chromium-wip/patches/patch-tools_gn_build_gen.py   |   40 +
 .../patch-tools_gn_src_base_files_file__posix.cc   |   17 +
 .../patches/patch-tools_gn_src_gn_version.h        |   21 +
 .../patches/patch-tools_gn_src_util_exe__path.cc   |   96 ++
 .../patches/patch-tools_grit_grit_node_base.py     |   18 +
 ...son__schema__compiler_cpp__bundle__generator.py |   17 +
 ...ols_json__schema__compiler_feature__compiler.py |   18 +
 ...ls_memory_partition__allocator_inspect__utils.h |   17 +
 ...ch-tools_perf_chrome__telemetry__build_BUILD.gn |   26 +
 .../patch-tools_protoc__wrapper_protoc__wrapper.py |   30 +
 .../patch-tools_v8__context__snapshot_BUILD.gn     |   43 +
 ...atch-tools_variations_fieldtrial__to__struct.py |   18 +
 ...tch-ui_accessibility_accessibility__features.cc |   26 +
 ...atch-ui_accessibility_accessibility__features.h |   26 +
 .../patches/patch-ui_accessibility_ax__node.cc     |   26 +
 .../patches/patch-ui_accessibility_ax__node.h      |   17 +
 .../patches/patch-ui_accessibility_ax__tree.cc     |   62 +
 .../patches/patch-ui_accessibility_ax__tree.h      |   35 +
 .../patch-ui_aura_client_drag__drop__client.h      |   17 +
 .../patches/patch-ui_aura_screen__ozone.cc         |   17 +
 chromium-wip/patches/patch-ui_aura_screen__ozone.h |   26 +
 .../patch-ui_base_accelerators_accelerator.cc      |   17 +
 .../patches/patch-ui_base_accelerators_command.cc  |   17 +
 ...istener_global__accelerator__listener__ozone.cc |   35 +
 .../patch-ui_base_clipboard_clipboard__constants.h |   26 +
 ...tch-ui_base_clipboard_clipboard__non__backed.cc |   17 +
 .../patch-ui_base_cursor_cursor__factory.cc        |   17 +
 .../patches/patch-ui_base_cursor_cursor__factory.h |   17 +
 ...agdrop_os__exchange__data__provider__factory.cc |   26 +
 ...op_os__exchange__data__provider__non__backed.cc |   17 +
 ...patch-ui_base_ime_dummy__text__input__client.cc |   17 +
 .../patch-ui_base_ime_dummy__text__input__client.h |   17 +
 .../patch-ui_base_ime_fake__text__input__client.cc |   17 +
 .../patch-ui_base_ime_fake__text__input__client.h  |   17 +
 ...-ui_base_ime_init_input__method__initializer.cc |   35 +
 ...linux_linux__input__method__context__factory.cc |   26 +
 .../patch-ui_base_ime_text__input__client.h        |   17 +
 .../patch-ui_base_resource_resource__bundle.cc     |   17 +
 .../patch-ui_base_test_skia__gold__pixel__diff.cc  |   17 +
 .../patches/patch-ui_base_test_ui__controls.h      |   17 +
 .../patches/patch-ui_base_ui__base__features.cc    |   44 +
 .../patches/patch-ui_base_ui__base__features.h     |   17 +
 .../patches/patch-ui_base_ui__base__switches.cc    |   24 +
 .../patches/patch-ui_base_ui__base__switches.h     |   22 +
 .../patches/patch-ui_base_webui_web__ui__util.cc   |   26 +
 .../patch-ui_base_x_x11__cursor__factory.cc        |   26 +
 .../patches/patch-ui_base_x_x11__cursor__factory.h |   26 +
 .../patches/patch-ui_base_x_x11__cursor__loader.cc |   47 +
 .../patch-ui_base_x_x11__display__manager.cc       |   26 +
 .../patch-ui_base_x_x11__shm__image__pool.cc       |   77 +
 chromium-wip/patches/patch-ui_color_color__id.h    |   17 +
 .../patch-ui_color_color__provider__utils.cc       |   17 +
 .../patches/patch-ui_color_system__theme.h         |   17 +
 .../patches/patch-ui_compositor_compositor.cc      |   17 +
 .../patches/patch-ui_compositor_compositor.h       |   17 +
 .../patch-ui_compositor_compositor__observer.h     |   17 +
 chromium-wip/patches/patch-ui_display_screen.cc    |   17 +
 chromium-wip/patches/patch-ui_display_screen.h     |   26 +
 chromium-wip/patches/patch-ui_events_event.cc      |   35 +
 .../patches/patch-ui_events_event__switches.cc     |   17 +
 .../patches/patch-ui_events_event__switches.h      |   17 +
 ...ch-ui_events_keycodes_dom_keycode__converter.cc |   44 +
 ...tch-ui_events_keycodes_dom_keycode__converter.h |   17 +
 chromium-wip/patches/patch-ui_gfx_BUILD.gn         |   17 +
 chromium-wip/patches/patch-ui_gfx_canvas__skia.cc  |   17 +
 .../patches/patch-ui_gfx_font__fallback__linux.cc  |   17 +
 .../patches/patch-ui_gfx_font__render__params.h    |   26 +
 .../patch-ui_gfx_font__render__params__linux.cc    |   26 +
 chromium-wip/patches/patch-ui_gfx_font__util.cc    |   26 +
 .../patches/patch-ui_gfx_gpu__extra__info.h        |   17 +
 .../patches/patch-ui_gfx_linux_dmabuf__uapi.h      |   42 +
 .../patches/patch-ui_gfx_linux_gbm__wrapper.cc     |   17 +
 ...x_mojom_native__handle__types__mojom__traits.cc |   67 +
 ...fx_mojom_native__handle__types__mojom__traits.h |   51 +
 .../patches/patch-ui_gfx_native__pixmap__handle.cc |   68 +
 .../patches/patch-ui_gfx_native__pixmap__handle.h  |   44 +
 .../patches/patch-ui_gfx_native__widget__types.h   |   26 +
 .../patches/patch-ui_gfx_platform__font__skia.cc   |   26 +
 .../patch-ui_gfx_render__text__api__fuzzer.cc      |   26 +
 .../patches/patch-ui_gfx_render__text__fuzzer.cc   |   26 +
 chromium-wip/patches/patch-ui_gfx_switches.cc      |   17 +
 chromium-wip/patches/patch-ui_gfx_switches.h       |   17 +
 chromium-wip/patches/patch-ui_gfx_x_atom__cache.cc |   16 +
 .../patch-ui_gfx_x_generated__protos_dri3.cc       |   17 +
 .../patch-ui_gfx_x_generated__protos_shm.cc        |   17 +
 .../patches/patch-ui_gfx_x_xlib__support.cc        |   27 +
 chromium-wip/patches/patch-ui_gl_gl__context.cc    |   26 +
 chromium-wip/patches/patch-ui_gl_gl__fence.cc      |   17 +
 .../patches/patch-ui_gl_gl__implementation.cc      |   17 +
 chromium-wip/patches/patch-ui_gl_gl__switches.cc   |   35 +
 .../patch-ui_gl_sync__control__vsync__provider.cc  |   44 +
 .../patch-ui_gl_sync__control__vsync__provider.h   |   26 +
 chromium-wip/patches/patch-ui_gtk_gtk__compat.cc   |   56 +
 .../patch-ui_gtk_printing_print__dialog__gtk.cc    |   17 +
 ...i_message__center_views_message__popup__view.cc |   17 +
 ...tive__theme_features_native__theme__features.cc |   26 +
 .../patches/patch-ui_native__theme_native__theme.h |   17 +
 .../patch-ui_native__theme_native__theme__base.cc  |   17 +
 .../patches/patch-ui_ozone_common_egl__util.cc     |   20 +
 ...platform_headless_headless__surface__factory.cc |   26 +
 ..._platform_headless_ozone__platform__headless.cc |   17 +
 ...rm_headless_vulkan__implementation__headless.cc |   35 +
 ..._ozone_platform_wayland_common_wayland__util.cc |   24 +
 ..._wayland_gpu_vulkan__implementation__wayland.cc |   20 +
 ...latform_wayland_host_wayland__frame__manager.cc |   19 +
 ...one_platform_x11_vulkan__implementation__x11.cc |   20 +
 ...tch-ui_ozone_platform_x11_x11__screen__ozone.cc |   35 +
 ...atch-ui_ozone_platform_x11_x11__screen__ozone.h |   44 +
 .../patch-ui_ozone_platform_x11_x11__window.cc     |   17 +
 ...zone_public_ozone__ui__controls__test__helper.h |   17 +
 ...i_ozone_test_mock__platform__window__delegate.h |   17 +
 ..._platform__window_platform__window__delegate.cc |   17 +
 ...i_platform__window_platform__window__delegate.h |   17 +
 ...rm__window_platform__window__init__properties.h |   26 +
 chromium-wip/patches/patch-ui_qt_BUILD.gn          |   17 +
 ...ings_translations_app__locale__settings__bn.xtb |   17 +
 ...ings_translations_app__locale__settings__ja.xtb |   17 +
 ...ings_translations_app__locale__settings__ko.xtb |   17 +
 ...ings_translations_app__locale__settings__ml.xtb |   17 +
 ...ings_translations_app__locale__settings__th.xtb |   17 +
 ...s_translations_app__locale__settings__zh-CN.xtb |   17 +
 ...s_translations_app__locale__settings__zh-TW.xtb |   17 +
 chromium-wip/patches/patch-ui_views_BUILD.gn       |   16 +
 ...h-ui_views_accessibility_view__accessibility.cc |   26 +
 .../patch-ui_views_controls_prefix__selector.cc    |   17 +
 .../patch-ui_views_controls_prefix__selector.h     |   17 +
 .../patch-ui_views_controls_textfield_textfield.cc |   71 +
 .../patch-ui_views_controls_textfield_textfield.h  |   26 +
 .../patch-ui_views_examples_widget__example.cc     |   17 +
 .../patches/patch-ui_views_focus_focus__manager.cc |   26 +
 .../patch-ui_views_style_platform__style.cc        |   26 +
 .../patches/patch-ui_views_style_platform__style.h |   17 +
 ..._ui__controls__factory__desktop__aura__ozone.cc |   17 +
 .../patches/patch-ui_views_views__delegate.cc      |   17 +
 .../patches/patch-ui_views_views__delegate.h       |   17 +
 ...top__aura_desktop__drag__drop__client__ozone.cc |   17 +
 ...ktop__aura_desktop__drag__drop__client__ozone.h |   26 +
 ...__aura_desktop__window__tree__host__platform.cc |   35 +
 .../patches/patch-ui_views_widget_root__view.cc    |   17 +
 .../patches/patch-ui_views_widget_widget.cc        |   26 +
 .../patches/patch-ui_views_widget_widget.h         |   17 +
 .../patch-ui_views_window_default__frame__view.cc  |   17 +
 .../patch-ui_views_window_dialog__delegate.cc      |   17 +
 .../patch-ui_views_window_frame__background.cc     |   17 +
 chromium-wip/patches/patch-v8_BUILD.gn             |  139 ++
 .../patches/patch-v8_include_v8-internal.h         |   17 +
 chromium-wip/patches/patch-v8_include_v8config.h   |   59 +
 chromium-wip/patches/patch-v8_src_api_api.cc       |   26 +
 chromium-wip/patches/patch-v8_src_base_atomicops.h |   30 +
 .../patches/patch-v8_src_base_platform_memory.h    |   24 +
 .../patch-v8_src_base_platform_platform-freebsd.cc |   38 +
 .../patch-v8_src_base_platform_platform-openbsd.cc |   53 +
 .../patch-v8_src_base_platform_platform-posix.cc   |   82 ++
 chromium-wip/patches/patch-v8_src_base_strings.h   |   18 +
 chromium-wip/patches/patch-v8_src_base_sys-info.cc |   21 +
 ...ch-v8_src_base_utils_random-number-generator.cc |   17 +
 .../patches/patch-v8_src_diagnostics_perf-jit.cc   |   17 +
 .../patches/patch-v8_src_diagnostics_perf-jit.h    |   17 +
 .../patches/patch-v8_src_execution_isolate.cc      |   33 +
 chromium-wip/patches/patch-v8_src_flags_flags.cc   |   30 +
 .../patches/patch-v8_src_libsampler_sampler.cc     |   25 +
 .../patches/patch-v8_src_sandbox_sandbox.cc        |   17 +
 ..._embedded_platform-embedded-file-writer-base.cc |   17 +
 ...t_embedded_platform-embedded-file-writer-base.h |   16 +
 ...bedded_platform-embedded-file-writer-generic.cc |   48 +
 ...tch-v8_src_trap-handler_handler-inside-posix.cc |   43 +
 ...atch-v8_src_trap-handler_handler-inside-posix.h |   17 +
 .../patch-v8_src_trap-handler_trap-handler.h       |   17 +
 ...wasm_baseline_ia32_liftoff-assembler-ia32-inl.h |  134 ++
 chromium-wip/patches/patch-v8_tools_run-paxctl.py  |   25 +
 chromium-wip/patches/patch-v8_tools_run.py         |   17 +
 chromium-wip/tests.mk                              |   59 +
 1473 files changed, 50671 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index b1f48320fc..dbc1b2bae9 100644
--- a/Makefile
+++ b/Makefile
@@ -477,6 +477,7 @@ SUBDIR+=	choosefont
 SUBDIR+=	chora
 SUBDIR+=	chromium
 SUBDIR+=	chromium-depot_tools
+SUBDIR+=	chromium-wip
 SUBDIR+=	chronograf
 SUBDIR+=	chrsh
 SUBDIR+=	chruby
diff --git a/chromium-wip/COMMIT_MSG b/chromium-wip/COMMIT_MSG
new file mode 100644
index 0000000000..4e95ca4acd
--- /dev/null
+++ b/chromium-wip/COMMIT_MSG
@@ -0,0 +1,22 @@
+www/chromium: update to 139.0.7258.66
+
+* 139.0.7258.66
+This update includes 12 security fixes. Below, we highlight fixes
+that were contributed by external researchers. Please see the
+Chrome Security Page for more information.
+[$2000][414760982] Medium CVE-2025-8576: Use after free in Extensions.
+Reported by asnine on 2025-04-30
+[$1000][384050903] Medium CVE-2025-8577: Inappropriate implementation
+in Picture In Picture. Reported by Umar Farooq on 2024-12-14
+[TBD][423387026] Medium CVE-2025-8578: Use after free in Cast.
+Reported by Fayez on 2025-06-09
+[$10000][407791462] Low CVE-2025-8579: Inappropriate implementation in
+Gemini Live in Chrome. Reported by Alesandro Ortiz on 2025-04-02
+[$2000][411544197] Low CVE-2025-8580: Inappropriate implementation in
+Filesystems. Reported by Huuuuu on 2025-04-18
+[$2000][416942878] Low CVE-2025-8581: Inappropriate implementation in
+Extensions. Reported by Vincent Dragnea on 2025-05-11
+[$1000][40089450] Low CVE-2025-8582: Insufficient validation of
+untrusted input in DOM. Reported by Anonymous on 2017-10-31
+[$500][373794472] Low CVE-2025-8583: Inappropriate implementation in
+Permissions. Reported by Shaheen Fazim on 2024-10-16
diff --git a/chromium-wip/DESCR b/chromium-wip/DESCR
new file mode 100644
index 0000000000..2a86084420
--- /dev/null
+++ b/chromium-wip/DESCR
@@ -0,0 +1,3 @@
+Chromium is an open-source browser project that aims to build a
+safer, faster, and more stable way for all Internet users to
+experience the web.
diff --git a/chromium-wip/Makefile b/chromium-wip/Makefile
new file mode 100644
index 0000000000..1c6703c783
--- /dev/null
+++ b/chromium-wip/Makefile
@@ -0,0 +1,373 @@
+# $NetBSD$
+
+DISTNAME=			chromium-${VERSION}
+VERSION=			139.0.7258.66
+CATEGORIES=			www
+MASTER_SITES=			https://commondatastorage.googleapis.com/chromium-browser-official/
+EXTRACT_SUFX_C=			.tar.xz
+
+DISTFILES+=			${DISTNAME}${EXTRACT_SUFX_C}
+
+# audioio source
+A_VERSION=			138.0
+GITHUB_SUBMODULES=		kikadf chromium-audioio v${A_VERSION} media/audio/audioio
+
+# LLVM_MAJOR_VERSION
+LLVM_MV=			19
+
+MAINTAINER=			kikadf.01%gmail.com@localhost
+HOMEPAGE=			https://www.chromium.org/Home
+COMMENT=			Open source web browser
+LICENSE=			modified-bsd AND gnu-lgpl-v3 AND mpl-2.0
+
+USE_TOOLS+=			bash bison flex:pkgsrc gmake pax perl pkg-config
+TOOLS_PLATFORM.flex=		# override the platform definition to use pkgsrc's flex.
+USE_LANGUAGES=			c c++
+
+CHECK_PORTABILITY_SKIP+=	third_party/dawn/third_party/dxc/utils/buildit/build_llvm
+CHECK_PORTABILITY_SKIP+=	third_party/ffmpeg/configure
+CHECK_PORTABILITY_SKIP+=	third_party/fontconfig/src/.gitlab-ci/fedora-cross.sh
+CHECK_PORTABILITY_SKIP+=	third_party/llvm/flang/tools/f18/flang.sh.in
+CHECK_PORTABILITY_SKIP+=	third_party/nearby/src/embedded/build.sh
+CHECK_PORTABILITY_SKIP+=	third_party/protobuf/post_process_dist.sh
+CHECK_PORTABILITY_SKIP+=	third_party/rust-src/vendor/libdbus-sys-0.2.5/vendor/dbus/tools/cmake-format
+CHECK_PORTABILITY_SKIP+=	third_party/rust-toolchain/lib/rustlib/src/rust/vendor/libdbus-sys-0.2.5/vendor/dbus/tools/cmake-format
+CHECK_PORTABILITY_SKIP+=	third_party/sqlite/src/configure
+CHECK_PORTABILITY_SKIP+=	third_party/xdg-utils/scripts/xdg-terminal
+CHECK_PORTABILITY_SKIP+=	third_party/xdg-utils/scripts/xdg-terminal.in
+CHECK_PORTABILITY_SKIP+=	v8/tools/profiling/run-llprof.sh
+CHECK_PORTABILITY_SKIP+=	v8/tools/run-llprof.sh
+
+TOOL_DEPENDS+=			gperf>=3.2:../../devel/gperf
+TOOL_DEPENDS+=			nasm-[0-9]*:../../devel/nasm
+TOOL_DEPENDS+=			ninja-build-[0-9]*:../../devel/ninja-build
+TOOL_DEPENDS+=			${PYPKGPREFIX}-html5lib-[0-9]*:../../textproc/py-html5lib
+TOOL_DEPENDS+=			${PYPKGPREFIX}-beautifulsoup4-[0-9]*:../../www/py-beautifulsoup4
+TOOL_DEPENDS+=			${PYPKGPREFIX}-ply-[0-9]*:../../devel/py-ply
+TOOL_DEPENDS+=			nodejs-[0-9]*:../../lang/nodejs
+TOOL_DEPENDS+=			rust-bindgen-[0-9]*:../../devel/rust-bindgen
+
+DEPENDS+=			xdg-utils-[0-9]*:../../misc/xdg-utils
+
+.include "../../mk/bsd.prefs.mk"
+.include "../../mk/compiler.mk"
+
+# Supported platforms, synced with rust/platform.mk
+.for c_arch in x86_64 aarch64
+ONLY_FOR_PLATFORM+=		NetBSD-1[0-9].*-${c_arch}
+ONLY_FOR_PLATFORM+=		Linux-*-${c_arch}
+ONLY_FOR_PLATFORM+=		Darwin-*-${c_arch}
+ONLY_FOR_PLATFORM+=		FreeBSD-*-${c_arch}
+.endfor
+
+# Workaround for brotli and other commands.
+#BUILDLINK_TRANSFORM.NetBSD+=	rm:-ldl
+
+# Let to chromium use the -Wl,-z,relro flag
+BUILDLINK_TRANSFORM+=		rm:-Wl,-zrelro
+
+# Do not use alloca(3) in libc.
+BUILDLINK_TRANSFORM+=		opt:-std=c11:-std=gnu11
+BUILDLINK_TRANSFORM+=		opt:-std=c99:-std=gnu99
+BUILDLINK_TRANSFORM+=		opt:-std=c++14:-std=gnu++14
+BUILDLINK_TRANSFORM+=		opt:-std=c++17:-std=gnu++17
+BUILDLINK_TRANSFORM+=		opt:-std=c++20:-std=gnu++20
+
+REPLACE_BASH=		chrome/tools/build/linux/chrome-wrapper
+FILES_SUBST+=		PYTHONBIN=${PYTHONBIN:Q}
+
+SUBST_CLASSES+=		path
+SUBST_STAGE.path=	pre-configure
+SUBST_MESSAGE.path=	Fixing pathes
+SUBST_FILES.path+=	base/base_paths_posix.cc
+SUBST_FILES.path+=	base/process/process_handle_openbsd.cc
+SUBST_FILES.path+=	build/rust/rust_bindgen.gni
+SUBST_FILES.path+=	build/rust/rust_bindgen_generator.gni
+SUBST_FILES.path+=	chrome/common/chrome_paths.cc
+SUBST_FILES.path+=	chromium.sh
+SUBST_FILES.path+=	components/policy/core/common/policy_paths.cc
+SUBST_FILES.path+=	sandbox/policy/openbsd/sandbox_openbsd.cc
+SUBST_FILES.path+=	services/device/hid/hid_service_freebsd.cc
+SUBST_FILES.path+=	services/device/time_zone_monitor/time_zone_monitor_linux.cc
+SUBST_FILES.path+=	third_party/pdfium/core/fxge/linux/fx_linux_impl.cpp
+SUBST_FILES.path+=	third_party/perfetto/src/base/utils.cc
+#SUBST_FILES.path+=	ui/gtk/ime_compat_check.cc
+SUBST_FILES.path+=	v8/tools/run-paxctl.py
+SUBST_VARS.path+=	PREFIX PKG_SYSCONFBASE VARBASE QTDIR X11BASE PYTHONBIN
+
+SUBST_CLASSES+=		man
+SUBST_STAGE.man=	pre-configure
+SUBST_MESSAGE.man=	Fixing manpage
+SUBST_FILES.man+=	chrome/app/resources/manpage.1.in
+SUBST_SED.man+=		-e 's,@@PACKAGE@@,chromium,g'
+SUBST_SED.man+=		-e 's,@@MENUNAME@@,Chromium Web Browser,g'
+
+.include "options.mk"
+
+SUBST_CLASSES+=		pulse
+SUBST_STAGE.pulse=	pre-configure
+SUBST_MESSAGE.pulse=	Set BUILT_WITH_PULSE to ${WITH_PA} in chromium wrapper
+SUBST_FILES.pulse+=	chromium.sh
+SUBST_SED.pulse+=	-e 's,@PULSE@,${WITH_PA},g'
+
+.include "tests.mk"
+
+BUILDTYPE=	Release
+MAKE_ENV+=	BUILDTYPE=${BUILDTYPE}
+MAKE_ENV+=	GPERF=${PREFIX}/bin/gperf
+TARGET=		chrome chromedriver
+
+# These libraries are used from the system and the build infrastructure
+# removes them from the bundled third_party directory and replaces them
+# with hooks to use them from the system.
+GN_SYSTEM_LIBS=		dav1d
+GN_SYSTEM_LIBS+=	fontconfig
+GN_SYSTEM_LIBS+=	icu
+GN_SYSTEM_LIBS+=	libaom
+GN_SYSTEM_LIBS+=	libjpeg # libjpeg-turbo
+GN_SYSTEM_LIBS+=	libpng
+GN_SYSTEM_LIBS+=	libvpx
+GN_SYSTEM_LIBS+=	libxml
+GN_SYSTEM_LIBS+=	libxslt
+GN_SYSTEM_LIBS+=	openh264
+GN_SYSTEM_LIBS+=	opus
+
+GN_ARGS+=	clang_use_chrome_plugins=false
+GN_ARGS+=	disable_fieldtrial_testing_config=true
+GN_ARGS+=	enable_backup_ref_ptr_support=false
+GN_ARGS+=	enable_hangout_services_extension=true
+GN_ARGS+=	enable_remoting=false
+GN_ARGS+=	fatal_linker_warnings=false
+GN_ARGS+=	icu_use_data_file=false
+GN_ARGS+=	is_cfi=false
+GN_ARGS+=	is_clang=true
+GN_ARGS+=	is_component_build=false
+GN_ARGS+=	is_debug=false
+GN_ARGS+=	is_official_build=true
+GN_ARGS+=	moc_qt6_path=\"${PREFIX}/qt6/libexec\"
+GN_ARGS+=	optimize_webui=true
+GN_ARGS+=	thin_lto_enable_optimizations=true
+GN_ARGS+=	treat_warnings_as_errors=false
+GN_ARGS+=	use_allocator_shim=false
+GN_ARGS+=	use_cups=true
+GN_ARGS+=	use_custom_libcxx=true
+GN_ARGS+=	use_custom_libunwind=true
+GN_ARGS+=	use_kerberos=false
+GN_ARGS+=	use_lld=false
+GN_ARGS+=	use_partition_alloc=true
+GN_ARGS+=	use_partition_alloc_as_malloc=false
+GN_ARGS+=	use_qt5=false
+GN_ARGS+=	use_qt6=true
+GN_ARGS+=	use_sndio=false
+GN_ARGS+=	use_sysroot=false
+GN_ARGS+=	use_system_freetype=true
+GN_ARGS+=	use_system_harfbuzz=true
+GN_ARGS+=	use_system_libdrm=true
+GN_ARGS+=	use_system_libjpeg=true #libjpeg-turbo
+GN_ARGS+=	use_thin_lto=false
+GN_ARGS+=	use_udev=false
+GN_ARGS+=	use_vaapi=false
+GN_ARGS+=	v8_enable_cet_ibt=true
+
+# flags
+CFLAGS+=	-fno-stack-protector
+CFLAGS+=	-isystem${PREFIX}/lib/clang/${LLVM_MV}/include # third_party/zlib with clang
+CFLAGS+=	-Wno-error=unused-command-line-argument
+CFLAGS+=	-Wno-unknown-warning-option
+
+EXTRA_LDFLAGS=	-L${PREFIX}/lib \
+		-L${X11BASE}/lib \
+		${COMPILER_RPATH_FLAG}${PREFIX}/lib \
+		${COMPILER_RPATH_FLAG}${PREFIX}/lib/nspr \
+		${COMPILER_RPATH_FLAG}${PREFIX}/lib/nss \
+		${COMPILER_RPATH_FLAG}${X11BASE}/lib
+EXTRA_CXXFLAGS=	-Wno-unknown-warning-option \
+		-I${BUILDLINK_DIR}/include \
+		-I${BUILDLINK_DIR}/include/libepoll-shim \
+		-I${BUILDLINK_DIR}/include/glib \
+		-I${BUILDLINK_DIR}/include/nss
+
+# rust
+RUSTC_VERSION=	rustc -V
+MAKE_ENV+=	RUSTC_BOOTSTRAP=1
+GN_ARGS+=	enable_rust=true \
+		rust_sysroot_absolute=\"${PREFIX}\" \
+		rustc_version=\"${RUSTC_VERSION:sh}\"
+
+PLIST_VARS+=		swiftshader
+.if ${MACHINE_ARCH} == "aarch64"
+FFMPEG_TARGET=		arm64
+.elif ${MACHINE_ARCH} == "x86_64"
+PLIST.swiftshader=	yes
+FFMPEG_TARGET=		x64
+.endif
+
+GN_ARGS+=	extra_cxxflags=\"${EXTRA_CXXFLAGS}\" \
+		extra_ldflags=\"${EXTRA_LDFLAGS}\"
+
+# Proprietary codecs are enabled.
+FFMPEG_BRAND=	Chrome
+FFMPEG_BDIR=	${WRKSRC}/third_party/ffmpeg/build.${FFMPEG_TARGET}.${LOWER_OPSYS}/${FFMPEG_BRAND}
+FFMPEG_CDIR=	${WRKSRC}/third_party/ffmpeg/chromium/config/${FFMPEG_BRAND}/${LOWER_OPSYS}/${FFMPEG_TARGET}
+
+GN_ARGS+=	proprietary_codecs=true \
+		ffmpeg_branding=\"${FFMPEG_BRAND}\"
+
+GN_BOOTSTRAP_FLAGS+=	--no-clean --no-rebuild
+GN_BOOTSTRAP_FLAGS+=	--skip-generate-buildfiles
+
+# API key and OAuth credential for Google.
+# This is pkgsrc use only.
+GN_ARGS+=	google_api_key=\"AIzaSyAT_3ogzNMKbBMFk3xQ6T35fg52Y9GrFBg\"
+#GN_ARGS+=	google_default_client_id=\"74061691103-faqqnan75j2s8ej3p7lh2k98dhkee816.apps.googleusercontent.com\"
+#GN_ARGS+=	google_default_client_secret=\"3R9TyUv14OXgzJnZi6Ismela\"
+
+NOT_PAX_MPROTECT_SAFE+=	lib/chromium/chrome
+#NOT_PAX_ASLR_SAFE+=	lib/chromium/chrome
+
+PKG_CC=			clang
+PKG_CXX=		clang++
+
+post-extract:
+	${CP} ${FILESDIR}/chromium.sh.in ${WRKSRC}/chromium.sh
+
+pre-configure:
+	# Prepare internal ffmpeg
+	cd ${WRKSRC}/media/ffmpeg && \
+		${PYTHONBIN} scripts/build_ffmpeg.py \
+		${LOWER_OPSYS} ${FFMPEG_TARGET} --config-only --branding=${FFMPEG_BRAND}
+	cd ${FFMPEG_BDIR} && ${GMAKE} ffversion.h
+	${INSTALL_DATA_DIR} ${FFMPEG_CDIR}
+.for ffmpeg_part in config.h config.asm config_components.h libavcodec libavformat libavutil
+	cp -pR ${FFMPEG_BDIR}/${ffmpeg_part} ${FFMPEG_CDIR}
+.endfor
+
+	# Create symlink to NetBSD nodejs command.
+	${MKDIR} ${WRKSRC}/third_party/node/${LOWER_OPSYS}/node-${LOWER_OPSYS}/bin
+	${LN} -sf ${PREFIX}/bin/node \
+		${WRKSRC}/third_party/node/${LOWER_OPSYS}/node-${LOWER_OPSYS}/bin/node
+
+do-configure:
+	cd ${WRKSRC} && \
+		${SETENV} ${MAKE_ENV} ${PYTHONBIN} ./build/linux/unbundle/replace_gn_files.py \
+		--system-libraries ${GN_SYSTEM_LIBS} || ${FALSE}
+
+	cd ${WRKSRC}/tools/gn && \
+		${SETENV} ${MAKE_ENV} ${PYTHONBIN} bootstrap/bootstrap.py ${GN_BOOTSTRAP_FLAGS}
+
+	cd ${WRKSRC} && \
+		${SETENV} ${CONFIGURE_ENV} ./out/${BUILDTYPE}/gn \
+		gen --args="${GN_ARGS}" --script-executable="${PYTHONBIN}" ${GN_VERBOSE} out/${BUILDTYPE}
+
+do-build:
+	${RUN} ${_ULIMIT_CMD} cd ${WRKSRC} && \
+	${SETENV} ${MAKE_ENV} ${PREFIX}/bin/ninja -j ${_MAKE_JOBS_N} -C out/${BUILDTYPE} ${TARGET}
+
+
+CHROMIUM=		chromium
+BUILDDIR=		${WRKSRC}/out/${BUILDTYPE}
+INSTALLATION_DIRS+=	lib/${CHROMIUM}
+INSTALLATION_DIRS+=	bin
+INSTALLATION_DIRS+=	${PKGMANDIR}/man1
+INSTALLATION_DIRS+=	share/applications
+INSTALLATION_DIRS+=	share/doc/${CHROMIUM}
+
+ICON_SIZES=		22_mono 24 48 64 128 256
+.for i in ${ICON_SIZES}
+ICONS_DIR${i}+=		share/icons/hicolor/${i}x${i}/apps
+INSTALLATION_DIRS+=	${ICONS_DIR${i}}
+.endfor
+
+CHROMIUM_LIBS+=		libEGL.so
+CHROMIUM_LIBS+=		libGLESv2.so
+CHROMIUM_LIBS+=		libVkICD_mock_icd.so
+.if ${MACHINE_ARCH} != "aarch64"
+CHROMIUM_LIBS+=		libvk_swiftshader.so
+CHROMIUM_LIBS+=		vk_swiftshader_icd.json
+.endif
+
+do-install:
+	${INSTALL_SCRIPT} ${WRKSRC}/${CHROMIUM}.sh ${DESTDIR}${PREFIX}/bin/${CHROMIUM}
+	${INSTALL_DATA} ${FILESDIR}/chromium-browser.desktop ${DESTDIR}${PREFIX}/share/applications
+	${INSTALL_DATA} ${FILESDIR}/README ${DESTDIR}${PREFIX}/share/doc/${CHROMIUM}
+	${INSTALL_PROGRAM} ${BUILDDIR}/chrome ${DESTDIR}${PREFIX}/lib/${CHROMIUM}
+	${INSTALL_PROGRAM} ${BUILDDIR}/chromedriver.unstripped  ${DESTDIR}${PREFIX}/bin/chromedriver
+.for i in ${CHROMIUM_LIBS}
+	${INSTALL_LIB} ${BUILDDIR}/${i} ${DESTDIR}${PREFIX}/lib/${CHROMIUM}
+.endfor
+	${INSTALL_LIB} ${BUILDDIR}/libvulkan.so.1 ${DESTDIR}${PREFIX}/lib/${CHROMIUM}/libvulkan.so
+	${INSTALL_DATA} ${WRKSRC}/chrome/app/resources/manpage.1.in \
+		 ${DESTDIR}/${PREFIX}/${PKGMANDIR}/man1/${CHROMIUM}.1
+	${INSTALL_DATA} ${BUILDDIR}/*.pak ${DESTDIR}${PREFIX}/lib/${CHROMIUM}
+.for i in ${ICON_SIZES}
+	${INSTALL_DATA} ${WRKSRC}/chrome/app/theme/chromium/product_logo_${i}.png \
+		${DESTDIR}${PREFIX}/${ICONS_DIR${i}}/${CHROMIUM}.png
+.endfor
+.for i in locales resources
+	cd ${WRKSRC}/out/${BUILDTYPE} && \
+		${FIND} ${i} -type f -print | pax -rw -pmp ${DESTDIR}${PREFIX}/lib/${CHROMIUM}
+.endfor
+.for f in snapshot_blob.bin v8_context_snapshot.bin
+	${INSTALL_DATA} ${BUILDDIR}/${f} ${DESTDIR}${PREFIX}/lib/${CHROMIUM}
+.endfor
+
+.include "../../archivers/bzip2/buildlink3.mk"
+.include "../../audio/libopus/buildlink3.mk"
+.include "../../audio/speech-dispatcher/buildlink3.mk"
+.include "../../audio/speex/buildlink3.mk"
+.include "../../devel/dconf/buildlink3.mk"
+.include "../../devel/libepoll-shim/buildlink3.mk"
+.include "../../devel/libusb1/buildlink3.mk"
+.include "../../devel/nspr/buildlink3.mk"
+.include "../../devel/nss/buildlink3.mk"
+.include "../../fonts/fontconfig/buildlink3.mk"
+.include "../../fonts/harfbuzz/buildlink3.mk"
+.include "../../graphics/cairo/buildlink3.mk"
+.include "../../graphics/freetype2/buildlink3.mk"
+.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
+.include "../../graphics/libexif/buildlink3.mk"
+.include "../../graphics/libwebp/buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
+BUILDLINK_DEPMETHOD.clang=	build
+.include "../../lang/clang/buildlink3.mk"
+.include "../../lang/compiler-rt/buildlink3.mk"
+.include "../../lang/python/tool.mk"
+.include "../../lang/rust/rust.mk"
+.include "../../misc/usbids/buildlink3.mk"
+.include "../../mk/jpeg.buildlink3.mk" # libjpeg-turbo
+.include "../../multimedia/dav1d/buildlink3.mk"
+.include "../../multimedia/libaom/buildlink3.mk"
+.include "../../multimedia/libvpx/buildlink3.mk"
+.include "../../multimedia/openh264/buildlink3.mk"
+.include "../../print/libcups/buildlink3.mk"
+.include "../../security/libgnome-keyring/buildlink3.mk"
+.include "../../security/libsecret/buildlink3.mk"
+.include "../../security/libgcrypt/buildlink3.mk"
+.include "../../sysutils/dbus/buildlink3.mk"
+.include "../../sysutils/dbus-glib/buildlink3.mk"
+.include "../../sysutils/desktop-file-utils/desktopdb.mk"
+.include "../../sysutils/pciutils/buildlink3.mk"
+# Use -lpciutils instead of -lpci for pkgsrc.
+BUILDLINK_TRANSFORM+=	l:pci:pciutils
+.include "../../textproc/expat/buildlink3.mk"
+.include "../../textproc/icu/buildlink3.mk"
+.include "../../textproc/jsoncpp/buildlink3.mk"
+.include "../../textproc/libxml2/buildlink3.mk"
+.include "../../textproc/libxslt/buildlink3.mk"
+.include "../../x11/gtk3/buildlink3.mk"
+.include "../../x11/xorgproto/buildlink3.mk"
+.include "../../x11/libdrm/buildlink3.mk"
+.include "../../x11/libX11/buildlink3.mk"
+.include "../../x11/libxcb/buildlink3.mk"
+.include "../../x11/libXcomposite/buildlink3.mk"
+.include "../../x11/libXcursor/buildlink3.mk"
+.include "../../x11/libXdamage/buildlink3.mk"
+.include "../../x11/libXext/buildlink3.mk"
+.include "../../x11/libXfixes/buildlink3.mk"
+.include "../../x11/libXi/buildlink3.mk"
+.include "../../x11/libXrandr/buildlink3.mk"
+.include "../../x11/libXrender/buildlink3.mk"
+.include "../../x11/libXScrnSaver/buildlink3.mk"
+.include "../../x11/libXtst/buildlink3.mk"
+.include "../../x11/qt6-qtbase/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/chromium-wip/PLIST b/chromium-wip/PLIST
new file mode 100644
index 0000000000..0298ce346a
--- /dev/null
+++ b/chromium-wip/PLIST
@@ -0,0 +1,140 @@
+@comment $NetBSD$
+bin/chromedriver
+bin/chromium
+lib/chromium/chrome
+lib/chromium/chrome_100_percent.pak
+lib/chromium/chrome_200_percent.pak
+lib/chromium/headless_command_resources.pak
+lib/chromium/libEGL.so
+lib/chromium/libGLESv2.so
+lib/chromium/libVkICD_mock_icd.so
+${PLIST.swiftshader}lib/chromium/libvk_swiftshader.so
+lib/chromium/libvulkan.so
+lib/chromium/locales/af.pak
+lib/chromium/locales/af.pak.info
+lib/chromium/locales/am.pak
+lib/chromium/locales/am.pak.info
+lib/chromium/locales/ar.pak
+lib/chromium/locales/ar.pak.info
+lib/chromium/locales/bg.pak
+lib/chromium/locales/bg.pak.info
+lib/chromium/locales/bn.pak
+lib/chromium/locales/bn.pak.info
+lib/chromium/locales/ca.pak
+lib/chromium/locales/ca.pak.info
+lib/chromium/locales/cs.pak
+lib/chromium/locales/cs.pak.info
+lib/chromium/locales/da.pak
+lib/chromium/locales/da.pak.info
+lib/chromium/locales/de.pak
+lib/chromium/locales/de.pak.info
+lib/chromium/locales/el.pak
+lib/chromium/locales/el.pak.info
+lib/chromium/locales/en-GB.pak
+lib/chromium/locales/en-GB.pak.info
+lib/chromium/locales/en-US.pak
+lib/chromium/locales/en-US.pak.info
+lib/chromium/locales/es-419.pak
+lib/chromium/locales/es-419.pak.info
+lib/chromium/locales/es.pak
+lib/chromium/locales/es.pak.info
+lib/chromium/locales/et.pak
+lib/chromium/locales/et.pak.info
+lib/chromium/locales/fa.pak
+lib/chromium/locales/fa.pak.info
+lib/chromium/locales/fi.pak
+lib/chromium/locales/fi.pak.info
+lib/chromium/locales/fil.pak
+lib/chromium/locales/fil.pak.info
+lib/chromium/locales/fr.pak
+lib/chromium/locales/fr.pak.info
+lib/chromium/locales/gu.pak
+lib/chromium/locales/gu.pak.info
+lib/chromium/locales/he.pak
+lib/chromium/locales/he.pak.info
+lib/chromium/locales/hi.pak
+lib/chromium/locales/hi.pak.info
+lib/chromium/locales/hr.pak
+lib/chromium/locales/hr.pak.info
+lib/chromium/locales/hu.pak
+lib/chromium/locales/hu.pak.info
+lib/chromium/locales/id.pak
+lib/chromium/locales/id.pak.info
+lib/chromium/locales/it.pak
+lib/chromium/locales/it.pak.info
+lib/chromium/locales/ja.pak
+lib/chromium/locales/ja.pak.info
+lib/chromium/locales/kn.pak
+lib/chromium/locales/kn.pak.info
+lib/chromium/locales/ko.pak
+lib/chromium/locales/ko.pak.info
+lib/chromium/locales/lt.pak
+lib/chromium/locales/lt.pak.info
+lib/chromium/locales/lv.pak
+lib/chromium/locales/lv.pak.info
+lib/chromium/locales/ml.pak
+lib/chromium/locales/ml.pak.info
+lib/chromium/locales/mr.pak
+lib/chromium/locales/mr.pak.info
+lib/chromium/locales/ms.pak
+lib/chromium/locales/ms.pak.info
+lib/chromium/locales/nb.pak
+lib/chromium/locales/nb.pak.info
+lib/chromium/locales/nl.pak
+lib/chromium/locales/nl.pak.info
+lib/chromium/locales/pl.pak
+lib/chromium/locales/pl.pak.info
+lib/chromium/locales/pt-BR.pak
+lib/chromium/locales/pt-BR.pak.info
+lib/chromium/locales/pt-PT.pak
+lib/chromium/locales/pt-PT.pak.info
+lib/chromium/locales/ro.pak
+lib/chromium/locales/ro.pak.info
+lib/chromium/locales/ru.pak
+lib/chromium/locales/ru.pak.info
+lib/chromium/locales/sk.pak
+lib/chromium/locales/sk.pak.info
+lib/chromium/locales/sl.pak
+lib/chromium/locales/sl.pak.info
+lib/chromium/locales/sr.pak
+lib/chromium/locales/sr.pak.info
+lib/chromium/locales/sv.pak
+lib/chromium/locales/sv.pak.info
+lib/chromium/locales/sw.pak
+lib/chromium/locales/sw.pak.info
+lib/chromium/locales/ta.pak
+lib/chromium/locales/ta.pak.info
+lib/chromium/locales/te.pak
+lib/chromium/locales/te.pak.info
+lib/chromium/locales/th.pak
+lib/chromium/locales/th.pak.info
+lib/chromium/locales/tr.pak
+lib/chromium/locales/tr.pak.info
+lib/chromium/locales/uk.pak
+lib/chromium/locales/uk.pak.info
+lib/chromium/locales/ur.pak
+lib/chromium/locales/ur.pak.info
+lib/chromium/locales/vi.pak
+lib/chromium/locales/vi.pak.info
+lib/chromium/locales/zh-CN.pak
+lib/chromium/locales/zh-CN.pak.info
+lib/chromium/locales/zh-TW.pak
+lib/chromium/locales/zh-TW.pak.info
+lib/chromium/resources.pak
+lib/chromium/resources/accessibility/reading_mode_gdocs_helper/content.js
+lib/chromium/resources/accessibility/reading_mode_gdocs_helper/gdocs_script.js
+lib/chromium/resources/accessibility/reading_mode_gdocs_helper_manifest.json
+lib/chromium/resources/inspector_overlay/inspector_overlay_resources.grd
+lib/chromium/resources/inspector_overlay/main.js
+lib/chromium/snapshot_blob.bin
+lib/chromium/v8_context_snapshot.bin
+${PLIST.swiftshader}lib/chromium/vk_swiftshader_icd.json
+man/man1/chromium.1
+share/applications/chromium-browser.desktop
+share/doc/chromium/README
+share/icons/hicolor/128x128/apps/chromium.png
+share/icons/hicolor/22_monox22_mono/apps/chromium.png
+share/icons/hicolor/24x24/apps/chromium.png
+share/icons/hicolor/256x256/apps/chromium.png
+share/icons/hicolor/48x48/apps/chromium.png
+share/icons/hicolor/64x64/apps/chromium.png
diff --git a/chromium-wip/TODO b/chromium-wip/TODO
new file mode 100644
index 0000000000..e611a939c9
--- /dev/null
+++ b/chromium-wip/TODO
@@ -0,0 +1,17 @@
+To Do:
+
+0) Build on NetBSD-10 amd64
+
+1) Audio backends
+ a) NetBSD uses sunaudio (https://github.com/kikadf/chromium-audioio)
+ b) FreeBSD uses pulseaudio
+
+If pulseaudio not run, chromium can't start it, so no sound:
+VERBOSE1:pulse_util.cc(261)] Failed to connect to the context. Error: Connection refused
+WARNING:audio_manager_linux.cc(53)] Falling back to ALSA for audio output. PulseAudio is not available or could not be initialized.
+
+If pulseaudio already started, chromium can join it, and has sound.
+This is the workaround, see the files/chromium.sh.in launch wrapper.
+
+2) HID doesn't work on NetBSD.
+NOTE: For this OpenBSD uses libudev-openbsd, FreeBSD uses devd.
diff --git a/chromium-wip/distinfo b/chromium-wip/distinfo
new file mode 100644
index 0000000000..6f8676ebaa
--- /dev/null
+++ b/chromium-wip/distinfo
@@ -0,0 +1,1472 @@
+$NetBSD$
+
+BLAKE2s (chromium-139.0.7258.66-testdata.tar.xz) = 53300340a140ef174371cdf80f899bcc057174f3d7d329c194303b3b9ea5fa09
+SHA512 (chromium-139.0.7258.66-testdata.tar.xz) = 594c5c3e489224d569b34514e829994126f1a540f7721870629fdf1b5d9e9a187616bcc2b91677a73cb35a998abbd5c38100a08267e801f009a0af00936cd136
+Size (chromium-139.0.7258.66-testdata.tar.xz) = 925126424 bytes
+BLAKE2s (chromium-139.0.7258.66.tar.xz) = 46273716c720c44d90de0c2a350f085b0284e4affcb0e37fdc8b62ea2688f7ba
+SHA512 (chromium-139.0.7258.66.tar.xz) = a46da6bd5d6b1f1d1a45c1854c9bb2ee2c52a4d228153313c5ee400ae11610056327362a09e417ba5b34d38a435b5f5710aaa4b72bafd74e1ce5bc6440b5ea07
+Size (chromium-139.0.7258.66.tar.xz) = 7263962432 bytes
+BLAKE2s (kikadf-chromium-audioio-v138.0.tar.gz) = d516e79f2de7f3fc0154fb01df665cc4b29f4f8dcf9353f0718ac8e3984f80a8
+SHA512 (kikadf-chromium-audioio-v138.0.tar.gz) = 55cdbc80f60b65c30ad0af2dcbaa0707c9e295f77a795326c7b629913e828e56b577a92c1d4d623c2cbd1497c4a3e23ff9e6412fdb6c113fb99f232eedf5783b
+Size (kikadf-chromium-audioio-v138.0.tar.gz) = 8455 bytes
+SHA1 (patch-BUILD.gn) = 14d168217b4f40e088164a5738d2e7f1cd0bb118
+SHA1 (patch-apps_ui_views_app__window__frame__view.cc) = 99d39c46404fd011c44bb2e8e1caaa2ac23ba6f1
+SHA1 (patch-base_BUILD.gn) = 92369afe3d06e9edf26ad68e712dafb9f7226095
+SHA1 (patch-base_allocator_dispatcher_tls.h) = 68a6a435e7ebedd97b9c6679d7ef1db7e5285385
+SHA1 (patch-base_allocator_partition__alloc__features.cc) = dfb53fa025378155296b368fba8642f1f9210392
+SHA1 (patch-base_allocator_partition__allocator_partition__alloc.gni) = 6f12a8738d8807a2e7110b97dbfd90d5ef0876fe
+SHA1 (patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn) = 4eb3f1ec4c94fe600227c3e87c223e88ff8d5367
+SHA1 (patch-base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h) = e252688ee3eded105a9bd51418068b694b501a48
+SHA1 (patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator.h) = 097dc399d8dbcca56ca78272e7fb185eb456c0a4
+SHA1 (patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h) = 2e03805ad051fab6f28102ec2deb400fb92c16ce
+SHA1 (patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.cc) = 96aedcb087d28997c8f2b9d500ccec2ee75ac7c4
+SHA1 (patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h) = 7342805d8f0857f8c1da12a40417d0e72ff1f1db
+SHA1 (patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_proc__maps__linux.cc) = 8b813c20b3725c7f987523f01557a48979a3d0a9
+SHA1 (patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_stack__trace__posix.cc) = a156dcdfc47e753d0128fef7c7647816f7ec18c2
+SHA1 (patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_rand__util__posix.cc) = 7220afb785114fcbea0bff8fdada98f1370c0ca3
+SHA1 (patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread.h) = 96332377dc7d661e84cb06b9a23f86cc6c317592
+SHA1 (patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__internal__posix.h) = 9d65e11c5205637764ab5791cbeb132a92073251
+SHA1 (patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__posix.cc) = 80071f03511cfee4ca9fc4b27bac92a3c85d445e
+SHA1 (patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h) = 114d300c345911616c55c29a05b39167495c43e7
+SHA1 (patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h) = 4cdda434abc3195c70e93c14427731c2f1f280aa
+SHA1 (patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__forward.h) = f15ffd1e0d582b0058f883a6916ec241c45fdda5
+SHA1 (patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc) = fe3ce37f51ccadd063370a8af8d924313025b98a
+SHA1 (patch-base_allocator_partition__allocator_src_partition__alloc_spinning__mutex.cc) = a87193bb3ca60b2b1fb8a8f13a638dfaf754eebf
+SHA1 (patch-base_allocator_partition__allocator_src_partition__alloc_stack_stack.cc) = 4a43b712f389925e4edaa4db0fbe7eee1daf4819
+SHA1 (patch-base_allocator_partition__allocator_src_partition__alloc_thread__isolation_pkey.cc) = ec0ed74cb787b74c16acf5065bf29c08f9198d82
+SHA1 (patch-base_atomicops.h) = 3c0c68c0f19e2709db8e3214142df0dfe1c8c24f
+SHA1 (patch-base_base__paths__posix.cc) = 46da23a46ff318d3905ab8f3fbf47409de1be5ce
+SHA1 (patch-base_compiler__specific.h) = a65b9faebedc29e8b28161b62cbf1d977e6e2143
+SHA1 (patch-base_debug_debugger__posix.cc) = 6a624f857cb07435fc16c969925eb8e33496243d
+SHA1 (patch-base_debug_elf__reader.cc) = 5d183dce4eccc37b9b1fb110afb7bd0fde23fdc3
+SHA1 (patch-base_debug_proc__maps__linux.cc) = 23c6b0fce8cad2feafa81c4d3a943dc98d3c2608
+SHA1 (patch-base_debug_stack__trace.cc) = b13f8dd84c12bdc808c310c6ff8821efdb094f43
+SHA1 (patch-base_debug_stack__trace__posix.cc) = 6dbb244acb0cbd8ba61e4646b19d4cb3954a3b00
+SHA1 (patch-base_files_dir__reader__linux.h) = 56f056d2944bfbe735ff59bf46e3f3302449b896
+SHA1 (patch-base_files_dir__reader__posix.h) = 7d23121012997d1cdd240798af9647af7a755b6a
+SHA1 (patch-base_files_drive__info.h) = a280f85bd35e80034dfc836c209546fd24ac76b1
+SHA1 (patch-base_files_drive__info__posix.cc) = f32dd4e7c024f729330c704c6efa8cbf9eb5e327
+SHA1 (patch-base_files_file__path__watcher.h) = 5e9d5f368b549cf33e4370e829650aba52ed23e2
+SHA1 (patch-base_files_file__path__watcher__bsd.cc) = 9fb553845880fa7844ec71c2d6e6cafd24d0525b
+SHA1 (patch-base_files_file__path__watcher__kqueue.h) = 532ae5b2590e2f32e01f4aafbbbfb79e5d86fbfa
+SHA1 (patch-base_files_file__path__watcher__unittest.cc) = d8dee5d8498f6486aecb222d46e0d2e73ff366b3
+SHA1 (patch-base_files_file__util__posix.cc) = 7240cbd0da632c6d9d46ed71d6e0441bb7e74d03
+SHA1 (patch-base_files_file__util__unittest.cc) = ef607a86016d17f3dd34f6155f94ac30180dbdfe
+SHA1 (patch-base_files_important__file__writer__cleaner.cc) = 7d66fd02d9334030251b0f5b0eabe8a0142c9e56
+SHA1 (patch-base_files_scoped__file.cc) = ba94967bcb0b82bf33b9ece2d659b5f2c7a546c8
+SHA1 (patch-base_functional_unretained__traits.h) = db1656afd04feb467b55b66b30ba0cf28851e2a4
+SHA1 (patch-base_i18n_icu__util.cc) = 080e71ee176a5dfdc74ad0a34eb988084183cdce
+SHA1 (patch-base_linux__util.cc) = 9fb071396fb2a7ee4a74509c1e2cc2c51883e003
+SHA1 (patch-base_logging__unittest.cc) = f73277818e33883f739be1caebdcdfd996cd4581
+SHA1 (patch-base_memory_discardable__memory.cc) = 3dcc58e00d3b9a86fb750a907d6ad68694e52649
+SHA1 (patch-base_memory_discardable__memory__internal.h) = bc5adafe8f61061111a48efc6a1a250d165c51af
+SHA1 (patch-base_memory_madv__free__discardable__memory__posix.cc) = e611e8dcc07e3825d8f35ec0c9d91addf9d22b29
+SHA1 (patch-base_memory_platform__shared__memory__region.h) = cec6f575bd769fbfeb96ed46e07ac8a1f70bceaa
+SHA1 (patch-base_memory_platform__shared__memory__region__posix.cc) = b8cd3f80aab37514e7329aeb72726a74169b707a
+SHA1 (patch-base_memory_protected__memory.h) = 43fd7624a2891def76c8fca4c96f9df6f90a6ebd
+SHA1 (patch-base_memory_protected__memory__posix.cc) = 9b14da15b956d7fa2dd1b0bc4e4bb8553e940d0f
+SHA1 (patch-base_message__loop_message__pump__epoll.cc) = 3c42d63da653f17a49c9c4600fec3e2a68ce9a64
+SHA1 (patch-base_message__loop_message__pump__epoll.h) = 1bf3ad2739588c17a296318967284757a497e92c
+SHA1 (patch-base_message__loop_message__pump__glib.cc) = d98857d580284c5f1d91ed59a1aacce1798adf1d
+SHA1 (patch-base_native__library__posix.cc) = ace08858c80675041c409a8db3c1abca3cb5e86a
+SHA1 (patch-base_native__library__unittest.cc) = e0810910518c28408a587794bda7efb930d8d77c
+SHA1 (patch-base_posix_can__lower__nice__to.cc) = 63b9567cfffe482e1e66220c43b4dbe95412f2f3
+SHA1 (patch-base_posix_file__descriptor__shuffle.h) = 2d8e3f84b889f65b4ed30452146a6c2ebf08ea80
+SHA1 (patch-base_posix_sysctl.cc) = a0f2029bc7a9f2da5b0ae2814d10c5b85051b7bb
+SHA1 (patch-base_posix_unix__domain__socket.cc) = 4be7fcd83bbcb5a29dfc4859444d73b9e2f8f1a4
+SHA1 (patch-base_posix_unix__domain__socket__unittest.cc) = d324654064c29837ce0eb87cdb125345d8b95d3e
+SHA1 (patch-base_process_internal__linux.h) = 5b0d617e8ad75df7c131ba18ee700dd65c24bd8f
+SHA1 (patch-base_process_kill.h) = e94337b080135cc0de89d31f3f32ea28a1739d49
+SHA1 (patch-base_process_kill__posix.cc) = d4fdd35b9aaf69ffcec2c662ee88bc1c3251a545
+SHA1 (patch-base_process_launch.h) = 54ee4db72e6a729ade11a8183c27237862fee651
+SHA1 (patch-base_process_launch__posix.cc) = 950b69b53b2d24a1fa188817b3db02f238d55c0d
+SHA1 (patch-base_process_memory__linux.cc) = 714a66f34209ae0c7bee328a07525d328b926286
+SHA1 (patch-base_process_process__handle.cc) = 8f1efd6ea5324a39fbd6f725481331a54072d87c
+SHA1 (patch-base_process_process__handle.h) = 48e696a8bdf0095e56ab5cb0bd911447f20c29ef
+SHA1 (patch-base_process_process__handle__freebsd.cc) = bebe79f83fa173ca400f2ea42ffc65882b365279
+SHA1 (patch-base_process_process__handle__netbsd.cc) = c01bd38af07d3b97d9a5f336c1168eb578a1e646
+SHA1 (patch-base_process_process__handle__openbsd.cc) = f687c787c613d12267ddd7f4664f059e2b04a8e1
+SHA1 (patch-base_process_process__iterator.h) = b580e018b6ba2a3699a6996b115a52888a691d09
+SHA1 (patch-base_process_process__iterator__freebsd.cc) = 902fe1ff73ada1bffd8a20ee147a4bc095c6f6ac
+SHA1 (patch-base_process_process__iterator__netbsd.cc) = fcad5250beae7da3e998f7d54a12b75f0f5d00e3
+SHA1 (patch-base_process_process__iterator__openbsd.cc) = a59259e28035848c09e801b90325b91bdf11f468
+SHA1 (patch-base_process_process__metrics.cc) = 4eb8abb9b2ab1ff3b4d241c9f8b2984873a68fee
+SHA1 (patch-base_process_process__metrics.h) = 9a93912242826d0dd4b5be5c5bc543274f941586
+SHA1 (patch-base_process_process__metrics__freebsd.cc) = af73fe361b315fab348593fc7f22186ca284d6d3
+SHA1 (patch-base_process_process__metrics__netbsd.cc) = 7689c0fb55e95cd420b80bb3211ad4346ad9b2d6
+SHA1 (patch-base_process_process__metrics__openbsd.cc) = a5a5504573385ba3f67faf90ea73d140bcd8d16a
+SHA1 (patch-base_process_process__metrics__posix.cc) = 2d611619973b7ea1b039a94384db418945734fa2
+SHA1 (patch-base_process_process__metrics__unittest.cc) = 3e3e16ec2d08a92cc3af5eebeaf352e025392d85
+SHA1 (patch-base_process_process__posix.cc) = 1a55c6addd146d9710813602af1c4f85c0dfc774
+SHA1 (patch-base_process_process__unittest.cc) = 30b37a2aaaf0d2406b728968e2b4067712a52787
+SHA1 (patch-base_profiler_module__cache.cc) = bfb7410a5cb3d052286e2be4d0b2d3ae4d6ba87b
+SHA1 (patch-base_profiler_sampling__profiler__thread__token.cc) = 0aeb3ae839e9ee04d51dee0322099464f8c7bdc9
+SHA1 (patch-base_profiler_sampling__profiler__thread__token.h) = b143ce9c2498a5b17105750e27a19deae4de26b7
+SHA1 (patch-base_profiler_stack__base__address__posix.cc) = f755bbafb3b1667c437676e273877d94871514f4
+SHA1 (patch-base_profiler_stack__sampling__profiler__test__util.cc) = 39d79d66abf82022b48c4201e2d9201252f58a18
+SHA1 (patch-base_profiler_stack__sampling__profiler__unittest.cc) = 545a95dfc9824a376ebd82834c1a4e26d59350b4
+SHA1 (patch-base_profiler_thread__delegate__posix.cc) = cff85cc93a87b3a4e12b6c38dd3c657ff7efd525
+SHA1 (patch-base_rand__util.h) = 1ffd531924a3a2e625e182b714dffbcb1854e370
+SHA1 (patch-base_rand__util__posix.cc) = 9eabfcf961107bbbab9783b20712b44985fd84a8
+SHA1 (patch-base_strings_safe__sprintf__unittest.cc) = 64765283e4843c43415bdf1b050ff890c85a49a4
+SHA1 (patch-base_synchronization_cancelable__event.h) = aa380554f6816f7fd2b174376ef53fef1c3c738a
+SHA1 (patch-base_synchronization_lock__impl.h) = d030bda604d3f9061fe0683464bda53a9ffdda96
+SHA1 (patch-base_syslog__logging.cc) = 74727042b4d520ac289021a33ea0f5f2b071db49
+SHA1 (patch-base_system_sys__info.cc) = 057c3b7cb56ce6cbad78cbb455e5c2ae581264c5
+SHA1 (patch-base_system_sys__info.h) = d65f9973c5111fece040e32fdc99829013c29973
+SHA1 (patch-base_system_sys__info__freebsd.cc) = a9b371b417ce9dbd9a66c6ed4b3560d61ff6a31d
+SHA1 (patch-base_system_sys__info__netbsd.cc) = 59926dd14080bfd88d1937224719c45c5f88a999
+SHA1 (patch-base_system_sys__info__openbsd.cc) = 190f55d22b50b127c9404d4c049f5cca68d13d09
+SHA1 (patch-base_system_sys__info__posix.cc) = 9d31dc61aad493405a1b166ca8447bab09370c4e
+SHA1 (patch-base_system_sys__info__unittest.cc) = 307ed0e4e80caf02619c828e4293d5fc00cfbce3
+SHA1 (patch-base_task_thread__pool_environment__config__unittest.cc) = 013a4f0ae7cf309d72a7b95ce70db7950cfa89cb
+SHA1 (patch-base_test_launcher_test__launcher.cc) = 2007e93d42b40007024707d01ee474f34e81beed
+SHA1 (patch-base_test_test__file__util__linux.cc) = de09c0da8044e1efb14d5b1bcbd7f61a46438e63
+SHA1 (patch-base_test_test__file__util__posix.cc) = d2f6ff334518f8e2a9a20ef0064aa972c358e6bd
+SHA1 (patch-base_threading_platform__thread.h) = 231d0d6c2917bbb98d8a8b82f603bf6b5d5c1dfb
+SHA1 (patch-base_threading_platform__thread__bsd.cc) = f0d6c6d1a0c7760e4b590ff2ae86467ad07bc887
+SHA1 (patch-base_threading_platform__thread__internal__posix.cc) = caef23b28deb79c474c56d32648678710ee5b9d1
+SHA1 (patch-base_threading_platform__thread__metrics.cc) = 25f44a1836ece48e0fa955d1efde387c81d1cf9e
+SHA1 (patch-base_threading_platform__thread__metrics.h) = 6e984612ee9a078a3842d5838995b5acbfbda757
+SHA1 (patch-base_threading_platform__thread__posix.cc) = 1a809a57137f69bcca98536c7253b26cc4e84aea
+SHA1 (patch-base_threading_platform__thread__unittest.cc) = 8ab796e4039cc07e034ca64810f909ee432ce55e
+SHA1 (patch-base_time_time__now__posix.cc) = fd72458499c4b9a1a805addd43a04ffb4acea10c
+SHA1 (patch-base_trace__event_malloc__dump__provider.cc) = 27743d143a7e215feb80a9af0d6770623bc962b4
+SHA1 (patch-base_trace__event_memory__dump__manager.cc) = 4ea583cd1b895b96241451c34ebbb3c0acea4aa6
+SHA1 (patch-base_trace__event_process__memory__dump.cc) = 586cfa5c5deb286e135c68f7195bdeb6dd4a84ef
+SHA1 (patch-base_tracing_trace__time.cc) = 5267d12b0df0f563f8c2fdbb308ee435a2c6b90a
+SHA1 (patch-base_tracing_trace__time.h) = 0970f2e404be9cb53e6133998dd86ef0587d3b81
+SHA1 (patch-base_version__info_version__info.h) = 39517a8ef4a1a9db83e2a338a6a4f3b2c6b30a01
+SHA1 (patch-build_config_BUILD.gn) = 9b2570bb5e4f5abbc586b1b8dd3d91cf8b51eca2
+SHA1 (patch-build_config_BUILDCONFIG.gn) = e67f8a3176666522f6eec43e554f55f7fd0fdbd9
+SHA1 (patch-build_config_clang_BUILD.gn) = 04637285abcc2af0a008a3c964fb56f8ef00f0e7
+SHA1 (patch-build_config_compiler_BUILD.gn) = b4cdc88272688ce3b3bea0b974679b686a8b010c
+SHA1 (patch-build_config_gcc_BUILD.gn) = 84e6d309dfaddd96288a2d86589e2f98f06bfed0
+SHA1 (patch-build_config_linux_BUILD.gn) = d15d7fa30335cea12ae10622809f262c668bf971
+SHA1 (patch-build_config_linux_libdrm_BUILD.gn) = 2d95f811422dc2a6ccceaf7915152f96f671cb8f
+SHA1 (patch-build_config_linux_pkg-config.py) = 135b6ce97176c39eb50bfe1a7472c44c75b56655
+SHA1 (patch-build_config_ozone.gni) = 776755ea46e3e771b8285d007f56d3f86faac94d
+SHA1 (patch-build_config_rust.gni) = 593b28cc9ea5a040113b6eea63f6c38b116b028f
+SHA1 (patch-build_config_v8__target__cpu.gni) = 8081ba39ba900bdb0a6f99ae8ed92ae4f1fda2f5
+SHA1 (patch-build_detect__host__arch.py) = cf8ef1105fc300c5a2762a3b0eecd28ecd246b93
+SHA1 (patch-build_gn__run__binary.py) = 95dbc501d2d8d25763f7f54391d8fac6dfda4022
+SHA1 (patch-build_linux_chrome.map) = 3d7fcfc3421b9e862588ccb51367704aed800125
+SHA1 (patch-build_linux_strip__binary.py) = 5c48db5d72c34b1af3265650be2c827e4752f1f3
+SHA1 (patch-build_linux_unbundle_icu.gn) = 694758c85b3d190a68e914074c7852e08622619c
+SHA1 (patch-build_linux_unbundle_libusb.gn) = c48eb4dc8f78d190f798976545d648caaf3a4959
+SHA1 (patch-build_nocompile.gni) = e8f0334da45ee13ed84bc2d9c967d04215a9d3ad
+SHA1 (patch-build_rust_rust__bindgen.gni) = 8c1db0cd73eb5dada4bd8cbb938fd0a5965b3796
+SHA1 (patch-build_rust_rust__bindgen__generator.gni) = 557812f116454353ef057507aa9113bc916f284b
+SHA1 (patch-build_rust_std_BUILD.gn) = bc72f6b4887fcc4d20edef57e2d36abc6ab8a29c
+SHA1 (patch-build_toolchain_freebsd_BUILD.gn) = 86d0ce337da0004cd228eb5866012b8a84cc0e7e
+SHA1 (patch-build_toolchain_gcc__solink__wrapper.py) = 7c3dac8aea1ce099171cec839728529ca54c9035
+SHA1 (patch-build_toolchain_gcc__toolchain.gni) = 1de886fcac68a62f0b4ee79b45df38f54dc08ace
+SHA1 (patch-build_toolchain_netbsd_BUILD.gn) = 1635a4bd5160923e2b481e714d4aa7bd6ce37773
+SHA1 (patch-build_toolchain_openbsd_BUILD.gn) = 1dfe434a74d0d31797b7c5d1e26a85819b04672c
+SHA1 (patch-build_toolchain_toolchain.gni) = e0ea9544bf4bb0cbc80c66522f5feff2bc99a7a9
+SHA1 (patch-cc_base_features.cc) = e708575514732732ec67f6abbe873b4653a203e1
+SHA1 (patch-chrome_app_chrome__command__ids.h) = f7babcdaaee88be06967e9e51a378884e6897298
+SHA1 (patch-chrome_app_chrome__main.cc) = 8aa2a9b2b1e27239af479577d8aa9edb654e9790
+SHA1 (patch-chrome_app_chrome__main__delegate.cc) = d8adf8613b135ad4e1984e7cc8984fa0f2b22510
+SHA1 (patch-chrome_browser_BUILD.gn) = 8d627bf8baaa6be341efac4a30d321d88fc761aa
+SHA1 (patch-chrome_browser_about__flags.cc) = 311ba4fdcfb1e8821414cae853c4d43f718cc8ec
+SHA1 (patch-chrome_browser_accessibility_page__colors.cc) = a621d0f3eb03c2a0371853ad7343c2fbf6f66fc9
+SHA1 (patch-chrome_browser_after__startup__task__utils.cc) = 0e63dcb47063e44cbf62dc68d365f7afe08b6c3b
+SHA1 (patch-chrome_browser_apps_app__service_publishers_extension__apps.cc) = ae63cdc6276890765dd5fc8334e39b52eaaf55ef
+SHA1 (patch-chrome_browser_apps_platform__apps_platform__app__launch.cc) = 3bfddeedd10bdeb51224d8ce3203596f599f2f66
+SHA1 (patch-chrome_browser_apps_platform__apps_platform__app__launch.h) = c1e5834d05276c9dc0558bf27cd12762545b41c2
+SHA1 (patch-chrome_browser_autocomplete_chrome__autocomplete__scheme__classifier.cc) = 315a68dd92ca33203afacb17d219d6ea4c0bdd26
+SHA1 (patch-chrome_browser_background_extensions_background__mode__manager.cc) = a4ce49854ddaa7660b3f3abc45580f9e7949084a
+SHA1 (patch-chrome_browser_background_extensions_background__mode__optimizer.cc) = 96f5f6b0e0de1773e0660348fa894b3034dc5523
+SHA1 (patch-chrome_browser_background_glic_glic__status__icon.cc) = 232a01ee41ec7b05fc794906b79458898e12335f
+SHA1 (patch-chrome_browser_browser__features.cc) = 379c015761f585e299d03041fbcf65622e61d2bb
+SHA1 (patch-chrome_browser_browser__features.h) = 32905bdc936ddbaec89812adb2ec30fa6699a58b
+SHA1 (patch-chrome_browser_browser__process__impl.cc) = eb1a297eb1daa04b2a931c63acc2b218103218a6
+SHA1 (patch-chrome_browser_browser__process__impl.h) = b3a5553ee32a64814164031d643aea83f9e97d19
+SHA1 (patch-chrome_browser_chrome__browser__field__trials.cc) = fbbfb972179c7ecfe33c532dd95d5be41aaa66e8
+SHA1 (patch-chrome_browser_chrome__browser__interface__binders.cc) = 4275b193963a43059952c56f1380d5f8e9400f54
+SHA1 (patch-chrome_browser_chrome__browser__interface__binders__webui.cc) = 0c60a72e6f24a8fb4fa089cde0d89777d75f5fcb
+SHA1 (patch-chrome_browser_chrome__browser__main.cc) = 5a37a512297babfbde74dc3e9d17f77987a1b8bb
+SHA1 (patch-chrome_browser_chrome__browser__main__extra__parts__linux.cc) = ff44f23fdb130de938a3a64addc8512eec440d1d
+SHA1 (patch-chrome_browser_chrome__browser__main__extra__parts__ozone.cc) = c5a520ac86035185218a190b1dd50c98beb58540
+SHA1 (patch-chrome_browser_chrome__browser__main__linux.cc) = 37776a145cbb5c6702e79c28f2b8535b25b0a08a
+SHA1 (patch-chrome_browser_chrome__browser__main__linux.h) = 946db564f1c17877499bc476d54b675ae0353662
+SHA1 (patch-chrome_browser_chrome__browser__main__posix.cc) = 671ee29e180306b8c94c14ae89a9a685101f72f3
+SHA1 (patch-chrome_browser_chrome__content__browser__client.cc) = 11b95bff57bdbfde7f569fd49ac58785d04db4d0
+SHA1 (patch-chrome_browser_chrome__content__browser__client.h) = 68f1bd6b79152efbdca0c679e0a50ef6d2e8c436
+SHA1 (patch-chrome_browser_chrome__content__browser__client__navigation__throttles.cc) = bdcdceeb6cc8a35912c1647b138180e8a0a6083a
+SHA1 (patch-chrome_browser_collaboration_messaging_messaging__backend__service__factory.cc) = 6ee562036f59a4e036f44a72639f11789186d12e
+SHA1 (patch-chrome_browser_component__updater_iwa__key__distribution__component__installer.cc) = e77ac39a394660c31fb5efc2910593c8aa6faddc
+SHA1 (patch-chrome_browser_component__updater_iwa__key__distribution__component__installer.h) = 8f6117256139fba707e81d8a129991b25abe902d
+SHA1 (patch-chrome_browser_component__updater_registration.cc) = 082e91a36d787d7886bc05c115cdd018b6838ccb
+SHA1 (patch-chrome_browser_component__updater_wasm__tts__engine__component__installer.cc) = ecea0a0e0b5f05c32b52812439a81c96626f1494
+SHA1 (patch-chrome_browser_component__updater_widevine__cdm__component__installer.cc) = 2e0965409ab2f19c2df8500b047d1853690d9ede
+SHA1 (patch-chrome_browser_custom__handlers_chrome__protocol__handler__registry__delegate.cc) = af636ba21a3bfb28f71f669461111f788a75db88
+SHA1 (patch-chrome_browser_defaults.cc) = e94cc28f72688123757934c12a9a315a37133611
+SHA1 (patch-chrome_browser_device__identity_device__oauth2__token__service__factory.cc) = feb43906f96f7f8f41e9c96e0eaf3da2e23f0149
+SHA1 (patch-chrome_browser_devtools_features.cc) = 9244219bc42ef32e7225220b91085907aec8d128
+SHA1 (patch-chrome_browser_devtools_features.h) = 489487a41a284447c6d5d8da297d3877be506f43
+SHA1 (patch-chrome_browser_devtools_remote__debugging__server.cc) = 6d651597be1f0aa6f663064f68d3bcbf4259c56f
+SHA1 (patch-chrome_browser_diagnostics_diagnostics__writer.h) = 402550b00830dbe3dfdf3e180cdf9ed823ef91e1
+SHA1 (patch-chrome_browser_download_chrome__download__manager__delegate.cc) = a002aab94eaa26580a912e5a0d25d901068c0be1
+SHA1 (patch-chrome_browser_download_download__commands.cc) = 03c15e686383a2a368fbb254c5ecdcb62cc66de7
+SHA1 (patch-chrome_browser_download_download__commands.h) = 18a29dc9999f23771cb5bad47b135d63072d2dc7
+SHA1 (patch-chrome_browser_download_download__file__picker.cc) = b36672f2e5432c401514ad800c0648f0d5f55dd8
+SHA1 (patch-chrome_browser_download_download__item__model.cc) = 7be0f396e56247d9f35fd2a0e0013d4a8158349a
+SHA1 (patch-chrome_browser_download_download__prefs.cc) = 316191f775feb3f37250b05ec163c0d14ad2533a
+SHA1 (patch-chrome_browser_download_download__prefs.h) = 3fe6b963dcbbe2c8c247e914ad7171702d8e7e6a
+SHA1 (patch-chrome_browser_enterprise_browser__management_browser__management__service.cc) = 6a223eca984961f5caabef075dcaaa26f9fdfa24
+SHA1 (patch-chrome_browser_enterprise_browser__management_browser__management__service.h) = 4b89842b24e4abd19d96cce3a8afb3b2d1b616e2
+SHA1 (patch-chrome_browser_enterprise_connectors_analysis_analysis__service__settings.cc) = 91bd26257659c9cb27749101d8a629f407ba3cb4
+SHA1 (patch-chrome_browser_enterprise_connectors_common.cc) = b97db22e0a895b6deff82ee93fae9f66476ec355
+SHA1 (patch-chrome_browser_enterprise_connectors_connectors__service.cc) = 64b3ef107750d586f5c466e166878eb57b880889
+SHA1 (patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc) = f0d854d25e4dcf6aeaa2811c7232f41b4961aaa2
+SHA1 (patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc) = a6c75d244da7045110fe7ebd648aa9c12b452cd4
+SHA1 (patch-chrome_browser_enterprise_connectors_device__trust_key__management_browser_commands_key__rotation__command__factory.cc) = eb372cbf8f62171e999d94ad798ce0758305581d
+SHA1 (patch-chrome_browser_enterprise_connectors_device__trust_key__management_core_persistence_key__persistence__delegate__factory.cc) = 913df16a8b5861c30616261bafc82e66659951b8
+SHA1 (patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc) = 60215c575dd4ce7cce0e396cdab8ad2000f75ba6
+SHA1 (patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc) = ecc259fdf7cb03b28a407a47269d805021773ab5
+SHA1 (patch-chrome_browser_enterprise_connectors_reporting_crash__reporting__context.cc) = 9d59a2f4f7672a31e60ed7da1ad254cc4aad1d8e
+SHA1 (patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.cc) = 15dc88fe340449ada0dfe83e73ed805f3e3f77c4
+SHA1 (patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.h) = dc6623e3c156076832908264dc0ed545e4c93f38
+SHA1 (patch-chrome_browser_enterprise_profile__management_profile__management__navigation__throttle.cc) = d9562cd3079f0a8a4b0368421c37b43672029693
+SHA1 (patch-chrome_browser_enterprise_remote__commands_cbcm__remote__commands__factory.cc) = 117fa7e9267166bdd2379651270ae33a590e1ca2
+SHA1 (patch-chrome_browser_enterprise_reporting_cloud__profile__reporting__service.cc) = dcf2367ad16e0080cf522eabec5da627c40e5a0f
+SHA1 (patch-chrome_browser_enterprise_reporting_cloud__profile__reporting__service__factory.cc) = c6fc1ad17bc1495b1c7b7d0ccab1dba9e91ea7f3
+SHA1 (patch-chrome_browser_enterprise_signals_context__info__fetcher.cc) = 7603d4adf1eba89bae46dbf1807a13da250cb601
+SHA1 (patch-chrome_browser_enterprise_signals_device__info__fetcher.cc) = 5abc64f9359a0c44004eb8120beee22098d20def
+SHA1 (patch-chrome_browser_enterprise_signin_enterprise__signin__service.h) = 7453b285761947be5d600d80652444648c9114c1
+SHA1 (patch-chrome_browser_enterprise_signin_interstitials_managed__profile__required__page.cc) = 1953d53e28e1c052673ce58409e904f20c2d1f93
+SHA1 (patch-chrome_browser_enterprise_util_managed__browser__utils.cc) = 674c2318ad283ee874caecbad5fb686b98ed1282
+SHA1 (patch-chrome_browser_extensions_BUILD.gn) = fbb63c26d3bba332a93c4b3f93fc59b1aae21b48
+SHA1 (patch-chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc) = 92b2bbd4c6379ec31d6f6eeac3fa3d74d580f97d
+SHA1 (patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc) = f1423c09ddeb58da28b6ceacb25ba107e9c2c875
+SHA1 (patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h) = ca78676e3d96496ed0d285623c5fe9dd5aacfa06
+SHA1 (patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc) = 82896b516607e69cce5c4797efda5014f0951f51
+SHA1 (patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h) = 8d88a8eec3ac17e15d9be424c1f4f5aa7e823aac
+SHA1 (patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc) = ccefcb7d42b8b1093e27616d4f1f36b4f78b40c9
+SHA1 (patch-chrome_browser_extensions_api_messaging_launch__context__posix.cc) = 89efed2434999fd704bd8d8d8d59f94811f9da56
+SHA1 (patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc) = 9466c4573b9f5fb6a099bf6a5ac99e965d20cff2
+SHA1 (patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc) = b7ffb29db69ab92a614896bd24555e79d7a9a667
+SHA1 (patch-chrome_browser_extensions_api_settings__private_prefs__util.cc) = 5e0d7a05e4d11c38879da9c7ab0a03c1e8583aed
+SHA1 (patch-chrome_browser_extensions_api_tabs_tabs__api.cc) = 1bb1018a4649574ce6d7aca3b6b079a0c95f1193
+SHA1 (patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc) = 8695b6d7b0199643e333b6217877c6c7f33e3041
+SHA1 (patch-chrome_browser_extensions_api_webstore__private_webstore__private__api.cc) = 6f65d783f52b60dd93ddfc77ee5cf1d022bdb312
+SHA1 (patch-chrome_browser_extensions_component__extensions__allowlist_allowlist.cc) = 0ab160c9965eb79e9d5322e6f656b6ba942f4c14
+SHA1 (patch-chrome_browser_extensions_external__provider__impl.cc) = 9f7f186d83b6d2dd1b7b9a9d4bf028d47b9a730b
+SHA1 (patch-chrome_browser_feedback_system__logs_about__system__logs__fetcher.cc) = c3a84fb67e7ce100105cf11fc78d9f3d19587e72
+SHA1 (patch-chrome_browser_feedback_system__logs_chrome__system__logs__fetcher.cc) = 5f86f9c8c3cea120231453179500b1d7d0ad3fe5
+SHA1 (patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc) = 1c479a4e14330744cc8c3b53cf5d2f056de82aa0
+SHA1 (patch-chrome_browser_first__run_first__run__dialog.h) = 1fa94df1f236b48ccd4016f1f24fcd25200f94dc
+SHA1 (patch-chrome_browser_first__run_first__run__internal.h) = 4c75a71ba7539d05c9fec028ecd26c3a134b3ab3
+SHA1 (patch-chrome_browser_flag__descriptions.cc) = dfd40326469ccea660fb7e59d5667d6998d6bf15
+SHA1 (patch-chrome_browser_flag__descriptions.h) = ba383e65e2f90c8ab35b3b70254cd9a1612fe135
+SHA1 (patch-chrome_browser_gcm_gcm__profile__service__factory.cc) = 150e673e6b933de370cded23e2c8ef139c2dfcc9
+SHA1 (patch-chrome_browser_gcm_instance__id_instance__id__profile__service__factory.cc) = 2dff63ecb94d1451e081323ce4ebbcc79b07047b
+SHA1 (patch-chrome_browser_global__features.cc) = 6ad9668cfc65914c459729bebac0a03d58237d77
+SHA1 (patch-chrome_browser_global__features.h) = c23006037e3fee693fa6d187249ce95c1c289048
+SHA1 (patch-chrome_browser_headless_headless__mode__util.cc) = 19556598766f96565855c8046f933b4c241581b1
+SHA1 (patch-chrome_browser_intranet__redirect__detector.h) = f7d17ca4fd1fff4d3fc11ed017aecc9d97e48f72
+SHA1 (patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc) = 166a7c6dd63a1d26c0ed6e2d8dff22cb24e53009
+SHA1 (patch-chrome_browser_media__galleries_media__file__system__registry.cc) = 4163876e6d673704cf2c7648a0e34ae69242a293
+SHA1 (patch-chrome_browser_media_audio__service__util.cc) = 2b6b4b2ca93b0364f0f012c263b7bcad8dd5abc2
+SHA1 (patch-chrome_browser_media_router_discovery_BUILD.gn) = 502bc3de92e122b04fc530837f8aaa2098c4b85e
+SHA1 (patch-chrome_browser_media_router_discovery_discovery__network__list__posix.cc) = 874c41c44aad4369a2016ef590b626ec5ee8822b
+SHA1 (patch-chrome_browser_media_router_discovery_discovery__network__list__wifi__linux.cc) = dd84482fd7127bdd9e07ac6b5528b8241c1bb496
+SHA1 (patch-chrome_browser_media_webrtc_chrome__screen__enumerator.cc) = c4941c39cf47e34df3663a6341d9985e482c45b2
+SHA1 (patch-chrome_browser_media_webrtc_chrome__screen__enumerator.h) = e8da6781fffd5d8037bde4f1473ee789a746d16d
+SHA1 (patch-chrome_browser_media_webrtc_desktop__media__picker__controller.cc) = ef80c1f09565227d4709ac003b2eb96dcfd4aa59
+SHA1 (patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc) = e4a6570494a5a61bb8b2906fadb79d8468188743
+SHA1 (patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc) = 4554ef5745b47295eff234448ff4faf946428288
+SHA1 (patch-chrome_browser_media_webrtc_webrtc__logging__controller.h) = 25c03ebaff4ac9e1a70783d54c0d6f40141f6e78
+SHA1 (patch-chrome_browser_memory__details.cc) = f8467a92da4b1dc62a13f43076e33934bda82fb6
+SHA1 (patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc) = 8337de1122ff64adb07fee1f4a7c92910f373393
+SHA1 (patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.h) = 248943a91647a1c4bdcb665d37c15c7fb83490bd
+SHA1 (patch-chrome_browser_metrics_chrome__metrics__service__client.cc) = db82ac3b3a0c8c5c786bc2b61939d5929eea7876
+SHA1 (patch-chrome_browser_metrics_perf_cpu__identity.cc) = f2807b8ca092d5ec88e194cfe2e1d41dc87b51bf
+SHA1 (patch-chrome_browser_metrics_power_process__metrics__recorder__util.cc) = 93f1140d05d8a17dbb52ab1a1234fe2a48637b53
+SHA1 (patch-chrome_browser_metrics_power_process__monitor.cc) = b4ccce96a97fe2321ecb7bd86e83eafe642684de
+SHA1 (patch-chrome_browser_metrics_power_process__monitor.h) = 00e304ceba5fea96fb8659d0b1644cf7790b71fc
+SHA1 (patch-chrome_browser_net_profile__network__context__service.cc) = 318afc04424c11422bc9930a70a0fe89a2998ed0
+SHA1 (patch-chrome_browser_net_profile__network__context__service__factory.cc) = de59249393d8b27c3452efe6dc35865e4e3920aa
+SHA1 (patch-chrome_browser_net_system__network__context__manager.cc) = d828dcc5cf6fa0915bdc14237ada26f7a0243d91
+SHA1 (patch-chrome_browser_net_system__network__context__manager.h) = 82b0ac93e0f7ea4c2688a9b6aff4b4cfc8fe98ce
+SHA1 (patch-chrome_browser_new__tab__page_modules_file__suggestion_drive__service.cc) = 7aafe3bb072027ba45c9946c11ca1cd4c2c0e71d
+SHA1 (patch-chrome_browser_new__tab__page_new__tab__page__util.cc) = da6b7f856876ebae24a5e19a8127a079c8c401ca
+SHA1 (patch-chrome_browser_notifications_notification__display__service__impl.cc) = a2707acec0de5c42e0f757c8758bd9a70f83faad
+SHA1 (patch-chrome_browser_notifications_notification__platform__bridge__delegator.cc) = 042e657560a470cea4404141b7a48fac945dc03d
+SHA1 (patch-chrome_browser_password__manager_chrome__password__manager__client.cc) = 4da7cbe66d6c248694dc4bb8fccc6b4d67eec7bf
+SHA1 (patch-chrome_browser_password__manager_password__reuse__manager__factory.cc) = 8b7de604ca3b45eddb080309a631872d7e44b3e5
+SHA1 (patch-chrome_browser_platform__util__linux.cc) = 738b7a523920874e04234fc966f5e20c85c8407d
+SHA1 (patch-chrome_browser_policy_browser__signin__policy__handler.cc) = 0ea48b48d675e075daf73b903b8adac93f0ed9d3
+SHA1 (patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc) = e0f554203e4624fbdcb968c01c746e9d84cf3e11
+SHA1 (patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc) = f880d3115b53c48192e1a21bca9bfbec2be5a0a6
+SHA1 (patch-chrome_browser_policy_device__management__service__configuration.cc) = 5680e91c75b9ebe54777a1f46b9e0e0b1ae5406f
+SHA1 (patch-chrome_browser_policy_policy__value__and__status__aggregator.cc) = a183e21aaea65469b55570d5c43db0fdd483697b
+SHA1 (patch-chrome_browser_prefs_browser__prefs.cc) = f6ef883dc53bb03f2ba1bf6eab9ce3d35090175b
+SHA1 (patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc) = 316f390da6a61ce612a646b42edf5ffe9eeedc14
+SHA1 (patch-chrome_browser_printing_print__backend__service__manager.cc) = 5b77a2ebed8382520b4f8dce5d8688ee763e3f70
+SHA1 (patch-chrome_browser_printing_printer__query.cc) = d5b26dfc4ae05f1ea123ec80bcac0b038e43ecdc
+SHA1 (patch-chrome_browser_process__singleton__posix.cc) = 7cc4759f71b0424fccad18fb2f5e3c4122f0d5e0
+SHA1 (patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc) = 4e9112927d04432c95f28acf53138ba201931d9d
+SHA1 (patch-chrome_browser_profiles_profile__impl.cc) = 9c9c6636dad3ba14c530a0fca1ba505da9843d27
+SHA1 (patch-chrome_browser_profiles_profiles__state.cc) = 0c0983df620f98953e4fa7196dd251c9d43b5c6e
+SHA1 (patch-chrome_browser_regional__capabilities_regional__capabilities__service__factory.cc) = 359db5f81c03630f378d6a5f4e87f0beaf789fb8
+SHA1 (patch-chrome_browser_renderer__preferences__util.cc) = 6707b6e5ac52651a09b831b2a230dd9154c18dac
+SHA1 (patch-chrome_browser_resources_settings_autofill__page_passwords__shared.css) = bc314662cabf4c57019fba2ef3da77b1d192ded3
+SHA1 (patch-chrome_browser_resources_signin_signin__shared.css) = 6471bc7e5b17774ead992dbc0c3568da887fdca5
+SHA1 (patch-chrome_browser_safe__browsing_chrome__password__protection__service.cc) = 7da5929501e50851436ffd7b5c39f76b866f9a9c
+SHA1 (patch-chrome_browser_safe__browsing_cloud__content__scanning_binary__upload__service.cc) = 5bc81658895b8e9b318f46b2edef61f7b9214713
+SHA1 (patch-chrome_browser_safe__browsing_incident__reporting_incident__reporting__service.cc) = 465d70824c14e5f55deecd383766ff03252384af
+SHA1 (patch-chrome_browser_safe__browsing_safe__browsing__pref__change__handler.cc) = 92ac1cfeeba738bcb8de9044a9e1b5e1b346b3df
+SHA1 (patch-chrome_browser_screen__ai_screen__ai__install__state.cc) = 6f5ea398722973014acd8bfc82969bdacafacf0d
+SHA1 (patch-chrome_browser_screen__ai_screen__ai__service__handler__base.cc) = 8683d2b73b1de5a67d57725acb753be409d5576f
+SHA1 (patch-chrome_browser_sessions_session__restore.cc) = 84fc78dccd468fb36fc38a264e302caf632ac5df
+SHA1 (patch-chrome_browser_sharing_sharing__handler__registry__impl.cc) = 989ab882690d303aadee3090acf9fbba026971fe
+SHA1 (patch-chrome_browser_shortcuts_icon__badging.cc) = 8fb2bad1fc8ed00831af2b9f35f9c31626d3586f
+SHA1 (patch-chrome_browser_signin_accounts__policy__manager.cc) = 57557b35183afd651d3ac88165b5d02fe8adae6f
+SHA1 (patch-chrome_browser_signin_accounts__policy__manager.h) = 5612715c6597a1153769de42c86b55f6c67eb33a
+SHA1 (patch-chrome_browser_signin_signin__util.cc) = fe010b783419d1c8f5ff41ccfb9249b69393bd3d
+SHA1 (patch-chrome_browser_signin_signin__util.h) = 2fe5a19ecc5ab3255ddd52a2342d6a507849f811
+SHA1 (patch-chrome_browser_supervised__user_classify__url__navigation__throttle.cc) = d56199d0086a7c30a7faf47cb050b75551179ad7
+SHA1 (patch-chrome_browser_supervised__user_supervised__user__browser__utils.cc) = 7bf92cbcfcf02380de1c24b667313aa3e6ba270f
+SHA1 (patch-chrome_browser_supervised__user_supervised__user__browser__utils.h) = 7e3730392de7315aecf96fc559adb08783b1baa0
+SHA1 (patch-chrome_browser_supervised__user_supervised__user__extensions__delegate__impl.cc) = be5da328975c6c8fabe97719bc0b670a9193db13
+SHA1 (patch-chrome_browser_supervised__user_supervised__user__extensions__manager.cc) = 768f863082d8d79a15872f587890d2efd7f12728
+SHA1 (patch-chrome_browser_supervised__user_supervised__user__extensions__manager.h) = c2dd2acc811e01ac097d6d7c8c872233e79b358a
+SHA1 (patch-chrome_browser_supervised__user_supervised__user__google__auth__navigation__throttle.cc) = a1d18a1640ac7e7d77bf44a78bcd6040997cd5d7
+SHA1 (patch-chrome_browser_supervised__user_supervised__user__metrics__service__factory.cc) = 3ff847c651296f19a506c8fdde6803543bcb25d7
+SHA1 (patch-chrome_browser_supervised__user_supervised__user__navigation__observer.cc) = eb1533e6bf005b601a825a35fbdd43c2213e8bd2
+SHA1 (patch-chrome_browser_sync_chrome__sync__controller__builder.cc) = 34bf24cf05fe81196421ced23bb8703541cdb687
+SHA1 (patch-chrome_browser_sync_device__info__sync__client__impl.cc) = fbe36ce3bc2d2e07e8e382b7d85535fe868d6be1
+SHA1 (patch-chrome_browser_sync_sync__service__factory.cc) = 10c4f2ff33a243ae06094bf6b351f32ebeb4d144
+SHA1 (patch-chrome_browser_task__manager_sampling_task__group.cc) = a32e1905d9b91bfe896cd4e962fdca2c82707837
+SHA1 (patch-chrome_browser_task__manager_sampling_task__group.h) = 511c65226a2a1f904f3e5f24ee7dff46c5f720d4
+SHA1 (patch-chrome_browser_task__manager_sampling_task__group__sampler.cc) = 050d2356ef54c192f834d147768de9928f54d30c
+SHA1 (patch-chrome_browser_task__manager_sampling_task__group__sampler.h) = 984c8fa68ab6a5b9014df980f1a42859467ce907
+SHA1 (patch-chrome_browser_task__manager_sampling_task__manager__impl.cc) = 4e96cf1fa42c881efad00095c7d231888998cce5
+SHA1 (patch-chrome_browser_task__manager_task__manager__observer.h) = 5042d5463ea6b46ea7bc60f6c56142741d2a596f
+SHA1 (patch-chrome_browser_themes_theme__helper.cc) = 9a1f993052dc305528ab1c5b8b97caf886fccf60
+SHA1 (patch-chrome_browser_themes_theme__service.cc) = 0557c112336bd63d9e3f2198d15bd31b44be9bb3
+SHA1 (patch-chrome_browser_themes_theme__service__aura__linux.cc) = d07c4cc9b92513490baa01fa04e27a437f10f418
+SHA1 (patch-chrome_browser_themes_theme__service__factory.cc) = 2d93a033a6ea8ab8283e4fbd66b46eafec5ab908
+SHA1 (patch-chrome_browser_ui_actions_chrome__action__id.h) = d573cb5d847f1498b7437c6bc179fada1bb864b1
+SHA1 (patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.cc) = 858ae510ca34a6aa6ae09617471d71001aeb8d0f
+SHA1 (patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.h) = 923d19431854808af4f40aabe532e3a13036bd79
+SHA1 (patch-chrome_browser_ui_browser.h) = 552f7f9c43f47367e13335fa93a0603d1e50e32d
+SHA1 (patch-chrome_browser_ui_browser__command__controller.cc) = e64db152d8c62c0aea1d58b777004d40fb5a584e
+SHA1 (patch-chrome_browser_ui_browser__commands.cc) = f37b212780e3d63f813a9cd90a63418bf14f368c
+SHA1 (patch-chrome_browser_ui_browser__ui__prefs.cc) = 5c7226050df968c7f9b7c62c846e08b6eaec6640
+SHA1 (patch-chrome_browser_ui_browser__view__prefs.cc) = c41ab98be3d991589e4ed29462a25c1550f99fa0
+SHA1 (patch-chrome_browser_ui_chrome__pages.cc) = 7be68b295a5187696176c0c6849cd61ed2ba725b
+SHA1 (patch-chrome_browser_ui_chrome__pages.h) = f2e928523b02ac90bd0cc727c446b4c15b93fd82
+SHA1 (patch-chrome_browser_ui_color_native__chrome__color__mixer.cc) = 6cb3212b7036e50cde18eb36d1f5182b2f88470b
+SHA1 (patch-chrome_browser_ui_managed__ui.cc) = 9a8abbfdcb19d05c276ba815bd1f4a6fc138e9dd
+SHA1 (patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc) = 8f6bf2bde2c468203f29b169288505f639e4e260
+SHA1 (patch-chrome_browser_ui_passwords_bubble__controllers_relaunch__chrome__bubble__controller.cc) = c5bda8dc9f1ac9ae2e803dde4f7228bf696357db
+SHA1 (patch-chrome_browser_ui_passwords_manage__passwords__ui__controller.cc) = f667e3309e88635eaa1f988b77c2d959d2398202
+SHA1 (patch-chrome_browser_ui_prefs_prefs__tab__helper.cc) = 6c4c587d78b9c0f9bb1830aa8336ae8c49f6d288
+SHA1 (patch-chrome_browser_ui_sad__tab.cc) = 6a510c2f39cdabd74a6c152a05f3e74e5d7238a1
+SHA1 (patch-chrome_browser_ui_sharing__hub_sharing__hub__bubble__controller.h) = f39077cf1d2182b64bcf19e1ef89f408a0191846
+SHA1 (patch-chrome_browser_ui_signin_signin__view__controller.cc) = 37b320b8e9dd29200754595f0cc314cc88bd5660
+SHA1 (patch-chrome_browser_ui_signin_signin__view__controller.h) = 4dc753080cb32497c28a58aec7dbc4cf8fd35086
+SHA1 (patch-chrome_browser_ui_signin_signin__view__controller__delegate.h) = 39f2ac6bfdf74b7ba4eae76d4f66e19747ea7437
+SHA1 (patch-chrome_browser_ui_startup_bad__flags__prompt.cc) = 6af1d1799ec7aac58e5b986c8ba3672493af9b3b
+SHA1 (patch-chrome_browser_ui_startup_startup__browser__creator.cc) = d5efde07741fa47e8b38f61b15815497ddfc064c
+SHA1 (patch-chrome_browser_ui_startup_startup__browser__creator__impl.cc) = b3acd9c6df42e5dd9e8ded09576acd30a00f65de
+SHA1 (patch-chrome_browser_ui_startup_startup__tab__provider.cc) = 82c9a5b46ec8ea51368a4f45ee348be02837e823
+SHA1 (patch-chrome_browser_ui_tab__helpers.cc) = 1692fbca85045d400be0a50834094495cbc05fb9
+SHA1 (patch-chrome_browser_ui_tabs_features.cc) = e1cbbae30fd3724610e38ca59ca42dabcd32d38a
+SHA1 (patch-chrome_browser_ui_tabs_tab__dialog__manager.cc) = af5aa1ed265c730a04d4e3e8c4647e0d4fbe4256
+SHA1 (patch-chrome_browser_ui_tabs_tab__features.cc) = 87606d27f177c5bdee6783912465263c108665fc
+SHA1 (patch-chrome_browser_ui_tabs_tab__strip__prefs.cc) = 493e22514139987070119f837c31683b4a47ab7d
+SHA1 (patch-chrome_browser_ui_task__manager_task__manager__columns.h) = 0f7827fa9d427b75bb015ea7cf33e0490262d21f
+SHA1 (patch-chrome_browser_ui_task__manager_task__manager__table__model.cc) = 0f5d81dd71bd1b5e19529fe159d7aef0fd9aed57
+SHA1 (patch-chrome_browser_ui_test_popup__browsertest.cc) = b3cda0981e209be69c13f304593e0b1592cb780b
+SHA1 (patch-chrome_browser_ui_test_test__browser__ui.cc) = 7db674be547d8c87972ebdb62f1a4aaa8ff695eb
+SHA1 (patch-chrome_browser_ui_ui__features.cc) = b095b6272a87cc512aa9ca361e4af834e2005923
+SHA1 (patch-chrome_browser_ui_ui__features.h) = 7decd7f2b98f516ba494791862abdf10af518d6e
+SHA1 (patch-chrome_browser_ui_views_accelerator__table.cc) = d84a96a62668bdca62f4beb47d9c236449fd5dae
+SHA1 (patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc) = cbfb1878651622b8a16a95443efe7061c3c8132a
+SHA1 (patch-chrome_browser_ui_views_chrome__browser__main__extra__parts__views.cc) = ccc1d1ccccc94226c39722d206af674aa10c9ab0
+SHA1 (patch-chrome_browser_ui_views_chrome__views__delegate.h) = aa3398f2b8bdd2a21df1bd88a8c1bc3badc7d9c3
+SHA1 (patch-chrome_browser_ui_views_chrome__views__delegate__linux.cc) = 172fe29fa0ec7d3c280e67403aa213bd13df1ddd
+SHA1 (patch-chrome_browser_ui_views_compose_compose__dialog__view.cc) = 8dcf4c4127652bf7cd83fe00415606b7722d0947
+SHA1 (patch-chrome_browser_ui_views_frame_browser__frame.cc) = de461ffec1f26db1d61bede186e2f512f8056d35
+SHA1 (patch-chrome_browser_ui_views_frame_browser__frame.h) = 79d46034f881601203de73c53ff42a3aad8c178b
+SHA1 (patch-chrome_browser_ui_views_frame_browser__frame__view__layout__linux.cc) = d33e2da2221e9ee1d731d7b7b1dfb46fdf8e400c
+SHA1 (patch-chrome_browser_ui_views_frame_browser__frame__view__layout__linux__native.cc) = 89eb4a83c9f692d85e2d288905c502fc86dd48e7
+SHA1 (patch-chrome_browser_ui_views_frame_browser__frame__view__linux.cc) = c1a19d911745d2f3e1e3b9afc298895a0dc3dd74
+SHA1 (patch-chrome_browser_ui_views_frame_browser__non__client__frame__view__factory__views.cc) = 552de8e59880e0ca8eb25783c9971f014b7bcbbd
+SHA1 (patch-chrome_browser_ui_views_frame_browser__view.cc) = 1780b539218718452025610d0a2168a8e4c3da75
+SHA1 (patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc) = 40ad122dd30c44e4da3aab29f0ee24ab10a8f156
+SHA1 (patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.h) = 0c88d2134281282a1bca016cf8ce32e68ec48bb7
+SHA1 (patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout__delegate.h) = b6da181d89a9c42f20c8b16017f4533c32029160
+SHA1 (patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc) = aa3c24fd7f1e516e0a24093b2922b663c57c4b14
+SHA1 (patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc) = 557840bb4e0b10d16d694e24f8c7c2fd2b96404b
+SHA1 (patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc) = 8894e5db0c2a215ce03d37c544a62289cac009f0
+SHA1 (patch-chrome_browser_ui_views_frame_tab__strip__region__view.cc) = 79fd1e597c4192e272183e60b532aa98d876a11b
+SHA1 (patch-chrome_browser_ui_views_hung__renderer__view.cc) = 0383138ae14a6135d3e9aa706de9208c7ef3290a
+SHA1 (patch-chrome_browser_ui_views_new__tab__footer_footer__controller.cc) = 4d8ebc4309cf2baadbe7020c1f03faa6b5a3d144
+SHA1 (patch-chrome_browser_ui_views_omnibox_omnibox__view__views.cc) = 084a3677ce7f13081159cb91738590d5cd2a02ea
+SHA1 (patch-chrome_browser_ui_views_passwords_password__bubble__view__base.cc) = b4b402b6913a99f39e23535c1ffeb07f43fe114d
+SHA1 (patch-chrome_browser_ui_views_profiles_avatar__toolbar__button.cc) = e0881f5efa7d68d75537b10c169acbf61320a4d7
+SHA1 (patch-chrome_browser_ui_views_profiles_avatar__toolbar__button.h) = 6af06caeb79d53d50be5552d88d640cbb55b4327
+SHA1 (patch-chrome_browser_ui_views_profiles_profile__menu__coordinator.cc) = ab9e1abffa53461bfed4a3f026823bfca93de144
+SHA1 (patch-chrome_browser_ui_views_profiles_profile__menu__view.cc) = 751975a92139600d5ef873b908f57eb03ce3ff80
+SHA1 (patch-chrome_browser_ui_views_profiles_profile__picker__view.cc) = 3736475f334fb8276d5ee6c689557576e05eaa09
+SHA1 (patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc) = 9b15775f23168aed0c654eae7c4e42dc0acaf788
+SHA1 (patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.h) = 99faa4f9a18399528d6060788d781a37991f4824
+SHA1 (patch-chrome_browser_ui_views_tabs_dragging_tab__drag__controller.cc) = 86bf04826143b6c407bd27eeb89710310256d172
+SHA1 (patch-chrome_browser_ui_views_tabs_tab.cc) = 57ff51629657e3510956a4a61c8afa29d371348b
+SHA1 (patch-chrome_browser_ui_views_tabs_tab__hover__card__bubble__view.cc) = a22ec23579c8f608d6a94bc2e8c10b7871b71ea1
+SHA1 (patch-chrome_browser_ui_views_tabs_tab__strip__combo__button.cc) = 19dbafe589df6a04b5583b3c2d35e6b654567f4d
+SHA1 (patch-chrome_browser_ui_views_tabs_tab__style__views.cc) = 01dc884b4b42133211d2b0179c8bfdf249a7f51d
+SHA1 (patch-chrome_browser_ui_views_task__manager__search__bar__view.cc) = 50c271541a3a44133087be0f587a87bc569f60e4
+SHA1 (patch-chrome_browser_ui_views_user__education_browser__user__education__service.cc) = 71e9578b393155c6854215cee95cf1a46fa554ba
+SHA1 (patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc) = 9800cb090e850cd70002153d54c51094a5add0c3
+SHA1 (patch-chrome_browser_ui_web__applications_web__app__dialogs.h) = f0e8cc0388469d18ee1fe33a77633da5d7551f48
+SHA1 (patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.cc) = 9ddffb1d2eab87623a30bb5fe7f6bca0380d9aca
+SHA1 (patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.h) = 5b232182607ed85abbd794daea4075bac6eab215
+SHA1 (patch-chrome_browser_ui_webui_about_about__ui.cc) = 2bbba3210f14b3c48086f2b80800ffddb689e3fc
+SHA1 (patch-chrome_browser_ui_webui_about_about__ui.h) = 2a2f5c307bb926d5d236a045107f81237f0a2cc0
+SHA1 (patch-chrome_browser_ui_webui_app__home_app__home__page__handler.cc) = 519d59a0adcf13b3375ace9d5cc2bf31f43c7212
+SHA1 (patch-chrome_browser_ui_webui_app__home_app__home__page__handler.h) = b58cd887e9ae6c836761fc40bbbb233fcf7f4c80
+SHA1 (patch-chrome_browser_ui_webui_app__settings_web__app__settings__ui.h) = a931bca4fb435ed82cc1820607c3261a0873d593
+SHA1 (patch-chrome_browser_ui_webui_certificate__manager_certificate__manager__handler.cc) = 1ca30ff72e06a97e868c474c33733d6a7764e9c5
+SHA1 (patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.cc) = f746a2355bd93b3cdecd75cd7d0ef237777744fd
+SHA1 (patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.h) = 585cca925427ce300b3a953e374662c95037cb99
+SHA1 (patch-chrome_browser_ui_webui_chrome__web__ui__configs.cc) = 512b3c8dee63c35bffd4e16430d618e7d770fb96
+SHA1 (patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc) = efb7fef0657ea72a6cae6b2e5531aa6a8fc175a9
+SHA1 (patch-chrome_browser_ui_webui_connectors__internals_connectors__internals__page__handler.cc) = 847d278ffb1832d0d3a6dc63af84607e233b8d1f
+SHA1 (patch-chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc) = 1f05301ec18e8a1e33eca837d0934f2a09089ed5
+SHA1 (patch-chrome_browser_ui_webui_interstitials_interstitial__ui.cc) = e3eec6a369dec4fca59f6580f4cb357cebb0440f
+SHA1 (patch-chrome_browser_ui_webui_management_management__ui.cc) = 266028f84700bb1cb0596a0fff234dc2c6d6d629
+SHA1 (patch-chrome_browser_ui_webui_management_management__ui__constants.cc) = f967dc0a40b7f6ca72fa8ce685dbc34057349fbf
+SHA1 (patch-chrome_browser_ui_webui_management_management__ui__constants.h) = ffde19b829e4750091c072244c5850053834699d
+SHA1 (patch-chrome_browser_ui_webui_management_management__ui__handler.cc) = 31b0f2652aac299898569a56f32e6801f9d40752
+SHA1 (patch-chrome_browser_ui_webui_management_management__ui__handler.h) = cd744b5299ee45045fb455b964d4e8a6d5d55519
+SHA1 (patch-chrome_browser_ui_webui_new__tab__page_new__tab__page__handler.cc) = de5a792b50a9c30e7bfd8eb8ced7cee03d482d3b
+SHA1 (patch-chrome_browser_ui_webui_password__manager_promo__cards__handler.cc) = 8455d41ba3ae087fd5cb2e4c3f7bcd76e3cac9b9
+SHA1 (patch-chrome_browser_ui_webui_password__manager_promo__cards_relaunch__chrome__promo.cc) = eedbfe0bb1f87aab52454c3b85421af6139a9c89
+SHA1 (patch-chrome_browser_ui_webui_searchbox_searchbox__handler.cc) = 0337550dd2d3476cda41662f8fdb3536f1aed4f7
+SHA1 (patch-chrome_browser_ui_webui_settings_appearance__handler.cc) = d4465cfb0e867d9ce6fbc23b6308eb1ffb3e70ee
+SHA1 (patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc) = 2f0789b7bcb3f0f51a8cf442e459ab323d68290c
+SHA1 (patch-chrome_browser_ui_webui_side__panel_customize__chrome_customize__chrome__page__handler.cc) = 23c34177a2efb0d56619921580e0d71d8e876908
+SHA1 (patch-chrome_browser_ui_webui_side__panel_customize__chrome_customize__chrome__page__handler.h) = f93ccd6a5cdb4a3affab3c50b16894b1feb2c2a8
+SHA1 (patch-chrome_browser_ui_webui_signin_profile__picker__handler.cc) = 8adba1e2f555f83734dbf36b89fea5a7a38daaec
+SHA1 (patch-chrome_browser_ui_webui_user__education__internals_user__education__internals__page__handler__impl.cc) = 3c24c5a77594282369b64f3e479cf6d6b2fe110c
+SHA1 (patch-chrome_browser_ui_window__sizer_window__sizer.cc) = e57fccf4c1855817ee3aa67c67e331207b0eb65f
+SHA1 (patch-chrome_browser_upgrade__detector_version__history__client.cc) = 1c5120122a1c8528c4d1d51aee536dd99d336a57
+SHA1 (patch-chrome_browser_visited__url__ranking_visited__url__ranking__service__factory.cc) = f403339befb61ab0354d5a2da6d2d640abdcde0e
+SHA1 (patch-chrome_browser_web__applications_commands_launch__web__app__command.cc) = d5f4a1c58250bde23c61d025d82169263101565e
+SHA1 (patch-chrome_browser_web__applications_commands_set__user__display__mode__command.cc) = 0e3285b3fa70d8e9611ad33c56c235f37cce1929
+SHA1 (patch-chrome_browser_web__applications_extension__status__utils.h) = 9106a8bfb43d577ed11ba0f1293b656e5a98a088
+SHA1 (patch-chrome_browser_web__applications_extensions_extension__status__utils.cc) = abffe9b2eaf5dcce8e6188b9158fd0af0b574a61
+SHA1 (patch-chrome_browser_web__applications_os__integration_os__integration__manager.cc) = cec4b4b6f9b7e7815fae749c34ade8e6f1dbab25
+SHA1 (patch-chrome_browser_web__applications_os__integration_os__integration__test__override.h) = 1be09b699c1643e33b71a1b97df4114e47d67d40
+SHA1 (patch-chrome_browser_web__applications_os__integration_run__on__os__login__sub__manager.cc) = 733fd1f4c13e02b50544310efa0c6de9a1956d74
+SHA1 (patch-chrome_browser_web__applications_os__integration_shortcut__sub__manager.cc) = 58d61fec70e311b3d376de1be90f4f0d5f33211e
+SHA1 (patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h) = 870eaa66dbe844ff1db787967bc25da681af20dd
+SHA1 (patch-chrome_browser_web__applications_os__integration_web__app__shortcut.cc) = a4a632ced4f4d20ce9bd4319e564ee49ff898c3e
+SHA1 (patch-chrome_browser_web__applications_os__integration_web__app__shortcut.h) = cbc8be601f852724664e016ffc510e2220cb5c26
+SHA1 (patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc) = cf443a7f6f36d57f762e3aa6d883cafd3d4d54d7
+SHA1 (patch-chrome_browser_web__applications_test_os__integration__test__override__impl.cc) = 48198acfa52b685708c7de3456a6e01b55ed774e
+SHA1 (patch-chrome_browser_web__applications_test_os__integration__test__override__impl.h) = 1d1542ebe5e9747757e318485577dd7544473b51
+SHA1 (patch-chrome_browser_web__applications_web__app__helpers.cc) = c92e3339f9f4420ab99059fb9c260302c4e206b0
+SHA1 (patch-chrome_browser_web__applications_web__app__install__info.h) = fccc9fcb839a116ff3efe1312c3906d666427777
+SHA1 (patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc) = 0e4d9516f076e46ba556947a83d01c4b27c21c76
+SHA1 (patch-chrome_browser_webauthn_enclave__manager.cc) = d134862ecfa4e3a2d5a30f2144e65441ce3b1bdf
+SHA1 (patch-chrome_browser_webauthn_gpm__user__verification__policy.cc) = de4d419d9797fb517b7914b75e77f8129d47bfb0
+SHA1 (patch-chrome_browser_webauthn_password__credential__controller.cc) = 86e91284f503c02c7b90b4547a5f7ba8ea93aa91
+SHA1 (patch-chrome_browser_webauthn_unexportable__key__utils.cc) = 4a4626202b876422b926f6ae771f81297c2c64bd
+SHA1 (patch-chrome_common_channel__info.h) = d9a5c26152a1f46771790f7bc705042638c3d87e
+SHA1 (patch-chrome_common_channel__info__posix.cc) = 86be35b547e85671c646957924690a29224b5b4a
+SHA1 (patch-chrome_common_chrome__features.cc) = 250e43ee0dd8657f54acd5843af2c35981321be2
+SHA1 (patch-chrome_common_chrome__features.h) = 01112b9f2d4608eed0d82227ce0eb5200646c91b
+SHA1 (patch-chrome_common_chrome__paths.cc) = e7f7a5022194acaa650cdcb7ba9ccaf4c1084b1a
+SHA1 (patch-chrome_common_chrome__paths.h) = 29e2ad734488ec6fb4204e7b841996a8ca249286
+SHA1 (patch-chrome_common_chrome__paths__internal.h) = af742a766e78e8f0ac15c7d8cb4e555291c30d74
+SHA1 (patch-chrome_common_chrome__switches.cc) = 56efeb400273386a4bf18b9bb7d4bd3ab55f8128
+SHA1 (patch-chrome_common_chrome__switches.h) = 725feaf6bfeab5bb45746a9aec5619afe217b033
+SHA1 (patch-chrome_common_crash__keys.cc) = 2d925773724e42bf9b1a1f473046d265822355e2
+SHA1 (patch-chrome_common_extensions_extension__constants.cc) = 1c350e3b03478eae7fa50984023554914a458718
+SHA1 (patch-chrome_common_extensions_extension__constants.h) = 05a5b045e27e9eb45b3954089864c39b6a779ba1
+SHA1 (patch-chrome_common_extensions_permissions_chrome__permission__message__rules.cc) = 806ea1c6bf16b6ca3573086bd1cd9ff8bd8d2b39
+SHA1 (patch-chrome_common_media_cdm__host__file__path.cc) = 1081d2170aedb0aa5fa66de65caa5678c14621b3
+SHA1 (patch-chrome_common_media_cdm__registration.cc) = 1c63beba6fee40640b316ba32a9f14ad3e47c082
+SHA1 (patch-chrome_common_media_cdm__registration.h) = 16d6235c619ddd38370047386fb5be830fa0ec83
+SHA1 (patch-chrome_common_media_component__widevine__cdm__hint__file__linux.h) = 769140b6d7fbc3a02d436f53b9b24061170782b6
+SHA1 (patch-chrome_common_pref__names.h) = 26ec510d817024249427bda206401d61720b30d2
+SHA1 (patch-chrome_common_url__constants.h) = 76510bb05f67f4b871c48f70f1c0da7182735c57
+SHA1 (patch-chrome_common_webui__url__constants.cc) = 85697772439ffa36d3ff5d544d7d6bf92edcb3a1
+SHA1 (patch-chrome_common_webui__url__constants.h) = 3c03c4dff5b8961d5f4eb20364fbde1d6fb1f000
+SHA1 (patch-chrome_enterprise__companion_enterprise__companion__client.cc) = db96d15a1b3ed1f3c4bf0b51a52db9cf305fe404
+SHA1 (patch-chrome_enterprise__companion_event__logger.cc) = 797610fad2e3f16549b19ef0deb33b70e6d4d970
+SHA1 (patch-chrome_enterprise__companion_lock.cc) = 858c6846940d350fab7627897a13e3ec376c1893
+SHA1 (patch-chrome_services_printing_print__backend__service__impl.cc) = 90805b30659c6afde62b900cacc047ff5f9d1c22
+SHA1 (patch-chrome_services_speech_audio__source__fetcher__impl.cc) = 87e7db817c19f0a8fa9f32e13af3c7fd17b00cfa
+SHA1 (patch-chrome_test_base_scoped__channel__override__posix.cc) = 29272c9286c74f30a938125637472adb60ae429b
+SHA1 (patch-chrome_test_chromedriver_chrome__launcher.cc) = 2980f62bb203e5a9fecfd7cba474b4b619d827b3
+SHA1 (patch-chrome_test_chromedriver_chrome_chrome__finder.cc) = ab37783823e979ffd4ae2f942da1cb19ffa9b0b5
+SHA1 (patch-chrome_test_chromedriver_key__converter__unittest.cc) = 2417795b63cb5124f1e8642c431d0b104cd652a0
+SHA1 (patch-chrome_test_chromedriver_keycode__text__conversion__unittest.cc) = ed9548162960c3f8c4fad3531e9d73718d5c6243
+SHA1 (patch-chrome_test_supervised__user_google__auth__state__waiter__mixin.cc) = b7b4201259c253aab3d4b48c6a2ad94351313da0
+SHA1 (patch-chrome_updater_app_app__uninstall.cc) = 4306a98ee207d00530da1cd6fcd616ce9b707185
+SHA1 (patch-chrome_updater_configurator.cc) = 6a7877a74d126af6d4ffa1a7351c55984fccbadc
+SHA1 (patch-chrome_updater_lock.cc) = 5c45d7dd337e3b731716f82a604178582c91a7b6
+SHA1 (patch-chrome_updater_util_posix__util.cc) = ba64decb85cf420c153ebdd3f938c854e5bd0e9a
+SHA1 (patch-chrome_utility_services.cc) = a62e8cbf67a397b11c5fbc819f7097bdbc31fc75
+SHA1 (patch-chromecast_browser_cast__browser__main__parts.cc) = 5a4f65198e9a665eb7be3389df9812173b87e2b2
+SHA1 (patch-chromecast_browser_cast__content__browser__client.cc) = 7a0dbe8da3b44483e3496f425c28c02341aed51c
+SHA1 (patch-chromecast_cast__core_runtime_browser_runtime__application__service__impl.cc) = 3e83c194fb437ee39f0f63e009472a0711f17731
+SHA1 (patch-chromecast_media_base_default__monotonic__clock.cc) = 3d41fc579f07befa787c12ccf0ddab50caae3508
+SHA1 (patch-components_BUILD.gn) = dd1cbc221439ae7c010bf6c87cbc1f37f9bcadfb
+SHA1 (patch-components_autofill_core_browser_data__manager_payments_payments__data__manager.cc) = 9adb1bb96f40a248cb0da939c90140d06dae4ee5
+SHA1 (patch-components_autofill_core_browser_data__manager_payments_payments__data__manager.h) = 4ba117704adb715bb0256e9fbabe95b7b518b5a8
+SHA1 (patch-components_autofill_core_browser_foundations_browser__autofill__manager.cc) = 82726e7ff58fe743569053931ebe33e564c1b2f3
+SHA1 (patch-components_autofill_core_browser_integrators_optimization__guide_autofill__optimization__guide.cc) = bbc4eb2e2e87ce4334e973fb91067243971f1ed1
+SHA1 (patch-components_autofill_core_browser_payments_amount__extraction__manager.cc) = c8f954e7b9feaf97f12a00fe243c7ff8a73643c6
+SHA1 (patch-components_autofill_core_browser_payments_bnpl__manager.cc) = 777a191acb3e15130ec669c711bad27665c16bb3
+SHA1 (patch-components_autofill_core_browser_webdata_payments_payments__sync__bridge__util.cc) = a64653f0c4ebadd8a2b9f7ba047daa6633569077
+SHA1 (patch-components_autofill_core_common_autofill__payments__features.cc) = 8e437be0be68fd508a22657336d55c18a7dd2195
+SHA1 (patch-components_autofill_core_common_autofill__prefs.cc) = 37d8d2d8243a1bf32b87b5d8a7305c1eae267f23
+SHA1 (patch-components_autofill_core_common_autofill__prefs.h) = 776c6ae9dfb25c391b42d3edf0fb11255986d484
+SHA1 (patch-components_commerce_core_commerce__feature__list.cc) = 7116331e14b60ca19a9083209d2ae7a502440476
+SHA1 (patch-components_constrained__window_constrained__window__views.cc) = 4c9d0266c30d6b3df1c2a3ba29afa375bcfdddee
+SHA1 (patch-components_content__settings_core_browser_website__settings__registry.cc) = d4d2dfaa42f0a784ed7392ab82c313f19c12aa05
+SHA1 (patch-components_cookie__config_cookie__store__util.cc) = cf9e725ac3a117ba659739c72f7f12e6c61563ac
+SHA1 (patch-components_crash_core_app_BUILD.gn) = 153368994a5f6b2d6b1df38eac26e9d884a1795c
+SHA1 (patch-components_crash_core_app_chrome__crashpad__handler.cc) = fa5502ee8bf7daef367a2dca9241e9ad24add1ed
+SHA1 (patch-components_crash_core_app_crashpad__handler__main.cc) = e5eb5857b7a6d957dc6415a5f2a8da002c2aa4d2
+SHA1 (patch-components_crash_core_browser_crash__upload__list__crashpad.cc) = 56c120620ab9b69c35fce1cc98e8915feb4d14d3
+SHA1 (patch-components_crash_core_common_BUILD.gn) = f61903d8f97134f1355514923e210bc79f366ddc
+SHA1 (patch-components_device__signals_core_browser_browser__utils.h) = 648b2c0ec0710a744e6aa8e096ce0214e4a40c15
+SHA1 (patch-components_device__signals_core_browser_mock__signals__aggregator.h) = d77767506e7e9a0251b6f32d69f3ebf7700ad210
+SHA1 (patch-components_device__signals_core_browser_signals__aggregator.h) = 6f9fd74b6ef1d643263a1524c57ea1afdf7b4b32
+SHA1 (patch-components_device__signals_core_browser_signals__aggregator__impl.cc) = 64c422d96bc6adb507dafe6a44d6b7042bce29d3
+SHA1 (patch-components_device__signals_core_browser_signals__aggregator__impl.h) = ce49d25be4d0395fd6e45883f44c2c8d3d4e7ab6
+SHA1 (patch-components_device__signals_core_browser_user__permission__service.h) = dd979c95905a40e697ea991e95129cf2acec067b
+SHA1 (patch-components_device__signals_core_browser_user__permission__service__impl.cc) = fe0f482e2bc01be3fba512dff3ea5fd319bbccbe
+SHA1 (patch-components_device__signals_core_browser_user__permission__service__impl.h) = fee84dc3838f4d97d5d05d4165608c25e2eec5b6
+SHA1 (patch-components_device__signals_core_common_linux_platform__utils__linux.cc) = e020cbd7a47347f74933bb158fcbf3f38dfa6457
+SHA1 (patch-components_device__signals_core_common_signals__features.cc) = cca0eed32fd9ef5eb61832ff260088c786e841dd
+SHA1 (patch-components_device__signals_core_common_signals__features.h) = e89fdce5899ec52b2743412bc10642a2588758f9
+SHA1 (patch-components_device__signals_core_system__signals_platform__delegate.cc) = 1815f0176886caf3c27163ca82afa50941ac5805
+SHA1 (patch-components_device__signals_test_signals__contract.cc) = 5636df682196fcf69bb170d6ec6ca5aeaa9cd5ac
+SHA1 (patch-components_discardable__memory_service_discardable__shared__memory__manager.cc) = 5205e2bc8dd129c57750fd42a59b32d8aa267e6b
+SHA1 (patch-components_embedder__support_user__agent__utils.cc) = 69189a73500571beb7947d28c98035a89ee885f1
+SHA1 (patch-components_embedder__support_user__agent__utils__unittest.cc) = 604dd7851caa25a006c612910ab2e0d0f2bd149a
+SHA1 (patch-components_enterprise_connectors_core_realtime__reporting__client__base.cc) = 41a5589fa10c74077be1ae690f27c391178b0586
+SHA1 (patch-components_enterprise_watermarking_watermark.cc) = 06501a9b0ade95c8fced3db6d0342cf00305f44a
+SHA1 (patch-components_error__page_common_localized__error.cc) = e1328ec81b49d7d1acdc07a6821e778d4fb4bc6b
+SHA1 (patch-components_eye__dropper_eye__dropper__view.cc) = e390e82ecdc64b4ca55b765e4d93d5a153c91469
+SHA1 (patch-components_feature__engagement_public_event__constants.cc) = b73be432173e7255ff5febcf0b41e8b8ca443a69
+SHA1 (patch-components_feature__engagement_public_event__constants.h) = c0c88cf36b7c05402630203b501f95eb272dc630
+SHA1 (patch-components_feature__engagement_public_feature__configurations.cc) = a76077c71d5557d3ccc3216c11384caafe33391c
+SHA1 (patch-components_feature__engagement_public_feature__constants.cc) = 89f7e6500b454bc4758904855bc193968d629e1d
+SHA1 (patch-components_feature__engagement_public_feature__constants.h) = 697036eb441c5c2df2fed55177fc80f307620755
+SHA1 (patch-components_feature__engagement_public_feature__list.cc) = 4c99bcc0b44bf9973117718c70b26a639b323140
+SHA1 (patch-components_feature__engagement_public_feature__list.h) = 640c4cc04d8c81edd5fcf3b77007d61af2e0aa7a
+SHA1 (patch-components_feed_core_proto_v2_wire_version.proto) = 142a7f613125b1bf1ec38eaa8f9a68c192fea385
+SHA1 (patch-components_feed_core_v2_feed__network__impl__unittest.cc) = dc7ec57641a2fa7f6913e29b29e63f8c18f00f00
+SHA1 (patch-components_feed_core_v2_proto__util.cc) = 8c5862fc40f6c6b3193961f2b4782077a4980057
+SHA1 (patch-components_feed_core_v2_proto__util__unittest.cc) = 1382b758739f0ea954015c339d0ac710f489b18c
+SHA1 (patch-components_feed_core_v2_test_proto__printer.cc) = 4d6a1b4b1489d704aa13c69f440d57da6e42a0ff
+SHA1 (patch-components_gcm__driver_gcm__desktop__utils.cc) = 73b86b7135757a49aba5ceb0632d7738641604f2
+SHA1 (patch-components_gwp__asan_BUILD.gn) = 1ce9ec1af031d49241d2135242fb490685c613cb
+SHA1 (patch-components_gwp__asan_buildflags_buildflags.gni) = 2a0324fca482df6be300772c31e29382e70cb396
+SHA1 (patch-components_gwp__asan_client_guarded__page__allocator__posix.cc) = 232063f37306b287ce63271dd64357fff26ac44e
+SHA1 (patch-components_gwp__asan_client_gwp__asan.cc) = 4afd4461c9543d5fd4d57b23fa1646eff02690b2
+SHA1 (patch-components_gwp__asan_client_gwp__asan__features.cc) = d9ed3bc7f8e3f38bb2a668dc640b85ff8af83948
+SHA1 (patch-components_gwp__asan_crash__handler_crash__analyzer.cc) = 6af9e28d629ed0f60cedf62a2eeebef350e5882c
+SHA1 (patch-components_live__caption_caption__util.cc) = 36621cfc882f76520a2ca013e4c7450266289057
+SHA1 (patch-components_live__caption_caption__util.h) = a8d58f29e4dc03258786bf49a7f0a1dc2ce5501f
+SHA1 (patch-components_media__router_common_media__source.cc) = 0111abdf094bf1625ae92d6ebe687f075cdcdb96
+SHA1 (patch-components_media__router_common_providers_cast_channel_cast__message__util.cc) = 9481923b4cdff9ae4bde061401f7d2060ce9b33d
+SHA1 (patch-components_media__router_common_providers_cast_channel_enum__table.h) = 0d5a6b5a53843cd44360ad3550d953570011f2a7
+SHA1 (patch-components_metrics_drive__metrics__provider.cc) = 0db962dc9f99d2dee6d46be3a6648048193f2989
+SHA1 (patch-components_metrics_dwa_dwa__service.cc) = db93f08fb563a634763323ff9037891432a98326
+SHA1 (patch-components_metrics_metrics__log.cc) = 1aa828796f9a3a2a4701c05af099edb8d503fb52
+SHA1 (patch-components_metrics_motherboard.cc) = 66eac783c567a3f89c2e3032864768c70b61e055
+SHA1 (patch-components_named__mojo__ipc__server_connection__info.h) = 9484a02817bee47fd3f263e4088a43cda2179f12
+SHA1 (patch-components_named__mojo__ipc__server_named__mojo__ipc__server__client__util.cc) = 503380b14f9495a7c1584ebd17fd49ef971d8487
+SHA1 (patch-components_named__mojo__ipc__server_named__mojo__server__endpoint__connector__linux.cc) = d92db581bff6b415880c7f2a2bb81e3f969aa9fd
+SHA1 (patch-components_named__system__lock_BUILD.gn) = a0ba8823bdd61e488f5c05a348599af1153e7375
+SHA1 (patch-components_named__system__lock_lock.h) = 3a7225e49384f3003a5480a8415d98da094ce4c6
+SHA1 (patch-components_named__system__lock_lock__unittest.cc) = a3e2930ab4e56bf7196f939f0717acfb2741a253
+SHA1 (patch-components_optimization__guide_core_optimization__guide__features.cc) = b028e62cee5215600788e5b9c0316eb3067d2fac
+SHA1 (patch-components_optimization__guide_core_optimization__guide__util.cc) = 8d1b4a1552c9e982e5ec2ac9a899008bcb58132d
+SHA1 (patch-components_os__crypt_async_browser_secret__portal__key__provider.cc) = e7323f9e44de150d9389e73aabc06984b6339996
+SHA1 (patch-components_os__crypt_sync_libsecret__util__linux.cc) = 62b491a28351da82e16e931fbfe4ab084609200c
+SHA1 (patch-components_os__crypt_sync_os__crypt.h) = c18f6dfaa771cad52cb96f9ad7757b571e13a89a
+SHA1 (patch-components_paint__preview_browser_paint__preview__client.cc) = 9c61b9191ee63e0d276131090b4c52771f081425
+SHA1 (patch-components_paint__preview_browser_paint__preview__client__unittest.cc) = a7c6090519e7446ae443b0d69d546c153b074971
+SHA1 (patch-components_paint__preview_common_proto_paint__preview.proto) = 76079afa8d0b9facc0556db5dc7955b7e4b3040a
+SHA1 (patch-components_paint__preview_player_player__compositor__delegate.cc) = 6367050437266e030138ea30ef8cda463bd093ba
+SHA1 (patch-components_password__manager_core_browser_features_password__features.cc) = bbca95ec92ca130ce0d1aaa9730ecbf490c04666
+SHA1 (patch-components_password__manager_core_browser_features_password__features.h) = c2322ed42c62fc18652e9c34e02acbbed47067f1
+SHA1 (patch-components_password__manager_core_browser_password__autofill__manager.cc) = da471973d13e3c658936791c8e64326bcda8ea32
+SHA1 (patch-components_password__manager_core_browser_password__autofill__manager.h) = 78fe31dff40402575373a888c9f175d3686ce2e0
+SHA1 (patch-components_password__manager_core_browser_password__form__filling.cc) = 475df3cbf6672702573dbdc293602d3781c977d3
+SHA1 (patch-components_password__manager_core_browser_password__form__manager.cc) = d1f9e6b2ff19a34ed3a5eee63914cf08f0b53a07
+SHA1 (patch-components_password__manager_core_browser_password__manager.cc) = 94303f3902b79cb71733630267664f02ec402896
+SHA1 (patch-components_password__manager_core_browser_password__manager__client.h) = a686c0274f18babd7cdb1644def4ae8827a4bdcc
+SHA1 (patch-components_password__manager_core_browser_password__manager__switches.cc) = 2582c6b698be7e4983fd3da791a1e7f7e2b04396
+SHA1 (patch-components_password__manager_core_browser_password__manager__switches.h) = fa27e98f864aa9e4952b324f0f925b2b5d2c1a4e
+SHA1 (patch-components_password__manager_core_browser_password__manual__fallback__flow.cc) = bde4cfd6d19092c58598deaa0b57e9e39c95faf3
+SHA1 (patch-components_password__manager_core_browser_password__manual__fallback__flow.h) = a7375f52fe9052cab40698515a033464e7d32986
+SHA1 (patch-components_password__manager_core_browser_password__store__factory__util.cc) = 9d7340ec3dfdf8db3278f284b0a524de34f7f7cc
+SHA1 (patch-components_password__manager_core_browser_password__store_login__database.cc) = 319e4281afe2ac0fb6389b81b094691a0d279d5c
+SHA1 (patch-components_password__manager_core_browser_password__store_login__database__async__helper.cc) = 0dfc9271758896723db11e4a389e95ccaad82376
+SHA1 (patch-components_password__manager_core_browser_password__store_login__database__unittest.cc) = 6af5b1ae4146ce49b931c76594af4539fb8c6772
+SHA1 (patch-components_password__manager_core_browser_stub__password__manager__client.cc) = 67b0bfadef9cade05b4fb128f954e51373f19eee
+SHA1 (patch-components_password__manager_core_browser_stub__password__manager__client.h) = 3970917ce6a155698b769f5746aab242cf54c849
+SHA1 (patch-components_password__manager_core_common_password__manager__pref__names.h) = 5ee3246e5acf59db5900d4e187693fbb58129f9b
+SHA1 (patch-components_performance__manager_decorators_process__metrics__decorator.cc) = 15a89ece8defd49f314bcb9e1cd26037247bf3d7
+SHA1 (patch-components_performance__manager_public_features.h) = 6d4c72a4336daa51c979a710ea1e36fc0db79cf3
+SHA1 (patch-components_permissions_prediction__service_prediction__common.cc) = 6a73d68751e8ec59b2b16634256593517e966f1b
+SHA1 (patch-components_policy_core_browser_policy__pref__mapping__test.cc) = 374ac94ee3dd844ce661020c024aa641de1a11a7
+SHA1 (patch-components_policy_core_browser_url__blocklist__manager.cc) = 952592ea57a629edea10234adc3b6a638a21a6b4
+SHA1 (patch-components_policy_core_common_cloud_cloud__policy__client.cc) = 3ec0d91899bb1c17a25a41683a70818c8054b292
+SHA1 (patch-components_policy_core_common_cloud_cloud__policy__refresh__scheduler.cc) = def170cf38cdb96682e3f9134577e85be6e0765d
+SHA1 (patch-components_policy_core_common_cloud_cloud__policy__util.cc) = 5e5177afda2b19cb195f37930408784edca87870
+SHA1 (patch-components_policy_core_common_policy__loader__common.cc) = b10b4920f8e43426bee127d97613155fb7c570ce
+SHA1 (patch-components_policy_core_common_policy__paths.cc) = ecfc704da8b03b5c4f4968c84eda37dd971b2cc9
+SHA1 (patch-components_policy_core_common_policy__pref__names.cc) = e9e9c570923bb83751afd21fc4e8d514b954370d
+SHA1 (patch-components_policy_core_common_policy__pref__names.h) = b2333abb4227faf698194a66af476e2ab4eafd11
+SHA1 (patch-components_policy_tools_generate__policy__source.py) = 77358a909cb18955818a04526c1bfd5cc341935a
+SHA1 (patch-components_power__metrics_BUILD.gn) = 199a8529511bef4ac2ef7d311277e07d954d76bc
+SHA1 (patch-components_power__metrics_energy__metrics__provider.cc) = 10d27b69c70cae6720c18c550518f3e5dd996ffa
+SHA1 (patch-components_regional__capabilities_regional__capabilities__service.cc) = bf4e55238538673db6701e1b22b2036d95aeb20a
+SHA1 (patch-components_regional__capabilities_regional__capabilities__switches.cc) = 2f73bad1d9c389df78a6aaf184eba371f9999e53
+SHA1 (patch-components_regional__capabilities_regional__capabilities__switches.h) = 3025016b2504eeeec0dac933877008e579ffab54
+SHA1 (patch-components_safe__browsing_content_common_file__type__policies__unittest.cc) = 605ce908453bb9c558731a21817a4f9160e578b1
+SHA1 (patch-components_safe__browsing_content_resources_gen__file__type__proto.py) = ba61c876fd2307a9d7506b778b26e1eb23a8e4d8
+SHA1 (patch-components_safe__browsing_core_browser_db_v4__protocol__manager__util.cc) = b52a23d1334ec17110e88007fc628a1adb05dc5b
+SHA1 (patch-components_safe__browsing_core_browser_realtime_url__lookup__service__base.cc) = 673549cb101878c511a947d383ddf257d7f6114b
+SHA1 (patch-components_search__engines_template__url__service.cc) = 3b21a76ae5b49f1c9cba9b03e06e77680dcb088a
+SHA1 (patch-components_security__interstitials_content_utils.cc) = bb25cf5b4bfe65fe879d542d201bbdd643f3c2f2
+SHA1 (patch-components_segmentation__platform_embedder_default__model_cross__device__user__segment.cc) = 5996064ffd0956dc1e612c9c3a1055a68a9bfe0d
+SHA1 (patch-components_services_on__device__translation_sandbox__hook.cc) = 57189c2d0b9137cbca598032758b4218e04f9a6e
+SHA1 (patch-components_services_on__device__translation_sandbox__hook.h) = b8062dc000d32953cf1965168bcc0adf8967e857
+SHA1 (patch-components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.cc) = 65d28731bd34f59f0e1759e237400f9263b6b1a4
+SHA1 (patch-components_signin_public_base_signin__switches.cc) = e512429cefc61a9673617f30bf3da1cf81d71a93
+SHA1 (patch-components_signin_public_base_signin__switches.h) = 5a78166e6875ecd72bd5268ad7c3f14c6c11568d
+SHA1 (patch-components_soda_soda__util.cc) = 85ef9e45aa4648595e4d6163393a9b59b372b3c7
+SHA1 (patch-components_startup__metric__utils_common_startup__metric__utils.cc) = a452d5569f8eccc3364fb8b7e3395bf970cf5847
+SHA1 (patch-components_storage__monitor_BUILD.gn) = fabe33464ea9152cd3d23e780f0fc5690a9b78cf
+SHA1 (patch-components_storage__monitor_removable__device__constants.cc) = 4908f8c07cd1ef39efa763d8893522a49b644d4e
+SHA1 (patch-components_storage__monitor_removable__device__constants.h) = 35be2da0bb20119c8d572007cd83fbd0b4d5adb8
+SHA1 (patch-components_supervised__user_core_browser_kids__chrome__management__url__checker__client.cc) = a8efb7b0b0c726299d0ccf9075b8468a0a5c6382
+SHA1 (patch-components_supervised__user_core_browser_list__family__members__service.h) = 34a46253406aec12dad603aa378581e88e5ff1b8
+SHA1 (patch-components_supervised__user_core_browser_supervised__user__metrics__service.cc) = 3655106db68a26fa3a2a68c8b4a58766426f481d
+SHA1 (patch-components_supervised__user_core_browser_supervised__user__preferences.cc) = 5fa778eed98cdff465082a24ed0fb94696095b0e
+SHA1 (patch-components_supervised__user_core_common_features.cc) = bd0184a55311029d775c17a636b17566ad672c32
+SHA1 (patch-components_supervised__user_core_common_features.h) = 0a4f0be1781a84f1c5e5d99d96835a2a4b510461
+SHA1 (patch-components_supervised__user_core_common_pref__names.h) = 8f17750870f258c8e9f73e9f7b0ac092509f4757
+SHA1 (patch-components_sync__device__info_local__device__info__util.cc) = 17a779e500f00fb26dd6a570fa56fe04f2fdbfee
+SHA1 (patch-components_sync__device__info_local__device__info__util__linux.cc) = 1ad169a5377f2fd7ac2d7c2292c88393082c9917
+SHA1 (patch-components_sync__preferences_common__syncable__prefs__database.cc) = bc4705a9180ffaf29c5ac1ee863da1b177dbdcfc
+SHA1 (patch-components_sync_base_sync__util.cc) = 6714d5f46a3f19e93768db2919315ef6029c05cf
+SHA1 (patch-components_system__cpu_cpu__probe.cc) = 1d90dced4a0033170343b237173ead75a4f898a8
+SHA1 (patch-components_translate_core_common_translate__util.cc) = 4082494904ebe95cdebd9a59383e1ee22a5fc4bb
+SHA1 (patch-components_trusted__vault_trusted__vault__connection__impl.cc) = 544d0b9d3ef8f6eefcae5514c54e7f97df872628
+SHA1 (patch-components_update__client_update__query__params.cc) = 715550e3b2d2c8d72fd2ebff8370b4f5104518d2
+SHA1 (patch-components_url__formatter_spoof__checks_idn__spoof__checker.cc) = b72e653df58e13dba81052c3774d52ba52e20bb1
+SHA1 (patch-components_user__education_views_help__bubble__view.cc) = 83646a16e48b09f772bd9c507ac669c110cff85a
+SHA1 (patch-components_user__education_views_help__bubble__view.h) = d30c5f7b0eed78f2be1b0c33b6fec11ce1b8bcfb
+SHA1 (patch-components_variations_service_variations__service.cc) = b43343c2558f8f4cf701072d290de78002ae2b43
+SHA1 (patch-components_visited__url__ranking_public_url__visit__util.cc) = 1259b9541431e847548e880be0875f511a9bcac6
+SHA1 (patch-components_viz_host_gpu__host__impl.cc) = b89ebc6bddb71345c148704a80a2d61aee1147cf
+SHA1 (patch-components_viz_host_host__display__client.cc) = ada95c269a5ac7b6953a0ca46f564a4aa540a6f2
+SHA1 (patch-components_viz_host_host__display__client.h) = 594c8fe7c55ee43a55e0439c77b61c05d6d74704
+SHA1 (patch-components_viz_service_display__embedder_skia__output__surface__impl.cc) = 4325e6d654f23296f2eff817966f3ae6f4d7abda
+SHA1 (patch-components_viz_service_display__embedder_software__output__surface.cc) = 3cc3cd74d69d7cff934ab42857bf25413957eb8c
+SHA1 (patch-components_viz_service_display__embedder_software__output__surface.h) = c9d499a5171277e3228230d596b31d36e5fae7cd
+SHA1 (patch-components_viz_service_display_skia__renderer.cc) = f8d7643140c8ecb3b8c3c2183ea64469cad0a50a
+SHA1 (patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc) = ba13177cc66b9ef037c2660ad7c11bd891778e7b
+SHA1 (patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h) = c792fc27c3607f06c84e9059ff2a81d2d9494f1b
+SHA1 (patch-components_viz_service_gl_gpu__service__impl.cc) = cd4cc1a64fec98e8e7813ac2069cffed40938f59
+SHA1 (patch-components_viz_service_gl_gpu__service__impl.h) = a07c8979124833e7da26ec907490d9bddee09122
+SHA1 (patch-components_viz_test_fake__display__client.cc) = f8b164d0c7e1b5ea8ddee61428ccbf89c0bb7f65
+SHA1 (patch-components_viz_test_fake__display__client.h) = 3744d5a26895854845131ae38b5401c951d6e07b
+SHA1 (patch-components_viz_test_mock__display__client.h) = d23f943dd5e2ff3e3919be7f9b063c9b79fa3df1
+SHA1 (patch-components_webui_flags_flags__state.cc) = 5afcb99aea49fb297d712c181c8dca84433defe9
+SHA1 (patch-content_app_BUILD.gn) = 9aaa5401bbae1f162ab01fbadc312976bf2ea736
+SHA1 (patch-content_app_content__main.cc) = f051085386ed49d57a90aa180152a69dd7d10b6a
+SHA1 (patch-content_app_content__main__runner__impl.cc) = 7def4251bc60298babf0c29a4957bc01ad617455
+SHA1 (patch-content_browser_BUILD.gn) = bcf898280e77c3797798726aa6dba902cab77dee
+SHA1 (patch-content_browser_accessibility_browser__accessibility__state__impl.cc) = 26cdac13af546e91c2e3217eca068a7f01b6dd31
+SHA1 (patch-content_browser_accessibility_browser__accessibility__state__impl__auralinux.cc) = a48b8fde2162d33d7882ee3654c160df6361c2f5
+SHA1 (patch-content_browser_audio_audio__service.cc) = 6e44f0205e7748dadf68d51babcceaef49b3f3b2
+SHA1 (patch-content_browser_browser__child__process__host__impl.cc) = fbd5e66d57b1e2371202dc1ea6bc7a845417ea79
+SHA1 (patch-content_browser_browser__child__process__host__impl.h) = 252a7f64498cd081b9ebf509e0a7be3710509ead
+SHA1 (patch-content_browser_browser__child__process__host__impl__receiver__bindings.cc) = 074bfad2ef2a7ee173fa6e82e492c359daa2a6dd
+SHA1 (patch-content_browser_browser__main__loop.cc) = 374969fe8c7f4e51d21b738989962a1c655d1fb4
+SHA1 (patch-content_browser_child__process__launcher__helper__linux.cc) = 777bd7de9bebd3975fd1d106ac9921950ebe8a89
+SHA1 (patch-content_browser_child__thread__type__switcher__linux.cc) = 76e7cc8e599c3407b56464f933e274ee2f53378a
+SHA1 (patch-content_browser_child__thread__type__switcher__linux.h) = 4bd03a7d360f032997319b47e4d38b6f3db17e69
+SHA1 (patch-content_browser_compositor_viz__process__transport__factory.cc) = 3b4736e2f0eb4e8c02776d5e2bbad717213391cf
+SHA1 (patch-content_browser_devtools_devtools__frontend__host__impl.cc) = 64e7abd5fa0aadc71fccc7e2579a072ac34fc5e8
+SHA1 (patch-content_browser_devtools_devtools__frontend__host__impl.h) = 46f12fbdabd9c2c2948addaf5baf884fed1b178d
+SHA1 (patch-content_browser_devtools_protocol_system__info__handler.cc) = 6710d2e4329cbefc5606889394a587a4558c592a
+SHA1 (patch-content_browser_file__system__access_file__path__watcher_file__path__watcher.h) = d877b5c294956682239c6386132fb74a8be9e9d9
+SHA1 (patch-content_browser_file__system__access_file__path__watcher_file__path__watcher__bsd.cc) = 325b63e55c18b958f79966a62833608721da8b60
+SHA1 (patch-content_browser_file__system__access_file__path__watcher_file__path__watcher__kqueue.h) = 3b51a10fe9a24fc5ae423da7700a92828eb420ad
+SHA1 (patch-content_browser_file__system__access_file__system__access__local__path__watcher.cc) = 0cb8c71f139960a8b3eacb7b024a8f959d52978d
+SHA1 (patch-content_browser_font__access_font__enumeration__data__source.cc) = 621e8acbdcc462b07a7279885a02a75f6349886b
+SHA1 (patch-content_browser_gpu_compositor__util.cc) = 85b8a3227cf6cbf94e25ec49180d5b72852e0734
+SHA1 (patch-content_browser_gpu_gpu__data__manager__impl.cc) = 094bb751dd206830579d0f6990b3a7975e3b3475
+SHA1 (patch-content_browser_gpu_gpu__data__manager__impl.h) = 637c9b8dbf51ae91b856f9398deb0e62045a12e4
+SHA1 (patch-content_browser_gpu_gpu__data__manager__impl__private.cc) = 4833a752bc101b1128c51ecd4258cb7960dc5e67
+SHA1 (patch-content_browser_gpu_gpu__data__manager__impl__private.h) = ad29c29d5ee7e8ad8acf4ca67dcce38fca7ed853
+SHA1 (patch-content_browser_gpu_gpu__process__host.cc) = f9e2d16f32b049b0c5c17432b1d3de8274353c86
+SHA1 (patch-content_browser_media_frameless__media__interface__proxy.h) = 69aa93506ac92dd261b7a1ea99f695acff2f0fb6
+SHA1 (patch-content_browser_media_media__keys__listener__manager__impl.cc) = bccfccc600de14f0d28b41e1609e0ab869b18877
+SHA1 (patch-content_browser_network__service__instance__impl.cc) = 1f6edf24b268cbcb5bd41816ee4455ebbe6450db
+SHA1 (patch-content_browser_ppapi__plugin__process__host__receiver__bindings.cc) = 8b07089e409597f7bacebe62dbc85cac52fa9980
+SHA1 (patch-content_browser_renderer__host_delegated__frame__host.cc) = 94163886315ce9721871aa1bca651e5877e19012
+SHA1 (patch-content_browser_renderer__host_media_service__video__capture__device__launcher.cc) = f772f3c6feb2668958e83ba35260ba4341db4e5a
+SHA1 (patch-content_browser_renderer__host_pepper_pepper__file__io__host.cc) = 7da12b22cc9611b445618246aab6aa429c7e8a3c
+SHA1 (patch-content_browser_renderer__host_render__process__host__impl.cc) = 7e399aefb69b4f64b542c71ec9dbfbcf20eefeb7
+SHA1 (patch-content_browser_renderer__host_render__process__host__impl.h) = ef24abaefe4b5fb1bd266652fded721c625bc052
+SHA1 (patch-content_browser_renderer__host_render__process__host__impl__receiver__bindings.cc) = 552bee8fa6847ccd563bcb3938b37cea9269dff8
+SHA1 (patch-content_browser_renderer__host_render__view__host__impl.cc) = c40258f3c2dcbaa45dd5f1f54c883e06eaf9173b
+SHA1 (patch-content_browser_renderer__host_render__widget__host__view__aura.cc) = 3b1f3688faae42dcd3f583b04fa03170956b964c
+SHA1 (patch-content_browser_renderer__host_render__widget__host__view__aura.h) = a3d79e65e20ad79af8560d3166bae67f64cce54f
+SHA1 (patch-content_browser_renderer__host_render__widget__host__view__event__handler.cc) = cdef19fa795656ae47e82cd6c8c0058e05baf79b
+SHA1 (patch-content_browser_sandbox__host__linux.cc) = 8aef8631d2f93048b538d587bbf53445020558a7
+SHA1 (patch-content_browser_scheduler_responsiveness_jank__monitor__impl.cc) = 95ac36542e7c3bc67209dee78af423535700483a
+SHA1 (patch-content_browser_scheduler_responsiveness_native__event__observer.cc) = e573326cc72bc38827740997d1d398cc5c46dbd4
+SHA1 (patch-content_browser_scheduler_responsiveness_native__event__observer.h) = 3683fb070b94969028ee04d579fb54bec2e053c5
+SHA1 (patch-content_browser_service__host_utility__process__host.cc) = 61c57563485d19ce919f7b36f9f889a420fe0d4f
+SHA1 (patch-content_browser_service__host_utility__process__host__receiver__bindings.cc) = 58dd440eb379606c1ae0a6ccf56766061049e716
+SHA1 (patch-content_browser_service__host_utility__sandbox__delegate.cc) = e217f3bd567e5491d547dc45755cfca5666f3f46
+SHA1 (patch-content_browser_v8__snapshot__files.cc) = 08bbe1b9e3ec1935e3421404816fd2158495a339
+SHA1 (patch-content_browser_web__contents_slow__web__preference__cache.cc) = e7a0c20547456a610295cacae02f40f421b30b93
+SHA1 (patch-content_browser_web__contents_web__contents__view__aura.cc) = 8ddf52c5cec33fe0e39bcd04d4f4290c33d8764f
+SHA1 (patch-content_browser_web__contents_web__contents__view__aura__unittest.cc) = 5da5f977ec3603c47fda1d2bbfe220ce6547ba9c
+SHA1 (patch-content_browser_webui_web__ui__main__frame__observer.cc) = a993b631e7c40981307b5459d713f595fe76b7a8
+SHA1 (patch-content_browser_zygote__host_zygote__host__impl__linux.cc) = 4ec236aec7c30e1b9ea6f9d24811c6421f9d1137
+SHA1 (patch-content_browser_zygote__host_zygote__host__impl__linux.h) = 8303d79d2e3686c5ab706845fcacb9f2e93b7726
+SHA1 (patch-content_child_BUILD.gn) = ac0443fa9943ffff6a0fadef930f8293ffc05c10
+SHA1 (patch-content_child_child__process.cc) = 696ee1a148e9483c1017be8c594bffa3227571f8
+SHA1 (patch-content_child_child__process.h) = 12f350259bc3e79a94355ba8c42bef1ef9d15dfc
+SHA1 (patch-content_common_BUILD.gn) = 704c4a355dffebdaf5dee896a3dfa01eaeef550e
+SHA1 (patch-content_common_features.cc) = 9ed94b76ffae8beb87bc0f97b2ead4fc7a732ecc
+SHA1 (patch-content_common_features.h) = 98a30590cee4a965ddb072e6d3d6e7d538097e7a
+SHA1 (patch-content_common_font__list__unittest.cc) = a3db62c6c8c455644b1ac8851e4984aaad07a5ac
+SHA1 (patch-content_common_gpu__pre__sandbox__hook__bsd.cc) = 4bba054add68c4347cd019a974f7d7ef07da0b8c
+SHA1 (patch-content_common_gpu__pre__sandbox__hook__bsd.h) = 3ecb810b816dabd99e2788c2dc8f544112edf3b2
+SHA1 (patch-content_common_gpu__pre__sandbox__hook__linux.h) = c18a4f06a3ecc22d19dc0c087c58a19086e10b0f
+SHA1 (patch-content_common_thread__type__switcher.mojom) = 3b4f552056d0ded3172c8b21d45c550f373be0ea
+SHA1 (patch-content_gpu_gpu__child__thread.cc) = 7309866f1b5c4517469b294525ca1694eb3d8ea5
+SHA1 (patch-content_gpu_gpu__main.cc) = a7fa808dbb63ae7b681567b1eac76de56a82439c
+SHA1 (patch-content_ppapi__plugin_ppapi__blink__platform__impl.cc) = 88a62c3c6bbf2a55eaae61a647ee2b5b9befd547
+SHA1 (patch-content_ppapi__plugin_ppapi__blink__platform__impl.h) = 820630e8ad1ffc9521d7b40518cdc3cb873aa395
+SHA1 (patch-content_ppapi__plugin_ppapi__plugin__main.cc) = ad631e3ce7dce28217a3c4a8784cc373d1779790
+SHA1 (patch-content_public_browser_content__browser__client.cc) = 265e8fde06388c60f3aa0c4ffcbab81f6a64553b
+SHA1 (patch-content_public_browser_zygote__host_zygote__host__linux.h) = 4631594144a1cc48d9bce8591197d6350544688d
+SHA1 (patch-content_public_common_content__features.cc) = 2c301ffcb29f452612405417cd48098cc742013f
+SHA1 (patch-content_public_common_content__switches.cc) = f64f3cbf4c5f91fa71d9b752efdbd6939138db0c
+SHA1 (patch-content_public_common_content__switches.h) = 784453c3ceeca74a5fb878dcd79842af51774f28
+SHA1 (patch-content_public_common_zygote_features.gni) = 00bc5aa901620385c8c4ae8b676c9313f261c99b
+SHA1 (patch-content_renderer_render__thread__impl.cc) = d05808d3838bb3635f98b14f6d5fd9aacc5a833f
+SHA1 (patch-content_renderer_renderer__blink__platform__impl.cc) = f2e87eee3fa5b4252772d907e742b06da2603aeb
+SHA1 (patch-content_renderer_renderer__blink__platform__impl.h) = 3155b0895c25ffea7005f40cb6d872625f9f79a9
+SHA1 (patch-content_renderer_renderer__main__platform__delegate__linux.cc) = 3809da345d66d09413600693e4944a5f21f0e378
+SHA1 (patch-content_shell_BUILD.gn) = 869966f0d46e8262bfe05d66c3683f041b5d3870
+SHA1 (patch-content_shell_app_shell__main__delegate.cc) = 1e543998feff87be336034187a664e6cff4c0646
+SHA1 (patch-content_shell_browser_shell__browser__main__parts.cc) = 6f090f0ea9936d1a45e9885efe3194067b0bb820
+SHA1 (patch-content_shell_browser_shell__platform__delegate__views.cc) = 68fe4cf136404183cdc378139f035f45dad71c87
+SHA1 (patch-content_shell_renderer_shell__content__renderer__client.cc) = a563c7f85b331514a8c15163c254ca7c32833df8
+SHA1 (patch-content_shell_utility_shell__content__utility__client.cc) = 8b841f75f9ad3c2488e6eda68603ef72ed0fa8b5
+SHA1 (patch-content_test_BUILD.gn) = 1c5e10d9e0180cdadc3d034e297df8b7594a8cb7
+SHA1 (patch-content_utility_services.cc) = 16c7677d98f6febec447cf93556ee8680a327c8f
+SHA1 (patch-content_utility_speech_speech__recognition__sandbox__hook__linux.cc) = 8106716d871ac2d9388df6563a3985f90053bb80
+SHA1 (patch-content_utility_speech_speech__recognition__sandbox__hook__linux.h) = 0729ff247b31fdb7e5e91a2dfab47b5d6274b9d2
+SHA1 (patch-content_utility_utility__blink__platform__with__sandbox__support__impl.cc) = f1cd1a6cf875cbf327489b77ef71f15b14e3ddda
+SHA1 (patch-content_utility_utility__blink__platform__with__sandbox__support__impl.h) = 92a8ec26043ef81c9a49dd1ed6a1c135b9c869a1
+SHA1 (patch-content_utility_utility__main.cc) = 50c78a258156fc4e167b525b03c8da2cf14922d8
+SHA1 (patch-content_utility_utility__thread__impl.cc) = 0d99a584e3da66bab1b28fdb2962ed40da815805
+SHA1 (patch-content_zygote_BUILD.gn) = fc1fe1bb23b829b29361226c8b661563b200e5c0
+SHA1 (patch-content_zygote_zygote__linux.cc) = 68ae73434970aabc9ea5c78fde12f3a7ba623205
+SHA1 (patch-content_zygote_zygote__main__linux.cc) = 7455058ec445d2baecd5351d1c9ee21471ee5226
+SHA1 (patch-device_bluetooth_bluetooth__adapter.cc) = b30038d8a080d07b72eb64bbb91c51776738c751
+SHA1 (patch-device_bluetooth_cast__bluetooth.gni) = be255be3b79501c60286afb9c6554374a46e5edb
+SHA1 (patch-device_gamepad_BUILD.gn) = 6a3a1595b0ab08dba122617cd8578814de2f8d57
+SHA1 (patch-device_gamepad_gamepad__provider.cc) = 99ef123edbb4437d665ad7ee0ece39c91d857929
+SHA1 (patch-device_gamepad_hid__writer__linux.cc) = 226b7d041d9986951aab1326c3f93b7e5c76ed3d
+SHA1 (patch-extensions_browser_api_api__browser__context__keyed__service__factories.cc) = 615b37dcac526b03b3658aa15bcca5513b35c07d
+SHA1 (patch-extensions_browser_api_management_management__api.cc) = f6000c8b0e6c40f384d3782793ac9b5865a34cba
+SHA1 (patch-extensions_browser_api_messaging_message__service.cc) = f5abbf47369ea743dba0662f531567fba26025ff
+SHA1 (patch-extensions_browser_api_networking__private_networking__private__delegate__factory.cc) = baf1e13b4faacf552ecdf1823683983d666482b3
+SHA1 (patch-extensions_common_api___permission__features.json) = 6cb4052be71259f95d51ef41fb5ebdf6f1b8d6db
+SHA1 (patch-extensions_common_api_runtime.json) = e5d0907697cdbcc165ef4e68cd90de38f02ffa87
+SHA1 (patch-extensions_common_command.cc) = 98eecde1590378ab54c7556d7f0cff569df85f01
+SHA1 (patch-extensions_common_features_feature.cc) = 39af0bb0be9bb85d7854b88781c42488285e1b16
+SHA1 (patch-extensions_renderer_bindings_api__binding__util.cc) = 19d7400fb605e8eca8fdd4a86d66b39e54efbec9
+SHA1 (patch-extensions_renderer_bindings_argument__spec.cc) = 613dc34ae9dc5a435f7dd9205cef54f03b2909e7
+SHA1 (patch-extensions_shell_app_shell__main__delegate.cc) = 53194f16a8f86e34c4b865b45765332da6907825
+SHA1 (patch-extensions_shell_browser_api_runtime_shell__runtime__api__delegate.cc) = b3c52171449deb7de67cf92213969a2608e92e09
+SHA1 (patch-extensions_shell_browser_shell__browser__main__parts.cc) = 3ea0853f1db4e6eeaecead45e06e335ecae1fde8
+SHA1 (patch-extensions_shell_browser_shell__extensions__api__client.cc) = c105cc56b3f5d40dcaa5c1b81add7ddde00071cc
+SHA1 (patch-extensions_shell_browser_shell__extensions__api__client.h) = cbe981d749d560bd4e4b104586c5da7ec6a964a0
+SHA1 (patch-google__apis_gcm_engine_heartbeat__manager.cc) = 5b9a5508c7b71977ca57594643d143c5116126ce
+SHA1 (patch-gpu_command__buffer_client_fake__gpu__memory__buffer.cc) = 6729dbfec0bbf164a7b702b782aaf5368358d25c
+SHA1 (patch-gpu_command__buffer_client_fake__gpu__memory__buffer.h) = 89559dbdeb87e53b829617f8961880bf020b73d5
+SHA1 (patch-gpu_command__buffer_service_dawn__context__provider.cc) = 948b75e1eae829ea717429e0be31a8fe0305d14e
+SHA1 (patch-gpu_command__buffer_service_gles2__cmd__decoder.cc) = 3d981d5f175bbc0b2062105cdc38ce0d3f09aaae
+SHA1 (patch-gpu_command__buffer_service_raster__decoder__unittest__context__lost.cc) = ad5ede943ab252f5ba10b0c10c87cee18658956d
+SHA1 (patch-gpu_command__buffer_service_shared__context__state.cc) = 4dfdcd82c7373d707a309e94b648df8699a624c6
+SHA1 (patch-gpu_command__buffer_service_shared__context__state.h) = aa4b3f4b1a279a36edbcea574d438e9efe798d55
+SHA1 (patch-gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc) = 1cad7e64bab93575ccd244f3926466909aa79c27
+SHA1 (patch-gpu_command__buffer_service_shared__image_external__vk__image__backing.cc) = 473190254db687e213bc0a288beb705b76a1a3c6
+SHA1 (patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc) = f8394bd02a95082d9d4582f07e5b3a6376706707
+SHA1 (patch-gpu_command__buffer_service_shared__image_shared__image__factory.cc) = 6a91159fb6f791276a6f5ab8aa457bc0a94ce2bc
+SHA1 (patch-gpu_command__buffer_service_shared__image_shared__image__manager.cc) = 3850396d7e8b950831024c519ad5b4c4b553c5c4
+SHA1 (patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc) = 3d8eeec78e94f2ee056a641ddeadf4ca3f1d9b23
+SHA1 (patch-gpu_command__buffer_service_webgpu__decoder__impl.cc) = 911ae34c0b949d9660be14d8f23f1ddeb4771918
+SHA1 (patch-gpu_command__buffer_tests_gl__gpu__memory__buffer__unittest.cc) = f5fd1274d5a799ae1f72b97660e959277788b439
+SHA1 (patch-gpu_config_gpu__control__list.cc) = 5e4f1c50c0cbcba69e8501ee26a608b768533249
+SHA1 (patch-gpu_config_gpu__finch__features.cc) = 13ccc4cf812a6381adf6b3a7ace51556d03c5bac
+SHA1 (patch-gpu_config_gpu__info__collector.cc) = e822b30ee898707c554eae20172172f9308722e3
+SHA1 (patch-gpu_config_gpu__test__config.cc) = 06dabd286a6f9835b6df2331d3a9e2cc70128b47
+SHA1 (patch-gpu_ipc_common_gpu__memory__buffer__support.h) = a8991821bc5453da4a8f945267c7d98767b877a3
+SHA1 (patch-gpu_ipc_service_gpu__init.cc) = e41bb7dbdacc22b127e50def6a79dc0c7982436f
+SHA1 (patch-gpu_ipc_service_gpu__memory__buffer__factory.cc) = f2d5ae239080e4ca64674cf3ae9e11eb0101714a
+SHA1 (patch-gpu_ipc_service_x__util.h) = c57363253d3a31f1c6033facd7cb0082cc56dd60
+SHA1 (patch-gpu_vulkan_generate__bindings.py) = 62a4ef67c061583ee36dbeffdb1f8615dfebabd4
+SHA1 (patch-gpu_vulkan_semaphore__handle.cc) = 93a47bc1d90672db0c71c6518d8a8bfcb49deabb
+SHA1 (patch-gpu_vulkan_vulkan__device__queue.cc) = 1d88d3ac633a82a0d4ee734566f6f825a87d2473
+SHA1 (patch-gpu_vulkan_vulkan__device__queue.h) = 63b62a85706bca5f302a6fc42f9f0282c0188776
+SHA1 (patch-gpu_vulkan_vulkan__function__pointers.cc) = 2ec61ad91f09e37ada65d4f97df61d87f1ebff44
+SHA1 (patch-gpu_vulkan_vulkan__function__pointers.h) = dc12c5b086d46c7c7da3c5ea028462fe3930b09e
+SHA1 (patch-gpu_vulkan_vulkan__image.h) = 64d3df8987ff9369013edb84b3912326353c5bd7
+SHA1 (patch-gpu_vulkan_vulkan__util.cc) = 39c6f80ee8a4d6bf46a43d4f1d0d32ab56a4e08f
+SHA1 (patch-headless_BUILD.gn) = caa987e41012c9554fc2fa831869fb1e19c1058a
+SHA1 (patch-headless_lib_browser_headless__browser__main__parts__posix.cc) = 9137f102bbb0083287c38ecebd213fe708ef256d
+SHA1 (patch-headless_lib_browser_headless__content__browser__client.cc) = ead60ce0b2a19b09cb5ed7e7b26fb878b52fcb1c
+SHA1 (patch-headless_lib_browser_headless__content__browser__client.h) = a2373c48d60af2038b35129f09c4aea16805fafc
+SHA1 (patch-headless_lib_browser_headless__web__contents__impl.cc) = 4fdf04df21c799e8f80bed3f440f8a6e5b40ffa9
+SHA1 (patch-headless_lib_headless__content__main__delegate.cc) = 47a0caa1885658edfdd42737189e782815336b85
+SHA1 (patch-ipc_ipc__channel.h) = 8b037a442206142484d452be2d6ee20bc6564bbb
+SHA1 (patch-ipc_ipc__channel__common.cc) = 25d87d2ae76f4837d46ec148bf8e56ced71105f0
+SHA1 (patch-ipc_ipc__channel__mojo.cc) = 6948af7cf4b5b38b1ca5fe0818178cb05051c0f3
+SHA1 (patch-ipc_ipc__message__utils.cc) = a9d789e648f1d0611a24e34103bf0dc8ebeb2d69
+SHA1 (patch-ipc_ipc__message__utils.h) = 88254d4a5f2e51ca5eb05105846fe21b971557c8
+SHA1 (patch-media_BUILD.gn) = 6a0eda8352d0d03b9d370e3e577d69bdeed84412
+SHA1 (patch-media_audio_BUILD.gn) = eb7dcbad1f1bb798514e463c0264498d7aeba614
+SHA1 (patch-media_audio_alsa_audio__manager__alsa.cc) = 4056198045ed5083e9922b107be0aff853d8cdd6
+SHA1 (patch-media_audio_audio__input__device.cc) = 7f4fdd6878868e4a56aa42e4dea959ee1821cb79
+SHA1 (patch-media_audio_audio__output__proxy__unittest.cc) = c25cbe98247a82b569de65586152eb7422889da4
+SHA1 (patch-media_audio_pulse_pulse__util.cc) = c4546157de6f0835c0837ebd76c0808a145e38ed
+SHA1 (patch-media_audio_sndio_audio__manager__sndio.cc) = 64ae05269f5f1c902393319a9b025ad1805f1c33
+SHA1 (patch-media_audio_sndio_audio__manager__sndio.h) = 7398fb19fffe464809860d072a6fabd2e9888a97
+SHA1 (patch-media_audio_sndio_sndio__input.cc) = af97cab36522d65d4b0f9c49bc0a59c781ac84bd
+SHA1 (patch-media_audio_sndio_sndio__input.h) = 05700f676d00d3f58aeea878e4b17556273b95d7
+SHA1 (patch-media_audio_sndio_sndio__output.cc) = 02ae024a800dad63e725af84ee59a7564592d101
+SHA1 (patch-media_audio_sndio_sndio__output.h) = b4d0acf273517ee72f211b7348767f3a36ab69d8
+SHA1 (patch-media_base_audio__latency.cc) = fbf5a0cdd0b0744992e61e98ea271ff8683fa8ad
+SHA1 (patch-media_base_libaom__thread__wrapper.cc) = 0fda9ba7e83a89439b022bb58ff6ae3ed85d90b5
+SHA1 (patch-media_base_libvpx__thread__wrapper.cc) = ecf41d84dcdb219e01fb6a66cd5f27fa5e33cfe8
+SHA1 (patch-media_base_media__switches.cc) = 5529a8ff48666d766e8c292f6314e9540b936b68
+SHA1 (patch-media_base_media__switches.h) = 479166003fe295c119ebb0250228168f9f5ed36a
+SHA1 (patch-media_base_video__frame.cc) = baee595f6f236228a7df497a093cd65e6099e7e9
+SHA1 (patch-media_base_video__frame.h) = 6da2b6ca76cc2101aa4007c2853dd44d5e32bc12
+SHA1 (patch-media_capture_video_create__video__capture__device__factory.cc) = b5d3da33a493f2ad2b00f9829c224cc15c89ab48
+SHA1 (patch-media_capture_video_fake__video__capture__device__factory.cc) = 513c7e4cc1f40520df8b3557d866c7f6834ef2ed
+SHA1 (patch-media_capture_video_file__video__capture__device__factory.cc) = 232549039e18d3bd5003d60003379751eaa1a66a
+SHA1 (patch-media_capture_video_linux_fake__v4l2__impl.cc) = b1371af6181f59a614793776ea31f28db71a1282
+SHA1 (patch-media_capture_video_linux_fake__v4l2__impl.h) = 4cee7eac2b0998e7d703ad5c837f326d312424a2
+SHA1 (patch-media_capture_video_linux_v4l2__capture__delegate.cc) = bd09f13f1e6c6ee39cc6a38eddfa59a0456b7de4
+SHA1 (patch-media_capture_video_linux_v4l2__capture__delegate.h) = 1fb199e294ca1050ecfb3d8c8daff0a97fa3ea64
+SHA1 (patch-media_capture_video_linux_v4l2__capture__device.h) = ef9bdc1c5bbe372d4d38a13087d0f925aeb4d57c
+SHA1 (patch-media_capture_video_linux_v4l2__capture__device__impl.cc) = 365b7ecfd627c1cd46f8755088ce3b8e522bd0e9
+SHA1 (patch-media_capture_video_linux_v4l2__capture__device__impl.h) = 32fa108b11dfcfe62478d4f5f932d0570925e431
+SHA1 (patch-media_capture_video_linux_video__capture__device__factory__v4l2.cc) = bb810378dbbc531ec0c1111df74b239199ea2f1c
+SHA1 (patch-media_capture_video_linux_video__capture__device__factory__v4l2.h) = 9c38348b467b76f4c12249ad221c5696a776038b
+SHA1 (patch-media_capture_video_linux_video__capture__device__linux.cc) = 194d3ce914ac73d3f66213dfb6702a124995b0a1
+SHA1 (patch-media_capture_video_video__capture__buffer__tracker__factory__impl.cc) = 2bce219ee11fdc5dde1083ffa2ae2b8330b18b3f
+SHA1 (patch-media_capture_video_video__capture__device__client.cc) = f1d43a402f990bc3c7dd3f6fd0069acabc1174b8
+SHA1 (patch-media_cdm_cdm__paths__unittest.cc) = 4675fde1719975d7ca760e01b4c8a20654e2af16
+SHA1 (patch-media_cdm_library__cdm_cdm__paths.gni) = 005af2ffa9e5260202042985da7e214ec4a19696
+SHA1 (patch-media_ffmpeg_scripts_build__ffmpeg.py) = 6ea42d44999238d7b01216651db90a7177547649
+SHA1 (patch-media_ffmpeg_scripts_robo__lib_config.py) = 3893cf98a0cf016cc03eb848e4b2e265805a99e5
+SHA1 (patch-media_gpu_chromeos_gl__image__processor__backend.cc) = b3d84c968591e2d7dcc8cf6f993aa5c28968bc10
+SHA1 (patch-media_gpu_chromeos_libyuv__image__processor__backend.cc) = e4e5bad7ed865c8311f0bf6300a5c5e8e4bf3603
+SHA1 (patch-media_gpu_chromeos_mailbox__video__frame__converter.cc) = 45ab74fde3156cc29439cbfd0994458aeb441a6d
+SHA1 (patch-media_gpu_chromeos_platform__video__frame__utils.cc) = f63fa6501c095174020f3728d46a26a27e9a3d9d
+SHA1 (patch-media_gpu_chromeos_video__decoder__pipeline.cc) = f42fddd0a1da80a8c5b7970bc2d3bb473f2e32a0
+SHA1 (patch-media_gpu_gpu__video__decode__accelerator__factory.cc) = 93d71f68b78e014c4fca094ea65f8a37738e67df
+SHA1 (patch-media_gpu_gpu__video__encode__accelerator__factory.cc) = 9fdf90394b2022a87e0974bf997e1ac40e297a30
+SHA1 (patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc) = e9b1a3a93561abfefa486d5e2efe30121ea77e63
+SHA1 (patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.h) = c4303cb6229433bb3dd9e012fe460b51755e4edc
+SHA1 (patch-media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.cc) = 0ae36df03adc94a398607a44010a7ef0e64fb9c4
+SHA1 (patch-media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.h) = 88326c542a631f9cb0fadcc15f75163bb8b352ad
+SHA1 (patch-media_gpu_test_raw__video.cc) = 3ad1a62b70fa8943bc26c2ca803fe8ec775339a2
+SHA1 (patch-media_gpu_test_video__frame__file__writer.cc) = b078876f51837c3c00cd12f8535232529fc0c401
+SHA1 (patch-media_gpu_test_video__frame__helpers.cc) = 55f716037d32d6fe061f7ef74bc10725b7a758bd
+SHA1 (patch-media_gpu_test_video__frame__validator.cc) = ef0483708ae64b5b3f4ade685ed2bf3e0f9d86ae
+SHA1 (patch-media_gpu_vaapi_vaapi__video__decoder.cc) = b0caf50b8d77b3c690c94d7e050d80a99ff92286
+SHA1 (patch-media_gpu_vaapi_vaapi__wrapper.cc) = b982c82fe4fac6ec4391e8813faddde17146c003
+SHA1 (patch-media_media__options.gni) = 4ecdd973baac782410df94f837e4931d82397fcc
+SHA1 (patch-media_mojo_mojom_BUILD.gn) = 13bda59f0b0b73b008bed5fad1b3ef6c9917ae01
+SHA1 (patch-media_mojo_mojom_video__frame__mojom__traits.cc) = 319a5adbece2ff035a11b9b33378c16308515482
+SHA1 (patch-media_mojo_mojom_video__frame__mojom__traits.h) = 5199cc657aa18e3f769a92f5d09b9521662f4a8e
+SHA1 (patch-media_video_gpu__memory__buffer__video__frame__pool.cc) = 44154aa6e342eed67565f862c19c4844313b55df
+SHA1 (patch-media_video_video__encode__accelerator__adapter.cc) = c6efe941419f98cc4709e4787dbc4b5854ba5ccc
+SHA1 (patch-media_video_video__encode__accelerator__adapter__test.cc) = 12f99ee5252d4ddfb7a08ac1675a91cf0d0cff84
+SHA1 (patch-media_webrtc_audio__processor.cc) = 654036e110f71cb70021a74cf8044b4585b0de7c
+SHA1 (patch-media_webrtc_helpers.cc) = 2245f77d5c0b5a44121c293de29ca78eb40a3236
+SHA1 (patch-media_webrtc_helpers__unittests.cc) = eb6c51486d59766f52920d190673b7bda9a8ee09
+SHA1 (patch-mojo_core_BUILD.gn) = a5ffe3ec5c39ba0bfea4c019f0182132710ee174
+SHA1 (patch-mojo_core_channel.cc) = 9be0fbd2363429fbb7619f7784d497212ba0fb40
+SHA1 (patch-mojo_core_embedder_features.h) = 7ad550c99606029fb655240fb5fe5f0d0b56e2e9
+SHA1 (patch-mojo_public_cpp_platform_socket__utils__posix.cc) = 3f4ba53b96a1fe59ef83c5a79048514b166541e3
+SHA1 (patch-mojo_public_tools_bindings_mojom.gni) = 34b0b3ae89be8be46795ad7557e96a1c775fc1ba
+SHA1 (patch-net_BUILD.gn) = a53903ff9b1ea46c5aaaa4a8e65f7fecb82f426c
+SHA1 (patch-net_base_features.cc) = b8fc03e3c57b26e3dbb6ae1705ae31a221f59347
+SHA1 (patch-net_base_network__change__notifier.cc) = 94967835d7e1edbf4e915a4783de16572ff8aaf5
+SHA1 (patch-net_base_network__change__notifier.h) = d779275b2690c08682f05d39257c5474b2f56f39
+SHA1 (patch-net_base_network__change__notifier__passive.cc) = ba7fe95a7bcc10f25a4705f97a13a89173c99084
+SHA1 (patch-net_base_network__interfaces__posix.h) = 257352207a4d8e8887fc476d323d483878cfcefe
+SHA1 (patch-net_base_sockaddr__util__posix.cc) = f14110d14376dd06b1321e706dc74dbc3b0a2dc9
+SHA1 (patch-net_base_sockaddr__util__posix__unittest.cc) = faff0adbb7818c8268c26b6ccff743feaa5fd3b3
+SHA1 (patch-net_disk__cache_backend__experiment.h) = c37f9ea36d90d113238219144b9bb9a4260b94be
+SHA1 (patch-net_disk__cache_simple_simple__file__tracker.cc) = 4d0b262f782fa5f3b50cf1cc2ebc0dbae7abce2c
+SHA1 (patch-net_dns_BUILD.gn) = 3f900e73710d6acdbb0133905b302552c2049f1e
+SHA1 (patch-net_dns_address__info.cc) = 39fbed1dd852636b4ff5d73bca31618772a69f82
+SHA1 (patch-net_dns_address__sorter__posix.cc) = 25481b9fdb17851416bba802e53e5da7b4da28f9
+SHA1 (patch-net_dns_dns__config__service__posix.cc) = 46f19e76740f9a21cc41c104d4e68fd9bcbc64ad
+SHA1 (patch-net_dns_dns__reloader.cc) = 444d00e9321f7aa055b227b95f04edee44d60f5c
+SHA1 (patch-net_dns_dns__util.cc) = 0e45e96dcd76ce08cfe4103a5c5fcd80e82d36fe
+SHA1 (patch-net_dns_host__resolver__proc.cc) = 93c9cc3314d952e3e7dba13d440e4a2f5acdf4a0
+SHA1 (patch-net_dns_public_BUILD.gn) = 65f75eacc143f5e502e890ee4de23ee14258971e
+SHA1 (patch-net_dns_public_resolv__reader.cc) = 90a04100e8c80e1efc746f1aba1dd930ce5a903b
+SHA1 (patch-net_dns_public_resolv__reader.h) = 99e4e4387307a1ce015c4c330ef88695698dd814
+SHA1 (patch-net_dns_public_scoped__res__state.cc) = 2b8f6ecd086de0e3f86086efaeeb358998caaee3
+SHA1 (patch-net_dns_public_scoped__res__state.h) = 34c64ef640417384275e590eb4fbbf0735cc246a
+SHA1 (patch-net_filter_zstd__source__stream.cc) = 5c7f7b3eb7b240db8356bf12445ba719dfcd2b13
+SHA1 (patch-net_http_http__auth__gssapi__posix.cc) = d5d2c67ab774f8098cb758a4982063eeb0909644
+SHA1 (patch-net_http_http__auth__gssapi__posix.h) = f530f51c317ae98c961c0e4c6efef54080423190
+SHA1 (patch-net_http_http__auth__handler__negotiate.cc) = b70955c913ceab3f1ac423f464ca234bdd4701d1
+SHA1 (patch-net_http_http__auth__preferences.cc) = 3b6b1ab2a848b35787f0c0023d938080b7f97f89
+SHA1 (patch-net_http_http__auth__preferences.h) = 0ca6391ec84d2abb998f10097051498e731cf252
+SHA1 (patch-net_http_http__network__session.cc) = 628b297db0084e7fbe3a9ff0de27e1845147b260
+SHA1 (patch-net_proxy__resolution_proxy__config__service.cc) = d0a5b367612a2f547e02c78bf688f11afd64631c
+SHA1 (patch-net_proxy__resolution_proxy__config__service__linux.cc) = 4fbe32582d0f7a5b9cd3cd2adb7b25052e9ecb5a
+SHA1 (patch-net_quic_quic__network__transaction__unittest.cc) = a33195577185ae106c9eb588016ab290f5936cfc
+SHA1 (patch-net_socket_socks5__client__socket.cc) = 3f9097669c86199d6d6579007f536db5a9cf3653
+SHA1 (patch-net_socket_tcp__socket__posix.cc) = 60ab2d35b0c2ba5908831b013f5e931950be4b10
+SHA1 (patch-net_socket_udp__socket__posix.cc) = e40adf6ca030e93d327d83db2a1e1b060515e771
+SHA1 (patch-net_socket_udp__socket__unittest.cc) = 020bb0f3544115d95426d7001337227fad377038
+SHA1 (patch-net_third__party_quiche_BUILD.gn) = 228364be36753499fd2b83f2d4b2ff1f4c68963b
+SHA1 (patch-net_tools_cert__verify__tool_cert__verify__tool.cc) = eb4cb15b46de488c5df425a946750a443d4595fc
+SHA1 (patch-net_tools_net__watcher_net__watcher.cc) = 93880bc0f2066619c1812067499b5b3f777e0f0a
+SHA1 (patch-net_traffic__annotation_network__traffic__annotation.h) = 59b3d229c9c42bf217fd1ccbe2e79c45d7a091e9
+SHA1 (patch-net_url__request_url__request__context.cc) = ffa359faf1c199f34212237e06b52d820ffa213d
+SHA1 (patch-net_url__request_url__request__context.h) = cb02f0280d5dceb3409b124b7a3d35eade5ce7cb
+SHA1 (patch-net_url__request_url__request__context__builder.cc) = 90cda92aaaf5a32fa6ac18e7d188152373c9cac1
+SHA1 (patch-net_websockets_websocket__basic__stream__adapters__test.cc) = 3503580f4420721e8cf7791764af4957b002040e
+SHA1 (patch-pdf_pdfium_pdfium__engine.cc) = e50cb256f59ffd94af030a4ace4c47c130577707
+SHA1 (patch-ppapi_tests_test__utils.h) = bfca4cd6db4010fe372c96d2218f05ac0f1e172c
+SHA1 (patch-printing_backend_cups__ipp__helper.cc) = 2c7d5a0c6066ba44fb63c933156f498387fbaa26
+SHA1 (patch-printing_backend_print__backend__cups.cc) = 70885d099dc671a9c467378fa4fa196a2f2602f6
+SHA1 (patch-printing_mojom_printing__context__mojom__traits.cc) = cfcf91b6778fe98f94394d4f1a0f3504edab15a2
+SHA1 (patch-printing_mojom_printing__context__mojom__traits.h) = e354d5ae462e71f2e143a720b120fc5042af85b6
+SHA1 (patch-printing_mojom_printing__context__mojom__traits__unittest.cc) = 534524f5ece8afc15a33ecbd32f9e4c63039a7b3
+SHA1 (patch-printing_print__settings.cc) = a97eac2ffc8eafc8235667758b26ecdaded0edf9
+SHA1 (patch-printing_print__settings.h) = 19fecd4567029e512ba3f2229dfabbac2d7b243a
+SHA1 (patch-printing_print__settings__conversion.cc) = c4ee5aad3bfc5c85af8fc21b5f3f20d99e4ac940
+SHA1 (patch-printing_printing__context__linux.cc) = a94bab3c313478cf6ecf1a75e925729c2c257dec
+SHA1 (patch-printing_printing__features.cc) = a095ea25bbd7f75a8fcbb6e113ab954beb9b9470
+SHA1 (patch-printing_printing__features.h) = 60654e2d9cb207d13d8a7db6750b0f92d2a3db58
+SHA1 (patch-printing_sandbox_print__backend__sandbox__hook__linux.cc) = 84852c3d645c48f009417edad51c1e63ceb81b11
+SHA1 (patch-printing_sandbox_print__backend__sandbox__hook__linux.h) = 97c4da8dba1b18b870f3c72945bb8f93b56b88f8
+SHA1 (patch-remoting_base_constants.h) = 25629102e1dea0b05e208d553e84a8566039d447
+SHA1 (patch-remoting_base_host__settings.cc) = ec4d9c51a006294bed0884138180453512717bcd
+SHA1 (patch-remoting_codec_webrtc__video__encoder__vpx.cc) = eb7ca68335d9c3a11a1376fedcbb9e8ab1fe8f14
+SHA1 (patch-remoting_host_base_desktop__environment__options.cc) = 33fe16216117b1800898bef416db82c917b3ce2a
+SHA1 (patch-remoting_host_base_switches.cc) = 2f8c2572ec3208233ebb632d56ae6cf8dc9d85af
+SHA1 (patch-remoting_host_base_switches.h) = f5b8c1c48d33d3ba96b1766e009f570bba922077
+SHA1 (patch-remoting_host_chromoting__host.cc) = e81ae55950364a23b50c17d4c6a17ec85efbf95c
+SHA1 (patch-remoting_host_chromoting__host.h) = 410b9d2c19bd5e821f775feada79b851c2ff5226
+SHA1 (patch-remoting_host_chromoting__host__context.cc) = f28817ecc9fe8dfad3b6eea58a7017b966df8120
+SHA1 (patch-remoting_host_chromoting__host__services__client.cc) = c55271cfa6975aa68932f410e674e74769c06e2e
+SHA1 (patch-remoting_host_client__session.cc) = 3e6ecfd71ca6fc8bd938fd812d14b317421cd2f0
+SHA1 (patch-remoting_host_crash_crash__file__uploader.cc) = d808e72c8e6da7eb2595721cc187f72c62053e35
+SHA1 (patch-remoting_host_create__desktop__interaction__strategy__factory.cc) = 41e23a4a9a91734f1a384752cb2ed8cfbdff4309
+SHA1 (patch-remoting_host_evaluate__capability.cc) = 8bbcff6fe95b3523af6948eec2928f8d825a6714
+SHA1 (patch-remoting_host_host__attributes.cc) = e7215ee282fcfa730931cb56cf9dec15436dbfc1
+SHA1 (patch-remoting_host_host__details.cc) = ff7365acf1f03ff2196fc8a5254a51c4bddb527f
+SHA1 (patch-remoting_host_host__main.cc) = 232d864004edd5ca69fbe083147759b19cd570d3
+SHA1 (patch-remoting_host_ipc__constants.cc) = cd00d37c5ed2e790a8c1c305c9a0e7b8094e4181
+SHA1 (patch-remoting_host_it2me_it2me__native__messaging__host__main.cc) = d2fca80e9589b481481805bcd744eeb1343a269a
+SHA1 (patch-remoting_host_me2me__desktop__environment.cc) = 04bc6ea26f98b0e6140448d2f90f2dc5aa59f839
+SHA1 (patch-remoting_host_mojo__caller__security__checker.cc) = 5d0b3bbb5ca22d5124972cd01017eea7c68158d3
+SHA1 (patch-remoting_host_policy__watcher.cc) = 4a004e9dff999abfc18a37e98c4356b096c78c1a
+SHA1 (patch-remoting_host_remote__open__url_remote__open__url__client.cc) = cf9fef775e8cf0a62aaea3fa287cf4e59d12c03b
+SHA1 (patch-remoting_host_remote__open__url_remote__open__url__main.cc) = 5b7e155d0f48c5d20e000e39d12c7a226bf2cb7e
+SHA1 (patch-remoting_host_remote__open__url_remote__open__url__util.cc) = 6939adddf81cf903d81b72fae83804c88e6617ee
+SHA1 (patch-remoting_host_remote__open__url_url__forwarder__configurator.cc) = de02f90520744b03918cde46ba0305ebb20aaa8c
+SHA1 (patch-remoting_host_remoting__me2me__host.cc) = 773023b41dfb0f36d195207c32ec191d638d93c1
+SHA1 (patch-remoting_host_security__key_remote__security__key__main.cc) = 92ec21f80adeb34f319c398d77eb2ee34c897c47
+SHA1 (patch-remoting_host_session__policies__from__dict.cc) = 17ca07d9311fd8f27eb23bd3335ebf803cd8904b
+SHA1 (patch-remoting_host_setup_me2me__native__messaging__host__main.cc) = f2f1a991716b2d966a4e2d12bf574ad5bc1faa37
+SHA1 (patch-remoting_host_setup_start__host__main.cc) = acb639c4bf213b74f625801c17ab7a42e42fa5b4
+SHA1 (patch-remoting_host_webauthn_desktop__session__type__util.cc) = c0857c26612e652a0b7a6a9c397346c53d44d857
+SHA1 (patch-remoting_host_webauthn_remote__webauthn__caller__security__utils.cc) = 6c2d3ec15223afc7c4537035ce4734d7bc008877
+SHA1 (patch-remoting_host_webauthn_remote__webauthn__extension__notifier.cc) = d3b049519491918b33b15a814f25bef2082bb17c
+SHA1 (patch-remoting_host_webauthn_remote__webauthn__main.cc) = 9471f44e9f4438547b5c11ca5b16bcee38b7a71c
+SHA1 (patch-remoting_protocol_webrtc__video__stream.cc) = 809714ba128c3f97556b010fac9249b6fd88c3fa
+SHA1 (patch-remoting_signaling_ftl__host__device__id__provider.cc) = 17fb89924ccfb7b66f3a054f6bb4b1925254464b
+SHA1 (patch-sandbox_BUILD.gn) = 58ed28b3448e3fcb0549f4bb4fddfa93b4efed33
+SHA1 (patch-sandbox_features.gni) = 773d0c754c5688d282d7fc0768c219dfe11fab32
+SHA1 (patch-sandbox_linux_BUILD.gn) = 5120e61dd1c790ea2abd62dab365afcc28b50bbb
+SHA1 (patch-sandbox_linux_services_init__process__reaper.cc) = 5b4480103b2a14446455aff12acbdd2ad87cae4d
+SHA1 (patch-sandbox_linux_services_libc__interceptor.cc) = 0185e2c8e7fbd0ee6c7e91384273249377d74517
+SHA1 (patch-sandbox_policy_BUILD.gn) = 7962018e434a36f423efa1f9746e2753326cbd64
+SHA1 (patch-sandbox_policy_features.cc) = d9e7a35be9750634b2749096a0b9f5761c0ddaee
+SHA1 (patch-sandbox_policy_freebsd_sandbox__freebsd.cc) = 5b07dca9610e095916d6604df08f939ae1135075
+SHA1 (patch-sandbox_policy_freebsd_sandbox__freebsd.h) = d34399b055a0e6a85365b8e1dd92921805163574
+SHA1 (patch-sandbox_policy_mojom_sandbox.mojom) = f3035f61d1f463c219ff7e9b0d0eff6fe19bc950
+SHA1 (patch-sandbox_policy_netbsd_sandbox__netbsd.cc) = ae2eb051ba4115b4cec24ef7e15e1f49f9cb7f37
+SHA1 (patch-sandbox_policy_netbsd_sandbox__netbsd.h) = 9d1a3ff8a4a85b3cbb9e31a1e1ea0fa71df3fdae
+SHA1 (patch-sandbox_policy_openbsd_sandbox__openbsd.cc) = 0bebd8cbc2e0e1cc25e0df5cea5989780e85278c
+SHA1 (patch-sandbox_policy_openbsd_sandbox__openbsd.h) = 6a4298c47e00dd2e6e8e47df11ccf818b7c1f3cd
+SHA1 (patch-sandbox_policy_sandbox.cc) = 62d263682d218d932722d306f055545a66d1f646
+SHA1 (patch-sandbox_policy_sandbox.h) = 33a3e50adfd56a65b7d4ad4063955d0375ad557a
+SHA1 (patch-sandbox_policy_sandbox__type.cc) = b57fbf18aae23336ebbb9998ed6b4cbb4949cd95
+SHA1 (patch-sandbox_policy_switches.cc) = 4fdadfeab7fce3a03a83bb0e3d2f95186f1a6f0a
+SHA1 (patch-sandbox_policy_switches.h) = 7e5236ba9ae323e8b34088f3250b72aa7d0a9c7d
+SHA1 (patch-services_audio_audio__sandbox__hook__linux.cc) = 0c686037b82488891fd43cf0bc46089198e1fd12
+SHA1 (patch-services_audio_audio__sandbox__hook__linux.h) = d981e6a222debb41818015fd888ea5f9e8d04a28
+SHA1 (patch-services_device_BUILD.gn) = 33a6f01ee1108e6b7326b4065d94c50e602a980f
+SHA1 (patch-services_device_geolocation_location__provider__manager.cc) = 0bf628192a69f7cecc31b137540ad558de6a1bd1
+SHA1 (patch-services_device_hid_BUILD.gn) = d14d0caccca7048f47508adf1f88148fecd21b75
+SHA1 (patch-services_device_hid_hid__connection__fido.cc) = e8ee4654144977a7778e204435ba19ef67cdce22
+SHA1 (patch-services_device_hid_hid__connection__fido.h) = 22565f987616b5031739b9fd8b3656068e4537ab
+SHA1 (patch-services_device_hid_hid__connection__freebsd.cc) = 5af8754728a958fe130086fb797bf3ebff6ee7fb
+SHA1 (patch-services_device_hid_hid__connection__freebsd.h) = b6f88864cc0cffba0af713678bfd054d4f51c2f6
+SHA1 (patch-services_device_hid_hid__service.cc) = f0d432536e8dcdc0d72ec294e46a155906ff3bb7
+SHA1 (patch-services_device_hid_hid__service__fido.cc) = 78c8593e52835aae5e7d74b3d580265da89c3a4d
+SHA1 (patch-services_device_hid_hid__service__fido.h) = 4d2edb0f76e76f1ef294579e214b3771a3d7fe4e
+SHA1 (patch-services_device_hid_hid__service__freebsd.cc) = ef275d5c46f91f4ccbf705e9e6c0d17c7eaf702a
+SHA1 (patch-services_device_hid_hid__service__freebsd.h) = 0da743817b728d8975d817a991ed357988f9e4fd
+SHA1 (patch-services_device_hid_hid__service__netbsd.cc) = bfff1e3a94f12a578c214b8702ff12f285e311c2
+SHA1 (patch-services_device_hid_hid__service__netbsd.h) = 2b757ed3c99b962ab9764ccd0df5aed560b13f04
+SHA1 (patch-services_device_public_cpp_device__features.cc) = d5c8782d0928bfbca35d1f001715baf9d13c5fd5
+SHA1 (patch-services_device_public_cpp_device__features.h) = 3b5da8a14c8464902aae0bee8d076da951139d7a
+SHA1 (patch-services_device_public_cpp_generic__sensor_sensor__reading.h) = 91794da111f3960e91d6a72fde8b5468eb06adaa
+SHA1 (patch-services_device_public_mojom_BUILD.gn) = 5cecacf15922b46997f15e392a703f90a0d560a3
+SHA1 (patch-services_device_serial_BUILD.gn) = c8137d692becf4a20ee0fb00f238efe2c5ce4711
+SHA1 (patch-services_device_serial_serial__device__enumerator.cc) = 7fa3db4e481cbccf802ecb87cffd2cda5b59bd40
+SHA1 (patch-services_device_serial_serial__io__handler__posix.cc) = c2e64c624909e2459413fce9250913aa2ce36c48
+SHA1 (patch-services_device_time__zone__monitor_time__zone__monitor__linux.cc) = c19188bfd6edf7bd86ddc463cc5c5cc0892f9924
+SHA1 (patch-services_device_usb_BUILD.gn) = a001c817407aaaf92548c3eec5c4f4a6180fd600
+SHA1 (patch-services_device_usb_usb__device__handle__usbfs.cc) = b9d67b09614a2c2d3aeb0d87c87a7aaca59e4a62
+SHA1 (patch-services_device_usb_usb__device__handle__usbfs.h) = 2ec84688c01237fd9ce83100e2c83e1faa49e4c9
+SHA1 (patch-services_device_usb_usb__service.cc) = bc50797685485bdc515d99dc66a00dbad630e7a5
+SHA1 (patch-services_device_usb_usb__service__fake.cc) = baa268f5914c07c92d61054b2642551bda4cded4
+SHA1 (patch-services_device_usb_usb__service__fake.h) = ce4385778b2610dd7bce045730c6c190e445bfc6
+SHA1 (patch-services_network_BUILD.gn) = aecf5a95517331d3288d852358ff9319e702f1c7
+SHA1 (patch-services_network_network__context.cc) = 5cb5c63126d23def8f06a7f2e81d78736a30d629
+SHA1 (patch-services_network_network__context.h) = 31a4c2069a96f63b24fe95ca40ae15e9688d6513
+SHA1 (patch-services_network_network__sandbox__hook__linux.cc) = ccfb0a9fbe562b00bb25e10a7152e52a54e5f2bb
+SHA1 (patch-services_network_network__sandbox__hook__linux.h) = aae98bcabad9c12f90bc429cbaac93b776e72198
+SHA1 (patch-services_network_network__service.cc) = 5f07f7bb0278fe402d59a47392929f01b6271ad6
+SHA1 (patch-services_network_network__service.h) = 22e495661c9c91eb9e856ab0ba20a51e2c56d81c
+SHA1 (patch-services_network_public_cpp_BUILD.gn) = 0d9232573236f403afce93ca0b90fbde51cbeae3
+SHA1 (patch-services_network_public_cpp_features.cc) = 9c9111e671c4b33f50b3a1270f467ae51668e446
+SHA1 (patch-services_network_public_mojom_BUILD.gn) = 6d4aef075675b8581cca09713c8e1bd2d684c0aa
+SHA1 (patch-services_network_shared__dictionary_shared__dictionary__writer__in__memory.h) = d3c52a6dbb2461f0aed3bfff94f5d729c3120609
+SHA1 (patch-services_on__device__model_on__device__model__service.h) = 74392385d9872b60e1895f0b14d6190eb77f9a77
+SHA1 (patch-services_on__device__model_pre__sandbox__init.cc) = 5f5178039ed91297a08a63e10341278656edfd7a
+SHA1 (patch-services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc) = 4f69dbedd74017dd12b12efca22f089e45e6a59d
+SHA1 (patch-services_resource__coordinator_public_cpp_memory__instrumentation_BUILD.gn) = 53cdf3fd172f02e0c33d223e71ac02a7b9af5a83
+SHA1 (patch-services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics.h) = 32f05e449f2f8392805ae40a5ad5f5b03127cae5
+SHA1 (patch-services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics__bsd.cc) = 90f199fc87efde096e56d8a117f93546acd75596
+SHA1 (patch-services_screen__ai_public_cpp_utilities.cc) = f9d0d2afa8867104eb58280001ad8b4a68d9a103
+SHA1 (patch-services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.cc) = 319732234cb8e846d2f8be16a175f0310edf83b6
+SHA1 (patch-services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.h) = 1579533ec25ed2d58953482d6d949cb527cb3590
+SHA1 (patch-services_screen__ai_screen__ai__service__impl.cc) = e5e5a053bcede031ac2446340457bfced8d1b683
+SHA1 (patch-services_service__manager_BUILD.gn) = 0e9108c25135a2ceaac9910d964be9e5f9510ce3
+SHA1 (patch-services_service__manager_public_cpp_service__executable_BUILD.gn) = 69850caf6c2c5e79766e381943702d082d154c15
+SHA1 (patch-services_tracing_public_cpp_stack__sampling_tracing__sampler__profiler.cc) = d7aad28fb44cb3d65102abaac79100ab38e0dac8
+SHA1 (patch-services_tracing_public_cpp_system__metrics__sampler.cc) = d3d05ed82d50db39f716ba09a199b5a3d2a7975f
+SHA1 (patch-services_tracing_public_cpp_trace__startup.cc) = 443b33e9dc7308a94dcfc1014a48dfc4d3634c67
+SHA1 (patch-services_video__capture_public_mojom_video__capture__service.mojom) = ef72e0124bae245091ac7f7465d4575de4af9665
+SHA1 (patch-services_video__effects_video__effects__sandbox__hook__linux.cc) = 61de00b00cecab685d4dd83f0680a2d82d897697
+SHA1 (patch-services_video__effects_video__effects__sandbox__hook__linux.h) = a1d590072c91268ce94d5dd62eb754c6d23b811b
+SHA1 (patch-services_viz_public_mojom_BUILD.gn) = 033176b78d3213b0e7700fc49fc6bef8776bbedc
+SHA1 (patch-skia_ext_SkMemory__new__handler.cpp) = 3bea2790451bac4bf3d7f41771a00eef77f061e6
+SHA1 (patch-skia_ext_font__utils.cc) = 5d32dfa49cf8767719116d746ec5973d3d112fd5
+SHA1 (patch-skia_ext_skcolorspace__trfn.cc) = c057a5db211fbc7d6ca55b65eefefac98cce5631
+SHA1 (patch-third__party_abseil-cpp_absl_base_config.h) = 5981d8e8817ee68aa211d792420726be55a6a29b
+SHA1 (patch-third__party_abseil-cpp_absl_base_internal_raw__logging.cc) = 97f042cad9c3e5e725bd3434ee95c2c78aedb75c
+SHA1 (patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc) = fc309f3cd4b531873bcdf69a193a152707d381ee
+SHA1 (patch-third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.h) = e24577d9a90d53fded2d8af887f6e9dcd529b87e
+SHA1 (patch-third__party_abseil-cpp_absl_time_internal_cctz_src_time__zone__format.cc) = 5d86443754840560991fb5836e9365a3ea7a8b72
+SHA1 (patch-third__party_afl_src_afl-fuzz.c) = bfb5afeccad771a42f53ed1aaea89cb6e6f5c514
+SHA1 (patch-third__party_angle_BUILD.gn) = 8f397cda4dfcd06e3fb8c3a384aca7d925aefa17
+SHA1 (patch-third__party_angle_src_common_platform.h) = 0633d9c57f8393125c9c4c2dc037c0c4871fb66f
+SHA1 (patch-third__party_angle_src_common_platform__helpers.h) = ff3323cab15bf9db2d9d06031e78c903b3e60fe8
+SHA1 (patch-third__party_angle_src_common_system__utils.cpp) = 82cf8ae8844aab86762b799a76a5c2d0caf9bf37
+SHA1 (patch-third__party_angle_src_common_system__utils__linux.cpp) = 8b9b1147442b0aced1bc4f0cdf5205273c7d664f
+SHA1 (patch-third__party_angle_src_gpu__info__util_SystemInfo__internal.h) = 0f5f1665b433f87f6146e7cf893e22e31184db23
+SHA1 (patch-third__party_angle_src_gpu__info__util_SystemInfo__libpci.cpp) = 07abae5fe807ad53c0711d418df9c37edb1ee7cd
+SHA1 (patch-third__party_angle_src_gpu__info__util_SystemInfo__linux.cpp) = 2791334937b881c862616476e96524e9826f87c8
+SHA1 (patch-third__party_angle_src_gpu__info__util_SystemInfo__x11.cpp) = a6a2ea2be235b16527eddde71a356fe39ab47795
+SHA1 (patch-third__party_angle_src_libANGLE_Display.cpp) = fb3e1b44d9d206a5a35efc96a8eebc92d7a9d125
+SHA1 (patch-third__party_angle_src_libANGLE_renderer_gl_glx_FunctionsGLX.cpp) = 7b616b3ced38a594e10da62aef7333a5cb05bbbe
+SHA1 (patch-third__party_angle_src_libANGLE_renderer_vulkan_DisplayVk__api.h) = 19be63530198bc812afca39a1209cc85e5316cb0
+SHA1 (patch-third__party_angle_util_BUILD.gn) = dd180b403978feb5f5beaa8aa8ef4fee152fe51a
+SHA1 (patch-third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc) = 3f1c90cc7469d4cf832926a41ab96d21b2cc8e5e
+SHA1 (patch-third__party_blink_public_common_renderer__preferences_renderer__preferences.h) = 1f2e1f2a01e6b1f0650aafe23cc4efe0887f1c71
+SHA1 (patch-third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h) = d0bc9880d36b80fc411fc5170508b8053bbf2815
+SHA1 (patch-third__party_blink_public_platform_platform.h) = 95ac5c1068445eefbbbf2ccbeab3b9554c887029
+SHA1 (patch-third__party_blink_renderer_bindings_scripts_bind__gen_style__format.py) = b7a6e73018272e26b53d561aa5b1e259a9cee1d4
+SHA1 (patch-third__party_blink_renderer_build_scripts_gperf.py) = 465fc468e518d607b22b92fcb57d3f79d4b0b8dc
+SHA1 (patch-third__party_blink_renderer_build_scripts_run__with__pythonpath.py) = d61bca18c83f356acc4e7faab5501d7a1f10c4bb
+SHA1 (patch-third__party_blink_renderer_controller_blink__initializer.cc) = 129e2e26e35a99755cc0dcfabc073b72be8aae30
+SHA1 (patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.cc) = 3c26000e2746cdb04356f35f9e72e367abfbffed
+SHA1 (patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.h) = d3591825daa8acdfd0744ea95943666d0cf5bfbc
+SHA1 (patch-third__party_blink_renderer_core_editing_editing__behavior.cc) = 92bf460388f486cfa1d4cdef23627606c5bdf784
+SHA1 (patch-third__party_blink_renderer_core_execution__context_navigator__base.cc) = 1b8ba8b32a41a4aa216eced5208e29ae86be5574
+SHA1 (patch-third__party_blink_renderer_core_exported_web__view__impl.cc) = 8cc803f8b52a2e7bc54fd742109a0303336ef739
+SHA1 (patch-third__party_blink_renderer_core_frame_web__frame__test.cc) = 54019cbd4a355765fb5b56764966a0980c45d083
+SHA1 (patch-third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc) = 77aee602dc03bc343d267982b933a7442b70cffe
+SHA1 (patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc) = 4a60a2462ba9191d48f029a1776dda86283a6e80
+SHA1 (patch-third__party_blink_renderer_core_layout_layout__view.cc) = 4782543fdd42bf68e1470f5ded9ae3e5563afb65
+SHA1 (patch-third__party_blink_renderer_core_loader_mixed__content__checker.cc) = 9ed53cd5ce592342870a4dfd6a7b0c16480f84e3
+SHA1 (patch-third__party_blink_renderer_core_origin__trials_origin__trial__context.cc) = 2a33de437f5d4c978e41f81dfd0e7b319b3b632a
+SHA1 (patch-third__party_blink_renderer_core_page_context__menu__controller.cc) = 31336d99140ebd714cb3408d4b0d74c6c7c036a9
+SHA1 (patch-third__party_blink_renderer_core_paint_paint__layer.cc) = 0862d2ca9ce1505b3ca624dece7e81ce2a35bd3c
+SHA1 (patch-third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc) = 85ff8d9028a4859cd2dd3e5b1b54264340c08f99
+SHA1 (patch-third__party_blink_renderer_core_xml_xslt__processor.h) = 371b083f5cefed457809445f0168e5c311056186
+SHA1 (patch-third__party_blink_renderer_core_xml_xslt__processor__libxslt.cc) = 021886a780f7b58f8ad691c1a9489bc78c2fe552
+SHA1 (patch-third__party_blink_renderer_modules_media_audio_audio__device__factory.cc) = 252b3968d0757185b8ec6bb9a3870adf3e076ca3
+SHA1 (patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc) = 0b4fe0a5af4bdaf0ed2d8b66d54d7cba38e1ffa2
+SHA1 (patch-third__party_blink_renderer_modules_peerconnection_rtc__data__channel.cc) = f87e01f79c5abcad369d67cdc2abeb1bf4e5e74d
+SHA1 (patch-third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc) = 327fc9b9f9eb783eeceac376d4847f437056f7b6
+SHA1 (patch-third__party_blink_renderer_modules_webaudio_audio__worklet__thread__test.cc) = 491bb9b7e2409dd005874d83d522d12226ab5aa4
+SHA1 (patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc) = 422afa5cfd48b90871af2c106e422d5e983e6108
+SHA1 (patch-third__party_blink_renderer_modules_webgpu_gpu__canvas__context.cc) = 873bfa16f0ce64faf7bbc6420002dc494dc4a3d3
+SHA1 (patch-third__party_blink_renderer_modules_webgpu_gpu__queue.cc) = 0a2121b8b924d33c614c3c2d3cea85181a841a10
+SHA1 (patch-third__party_blink_renderer_platform_BUILD.gn) = 3fb5e52276fd21f3a53a475a72bd5bc249d39881
+SHA1 (patch-third__party_blink_renderer_platform_fonts_font__cache.cc) = fdb26cc7e4d93b7e02c1631419aad14340b82f8e
+SHA1 (patch-third__party_blink_renderer_platform_fonts_font__cache.h) = 13dfa579e99cffd16d0841f0703a4f6fa4d50117
+SHA1 (patch-third__party_blink_renderer_platform_fonts_font__description.cc) = ac3c959aede531be9a58d1702e03e24f2c7055a4
+SHA1 (patch-third__party_blink_renderer_platform_fonts_font__metrics.cc) = 017dc8b2eb53e3b808217a97638c585817f0763b
+SHA1 (patch-third__party_blink_renderer_platform_fonts_font__unique__name__lookup.cc) = 2b3ac53db015442f8b2e6bdebc38773ad5992226
+SHA1 (patch-third__party_blink_renderer_platform_fonts_skia_font__cache__skia.cc) = c0505e2ca3930361bc92ac012b419a3cccaa83ec
+SHA1 (patch-third__party_blink_renderer_platform_graphics_begin__frame__provider.cc) = b62705382922756233657bc0de56179999cba90a
+SHA1 (patch-third__party_blink_renderer_platform_graphics_gpu_image__layer__bridge.cc) = b26ead761712ec321fec0addb9487c78343f83f0
+SHA1 (patch-third__party_blink_renderer_platform_graphics_video__frame__submitter.cc) = 2f53c4d01c6d401094e22c78bbf6fbe7fdf985c9
+SHA1 (patch-third__party_blink_renderer_platform_instrumentation_partition__alloc__memory__dump__provider.cc) = 4b6a4c733bb7d941c244b72f9e5f1f70ca6f7855
+SHA1 (patch-third__party_blink_renderer_platform_peerconnection_rtc__video__encoder__factory.cc) = 4ad3d883031ae78b762563911856783f5d38a22c
+SHA1 (patch-third__party_blink_renderer_platform_runtime__enabled__features.json5) = f87b44d1fe4c152222b4a220a1b2825209c573ab
+SHA1 (patch-third__party_blink_renderer_platform_scheduler_common_thread.cc) = 8c378d43c41cf9e90d0cb5b7b415420004664b7d
+SHA1 (patch-third__party_blink_renderer_platform_widget_compositing_blink__categorized__worker__pool__delegate.cc) = 11fa47ce15d87acce4325e39115fc282e5f3901f
+SHA1 (patch-third__party_blink_renderer_platform_wtf_container__annotations.h) = cb09d440f97373416439d2d23e30856a694a4b64
+SHA1 (patch-third__party_blink_renderer_platform_wtf_math__extras.h) = f9c413bbae52852ec251638717d37459b047677b
+SHA1 (patch-third__party_blink_renderer_platform_wtf_stack__util.cc) = 25a826173c7851a97e9eaa0cd951b649b25c182e
+SHA1 (patch-third__party_brotli_common_platform.h) = c8b712c75dcbf838a3020470b1f11c5045d1f372
+SHA1 (patch-third__party_cpuinfo_cpuinfo.gni) = 64ccdfaee2fe7f02062b097651fa284a457305c1
+SHA1 (patch-third__party_crashpad_crashpad_build_crashpad__buildconfig.gni) = fcb495a4ba46dff8b7322210bb6e4a44dd777bcc
+SHA1 (patch-third__party_crashpad_crashpad_client_BUILD.gn) = d5e526b27afdf673b4703c058ec741a237362c01
+SHA1 (patch-third__party_crashpad_crashpad_client_crashpad__client__posix.cc) = 159204ce1d237547a8f7290c31aa8c29e83c9c67
+SHA1 (patch-third__party_crashpad_crashpad_minidump_minidump__misc__info__writer.cc) = d5d432ab3cda3beaeb2ad03f971044129f05efc9
+SHA1 (patch-third__party_crashpad_crashpad_util_misc_address__types.h) = 3ff2261142d778b4b8d35a82738562f408131221
+SHA1 (patch-third__party_crashpad_crashpad_util_misc_capture__context.h) = 6d5f56a02f312ac112abf6ce19684cf1263dd18e
+SHA1 (patch-third__party_crashpad_crashpad_util_misc_metrics.cc) = 57c91875d54db12189d771a5a8bd49b2da74913e
+SHA1 (patch-third__party_crashpad_crashpad_util_misc_uuid.cc) = afea27652e2f0946dc1e0c96c6f0cade2dc78062
+SHA1 (patch-third__party_crashpad_crashpad_util_posix_close__multiple.cc) = 63016ae2c7876b8731ed9f03ba69a08103b50d10
+SHA1 (patch-third__party_crashpad_crashpad_util_posix_drop__privileges.cc) = 37bcb54b85d9330c0ecfe48ee7a03d7be4c6207f
+SHA1 (patch-third__party_crashpad_crashpad_util_posix_signals.cc) = b2bde0f9412aa0c6c5033a81f901917ca6760542
+SHA1 (patch-third__party_crashpad_crashpad_util_posix_symbolic__constants__posix.cc) = bdbb44d13187a6639b37d81f30027784e627abad
+SHA1 (patch-third__party_crc32c_BUILD.gn) = d62e55b8269bc4d423d4b5975dc2a2906a6da135
+SHA1 (patch-third__party_dawn_include_dawn_native_VulkanBackend.h) = 78b9b54bcf8d2c644cadb27c28a5e6019fb534c9
+SHA1 (patch-third__party_dawn_src_dawn_common_Platform.h) = 875b90f41b6fad876f79a97a95dae3c778e371fc
+SHA1 (patch-third__party_dawn_src_dawn_native_vulkan_BackendVk.cpp) = 522a3ca1e24378d6faa595a924c42f85bf1c7807
+SHA1 (patch-third__party_ffmpeg_BUILD.gn) = 5ce7aa80a4d3af48aed73a35907f24678e7c4856
+SHA1 (patch-third__party_ffmpeg_libavcodec_x86_cabac.h) = 49dada3b11f64858fc555cfb0a32f7b2beefa9cf
+SHA1 (patch-third__party_ffmpeg_libavutil_cpu.c) = 71e51d89234c5d5e2251501e3f5453da12c71893
+SHA1 (patch-third__party_ffmpeg_libavutil_mem.c) = 0318079ba625bae0b149c0df6ff75c42f4390bef
+SHA1 (patch-third__party_ffmpeg_libavutil_random__seed.c) = 91dc0b89af48276c8adb82261f9814df8c5a44f9
+SHA1 (patch-third__party_ffmpeg_libavutil_x86_x86inc.asm) = 9bf42c96232487df6bc49f81938b37c5095e5dc8
+SHA1 (patch-third__party_fontconfig_include_meson-config.h) = 274c873fa36801d2202df36fea30870fa48db6a3
+SHA1 (patch-third__party_fontconfig_src_src_fccompat.c) = 9ff7058c55c19c42d3e66b0b075cb3de87b9fe07
+SHA1 (patch-third__party_ipcz_src_BUILD.gn) = 33cc35ec94791fc2309a03a2f2785472d8c7bdf9
+SHA1 (patch-third__party_ipcz_src_reference__drivers_random.cc) = 281136e7932b136d1f33b9b9431ce0cace1f55c1
+SHA1 (patch-third__party_ipcz_src_standalone_base_logging.cc) = a1ded04b75c68a4301ecb67be7bd8b5db672af71
+SHA1 (patch-third__party_leveldatabase_env__chromium.cc) = cc632a15b51356fd60ccf5eecc84b46966598590
+SHA1 (patch-third__party_libaom_source_libaom_aom__ports_aarch64__cpudetect.c) = 3fc6097d15dc1bdd29dbce273f07ba424ce8cf52
+SHA1 (patch-third__party_libc++_src_include_____locale__dir_locale__base__api.h) = 6f3a58626534ce8be8b0f4a83adc974b377db739
+SHA1 (patch-third__party_libc++_src_include_____locale__dir_support_bsd__like.h) = af073b630120ed13cd22a5e65884fbfd77a467fa
+SHA1 (patch-third__party_libc++_src_src_chrono.cpp) = 5dfcaabf512c2646e2d86cef9ba8b4b752ee6775
+SHA1 (patch-third__party_libc++_src_src_filesystem_filesystem__clock.cpp) = a05976d38845a0993612edaf2eac83665d533a5a
+SHA1 (patch-third__party_libc++abi_src_src_cxa__guard__impl.h) = f7cffc3172c851919cb1f6d5511acff88fbc198b
+SHA1 (patch-third__party_libdrm_src_xf86drmMode.c) = 4ab5a98816aa6752322412f901416bad880d0ce4
+SHA1 (patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_memory_singleton.h) = 6366f415ecb5239e140290f06788b299e8c60848
+SHA1 (patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_synchronization_lock.h) = d35584b7c07a99e900983b9f64c1f43feafc51c9
+SHA1 (patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_thread__checker.h) = b7df83a58ef96fb021f1002e6453692fc59062f6
+SHA1 (patch-third__party_libsync_src_include_sync_sync.h) = 6757627d66a19d29a7ebc312d59f76dc9df26488
+SHA1 (patch-third__party_libsync_src_sync.c) = 17db1632665bdb3494b375965dd1366f94044a31
+SHA1 (patch-third__party_libusb_BUILD.gn) = 9b494909a21d9153ef2e41295abdc83a9d789a40
+SHA1 (patch-third__party_libusb_src_libusb_core.c) = 31e460f7a2751fcde0e6d4c03632517ffc0ea80f
+SHA1 (patch-third__party_libusb_src_libusb_os_threads__posix.c) = 7a425698de9ac27777edc57b00db5a46835d40a3
+SHA1 (patch-third__party_libvpx_source_libvpx_vpx__ports_aarch64__cpudetect.c) = 56a12a0790d27c71f7f27900008fc70a51fdb298
+SHA1 (patch-third__party_lzma__sdk_C_CpuArch.c) = f615683d29814954f07c0816e6de509c53a8581f
+SHA1 (patch-third__party_material__color__utilities_src_cpp_palettes_tones.cc) = c36c40db9ed3eb45c05b8a482b833eda7fe06169
+SHA1 (patch-third__party_nasm_BUILD.gn) = 71a63630cd2c1e7ead7aa3b80257a7454d7ce1a0
+SHA1 (patch-third__party_nasm_config_config-linux.h) = c59e30e4d5c090c04779fc4a2eb6a88b4f712a41
+SHA1 (patch-third__party_node_check__version.py) = 0952e911724f52e93f56597fb2942729e671e8b5
+SHA1 (patch-third__party_node_node.gni) = ae3b45bd99cb313bb0e17ceb521ee529d660bde8
+SHA1 (patch-third__party_node_node.py) = e3a9fdefa59d90da637098783fa1d42320126f35
+SHA1 (patch-third__party_pdfium_core_fxge_cfx__fontmapper.cpp) = 13cf2488377e4177d65baab62d65ea1f5e46f076
+SHA1 (patch-third__party_pdfium_core_fxge_linux_fx__linux__impl.cpp) = 80f5e4b0acc1cc9c07fb974c46dd86e3741c0d05
+SHA1 (patch-third__party_pdfium_fxjs_fx__date__helpers.cpp) = 667bb9bd99996a130b45800693a7d76b66d594cd
+SHA1 (patch-third__party_pdfium_pdfium.gni) = 7caddb6af319c4631459193bb688e411fb59bf52
+SHA1 (patch-third__party_pdfium_xfa_fxfa_parser_cxfa__timezoneprovider.cpp) = dde7f72ee275e08d51dd19d8c94d269837e9158b
+SHA1 (patch-third__party_perfetto_include_perfetto_base_build__config.h) = 14db2429ac7e3af2f3024a0b2e07bf7cbee361de
+SHA1 (patch-third__party_perfetto_include_perfetto_base_thread__utils.h) = 4a644f3a7dfcce5d7373b1c214c2e2ae853d05d5
+SHA1 (patch-third__party_perfetto_include_perfetto_base_time.h) = 917196aef987d08ef64b637ad44168a7a6680cb2
+SHA1 (patch-third__party_perfetto_include_perfetto_ext_base_event__fd.h) = 82e61a76522a733394c978054dae3816a736ae29
+SHA1 (patch-third__party_perfetto_include_perfetto_ext_base_thread__utils.h) = 1759aad535db8729fcbb7b9e6b59a963a2ae0778
+SHA1 (patch-third__party_perfetto_include_perfetto_tracing_internal_track__event__legacy.h) = 13e6dc00e96541c819e2bc9bf727555c0f452936
+SHA1 (patch-third__party_perfetto_protos_perfetto_trace_ftrace_v4l2.proto) = 14d229aece05774dbfef6d30d2cf46bc3521439f
+SHA1 (patch-third__party_perfetto_src_base_clock__snapshots.cc) = 7aff4fdd4ea47084a709a2f4f385781f83b1e2aa
+SHA1 (patch-third__party_perfetto_src_base_event__fd.cc) = 33361a2ddf3a8b18f17dbf6bb5dd9e1f4566cd8f
+SHA1 (patch-third__party_perfetto_src_base_periodic__task.cc) = 2dacdaca66b4658dbbe9c7211f39542768267d9a
+SHA1 (patch-third__party_perfetto_src_base_string__utils.cc) = b2cfad007abde95c22da5a72b63397bae7d7553a
+SHA1 (patch-third__party_perfetto_src_base_subprocess__posix.cc) = 14ccd959253e891444b7908d7b58f5962aeef8b1
+SHA1 (patch-third__party_perfetto_src_base_test_vm__test__utils.cc) = 3cc9ecba1b77a2223958a15c52b4e8ac992d22a0
+SHA1 (patch-third__party_perfetto_src_base_thread__task__runner.cc) = b0bb052ccf50fbd7d94371101749d2c738e64502
+SHA1 (patch-third__party_perfetto_src_base_unix__socket.cc) = 08aaa9488f3896e3d2ed61ffa38bb05d26b2755c
+SHA1 (patch-third__party_perfetto_src_base_utils.cc) = d95da6a39a474d9d1d6dcaafa5ce754f76eabfa8
+SHA1 (patch-third__party_perfetto_src_trace__processor_importers_ftrace_v4l2__tracker.cc) = 94e531afd48dc6b39b13bd4b5a18dbe299b1cd44
+SHA1 (patch-third__party_perfetto_src_tracing_ipc_memfd.cc) = 81d9e665bae85d650b3b2a841b3a874aeb191fd3
+SHA1 (patch-third__party_perfetto_src_tracing_platform__posix.cc) = 341074d1494bc1b3f3715a403eb20f5c687fad0f
+SHA1 (patch-third__party_perfetto_src_tracing_track.cc) = 84f37883d95dd66a0b9d45276cb3269a86b3b080
+SHA1 (patch-third__party_protobuf_src_google_protobuf_stubs_platform__macros.h) = 9d1047576e3e2ffd7347c4bf782d452e2432f299
+SHA1 (patch-third__party_skia_src_gpu_ganesh_GrAutoLocaleSetter.h) = 0aebc7a54078d9ca2e2fa4165a1e2bb2a3a1e3a4
+SHA1 (patch-third__party_skia_src_ports_SkMemory__malloc.cpp) = a44ed12d40dbb5ea2c1f71c246b1de4e36e5c04f
+SHA1 (patch-third__party_skia_src_ports_SkOSFile__posix.cpp) = c5806bb8bf0531df557a14b5d78c0006b9c7746d
+SHA1 (patch-third__party_speech-dispatcher_libspeechd__version.h) = ff9087c140e634d83dc638bea9074b4524de0f61
+SHA1 (patch-third__party_speech-dispatcher_speechd__types.h) = 1b4e113cf9163b7763ab5a6b1eb1d6cc22f6788f
+SHA1 (patch-third__party_sqlite_BUILD.gn) = 54c8434a06e3c761fa5161b9b93e4362d0c209e0
+SHA1 (patch-third__party_sqlite_src_amalgamation__dev_sqlite3.c) = 84bed2c34d920f7e54aa97adcee140052d8f42cc
+SHA1 (patch-third__party_sqlite_src_amalgamation_sqlite3.c) = ea99f24b2eb0d2e08cdef974d64489c63e71c731
+SHA1 (patch-third__party_swiftshader_src_Reactor_Debug.cpp) = 99a878862a72c9bd03f2d8a7e1d6405f79d2ed10
+SHA1 (patch-third__party_swiftshader_src_System_Configurator.cpp) = 93b9f58860ff3fc586a1b8c5fcb851686f0bb4c0
+SHA1 (patch-third__party_swiftshader_src_System_Linux_MemFd.cpp) = b30f38c684ef06268f4069a5a0bba53e01142583
+SHA1 (patch-third__party_swiftshader_src_Vulkan_VkSemaphoreExternalLinux.hpp) = b78fd3ca46c38ed749994182185c8ef5f73051d2
+SHA1 (patch-third__party_swiftshader_src_WSI_libXCB.cpp) = 3590b7b81ce9df4e0050daa778ffbe0d4db333d4
+SHA1 (patch-third__party_swiftshader_third__party_llvm-10.0_configs_linux_include_llvm_Config_config.h) = 69f0c7cb0e1169a14bd7e49de6fb8259501cb3d6
+SHA1 (patch-third__party_swiftshader_third__party_llvm-subzero_build_Linux_include_llvm_Config_config.h) = 0f5b40c83d695e47becf99b7282ee5f72ea6e31a
+SHA1 (patch-third__party_swiftshader_third__party_marl_src_memory.cpp) = e5ffb931c59648249d46be41ab91e01adcdf7cc8
+SHA1 (patch-third__party_swiftshader_third__party_marl_src_thread.cpp) = e6c867db3f81e496a7c4a595bf69184d19cc122d
+SHA1 (patch-third__party_test__fonts_fontconfig_BUILD.gn) = 0655e2b652504162878c8f101b345ef0f3dae4fa
+SHA1 (patch-third__party_test__fonts_fontconfig_fontconfig__util__linux.cc) = 9961872ac7fc8c40f795b240d920e77a715e1114
+SHA1 (patch-third__party_test__fonts_fontconfig_generate__fontconfig__caches.cc) = 821adbd7202e681ef52c503f980a1c6bc597537c
+SHA1 (patch-third__party_tflite_features.gni) = 4fa8a7720d37e38094e4d000985ecd893468518b
+SHA1 (patch-third__party_unrar_src_crypt.cpp) = 330eafbb0497e469626444a736a07b2b42050252
+SHA1 (patch-third__party_vulkan-validation-layers_src_layers_external_vma_vk__mem__alloc.h) = 167322143a6dd0f0dd9d0ecec5eb558a2dc3ebef
+SHA1 (patch-third__party_vulkan-validation-layers_src_layers_vulkan_generated_vk__function__pointers.cpp) = 655bd2dbda8f867649ca3d7cdaf1ebeba69fa469
+SHA1 (patch-third__party_vulkan__memory__allocator_include_vk__mem__alloc.h) = fd0f874ced485a01aa7398d037ca79cd5a23e24c
+SHA1 (patch-third__party_wayland_BUILD.gn) = b89235d4716b712459efe362c27b30099d63a6ee
+SHA1 (patch-third__party_wayland_include_config.h) = 2912d4eb69e49bb91fcd3feb55d5bce06ea65b08
+SHA1 (patch-third__party_webrtc_BUILD.gn) = 199dde812d08307e3f7ddf09e59c5052ab42c20e
+SHA1 (patch-third__party_webrtc_modules_audio__device_BUILD.gn) = 738fd3c7c450ea71e7e13c033e1287456f25871a
+SHA1 (patch-third__party_webrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc) = d99d08b58c1da78788b5dc2281623213e3f69485
+SHA1 (patch-third__party_webrtc_modules_desktop__capture_linux_x11_x__server__pixel__buffer.cc) = b5c65bd85faddbb6a74d3437ede308b58aa4c0d4
+SHA1 (patch-third__party_webrtc_rtc__base_byte__order.h) = 5c19ea686adb58a55570f9f409a33ca8c3198419
+SHA1 (patch-third__party_webrtc_rtc__base_cpu__info.cc) = 385455d8bc96fd6438c9cc1c9498b22bc03559d9
+SHA1 (patch-third__party_webrtc_rtc__base_ip__address.cc) = cfc1560dc64a32230e99ec393c4460b98c94e1a4
+SHA1 (patch-third__party_webrtc_rtc__base_net__helpers.cc) = c269bfdeec34a377c1df6673c8b0538a476912de
+SHA1 (patch-third__party_webrtc_rtc__base_network.cc) = 05b398fa0f5651f693c53259e6d5d63c79600d1b
+SHA1 (patch-third__party_webrtc_rtc__base_physical__socket__server.cc) = 737ae336e3c6dc21934d19240acdf404957472cb
+SHA1 (patch-third__party_webrtc_rtc__base_physical__socket__server.h) = 677bf8596802e3eef80183702d0c3a9cb949c42a
+SHA1 (patch-third__party_webrtc_rtc__base_platform__thread__types.cc) = 9f07f859e8c31778252bfe076d5ebcb18af945f5
+SHA1 (patch-third__party_webrtc_rtc__base_third__party_sigslot_sigslot.h) = 19efab0d853179bc33b1d10ae731f0a837db7af8
+SHA1 (patch-third__party_widevine_cdm_widevine.gni) = b59ec3dec9647777d2c39ddf203c6c3d08ef9fd3
+SHA1 (patch-third__party_zlib_BUILD.gn) = 59de9c19a5a1d5d23642d153f00df9f3a48decaa
+SHA1 (patch-third__party_zlib_cpu__features.c) = c95046a4c365887228ce12e47c2cee05a7d8eaa6
+SHA1 (patch-tools_code__cache__generator_BUILD.gn) = 99771f44ba64de9d44d13384053f4c4e32bb28e5
+SHA1 (patch-tools_generate__shim__headers_generate__shim__headers.py) = 7d6dddf27cf52ce10ebba6f22c12c4123f6a6bf2
+SHA1 (patch-tools_generate__stubs_rules.gni) = f5eb10d7412fb006584f4164f5e6e69b4f4150e0
+SHA1 (patch-tools_gn_build_build__linux.ninja.template) = 48052785a909b55328d7a8e9820da9a391b53826
+SHA1 (patch-tools_gn_build_gen.py) = 4ee8acfee3e638f1b3c5f38d007aec2baab9c494
+SHA1 (patch-tools_gn_src_base_files_file__posix.cc) = 38cff1b700210d64130a0ae58fd7062ea98064de
+SHA1 (patch-tools_gn_src_gn_version.h) = 26b0f6bba9a0b7cb77d3d748d53e7f7f4c13b149
+SHA1 (patch-tools_gn_src_util_exe__path.cc) = ac76ef736e8a9b2e601befef70fd120228da30a5
+SHA1 (patch-tools_grit_grit_node_base.py) = 968e579b34c67d0b81d89f4edf6d730f30b76517
+SHA1 (patch-tools_json__schema__compiler_cpp__bundle__generator.py) = 4395ce413062a7b535ad11698b87e4a529eba122
+SHA1 (patch-tools_json__schema__compiler_feature__compiler.py) = 40eb7f1b4699fd2939ee95e1a732c07df86b387b
+SHA1 (patch-tools_memory_partition__allocator_inspect__utils.h) = dd078ac827d536635a29717aebfabf2b43e01f72
+SHA1 (patch-tools_perf_chrome__telemetry__build_BUILD.gn) = 64ae62aae85a3701f1293c51d896ef74149225a1
+SHA1 (patch-tools_protoc__wrapper_protoc__wrapper.py) = a6cd75ab564ff3f86d64cfdba9b0547a6b851779
+SHA1 (patch-tools_v8__context__snapshot_BUILD.gn) = a6199018564c28ea958649d5097d25e3fb4a0bd3
+SHA1 (patch-tools_variations_fieldtrial__to__struct.py) = b591497e429f6bff4fe06b4bf6d4992d907a17d2
+SHA1 (patch-ui_accessibility_accessibility__features.cc) = 4daa381da1332737f24874b5eb2622c1c2c657dd
+SHA1 (patch-ui_accessibility_accessibility__features.h) = 2c590645023cde7e924dfd02f82cf848622baee6
+SHA1 (patch-ui_accessibility_ax__node.cc) = f90631d2ff532a79aea3b72136aff2c0c650df26
+SHA1 (patch-ui_accessibility_ax__node.h) = f93f15840f5b65d2609e92cdac1530d5a4902098
+SHA1 (patch-ui_accessibility_ax__tree.cc) = cccd29440532f51528e715b4fd0462813b80586e
+SHA1 (patch-ui_accessibility_ax__tree.h) = c617888e0b8af66d08f22db0d7ea9924d3d08765
+SHA1 (patch-ui_aura_client_drag__drop__client.h) = e52dde0c40a800e1d3edcdcca958065ef7de97cf
+SHA1 (patch-ui_aura_screen__ozone.cc) = f7c54a215c0c9554dc9efe396f9d36d221e12b77
+SHA1 (patch-ui_aura_screen__ozone.h) = 955e5d5465b986206a625d1246cf26d3767e11f7
+SHA1 (patch-ui_base_accelerators_accelerator.cc) = 04bc200cbf005fc5436ad8a9242dde498dfca914
+SHA1 (patch-ui_base_accelerators_command.cc) = eee68ad59b3f06a93415628be4cfeb45f49cfc0b
+SHA1 (patch-ui_base_accelerators_global__accelerator__listener_global__accelerator__listener__ozone.cc) = fb02ed15add764fc4aeef6773c97fd17d8d578ef
+SHA1 (patch-ui_base_clipboard_clipboard__constants.h) = aae67715d58b78863f202df7b1187a01bf010ef6
+SHA1 (patch-ui_base_clipboard_clipboard__non__backed.cc) = 55c59fd702a645176190f6d29db43ab15ecb8552
+SHA1 (patch-ui_base_cursor_cursor__factory.cc) = 76582675bd63471f9656984e1afab66bb3c38108
+SHA1 (patch-ui_base_cursor_cursor__factory.h) = 0df01660c74a75d83bbbe235df5199af96c34a3e
+SHA1 (patch-ui_base_dragdrop_os__exchange__data__provider__factory.cc) = 7f5992dcf316c970592ab71523f2c383b72526b5
+SHA1 (patch-ui_base_dragdrop_os__exchange__data__provider__non__backed.cc) = cfa768e0651c39de860501806020155d226724a8
+SHA1 (patch-ui_base_ime_dummy__text__input__client.cc) = b1865010bafa349ef41bb38a234dac04ecbad628
+SHA1 (patch-ui_base_ime_dummy__text__input__client.h) = 2d1b642ce655675bbcd973b6f0483d8e2907e161
+SHA1 (patch-ui_base_ime_fake__text__input__client.cc) = e764517e3a2d82f8872a125b6031c6cef164b4de
+SHA1 (patch-ui_base_ime_fake__text__input__client.h) = 34b436931e7422790de9ff3caae7f8c4439f8fe3
+SHA1 (patch-ui_base_ime_init_input__method__initializer.cc) = c96a046c9a46e9992ea387ebf3f5604f21b0fc4d
+SHA1 (patch-ui_base_ime_linux_linux__input__method__context__factory.cc) = 98335af4c9da03375f752eabf6a2e768f9de8616
+SHA1 (patch-ui_base_ime_text__input__client.h) = f8a1f048d09798304f72aa70431137a67584bf79
+SHA1 (patch-ui_base_resource_resource__bundle.cc) = 5e66d1cec97c5e91fe5c610b21e6f2f4437c8096
+SHA1 (patch-ui_base_test_skia__gold__pixel__diff.cc) = ed3c92d441df0ac77b59729950825d12490d0bb3
+SHA1 (patch-ui_base_test_ui__controls.h) = 88eb508c80e7935bd567f0f8159501faaf26b5e4
+SHA1 (patch-ui_base_ui__base__features.cc) = 9a044908d60d63b28244141b0bf68592d5fc3ef7
+SHA1 (patch-ui_base_ui__base__features.h) = 63bc8f6ade6c328c07af8a7d535d201ad6cb9326
+SHA1 (patch-ui_base_ui__base__switches.cc) = 5ab409aaa02a516ac00ddb449160128ab9729566
+SHA1 (patch-ui_base_ui__base__switches.h) = 53c804ab5182ba392eca443df337208789d1b30c
+SHA1 (patch-ui_base_webui_web__ui__util.cc) = 8008d31ea59c80fc27684f823543c37175870333
+SHA1 (patch-ui_base_x_x11__cursor__factory.cc) = 86794cd424172d25f6355075105d3ef00c44b4e1
+SHA1 (patch-ui_base_x_x11__cursor__factory.h) = 0d617718937a4a3ca0c70f88a0871fbaa8d40ee7
+SHA1 (patch-ui_base_x_x11__cursor__loader.cc) = 171ce75c416c7b60628a5a867254d71d6def89b8
+SHA1 (patch-ui_base_x_x11__display__manager.cc) = 774216a3c109c7ad264140ce2da44eb607b433d1
+SHA1 (patch-ui_base_x_x11__shm__image__pool.cc) = df8781afea73e5609f7ad7ad4ad2cea0597484aa
+SHA1 (patch-ui_color_color__id.h) = 2e3026bc86dc4fc095437f6a2a0992a6e2b5c9fe
+SHA1 (patch-ui_color_color__provider__utils.cc) = b1c8046d14fed52e32cb2f20fa990be7fc5740b3
+SHA1 (patch-ui_color_system__theme.h) = 04eadae4460a230272e4fa78fee01ca1c944dd10
+SHA1 (patch-ui_compositor_compositor.cc) = 2ded0ad35c4e41569484c02d96593b7366e6430d
+SHA1 (patch-ui_compositor_compositor.h) = 8658c68e2f091b694870d03342b63045ff7bf31e
+SHA1 (patch-ui_compositor_compositor__observer.h) = 4dd694224b2bafdff7893116aa29167e52930e9b
+SHA1 (patch-ui_display_screen.cc) = 646ab6da1ceb4fee2f701e72217125bc44b0eaa2
+SHA1 (patch-ui_display_screen.h) = 44cb847d35fcc9563911353e530b5c412906c275
+SHA1 (patch-ui_events_event.cc) = 1e04aed50979cf2c937652ad2712cd6ef3b847f0
+SHA1 (patch-ui_events_event__switches.cc) = ee0a335cb59220eae1928d42ae9b4cf8307c85aa
+SHA1 (patch-ui_events_event__switches.h) = 33860406aa47b8ba6b8c5b9ae18d09d0a900daae
+SHA1 (patch-ui_events_keycodes_dom_keycode__converter.cc) = f75357c3308e6b4fd1bc0724057062b32745c6de
+SHA1 (patch-ui_events_keycodes_dom_keycode__converter.h) = eed214b0c003351540aa3bd5a5dfc7232a167525
+SHA1 (patch-ui_gfx_BUILD.gn) = e8ba2de3eb781c324c924e8c0dc8306affc67286
+SHA1 (patch-ui_gfx_canvas__skia.cc) = 2ab681b4f2631b5ed63000201ed8bb0a76d0c878
+SHA1 (patch-ui_gfx_font__fallback__linux.cc) = 931248e9eeefe8295c70ff45a9d80c4e75f70bf2
+SHA1 (patch-ui_gfx_font__render__params.h) = 7dc13f120dba7788e3642e303e687dc05ab3425f
+SHA1 (patch-ui_gfx_font__render__params__linux.cc) = 688a136475c92b9f2a85fc8cbef2e67ff51475ff
+SHA1 (patch-ui_gfx_font__util.cc) = 5d0c626d2675e1c971eb0be8077399c4010dda93
+SHA1 (patch-ui_gfx_gpu__extra__info.h) = a16f64ff2888b0c4048881c7c66fbde293d42894
+SHA1 (patch-ui_gfx_linux_dmabuf__uapi.h) = 4b7c1c1ffdc158ed37fef481d751cf434dfd5e85
+SHA1 (patch-ui_gfx_linux_gbm__wrapper.cc) = 5b808e449a0163484988c16e97643d484e9c1ebd
+SHA1 (patch-ui_gfx_mojom_native__handle__types__mojom__traits.cc) = 6d33e65e1872538012591b287049e67f767296bb
+SHA1 (patch-ui_gfx_mojom_native__handle__types__mojom__traits.h) = dd7d07b66e0874fdb242f92d9f05ac7db6a280ef
+SHA1 (patch-ui_gfx_native__pixmap__handle.cc) = 939b3699f58528bbde42dc0fbb8498325d9e023a
+SHA1 (patch-ui_gfx_native__pixmap__handle.h) = 6471bf2a295635302449ca5b1423609c0073b293
+SHA1 (patch-ui_gfx_native__widget__types.h) = 347e251b0c75ed2f80c15fc2d21a6c97c9570935
+SHA1 (patch-ui_gfx_platform__font__skia.cc) = cf769a8b035a608a7aca231994e677213e26dd48
+SHA1 (patch-ui_gfx_render__text__api__fuzzer.cc) = 16ed3a2fd037cd9fa3d4bc477126d4fa31919cb5
+SHA1 (patch-ui_gfx_render__text__fuzzer.cc) = a18b0afa92451044fa500967da0ecfbd24ace2fa
+SHA1 (patch-ui_gfx_switches.cc) = 85c4e8cca207e1937a17fab24f3a97ca177e8089
+SHA1 (patch-ui_gfx_switches.h) = 608cb068ab35a40d14d01a8209c15192373a51bd
+SHA1 (patch-ui_gfx_x_atom__cache.cc) = a183ec2dd679bc990f65cf036f5b2821dd73a0b6
+SHA1 (patch-ui_gfx_x_generated__protos_dri3.cc) = 79bd9a67925cbe759913f8910ca23f0c81c97e27
+SHA1 (patch-ui_gfx_x_generated__protos_shm.cc) = d4fdb8dab9649b351ac4a0f0e6ccd390af29c68f
+SHA1 (patch-ui_gfx_x_xlib__support.cc) = ecc131cf6e5839f3e00bf58bb13a6d5a565fc37e
+SHA1 (patch-ui_gl_gl__context.cc) = c58a929d109a7fd9476ea553b369ce0cc28aa79b
+SHA1 (patch-ui_gl_gl__fence.cc) = fc636880715ae797ee89aedffa87cb6438d7109f
+SHA1 (patch-ui_gl_gl__implementation.cc) = e622046b89ee5afc3745e344126a4338442cb451
+SHA1 (patch-ui_gl_gl__switches.cc) = d18622d59e76cd5fcb5d95d53c73324dd230c830
+SHA1 (patch-ui_gl_sync__control__vsync__provider.cc) = 6a17828d563c8f97a9e9353376311fa2dab59e83
+SHA1 (patch-ui_gl_sync__control__vsync__provider.h) = a1eaafdd56b361e248b6082f00e8e0b8932a3b60
+SHA1 (patch-ui_gtk_gtk__compat.cc) = 283fe2253952e3f61f8e1639ef18a6231ecf1a90
+SHA1 (patch-ui_gtk_printing_print__dialog__gtk.cc) = e6de18d0c96463746e37a9b4c24a8184fe1fead2
+SHA1 (patch-ui_message__center_views_message__popup__view.cc) = e3774db9c77c7d21c0bb11c84639c06afb2fc10c
+SHA1 (patch-ui_native__theme_features_native__theme__features.cc) = a33630d5e6744f47b7a05e6e3fb99a552abbb8c9
+SHA1 (patch-ui_native__theme_native__theme.h) = 755037b715f38d65ffffdc45714d6d83fe3839ef
+SHA1 (patch-ui_native__theme_native__theme__base.cc) = aed569d771aabcf24e56aadd2478bc35d38d80d9
+SHA1 (patch-ui_ozone_common_egl__util.cc) = b3d065264bc0a752c8b0b261b06d222bbb023e73
+SHA1 (patch-ui_ozone_platform_headless_headless__surface__factory.cc) = 38c8cf8353a77fc5b4571b984735c863834bab4c
+SHA1 (patch-ui_ozone_platform_headless_ozone__platform__headless.cc) = e17c351478f1223c688e448986ae8c8610aeca3b
+SHA1 (patch-ui_ozone_platform_headless_vulkan__implementation__headless.cc) = 324d97b352dbbfd5c97e5e6fe9c3ef60c3e77ca2
+SHA1 (patch-ui_ozone_platform_wayland_common_wayland__util.cc) = e79a45036f50f77bf88ba9ae945f746fdc026a88
+SHA1 (patch-ui_ozone_platform_wayland_gpu_vulkan__implementation__wayland.cc) = a6b0e53ac24fb8943dddf5db07285e98af9f93d6
+SHA1 (patch-ui_ozone_platform_wayland_host_wayland__frame__manager.cc) = 84989ba403731a20469927aa1e6033399432d062
+SHA1 (patch-ui_ozone_platform_x11_vulkan__implementation__x11.cc) = 556224ca321c57a6f9bcd6770a140032dcc9d62a
+SHA1 (patch-ui_ozone_platform_x11_x11__screen__ozone.cc) = 3346b2897404787a2f18210108a3cece7a6cf54e
+SHA1 (patch-ui_ozone_platform_x11_x11__screen__ozone.h) = 10e3372c4df13105a5271445d34432b385e22a7b
+SHA1 (patch-ui_ozone_platform_x11_x11__window.cc) = a688b2d405a5691d47fba0956f404b8e77370bb9
+SHA1 (patch-ui_ozone_public_ozone__ui__controls__test__helper.h) = bf197ab423539feba9ccf4802c755d3f43581d19
+SHA1 (patch-ui_ozone_test_mock__platform__window__delegate.h) = b28b5db61fdbfffa501dd4a87aab9d9a62190ad9
+SHA1 (patch-ui_platform__window_platform__window__delegate.cc) = d3e28dbdfc0faab8b3f52009f22a54236c0e9781
+SHA1 (patch-ui_platform__window_platform__window__delegate.h) = c2c2848ae06517d3bfb737f75d9aafea3cbce011
+SHA1 (patch-ui_platform__window_platform__window__init__properties.h) = aa4b73ebf6a05a2f19779b38fa4a1bdd662f4be1
+SHA1 (patch-ui_qt_BUILD.gn) = 6ac0082b3f076a5b1a9ba68991a2d3458e574ee9
+SHA1 (patch-ui_strings_translations_app__locale__settings__bn.xtb) = c19b51450363704c38711ef3faf18e5065e37e2f
+SHA1 (patch-ui_strings_translations_app__locale__settings__ja.xtb) = 83cb8e5f34e9d9c8639427c34e5892d78665a674
+SHA1 (patch-ui_strings_translations_app__locale__settings__ko.xtb) = 0fd2cdee33f285314ca272b61393dbdd98000fe0
+SHA1 (patch-ui_strings_translations_app__locale__settings__ml.xtb) = a96b89a36735cbb2f8fd43d6d532395028979871
+SHA1 (patch-ui_strings_translations_app__locale__settings__th.xtb) = 220d8d7d5924ff17cc4f91d3231ba342e1c366a1
+SHA1 (patch-ui_strings_translations_app__locale__settings__zh-CN.xtb) = 653951a2009c4a642eddec0fb94f8c7d64fdfdc2
+SHA1 (patch-ui_strings_translations_app__locale__settings__zh-TW.xtb) = 7514d19bd324f7b21e76ce17f3c6529a67c53197
+SHA1 (patch-ui_views_BUILD.gn) = b29d2bcf72d33c494cad262a9aaecc849167c8e7
+SHA1 (patch-ui_views_accessibility_view__accessibility.cc) = f5b5b4bdf95fc630698b5779f8c4a3e6548d4ec5
+SHA1 (patch-ui_views_controls_prefix__selector.cc) = 6856de245dfb54a9a2764c6511d83858c0c5371e
+SHA1 (patch-ui_views_controls_prefix__selector.h) = 7d285db94a0bf29808ecb7668871e9f41e0a3271
+SHA1 (patch-ui_views_controls_textfield_textfield.cc) = 46a2cba979ef4d3c0744d13c57359dcd91ca77ee
+SHA1 (patch-ui_views_controls_textfield_textfield.h) = 035953c8df6d997f03f0608526ec945353d33953
+SHA1 (patch-ui_views_examples_widget__example.cc) = b60972b60a334e67e76361003647f94a00d687fd
+SHA1 (patch-ui_views_focus_focus__manager.cc) = e88d37d91a94992c649a0b5f6d4eafb24f7c4c8a
+SHA1 (patch-ui_views_style_platform__style.cc) = a8cdd441ca4eaf48705cfa483408db177705377c
+SHA1 (patch-ui_views_style_platform__style.h) = 3e7f325bdb21cc7ac380e0cb1b8a63f473f5d291
+SHA1 (patch-ui_views_test_ui__controls__factory__desktop__aura__ozone.cc) = 7399d2cc1e109bc7c4a4af32badd8144899a93cb
+SHA1 (patch-ui_views_views__delegate.cc) = 9c90f724aabe6bb5b5dd83416a79e2d4edaaf9f6
+SHA1 (patch-ui_views_views__delegate.h) = 99e1d0e235a794e438411b173f37945653d1a31a
+SHA1 (patch-ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.cc) = e580c6e465b9659c1bc3bdeeeaa64b6b0a240f8a
+SHA1 (patch-ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.h) = bf3c438b934b81344a37aa71821a222be0133b9a
+SHA1 (patch-ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc) = a9889c7dbf03654460f15dc0dec84ea6ae0b3de4
+SHA1 (patch-ui_views_widget_root__view.cc) = 59cf1ec69fd1f2de98d55bef9c41dc203a129d74
+SHA1 (patch-ui_views_widget_widget.cc) = b9cba59b21aca3560a05b837c2c2e9eda80247d8
+SHA1 (patch-ui_views_widget_widget.h) = 079e1a4773830231f6536f2cc99cd03f18486db5
+SHA1 (patch-ui_views_window_default__frame__view.cc) = 5b9ae6b76e3e560fdc33c6cd8c5579ec40a78656
+SHA1 (patch-ui_views_window_dialog__delegate.cc) = da0cd4da7259e2db7d333365bcbc95331a891088
+SHA1 (patch-ui_views_window_frame__background.cc) = b1933ecce05073b5383c8996c473a7b3ac3b86fe
+SHA1 (patch-v8_BUILD.gn) = c7d3f425320bcca73cdf70556862e9b99c633b24
+SHA1 (patch-v8_include_v8-internal.h) = 94d42736db996634032b52d418d08266a54e5500
+SHA1 (patch-v8_include_v8config.h) = 6d408ce163e87d87cb8075b83d04e20d3ed5eee4
+SHA1 (patch-v8_src_api_api.cc) = 1664be8cf71cf9755f45bb2150e800fbdc0b68c8
+SHA1 (patch-v8_src_base_atomicops.h) = 66d0eb508079df0e0051d9a5a88067f84d401444
+SHA1 (patch-v8_src_base_platform_memory.h) = 80f2bdc7c2393880a45f2efbdebac660388ea58f
+SHA1 (patch-v8_src_base_platform_platform-freebsd.cc) = d656c4970b78dd54736aeaa46f89c593ab9eaf99
+SHA1 (patch-v8_src_base_platform_platform-openbsd.cc) = 3a74a0bb25a223b3c80390c1d2663d23a0f114da
+SHA1 (patch-v8_src_base_platform_platform-posix.cc) = eb8fa7c860d96779a751db74b1147788ba13653f
+SHA1 (patch-v8_src_base_strings.h) = 236a3e47ed73f55a063839a68746c5bb72959fb5
+SHA1 (patch-v8_src_base_sys-info.cc) = 94c286cf7f666a4b12e8183a3d03f3836d58110a
+SHA1 (patch-v8_src_base_utils_random-number-generator.cc) = 3f9355b16d7b00350c0fc76f649281c972698852
+SHA1 (patch-v8_src_diagnostics_perf-jit.cc) = 75c07c5885917f870660cfe2b71a0fa0ef9fd9cd
+SHA1 (patch-v8_src_diagnostics_perf-jit.h) = a2c4e590258a38ab2e93b1420f838df2cf0e36cd
+SHA1 (patch-v8_src_execution_isolate.cc) = 6357b66c717eafff5b2df4daa31114b544fc8096
+SHA1 (patch-v8_src_flags_flags.cc) = b800424291efdcb245f0e87a48826eb6351be98b
+SHA1 (patch-v8_src_libsampler_sampler.cc) = 009d53bb3846fad317b0974c15f843c93ce3dae2
+SHA1 (patch-v8_src_sandbox_sandbox.cc) = e6ab93d5e43403f15aa5f2ca9b4029a63117bb2a
+SHA1 (patch-v8_src_snapshot_embedded_platform-embedded-file-writer-base.cc) = 29b854b93947a6912dd71ec328478aada4aff474
+SHA1 (patch-v8_src_snapshot_embedded_platform-embedded-file-writer-base.h) = 4e6616e1162e7dd04b1b519171bcbc3cfe94c168
+SHA1 (patch-v8_src_snapshot_embedded_platform-embedded-file-writer-generic.cc) = 501b52acb5299c9f3dbdef25bf53f6d4d8b3c7b2
+SHA1 (patch-v8_src_trap-handler_handler-inside-posix.cc) = 9d629dc4f0bbe7a1d4ce362dbe0f7e23d13a2088
+SHA1 (patch-v8_src_trap-handler_handler-inside-posix.h) = e4d5a83e4544c333267d2189110f161bd199dc6e
+SHA1 (patch-v8_src_trap-handler_trap-handler.h) = b91b58855a98b41e2cee54e6511b67a507e4a972
+SHA1 (patch-v8_src_wasm_baseline_ia32_liftoff-assembler-ia32-inl.h) = 8a3296c7396d80beb08c53e18673f7eaf7ca6d53
+SHA1 (patch-v8_tools_run-paxctl.py) = 83400e320e251406c85506957096f39a5a30d091
+SHA1 (patch-v8_tools_run.py) = 90e5fc0badcc4978860eedf3ce51a1925ca4b771
diff --git a/chromium-wip/files/README b/chromium-wip/files/README
new file mode 100644
index 0000000000..ba1ee55749
--- /dev/null
+++ b/chromium-wip/files/README
@@ -0,0 +1,29 @@
+$NetBSD: $
+
+Some notes on chromium:
+
+1) Wrapper flags support
+  The startup wrapper can read chromium flags
+  from ~/.config/chromium-flags.conf.
+  Example settings in chromium-flags.conf:
+    CHROMIUM_FLAGS="--disable-gpu"
+    CHROMIUM_FLAGS+=" --enable-logging=stderr --v=1"
+
+2) Disabling WebAssembly
+  WebAssembly is enabled by default, but it can be disabled by either:
+  - Setting CHROMIUM_ENABLE_WASM=0 in your environment, or
+  - Adding the following flags to ~/.config/chromium-flags.conf:
+    --disable-features=WebAssembly,AsmJsToWebAssembly,WebAssemblyStreaming
+    --js-flags=--noexpose-wasm
+
+3) Tab hang workaround
+  If you experience tab hanging issues (e.g.,
+  https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212812),
+  increase the net.local.stream.recvspace value:
+    sysctl -w net.local.stream.recvspace=16384
+
+  To make it permanent, add this line to /etc/sysctl.conf:
+    net.local.stream.recvspace=16384
+
+4) HID support
+  HID is not yet supported on NetBSD, so FIDO devices do not work.
diff --git a/chromium-wip/files/chromium-browser.desktop b/chromium-wip/files/chromium-browser.desktop
new file mode 100644
index 0000000000..163a834091
--- /dev/null
+++ b/chromium-wip/files/chromium-browser.desktop
@@ -0,0 +1,220 @@
+[Desktop Entry]
+Version=1.0
+Name=Chromium Web Browser
+# Only KDE 4 seems to use GenericName, so we reuse the KDE strings.
+# From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413.
+GenericName=Web Browser
+GenericName[ar]=متصفح الشبكة
+GenericName[bg]=Уеб браузър
+GenericName[ca]=Navegador web
+GenericName[cs]=WWW prohlížeč
+GenericName[da]=Browser
+GenericName[de]=Web-Browser
+GenericName[el]=Περιηγητής ιστού
+GenericName[en_GB]=Web Browser
+GenericName[es]=Navegador web
+GenericName[et]=Veebibrauser
+GenericName[fi]=WWW-selain
+GenericName[fr]=Navigateur Web
+GenericName[gu]=વેબ બ્રાઉઝર
+GenericName[he]=דפדפן אינטרנט
+GenericName[hi]=वेब ब्राउज़र
+GenericName[hu]=Webböngésző
+GenericName[it]=Browser Web
+GenericName[ja]=ウェブブラウザ
+GenericName[kn]=ಜಾಲ ವೀಕ್ಷಕ
+GenericName[ko]=웹 브라우저
+GenericName[lt]=Žiniatinklio naršyklė
+GenericName[lv]=Tīmekļa pārlūks
+GenericName[ml]=വെബ് ബ്രൌസര്‍
+GenericName[mr]=वेब ब्राऊजर
+GenericName[nb]=Nettleser
+GenericName[nl]=Webbrowser
+GenericName[pl]=Przeglądarka WWW
+GenericName[pt]=Navegador Web
+GenericName[pt_BR]=Navegador da Internet
+GenericName[ro]=Navigator de Internet
+GenericName[ru]=Веб-браузер
+GenericName[sl]=Spletni brskalnik
+GenericName[sv]=Webbläsare
+GenericName[ta]=இணைய உலாவி
+GenericName[th]=เว็บเบราว์เซอร์
+GenericName[tr]=Web Tarayıcı
+GenericName[uk]=Навігатор Тенет
+GenericName[zh_CN]=网页浏览器
+GenericName[zh_HK]=網頁瀏覽器
+GenericName[zh_TW]=網頁瀏覽器
+# Not translated in KDE, from Epiphany 2.26.1-0ubuntu1.
+GenericName[bn]=ওয়েব ব্রাউজার
+GenericName[fil]=Web Browser
+GenericName[hr]=Web preglednik
+GenericName[id]=Browser Web
+GenericName[or]=ଓ୍ବେବ ବ୍ରାଉଜର
+GenericName[sk]=WWW prehliadač
+GenericName[sr]=Интернет прегледник
+GenericName[te]=మహాతల అన్వేషి
+GenericName[vi]=Bộ duyệt Web
+# Gnome and KDE 3 uses Comment.
+Comment=Access the Internet
+Comment[ar]=الدخول إلى الإنترنت
+Comment[bg]=Достъп до интернет
+Comment[bn]=ইন্টারনেটটি অ্যাক্সেস করুন
+Comment[ca]=Accedeix a Internet
+Comment[cs]=Přístup k internetu
+Comment[da]=Få adgang til internettet
+Comment[de]=Internetzugriff
+Comment[el]=Πρόσβαση στο Διαδίκτυο
+Comment[en_GB]=Access the Internet
+Comment[es]=Accede a Internet.
+Comment[et]=Pääs Internetti
+Comment[fi]=Käytä internetiä
+Comment[fil]=I-access ang Internet
+Comment[fr]=Accéder à Internet
+Comment[gu]=ઇંટરનેટ ઍક્સેસ કરો
+Comment[he]=גישה אל האינטרנט
+Comment[hi]=इंटरनेट तक पहुंच स्थापित करें
+Comment[hr]=Pristup Internetu
+Comment[hu]=Internetelérés
+Comment[id]=Akses Internet
+Comment[it]=Accesso a Internet
+Comment[ja]=インターネットにアクセス
+Comment[kn]=ಇಂಟರ್ನೆಟ್ ಅನ್ನು ಪ್ರವೇಶಿಸಿ
+Comment[ko]=인터넷 연결
+Comment[lt]=Interneto prieiga
+Comment[lv]=Piekļūt internetam
+Comment[ml]=ഇന്റര്‍‌നെറ്റ് ആക്‌സസ് ചെയ്യുക
+Comment[mr]=इंटरनेटमध्ये प्रवेश करा
+Comment[nb]=Gå til Internett
+Comment[nl]=Verbinding maken met internet
+Comment[or]=ଇଣ୍ଟର୍ନେଟ୍ ପ୍ରବେଶ କରନ୍ତୁ
+Comment[pl]=Skorzystaj z internetu
+Comment[pt]=Aceder à Internet
+Comment[pt_BR]=Acessar a internet
+Comment[ro]=Accesaţi Internetul
+Comment[ru]=Доступ в Интернет
+Comment[sk]=Prístup do siete Internet
+Comment[sl]=Dostop do interneta
+Comment[sr]=Приступите Интернету
+Comment[sv]=Gå ut på Internet
+Comment[ta]=இணையத்தை அணுகுதல்
+Comment[te]=ఇంటర్నెట్‌ను ఆక్సెస్ చెయ్యండి
+Comment[th]=เข้าถึงอินเทอร์เน็ต
+Comment[tr]=İnternet'e erişin
+Comment[uk]=Доступ до Інтернету
+Comment[vi]=Truy cập Internet
+Comment[zh_CN]=访问互联网
+Comment[zh_HK]=連線到網際網路
+Comment[zh_TW]=連線到網際網路
+Exec=chromium %U
+Terminal=false
+Icon=chromium
+Type=Application
+Categories=Network;WebBrowser;
+MimeType=text/html;text/xml;application/xhtml_xml;image/webp;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;
+Actions=NewWindow;NewPrivateWindow;
+
+[Desktop Action NewWindow]
+Name=New Window
+Name[am]=አዲስ መስኮት
+Name[ar]=نافذة جديدة
+Name[bg]=Нов прозорец
+Name[bn]=নতুন উইন্ডো
+Name[ca]=Finestra nova
+Name[cs]=Nové okno
+Name[da]=Nyt vindue
+Name[de]=Neues Fenster
+Name[el]=Νέο Παράθυρο
+Name[en_GB]=New Window
+Name[es]=Nueva ventana
+Name[et]=Uus aken
+Name[fa]=پنجره جدید
+Name[fi]=Uusi ikkuna
+Name[fil]=New Window
+Name[fr]=Nouvelle fenêtre
+Name[gu]=નવી વિંડો
+Name[hi]=नई विंडो
+Name[hr]=Novi prozor
+Name[hu]=Új ablak
+Name[id]=Jendela Baru
+Name[it]=Nuova finestra
+Name[iw]=חלון חדש
+Name[ja]=新規ウインドウ
+Name[kn]=ಹೊಸ ವಿಂಡೊ
+Name[ko]=새 창
+Name[lt]=Naujas langas
+Name[lv]=Jauns logs
+Name[ml]=പുതിയ വിന്‍ഡോ
+Name[mr]=नवीन विंडो
+Name[nl]=Nieuw venster
+Name[no]=Nytt vindu
+Name[pl]=Nowe okno
+Name[pt]=Nova janela
+Name[pt_BR]=Nova janela
+Name[ro]=Fereastră nouă
+Name[ru]=Новое окно
+Name[sk]=Nové okno
+Name[sl]=Novo okno
+Name[sr]=Нови прозор
+Name[sv]=Nytt fönster
+Name[sw]=Dirisha Jipya
+Name[ta]=புதிய சாளரம்
+Name[te]=క్రొత్త విండో
+Name[th]=หน้าต่างใหม่
+Name[tr]=Yeni Pencere
+Name[uk]=Нове вікно
+Name[vi]=Cửa sổ Mới
+Name[zh_CN]=新建窗口
+Name[zh_TW]=開新視窗
+Exec=chromium
+
+[Desktop Action NewPrivateWindow]
+Name=New Incognito Window
+Name[ar]=نافذة جديدة للتصفح المتخفي
+Name[bg]=Нов прозорец „инкогнито“
+Name[bn]=নতুন ছদ্মবেশী উইন্ডো
+Name[ca]=Finestra d'incògnit nova
+Name[cs]=Nové anonymní okno
+Name[da]=Nyt inkognitovindue
+Name[de]=Neues Inkognito-Fenster
+Name[el]=Νέο παράθυρο για ανώνυμη περιήγηση
+Name[en_GB]=New Incognito window
+Name[es]=Nueva ventana de incógnito
+Name[et]=Uus inkognito aken
+Name[fa]=پنجره جدید حالت ناشناس
+Name[fi]=Uusi incognito-ikkuna
+Name[fil]=Bagong Incognito window
+Name[fr]=Nouvelle fenêtre de navigation privée
+Name[gu]=નવી છુપી વિંડો
+Name[hi]=नई गुप्त विंडो
+Name[hr]=Novi anoniman prozor
+Name[hu]=Új Inkognitóablak
+Name[id]=Jendela Penyamaran baru
+Name[it]=Nuova finestra di navigazione in incognito
+Name[iw]=חלון חדש לגלישה בסתר
+Name[ja]=新しいシークレット ウィンドウ
+Name[kn]=ಹೊಸ ಅಜ್ಞಾತ ವಿಂಡೋ
+Name[ko]=새 시크릿 창
+Name[lt]=Naujas inkognito langas
+Name[lv]=Jauns inkognito režīma logs
+Name[ml]=പുതിയ വേഷ പ്രച്ഛന്ന വിന്‍ഡോ
+Name[mr]=नवीन गुप्त विंडो
+Name[nl]=Nieuw incognitovenster
+Name[no]=Nytt inkognitovindu
+Name[pl]=Nowe okno incognito
+Name[pt]=Nova janela de navegação anónima
+Name[pt_BR]=Nova janela anônima
+Name[ro]=Fereastră nouă incognito
+Name[ru]=Новое окно в режиме инкогнито
+Name[sk]=Nové okno inkognito
+Name[sl]=Novo okno brez beleženja zgodovine
+Name[sr]=Нови прозор за прегледање без архивирања
+Name[sv]=Nytt inkognitofönster
+Name[ta]=புதிய மறைநிலைச் சாளரம்
+Name[te]=క్రొత్త అజ్ఞాత విండో
+Name[th]=หน้าต่างใหม่ที่ไม่ระบุตัวตน
+Name[tr]=Yeni Gizli pencere
+Name[uk]=Нове вікно в режимі анонімного перегляду
+Name[vi]=Cửa sổ ẩn danh mới
+Name[zh_CN]=新建隐身窗口
+Name[zh_TW]=新增無痕式視窗
+Exec=chromium --incognito
diff --git a/chromium-wip/files/chromium.sh.in b/chromium-wip/files/chromium.sh.in
new file mode 100644
index 0000000000..4626e08328
--- /dev/null
+++ b/chromium-wip/files/chromium.sh.in
@@ -0,0 +1,80 @@
+#!/bin/sh
+
+DATASIZE="716800"
+OPENFILES="400"
+
+xm_log() {
+	echo -n "$@\nDo you want to run Chromium anyway?\n\
+(If you don't increase these limits, Chromium might fail to work properly.)" | \
+		@X11BASE@/bin/xmessage -file - -center -buttons yes:0,no:1 -default no
+}
+
+if [ $(ulimit -Sd) -lt ${DATASIZE} ]; then
+	ulimit -Sd ${DATASIZE} || \
+		xm_log "Cannot increase datasize-cur to at least ${DATASIZE}"
+		[ $? -eq 0 ] || exit
+fi
+
+if [ $(ulimit -Sn) -lt ${OPENFILES} ]; then
+	ulimit -Sn ${OPENFILES} || \
+		xm_log "Cannot increase openfiles-cur to at least ${OPENFILES}"
+		[ $? -eq 0 ] || exit
+fi
+
+#
+# Temporary workaround for the case when chromium crashes and leaves
+# the SingletonLock, which prevents chromium to start up.
+#
+if [ -h ${HOME}/.config/chromium/SingletonLock ]; then
+	_pid=`readlink ${HOME}/.config/chromium/SingletonLock | cut -d '-' -f 2`
+	kill -0 ${_pid} 2>/dev/null
+	if [ $? -gt 0 ]; then
+		rm ${HOME}/.config/chromium/SingletonLock
+	fi
+fi
+
+#
+# Issue #395446
+# https://code.google.com/p/chromium/issues/detail?id=395446
+#
+[ -z ${LANG} ] && _l=en_US.UTF-8 || _l=${LANG}
+
+#
+# Workaround to dbus
+# https://bugs.chromium.org/p/chromium/issues/detail?id=918234
+#
+[ -z ${DBUS_SESSION_BUS_ADDRESS} ] && export DBUS_SESSION_BUS_ADDRESS="autolaunch:"
+
+#
+# Workaround to pulseaudio
+# Chromium is failing to start a new pulseaudio server,
+# however can use an already started.
+#
+BUILT_WITH_PULSE=@PULSE@
+if [ "$BUILT_WITH_PULSE" = "yes" ]; then
+	pgrep -x pulseaudio || pulseaudio --start --log-target=syslog --exit-idle-time=-1
+fi
+
+# Always use our versions of ffmpeg libs.
+# This also makes RPMs find the compatibly-named library symlinks.
+if [ -n "$LD_LIBRARY_PATH" ]; then
+	LD_LIBRARY_PATH="@PREFIX@/lib/chromium:@PREFIX@/lib/chromium/lib:$LD_LIBRARY_PATH"
+else
+	LD_LIBRARY_PATH="@PREFIX@/lib/chromium:@PREFIX@/lib/chromium/lib"
+fi
+export LD_LIBRARY_PATH
+
+[ -d ~/Downloads ] || mkdir -m 0700 ~/Downloads
+[ -d ~/.config ] || mkdir -m 0700 ~/.config
+[ -f ~/.config/user-dirs.dirs ] || \
+	echo 'XDG_DOWNLOAD_DIR="$HOME/Downloads"' > ~/.config/user-dirs.dirs
+
+# WebAssembly can be disabled by setting CHROMIUM_ENABLE_WASM=0 in your environment.
+[ "${CHROMIUM_ENABLE_WASM:-1}" != "1" ] && \
+	_NOWASM="--disable-features=WebAssembly,AsmJsToWebAssembly,WebAssemblyStreaming --js-flags=--noexpose-wasm"
+
+# User settings
+[ -f ~/.config/chromium-flags.conf ] || echo 'CHROMIUM_FLAGS=""' > ~/.config/chromium-flags.conf
+. ~/.config/chromium-flags.conf
+
+LANG=${_l} exec "@PREFIX@/lib/chromium/chrome" ${_NOWASM} ${CHROMIUM_FLAGS} "${@}"
diff --git a/chromium-wip/options.mk b/chromium-wip/options.mk
new file mode 100644
index 0000000000..87a2c28d09
--- /dev/null
+++ b/chromium-wip/options.mk
@@ -0,0 +1,51 @@
+# $NetBSD: options.mk,v 1.32 2016/08/20 11:17:32 ryoon Exp $
+
+PKG_OPTIONS_VAR=		PKG_OPTIONS.chromium
+PKG_OPTIONS_REQUIRED_GROUPS=	audio
+PKG_OPTIONS_GROUP.audio=	alsa pulseaudio sunaudio
+PKG_SUPPORTED_OPTIONS+=		debug
+
+.if ${OPSYS} == "NetBSD"
+PKG_SUGGESTED_OPTIONS+=		sunaudio
+.else
+PKG_SUGGESTED_OPTIONS+=		pulseaudio
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Msunaudio)
+GN_ARGS+=	use_audioio=true
+.else
+GN_ARGS+=	use_audioio=false
+.endif
+
+.if !empty(PKG_OPTIONS:Malsa)
+GN_ARGS+=	use_alsa=true
+.include "../../audio/alsa-lib/buildlink3.mk"
+.else
+GN_ARGS+=	use_alsa=false
+.endif
+
+.if !empty(PKG_OPTIONS:Mpulseaudio)
+WITH_PA=	yes
+GN_ARGS+=	use_pulseaudio=true
+.include "../../audio/pulseaudio/buildlink3.mk"
+.else
+WITH_PA=	no
+GN_ARGS+=	use_pulseaudio=false
+.endif
+
+.if !empty(PKG_OPTIONS:Mdebug)
+#BUILDTYPE=		Debug
+#GN_ARGS+=		is_debug=true
+GN_ARGS+=		symbol_level=1
+#GN_BOOTSTRAP_FLAGS+=	--debug
+GN_VERBOSE=		#-v
+INSTALL_UNSTRIPPED=	yes
+.else
+#BUILDTYPE=		Release
+#GN_ARGS+=		is_debug=false
+GN_ARGS+=		blink_symbol_level=0
+GN_ARGS+=		symbol_level=0
+GN_VERBOSE=		# empty
+.endif
diff --git a/chromium-wip/patches/patch-BUILD.gn b/chromium-wip/patches/patch-BUILD.gn
new file mode 100644
index 0000000000..04c342a379
--- /dev/null
+++ b/chromium-wip/patches/patch-BUILD.gn
@@ -0,0 +1,104 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ BUILD.gn
+@@ -71,7 +71,7 @@ declare_args() {
+   root_extra_deps = []
+ }
+ 
+-if (is_official_build) {
++if (is_official_build && !is_bsd) {
+   # An official (maximally optimized!) component (optimized for build times)
+   # build doesn't make sense and usually doesn't work.
+   assert(!is_component_build)
+@@ -103,7 +103,6 @@ group("gn_all") {
+       "//codelabs",
+       "//components:components_unittests",
+       "//components/gwp_asan:gwp_asan_unittests",
+-      "//infra/orchestrator:orchestrator_all",
+       "//net:net_unittests",
+       "//sandbox:sandbox_unittests",
+       "//services:services_unittests",
+@@ -448,7 +447,7 @@ group("gn_all") {
+       }
+     }
+ 
+-    if (is_linux || is_chromeos || is_android) {
++    if ((is_linux && !is_bsd) || is_chromeos || is_android) {
+       deps += [
+         "//third_party/breakpad:breakpad_unittests",
+         "//third_party/breakpad:core-2-minidump",
+@@ -635,6 +634,15 @@ group("gn_all") {
+       }
+     }
+ 
++    if (is_bsd) {
++      deps -= [
++        "//third_party/breakpad:dump_syms($host_system_allocator_toolchain)",
++        "//third_party/breakpad:microdump_stackwalk($host_system_allocator_toolchain)",
++        "//third_party/breakpad:minidump_dump($host_system_allocator_toolchain)",
++        "//third_party/breakpad:minidump_stackwalk($host_system_allocator_toolchain)",
++      ]
++    }
++
+     if (is_mac) {
+       deps += [
+         "//third_party/breakpad:dump_syms($host_system_allocator_toolchain)",
+@@ -683,7 +691,7 @@ group("gn_all") {
+       }
+     }
+ 
+-    if (!is_fuchsia) {
++    if (!is_fuchsia && !is_bsd) {
+       # The official builders use this binary from the default toolchain's
+       # output directory after building in order to upload the symbols of that
+       # binary. They build the binary like `ninja symupload` which requires the
+@@ -718,7 +726,7 @@ group("gn_all") {
+       ]
+     }
+ 
+-    if (is_mac || is_win || is_android || is_linux || is_chromeos) {
++    if (!is_bsd && (is_mac || is_win || is_android || is_linux || is_chromeos)) {
+       deps += [
+         "//third_party/crashpad/crashpad:crashpad_tests",
+         "//third_party/crashpad/crashpad/handler:crashpad_handler",
+@@ -1126,7 +1134,7 @@ if (use_blink && !is_cronet_build) {
+       "//third_party/blink/public:all_blink",
+     ]
+ 
+-    if (!is_chromeos && !is_ios && !is_fuchsia && !is_android && !is_castos) {
++    if (!is_chromeos && !is_ios && !is_fuchsia && !is_android && !is_castos && !is_bsd) {
+       deps += [
+         ":chrome_wpt_tests",
+         ":headless_shell_wpt",
+@@ -1279,7 +1287,7 @@ if (use_blink && !is_cronet_build) {
+       data_deps += [ "//content/web_test:web_test_common_mojom_js_data_deps" ]
+     }
+ 
+-    if (!is_win && !is_android) {
++    if (!is_win && !is_android && !is_bsd) {
+       # Using the default toolchain for this tool, as it's run during tests not
+       # during the build. This places a symlink in the root_build_dir for scrips
+       # to use.
+@@ -1293,7 +1301,7 @@ if (use_blink && !is_cronet_build) {
+       data_deps += [ "//third_party/breakpad:dump_syms" ]
+     }
+ 
+-    if (is_linux || is_chromeos) {
++    if ((is_linux && !is_bsd) || is_chromeos) {
+       # Using the default toolchain for this tool, as it's run during tests not
+       # during the build. This places a symlink in the root_build_dir for scrips
+       # to use.
+@@ -1744,7 +1752,7 @@ group("chromium_builder_perf") {
+       data_deps += [ "//chrome/test:performance_browser_tests" ]
+     }
+ 
+-    if (!is_win) {
++    if (!is_win && !is_bsd) {
+       data_deps += [ "//third_party/breakpad:minidump_stackwalk($host_system_allocator_toolchain)" ]
+     }
+   }
diff --git a/chromium-wip/patches/patch-apps_ui_views_app__window__frame__view.cc b/chromium-wip/patches/patch-apps_ui_views_app__window__frame__view.cc
new file mode 100644
index 0000000000..84fd171d0e
--- /dev/null
+++ b/chromium-wip/patches/patch-apps_ui_views_app__window__frame__view.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- apps/ui/views/app_window_frame_view.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ apps/ui/views/app_window_frame_view.cc
+@@ -146,7 +146,7 @@ gfx::Rect AppWindowFrameView::GetBoundsF
+ gfx::Rect AppWindowFrameView::GetWindowBoundsForClientBounds(
+     const gfx::Rect& client_bounds) const {
+   gfx::Rect window_bounds = client_bounds;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Get the difference between the widget's client area bounds and window
+   // bounds, and grow |window_bounds| by that amount.
+   gfx::Insets native_frame_insets =
diff --git a/chromium-wip/patches/patch-base_BUILD.gn b/chromium-wip/patches/patch-base_BUILD.gn
new file mode 100644
index 0000000000..e5df506758
--- /dev/null
+++ b/chromium-wip/patches/patch-base_BUILD.gn
@@ -0,0 +1,172 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/BUILD.gn
+@@ -949,7 +949,7 @@ component("base") {
+     #"system/sys_info_openbsd.cc",
+   ]
+ 
+-  if (is_apple || current_os == "freebsd" || current_os == "openbsd") {
++  if (is_apple || current_os == "freebsd" || current_os == "openbsd" || current_os == "netbsd") {
+     sources += [
+       "posix/sysctl.cc",
+       "posix/sysctl.h",
+@@ -1102,11 +1102,26 @@ component("base") {
+   # Needed for <atomic> if using newer C++ library than sysroot, except if
+   # building inside the cros_sdk environment - use host_toolchain as a
+   # more robust check for this.
+-  if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos)) &&
++  if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos && !is_bsd)) &&
+       host_toolchain != "//build/toolchain/cros:host") {
+     libs += [ "atomic" ]
+   }
+ 
++  # *BSD needs libkvm
++  if (is_bsd) {
++    libs += [
++      "kvm",
++      "epoll-shim",
++    ]
++  }
++
++  if (is_freebsd) {
++    libs += [
++      "execinfo",
++      "util",
++    ]
++  }
++
+   if (use_allocator_shim) {
+     if (is_apple) {
+       sources += [ "allocator/early_zone_registration_apple.h" ]
+@@ -1126,7 +1141,7 @@ component("base") {
+ 
+   # Allow more direct string conversions on platforms with native utf8
+   # strings
+-  if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia) {
++  if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia || is_bsd) {
+     defines += [ "SYSTEM_NATIVE_UTF8" ]
+   }
+ 
+@@ -2137,6 +2152,29 @@ component("base") {
+     ]
+   }
+ 
++  if (is_openbsd) {
++    sources += [
++      "process/process_handle_openbsd.cc",
++      "process/process_iterator_openbsd.cc",
++      "process/process_metrics_openbsd.cc",
++      "system/sys_info_openbsd.cc",
++    ]
++  } else if (is_freebsd) {
++    sources += [
++      "process/process_handle_freebsd.cc",
++      "process/process_iterator_freebsd.cc",
++      "process/process_metrics_freebsd.cc",
++      "system/sys_info_freebsd.cc",
++    ]
++  }  else if (is_netbsd) {
++    sources += [
++      "process/process_handle_netbsd.cc",
++      "process/process_iterator_netbsd.cc",
++      "process/process_metrics_netbsd.cc",
++      "system/sys_info_netbsd.cc",
++    ]
++  }
++
+   # iOS
+   if (is_ios) {
+     sources += [
+@@ -2305,6 +2343,33 @@ component("base") {
+     }
+   }
+ 
++  if (is_bsd) {
++    sources -= [
++      "files/file_path_watcher_inotify.cc",
++      "files/scoped_file_linux.cc",
++      "process/set_process_title_linux.cc",
++      "process/set_process_title_linux.h",
++      "system/sys_info_linux.cc",
++      "process/process_iterator_linux.cc",
++      "process/process_linux.cc",
++      "process/process_metrics_linux.cc",
++      "process/process_handle_linux.cc",
++      "profiler/stack_copier_signal.cc",
++      "profiler/stack_copier_signal.h",
++      "profiler/thread_delegate_posix.cc",
++      "profiler/thread_delegate_posix.h",
++      "threading/platform_thread_linux.cc",
++      "stack_canary_linux.cc",
++      "stack_canary_linux.h",
++    ]
++    sources += [
++      "files/file_path_watcher_kqueue.cc",
++      "files/file_path_watcher_kqueue.h",
++      "files/file_path_watcher_bsd.cc",
++      "threading/platform_thread_bsd.cc",
++    ]
++  }
++
+   if (use_blink) {
+     sources += [
+       "files/file_path_watcher.cc",
+@@ -2694,7 +2759,7 @@ buildflag_header("protected_memory_build
+   header = "protected_memory_buildflags.h"
+   header_dir = "base/memory"
+ 
+-  protected_memory_enabled = !is_component_build && is_clang &&
++  protected_memory_enabled = !is_openbsd && !is_component_build && is_clang &&
+                              (is_win || is_linux || is_android || is_mac)
+ 
+   flags = [ "PROTECTED_MEMORY_ENABLED=$protected_memory_enabled" ]
+@@ -3200,7 +3265,7 @@ if (is_apple) {
+   }
+ }
+ 
+-if (is_linux || is_chromeos) {
++if (!is_bsd && (is_linux || is_chromeos)) {
+   # This test must compile with -fstack-protector-all
+   source_set("stack_canary_linux_unittests") {
+     testonly = true
+@@ -3885,7 +3950,7 @@ test("base_unittests") {
+     ]
+   }
+ 
+-  if (is_linux || is_chromeos) {
++  if (!is_bsd && (is_linux || is_chromeos)) {
+     sources += [
+       "debug/proc_maps_linux_unittest.cc",
+       "files/scoped_file_linux_unittest.cc",
+@@ -3909,7 +3974,7 @@ test("base_unittests") {
+       "posix/file_descriptor_shuffle_unittest.cc",
+       "posix/unix_domain_socket_unittest.cc",
+     ]
+-    if (!is_apple) {
++    if (!is_apple && !is_bsd) {
+       sources += [
+         "profiler/stack_base_address_posix_unittest.cc",
+         "profiler/stack_copier_signal_unittest.cc",
+@@ -3920,7 +3985,7 @@ test("base_unittests") {
+ 
+   # Allow more direct string conversions on platforms with native utf8
+   # strings
+-  if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia) {
++  if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia || is_bsd) {
+     defines += [ "SYSTEM_NATIVE_UTF8" ]
+   }
+ 
+@@ -4108,7 +4173,7 @@ test("base_unittests") {
+     deps += [ ":base_profiler_test_support_library" ]
+   }
+ 
+-  if (is_fuchsia || is_linux || is_chromeos) {
++  if ((is_fuchsia || is_linux || is_chromeos) && !is_bsd) {
+     sources += [
+       "debug/elf_reader_unittest.cc",
+       "debug/test_elf_image_builder.cc",
diff --git a/chromium-wip/patches/patch-base_allocator_dispatcher_tls.h b/chromium-wip/patches/patch-base_allocator_dispatcher_tls.h
new file mode 100644
index 0000000000..89993b1e06
--- /dev/null
+++ b/chromium-wip/patches/patch-base_allocator_dispatcher_tls.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/allocator/dispatcher/tls.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/allocator/dispatcher/tls.h
+@@ -81,7 +81,7 @@ struct BASE_EXPORT MMapAllocator {
+   constexpr static size_t AllocationChunkSize = 16384;
+ #elif BUILDFLAG(IS_ANDROID) && defined(ARCH_CPU_64_BITS)
+   constexpr static size_t AllocationChunkSize = 16384;
+-#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)
++#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)
+   constexpr static size_t AllocationChunkSize = 16384;
+ #else
+   constexpr static size_t AllocationChunkSize = 4096;
diff --git a/chromium-wip/patches/patch-base_allocator_partition__alloc__features.cc b/chromium-wip/patches/patch-base_allocator_partition__alloc__features.cc
new file mode 100644
index 0000000000..551294ed29
--- /dev/null
+++ b/chromium-wip/patches/patch-base_allocator_partition__alloc__features.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/allocator/partition_alloc_features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/allocator/partition_alloc_features.cc
+@@ -164,7 +164,7 @@ BASE_FEATURE(kPartitionAllocEventuallyZe
+ // disabled elsewhere (for now). Does not apply to Windows.
+ BASE_FEATURE(kPartitionAllocFewerMemoryRegions,
+              "PartitionAllocFewerMemoryRegions",
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+              FEATURE_ENABLED_BY_DEFAULT);
+ #else
+              FEATURE_DISABLED_BY_DEFAULT);
+@@ -489,7 +489,7 @@ BASE_FEATURE(kPartitionAllocAdjustSizeWh
+ #if PA_CONFIG(ENABLE_SHADOW_METADATA)
+ BASE_FEATURE(kPartitionAllocShadowMetadata,
+              "PartitionAllocShadowMetadata",
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+              FEATURE_ENABLED_BY_DEFAULT);
+ #else
+              FEATURE_DISABLED_BY_DEFAULT);
diff --git a/chromium-wip/patches/patch-base_allocator_partition__allocator_partition__alloc.gni b/chromium-wip/patches/patch-base_allocator_partition__allocator_partition__alloc.gni
new file mode 100644
index 0000000000..61767b4334
--- /dev/null
+++ b/chromium-wip/patches/patch-base_allocator_partition__allocator_partition__alloc.gni
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/allocator/partition_allocator/partition_alloc.gni.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/allocator/partition_allocator/partition_alloc.gni
+@@ -87,7 +87,7 @@ if (current_cpu == "x64" || current_cpu 
+ # TODO(crbug.com/329199197): Clean this up when experiments are complete.
+ use_large_empty_slot_span_ring = true
+ 
+-has_memory_tagging = current_cpu == "arm64" && is_clang && !is_asan &&
++has_memory_tagging = current_cpu == "arm64" && is_clang && !is_asan && !is_bsd &&
+                      !is_hwasan && (is_linux || is_android)
+ 
+ declare_args() {
+@@ -340,7 +340,7 @@ declare_args() {
+ declare_args() {
+   # Shadow metadata is still under development and only supports Linux
+   # for now.
+-  enable_shadow_metadata = is_linux && has_64_bit_pointers
++  enable_shadow_metadata = !is_bsd && is_linux && has_64_bit_pointers
+ }
+ 
+ declare_args() {
+@@ -483,7 +483,7 @@ assert(!use_asan_backup_ref_ptr || use_r
+ # dependencies that use partition_allocator are compiled in AOSP against a
+ # version of glibc that does not include pkeys syscall numbers.
+ is_pkeys_available =
+-    (is_linux || is_chromeos) && current_cpu == "x64" && !is_cronet_build
++    !is_bsd && (is_linux || is_chromeos) && current_cpu == "x64" && !is_cronet_build
+ declare_args() {
+   enable_pkeys = is_pkeys_available
+ }
diff --git a/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn
new file mode 100644
index 0000000000..3416497cab
--- /dev/null
+++ b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/allocator/partition_allocator/src/partition_alloc/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/allocator/partition_allocator/src/partition_alloc/BUILD.gn
+@@ -893,7 +893,7 @@ if (is_clang_or_gcc) {
+         configs -= [ partition_alloc_enable_arc_config ]
+       }
+     }
+-    if (is_chromeos || is_linux) {
++    if ((is_chromeos || is_linux) && !is_bsd) {
+       shim_headers += [
+         "shim/allocator_shim_override_cpp_symbols.h",
+         "shim/allocator_shim_override_glibc_weak_symbols.h",
diff --git a/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h
new file mode 100644
index 0000000000..402de0ec40
--- /dev/null
+++ b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h
+@@ -38,7 +38,7 @@ AslrMask(uintptr_t bits) {
+ 
+ #if PA_BUILDFLAG(PA_ARCH_CPU_64_BITS)
+ 
+-  #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
++  #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) && !PA_BUILDFLAG(IS_BSD)
+ 
+     // We shouldn't allocate system pages at all for sanitizer builds. However,
+     // we do, and if random hint addresses interfere with address ranges
+@@ -125,7 +125,7 @@ AslrMask(uintptr_t bits) {
+         return AslrAddress(0x20000000ULL);
+       }
+     #elif PA_BUILDFLAG(PA_ARCH_CPU_ARM64)
+-      #if PA_BUILDFLAG(IS_LINUX)
++      #if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_BSD)
+ 
+       // Linux on arm64 can use 39, 42, 48, or 52-bit user space, depending on
+       // page size and number of levels of translation pages used. We use
diff --git a/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator.h b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator.h
new file mode 100644
index 0000000000..a6cba35a3f
--- /dev/null
+++ b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/allocator/partition_allocator/src/partition_alloc/page_allocator.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/allocator/partition_allocator/src/partition_alloc/page_allocator.h
+@@ -273,7 +273,7 @@ bool DecommitAndZeroSystemPages(void* ad
+ // recommitted. Do not assume that this will not change over time.
+ constexpr PA_COMPONENT_EXPORT(
+     PARTITION_ALLOC) bool DecommittedMemoryIsAlwaysZeroed() {
+-#if PA_BUILDFLAG(IS_APPLE)
++#if PA_BUILDFLAG(IS_APPLE) || PA_BUILDFLAG(IS_BSD)
+   return false;
+ #else
+   return true;
diff --git a/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h
new file mode 100644
index 0000000000..ff8faeba05
--- /dev/null
+++ b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h
+@@ -26,8 +26,8 @@
+ #define PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR __attribute__((const))
+ 
+ #elif (PA_BUILDFLAG(IS_ANDROID) && PA_BUILDFLAG(PA_ARCH_CPU_64_BITS)) || \
+-    (PA_BUILDFLAG(IS_LINUX) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64)) ||       \
+-    (PA_BUILDFLAG(IS_LINUX) && PA_BUILDFLAG(PA_ARCH_CPU_PPC64))
++    ((PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_BSD)) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64)) ||       \
++    ((PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_BSD)) && PA_BUILDFLAG(PA_ARCH_CPU_PPC64))
+ // This should work for all POSIX (if needed), but currently all other
+ // supported OS/architecture combinations use either hard-coded values
+ // (such as x86) or have means to determine these values without needing
diff --git a/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.cc b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.cc
new file mode 100644
index 0000000000..e18266177a
--- /dev/null
+++ b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.cc
+@@ -39,7 +39,7 @@ uint32_t SecTaskGetCodeSignStatus(SecTas
+ 
+ #if PA_BUILDFLAG(HAS_MEMORY_TAGGING) ||                                        \
+     (defined(__ARM_FEATURE_BTI_DEFAULT) && (__ARM_FEATURE_BTI_DEFAULT == 1) && \
+-     __has_include(<sys/ifunc.h>))
++     __has_include(<sys/ifunc.h>) && !PA_BUILDFLAG(IS_BSD))
+ struct __ifunc_arg_t;
+ 
+ #include "partition_alloc/aarch64_support.h"
diff --git a/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h
new file mode 100644
index 0000000000..fd5fb202c4
--- /dev/null
+++ b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h
+@@ -317,8 +317,12 @@ bool TryRecommitSystemPagesInternal(
+ 
+ void DiscardSystemPagesInternal(uintptr_t address, size_t length) {
+   void* ptr = reinterpret_cast<void*>(address);
+-#if PA_BUILDFLAG(IS_APPLE)
++#if PA_BUILDFLAG(IS_APPLE) || PA_BUILDFLAG(IS_BSD)
++#if PA_BUILDFLAG(IS_BSD)
++  int ret = madvise(ptr, length, MADV_FREE);
++#else
+   int ret = madvise(ptr, length, MADV_FREE_REUSABLE);
++#endif
+   if (ret) {
+     // MADV_FREE_REUSABLE sometimes fails, so fall back to MADV_DONTNEED.
+     ret = madvise(ptr, length, MADV_DONTNEED);
diff --git a/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_proc__maps__linux.cc b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_proc__maps__linux.cc
new file mode 100644
index 0000000000..d0d4e49597
--- /dev/null
+++ b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_proc__maps__linux.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/proc_maps_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/proc_maps_linux.cc
+@@ -15,7 +15,7 @@
+ #include "partition_alloc/partition_alloc_check.h"
+ 
+ #if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) || \
+-    PA_BUILDFLAG(IS_ANDROID)
++    PA_BUILDFLAG(IS_ANDROID) || PA_BUILDFLAG(IS_BSD)
+ #include <inttypes.h>
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_stack__trace__posix.cc b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_stack__trace__posix.cc
new file mode 100644
index 0000000000..ed6f178062
--- /dev/null
+++ b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_stack__trace__posix.cc
@@ -0,0 +1,40 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_posix.cc
+@@ -13,11 +13,11 @@
+ #include "partition_alloc/partition_alloc_base/posix/eintr_wrapper.h"
+ #include "partition_alloc/partition_alloc_base/strings/safe_sprintf.h"
+ 
+-#if !PA_BUILDFLAG(IS_ANDROID) && !PA_BUILDFLAG(IS_APPLE)
++#if !PA_BUILDFLAG(IS_ANDROID) && !PA_BUILDFLAG(IS_APPLE) && !PA_BUILDFLAG(IS_BSD)
+ #include <link.h>  // For ElfW() macro.
+ #endif
+ 
+-#if PA_BUILDFLAG(IS_APPLE)
++#if PA_BUILDFLAG(IS_APPLE) || PA_BUILDFLAG(IS_BSD)
+ #include <dlfcn.h>
+ #endif
+ 
+@@ -25,7 +25,7 @@ namespace partition_alloc::internal::bas
+ 
+ namespace {
+ 
+-#if !PA_BUILDFLAG(IS_APPLE)
++#if !PA_BUILDFLAG(IS_APPLE) && !PA_BUILDFLAG(IS_BSD)
+ 
+ // On Android the 'open' function has two versions:
+ // int open(const char *pathname, int flags);
+@@ -369,7 +369,7 @@ void PrintStackTraceInternal(const void*
+ }
+ #endif  // !PA_BUILDFLAG(IS_APPLE)
+ 
+-#if PA_BUILDFLAG(IS_APPLE)
++#if PA_BUILDFLAG(IS_APPLE) || PA_BUILDFLAG(IS_BSD)
+ // Since /proc/self/maps is not available, use dladdr() to obtain module
+ // names and offsets inside the modules from the given addresses.
+ void PrintStackTraceInternal(const void* const* trace, size_t size) {
diff --git a/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_rand__util__posix.cc b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_rand__util__posix.cc
new file mode 100644
index 0000000000..fb6957c264
--- /dev/null
+++ b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_rand__util__posix.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_posix.cc
+@@ -102,6 +102,10 @@ void RandBytes(void* output, size_t outp
+   if (getentropy(output, output_length) == 0) {
+     return;
+   }
++#elif PA_BUILDFLAG(IS_BSD)
++  if (getentropy(output, output_length) == 0) {
++    return;
++  }
+ #endif
+   // If getrandom(2) above returned with an error and the /dev/urandom fallback
+   // took place on Linux/ChromeOS bots, they would fail with a CHECK in
diff --git a/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread.h b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread.h
new file mode 100644
index 0000000000..717ab471ee
--- /dev/null
+++ b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h
+@@ -37,6 +37,8 @@ typedef DWORD PlatformThreadId;
+ typedef zx_handle_t PlatformThreadId;
+ #elif PA_BUILDFLAG(IS_APPLE)
+ typedef mach_port_t PlatformThreadId;
++#elif PA_BUILDFLAG(IS_BSD)
++typedef uint64_t PlatformThreadId;
+ #elif PA_BUILDFLAG(IS_POSIX)
+ typedef pid_t PlatformThreadId;
+ #endif
diff --git a/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__internal__posix.h b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__internal__posix.h
new file mode 100644
index 0000000000..9b36b0388c
--- /dev/null
+++ b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__internal__posix.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h
+@@ -10,7 +10,7 @@
+ 
+ namespace partition_alloc::internal::base::internal {
+ 
+-#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS)
++#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) || PA_BUILDFLAG(IS_BSD)
+ // Current thread id is cached in thread local storage for performance reasons.
+ // In some rare cases it's important to invalidate that cache explicitly (e.g.
+ // after going through clone() syscall which does not call pthread_atfork()
diff --git a/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__posix.cc b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__posix.cc
new file mode 100644
index 0000000000..aae1fcc3d5
--- /dev/null
+++ b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__posix.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix.cc
+@@ -18,7 +18,7 @@
+ #include "partition_alloc/partition_alloc_base/logging.h"
+ #include "partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h"
+ 
+-#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS)
++#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) || PA_BUILDFLAG(IS_BSD)
+ #include <sys/syscall.h>
+ #include <atomic>
+ #endif
diff --git a/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h
new file mode 100644
index 0000000000..2d2228c830
--- /dev/null
+++ b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h
@@ -0,0 +1,37 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h
+@@ -51,8 +51,8 @@ static_assert(sizeof(void*) != 8, "");
+ // POSIX is not only UNIX, e.g. macOS and other OSes. We do use Linux-specific
+ // features such as futex(2).
+ #define PA_CONFIG_HAS_LINUX_KERNEL()                      \
+-  (PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) || \
+-   PA_BUILDFLAG(IS_ANDROID))
++  ((PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) || \
++   PA_BUILDFLAG(IS_ANDROID)) && !PA_BUILDFLAG(IS_NETBSD))
+ 
+ // Need TLS support.
+ #define PA_CONFIG_THREAD_CACHE_SUPPORTED() \
+@@ -164,7 +164,7 @@ constexpr bool kUseLazyCommit = false;
+ // This may be required on more platforms in the future.
+ #define PA_CONFIG_HAS_ATFORK_HANDLER()                 \
+   (PA_BUILDFLAG(IS_APPLE) || PA_BUILDFLAG(IS_LINUX) || \
+-   PA_BUILDFLAG(IS_CHROMEOS))
++   PA_BUILDFLAG(IS_CHROMEOS) || PA_BUILDFLAG(IS_BSD))
+ 
+ // Enable shadow metadata.
+ //
+@@ -227,7 +227,7 @@ constexpr bool kUseLazyCommit = false;
+ // Also enabled on ARM64 macOS and iOS, as the 16kiB pages on this platform lead
+ // to larger slot spans.
+ #if PA_BUILDFLAG(IS_LINUX) || \
+-    (PA_BUILDFLAG(IS_APPLE) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64))
++    (PA_BUILDFLAG(IS_APPLE) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64)) || PA_BUILDFLAG(IS_BSD)
+ #define PA_CONFIG_PREFER_SMALLER_SLOT_SPANS() 1
+ #else
+ #define PA_CONFIG_PREFER_SMALLER_SLOT_SPANS() 0
diff --git a/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h
new file mode 100644
index 0000000000..beb4da21ac
--- /dev/null
+++ b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h
+@@ -308,7 +308,7 @@ PA_DEFINE_OPERATORS_FOR_FLAGS(PoolHandle
+ // 8GB for each of the glued pools).
+ #if PA_BUILDFLAG(HAS_64_BIT_POINTERS)
+ #if PA_BUILDFLAG(IS_ANDROID) || PA_BUILDFLAG(IS_IOS) || \
+-    PA_BUILDFLAG(ENABLE_POINTER_COMPRESSION)
++    PA_BUILDFLAG(ENABLE_POINTER_COMPRESSION) || PA_BUILDFLAG(IS_BSD)
+ constexpr size_t kPoolMaxSize = 8 * kGiB;
+ #else
+ constexpr size_t kPoolMaxSize = 16 * kGiB;
+@@ -392,7 +392,7 @@ PA_ALWAYS_INLINE constexpr size_t MaxDir
+ // TODO(casey.smalley%arm.com@localhost): under 64k pages we can end up in a situation
+ // where a normal slot span will be large enough to contain multiple items,
+ // but the address will go over the final partition page after being aligned.
+-#if PA_BUILDFLAG(IS_LINUX) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64)
++#if (PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_BSD)) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64)
+ constexpr size_t kMaxSupportedAlignment = kSuperPageSize / 4;
+ #else
+ constexpr size_t kMaxSupportedAlignment = kSuperPageSize / 2;
diff --git a/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__forward.h b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__forward.h
new file mode 100644
index 0000000000..b8634938f5
--- /dev/null
+++ b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__forward.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h
+@@ -29,9 +29,13 @@ namespace internal {
+ // the second one 16. We could technically return something different for
+ // malloc() and operator new(), but this would complicate things, and most of
+ // our allocations are presumably coming from operator new() anyway.
++#if defined(__i386__) && defined(OS_FREEBSD)
++constexpr size_t kAlignment = 8;
++#else
+ constexpr inline size_t kAlignment =
+     std::max(alignof(max_align_t),
+              static_cast<size_t>(__STDCPP_DEFAULT_NEW_ALIGNMENT__));
++#endif
+ static_assert(base::bits::HasSingleBit(kAlignment),
+               "Alignment must be power of two.");
+ static_assert(kAlignment <= 16,
diff --git a/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc
new file mode 100644
index 0000000000..051582b759
--- /dev/null
+++ b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/allocator/partition_allocator/src/partition_alloc/partition_root.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/allocator/partition_allocator/src/partition_alloc/partition_root.cc
+@@ -47,7 +47,7 @@
+ #include "wow64apiset.h"
+ #endif
+ 
+-#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS)
++#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) || PA_BUILDFLAG(IS_BSD)
+ #include <pthread.h>
+ #if PA_CONFIG(ENABLE_SHADOW_METADATA)
+ #include <sys/mman.h>
+@@ -301,7 +301,7 @@ void PartitionAllocMallocInitOnce() {
+     return;
+   }
+ 
+-#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS)
++#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) || PA_BUILDFLAG(IS_BSD)
+   // When fork() is called, only the current thread continues to execute in the
+   // child process. If the lock is held, but *not* by this thread when fork() is
+   // called, we have a deadlock.
+@@ -1073,7 +1073,7 @@ void PartitionRoot::Init(PartitionOption
+     // apple OSes.
+     PA_CHECK((internal::SystemPageSize() == (size_t{1} << 12)) ||
+              (internal::SystemPageSize() == (size_t{1} << 14)));
+-#elif PA_BUILDFLAG(IS_LINUX) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64)
++#elif (PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_BSD)) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64)
+     // Check runtime pagesize. Though the code is currently the same, it is
+     // not merged with the IS_APPLE case above as a 1 << 16 case is only
+     // supported on Linux on AArch64.
diff --git a/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_spinning__mutex.cc b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_spinning__mutex.cc
new file mode 100644
index 0000000000..f39fa26e6c
--- /dev/null
+++ b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_spinning__mutex.cc
@@ -0,0 +1,45 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.cc
+@@ -19,7 +19,16 @@
+ #endif
+ 
+ #if PA_CONFIG(HAS_LINUX_KERNEL)
++#if defined(OS_OPENBSD) || defined(OS_NETBSD)
++#include <sys/time.h>
++#include <sys/futex.h>
++#elif defined(OS_FREEBSD)
++#include <sys/types.h>
++#include <sys/thr.h>
++#include <sys/umtx.h>
++#else
+ #include <linux/futex.h>
++#endif
+ #include <sys/syscall.h>
+ #include <unistd.h>
+ 
+@@ -92,8 +101,19 @@ PA_ALWAYS_INLINE long FutexSyscall(volat
+   int saved_errno = errno;
+   errno = 0;
+ 
++#if defined(OS_FREEBSD)
++  long retval = _umtx_op(&state_, UMTX_OP_WAIT_UINT_PRIVATE,
++                    kLockedContended, nullptr, nullptr);
++#elif defined(OS_OPENBSD)
++  long retval = futex(reinterpret_cast<volatile unsigned int *>(&state_), FUTEX_WAIT | FUTEX_PRIVATE_FLAG,
++                    kLockedContended, nullptr, nullptr);
++#elif defined(OS_NETBSD)
++  long retval = syscall(SYS___futex, reinterpret_cast<volatile int *>(&state_), op | FUTEX_PRIVATE_FLAG,
++                     value, nullptr, nullptr, 0, 0);
++#else
+   long retval = syscall(SYS_futex, ftx, op | FUTEX_PRIVATE_FLAG, value, nullptr,
+                         nullptr, 0);
++#endif
+   if (retval == -1) {
+     // These are programming errors, check them.
+     PA_DCHECK((errno != EPERM) || (errno != EACCES) || (errno != EINVAL) ||
diff --git a/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_stack_stack.cc b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_stack_stack.cc
new file mode 100644
index 0000000000..42b6706931
--- /dev/null
+++ b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_stack_stack.cc
@@ -0,0 +1,56 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/allocator/partition_allocator/src/partition_alloc/stack/stack.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/allocator/partition_allocator/src/partition_alloc/stack/stack.cc
+@@ -18,6 +18,10 @@
+ #include <pthread.h>
+ #endif
+ 
++#if PA_BUILDFLAG(IS_BSD) && !PA_BUILDFLAG(IS_NETBSD)
++#include <pthread_np.h>
++#endif
++
+ #if PA_BUILDFLAG(PA_LIBC_GLIBC)
+ extern "C" void* __libc_stack_end;
+ #endif
+@@ -50,6 +54,36 @@ void* GetStackTop() {
+   return pthread_get_stackaddr_np(pthread_self());
+ }
+ 
++#elif PA_BUILDFLAG(IS_OPENBSD)
++
++void* GetStackTop() {
++  stack_t ss;
++  if (pthread_stackseg_np(pthread_self(), &ss) != 0)
++    return nullptr;
++  return reinterpret_cast<uint8_t*>(ss.ss_sp);
++}
++
++#elif PA_BUILDFLAG(IS_FREEBSD) || PA_BUILDFLAG(IS_NETBSD)
++
++void* GetStackTop() {
++   pthread_attr_t attr;
++   int error = pthread_attr_init(&attr);
++   if (error) {
++     return nullptr;
++   }
++   error = pthread_attr_get_np(pthread_self(), &attr);
++   if (!error) {
++     void* base;
++     size_t size;
++     error = pthread_attr_getstack(&attr, &base, &size);
++     PA_CHECK(!error);
++     pthread_attr_destroy(&attr);
++     return reinterpret_cast<uint8_t*>(base) + size;
++   }
++  pthread_attr_destroy(&attr);
++  return nullptr;
++}
++
+ #elif PA_BUILDFLAG(IS_POSIX) || PA_BUILDFLAG(IS_FUCHSIA)
+ 
+ void* GetStackTop() {
diff --git a/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_thread__isolation_pkey.cc b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_thread__isolation_pkey.cc
new file mode 100644
index 0000000000..dfde68280f
--- /dev/null
+++ b/chromium-wip/patches/patch-base_allocator_partition__allocator_src_partition__alloc_thread__isolation_pkey.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.cc
+@@ -16,7 +16,7 @@
+ #include "partition_alloc/partition_alloc_check.h"
+ #include "partition_alloc/thread_isolation/thread_isolation.h"
+ 
+-#if !PA_BUILDFLAG(IS_LINUX) && !PA_BUILDFLAG(IS_CHROMEOS)
++#if !PA_BUILDFLAG(IS_LINUX) && !PA_BUILDFLAG(IS_CHROMEOS) && !PA_BUILDFLAG(IS_BSD)
+ #error "This pkey code is currently only supported on Linux and ChromeOS"
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-base_atomicops.h b/chromium-wip/patches/patch-base_atomicops.h
new file mode 100644
index 0000000000..5f97e90127
--- /dev/null
+++ b/chromium-wip/patches/patch-base_atomicops.h
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/atomicops.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/atomicops.h
+@@ -74,7 +74,11 @@ typedef intptr_t Atomic64;
+ 
+ // Use AtomicWord for a machine-sized pointer.  It will use the Atomic32 or
+ // Atomic64 routines below, depending on your architecture.
++#if !defined(OS_OPENBSD) && defined(__i386__)
++typedef Atomic32 AtomicWord;
++#else
+ typedef intptr_t AtomicWord;
++#endif
+ 
+ // Atomically execute:
+ //      result = *ptr;
diff --git a/chromium-wip/patches/patch-base_base__paths__posix.cc b/chromium-wip/patches/patch-base_base__paths__posix.cc
new file mode 100644
index 0000000000..9b9f247cb6
--- /dev/null
+++ b/chromium-wip/patches/patch-base_base__paths__posix.cc
@@ -0,0 +1,128 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/base_paths_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/base_paths_posix.cc
+@@ -15,6 +15,7 @@
+ #include <ostream>
+ #include <string>
+ 
++#include "base/command_line.h"
+ #include "base/environment.h"
+ #include "base/files/file_path.h"
+ #include "base/files/file_util.h"
+@@ -26,9 +27,13 @@
+ #include "base/process/process_metrics.h"
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_FREEBSD)
++#if BUILDFLAG(IS_BSD)
+ #include <sys/param.h>
+ #include <sys/sysctl.h>
++#if BUILDFLAG(IS_OPENBSD)
++#include <kvm.h>
++#define MAXTOKENS 2
++#endif
+ #elif BUILDFLAG(IS_SOLARIS) || BUILDFLAG(IS_AIX)
+ #include <stdlib.h>
+ #endif
+@@ -47,13 +52,21 @@ bool PathProviderPosix(int key, FilePath
+       *result = bin_dir;
+       return true;
+ #elif BUILDFLAG(IS_FREEBSD)
+-      int name[] = {CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1};
+-      std::optional<std::string> bin_dir = StringSysctl(name, std::size(name));
++      std::optional<std::string> bin_dir = StringSysctl({ CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 });
+       if (!bin_dir.has_value() || bin_dir.value().length() <= 1) {
+         NOTREACHED() << "Unable to resolve path.";
+       }
+       *result = FilePath(bin_dir.value());
+       return true;
++#elif BUILDFLAG(IS_NETBSD)
++      std::optional<std::string> bin_dir = StringSysctl({ CTL_KERN, KERN_PROC_ARGS, getpid(), KERN_PROC_PATHNAME });
++      if (!bin_dir.has_value() || bin_dir.value().length() <= 1) {
++        NOTREACHED() << "Unable to resolve path.";
++        return false;
++      }
++      *result = FilePath(bin_dir.value());
++      VLOG(1) << "PathProviderPosix result: " << bin_dir.value();
++      return true;
+ #elif BUILDFLAG(IS_SOLARIS)
+       char bin_dir[PATH_MAX + 1];
+       if (realpath(getexecname(), bin_dir) == NULL) {
+@@ -62,14 +75,65 @@ bool PathProviderPosix(int key, FilePath
+       *result = FilePath(bin_dir);
+       return true;
+ #elif BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_AIX)
+-      // There is currently no way to get the executable path on OpenBSD
+-      char* cpath;
+-      if ((cpath = getenv("CHROME_EXE_PATH")) != NULL) {
+-        *result = FilePath(cpath);
+-      } else {
+-        *result = FilePath("/usr/local/chrome/chrome");
++      char *cpath;
++#if !BUILDFLAG(IS_AIX)
++      struct kinfo_file *files;
++      kvm_t *kd = NULL;
++      char errbuf[_POSIX2_LINE_MAX];
++      static char retval[PATH_MAX];
++      int cnt;
++      struct stat sb;
++      pid_t cpid = getpid();
++      bool ret = false;
++
++      const base::CommandLine* command_line =
++          base::CommandLine::ForCurrentProcess();
++
++      VLOG(1) << "PathProviderPosix argv: " << command_line->argv()[0];
++
++      if (realpath(command_line->argv()[0].c_str(), retval) == NULL)
++        goto out;
++
++      if (stat(command_line->argv()[0].c_str(), &sb) < 0)
++        goto out;
++
++      if (!command_line->HasSwitch("no-sandbox")) {
++        ret = true;
++        *result = FilePath(retval);
++        VLOG(1) << "PathProviderPosix (sandbox) result: " << retval;
++        goto out;
+       }
+-      return true;
++
++      if ((kd = kvm_openfiles(NULL, NULL, NULL, (int)KVM_NO_FILES, errbuf)) == NULL)
++        goto out;
++
++      if ((files = kvm_getfiles(kd, KERN_FILE_BYPID, cpid,
++                                sizeof(struct kinfo_file), &cnt)) == NULL)
++        goto out;
++
++      for (int i = 0; i < cnt; i++) {
++        if (files[i].fd_fd == KERN_FILE_TEXT &&
++            files[i].va_fsid == static_cast<uint32_t>(sb.st_dev) &&
++            files[i].va_fileid == sb.st_ino) {
++          ret = true;
++          *result = FilePath(retval);
++          VLOG(1) << "PathProviderPosix result: " << retval;
++        }
++      }
++out:
++      if (kd)
++        kvm_close(kd);
++      if (!ret) {
++#endif
++        if ((cpath = getenv("CHROME_EXE_PATH")) != NULL)
++          *result = FilePath(cpath);
++        else
++          *result = FilePath("@PREFIX@/lib/chromium/chrome");
++        return true;
++#if !BUILDFLAG(IS_AIX)
++      }
++      return ret;
++#endif
+ #endif
+     }
+     case DIR_SRC_TEST_DATA_ROOT: {
diff --git a/chromium-wip/patches/patch-base_compiler__specific.h b/chromium-wip/patches/patch-base_compiler__specific.h
new file mode 100644
index 0000000000..80653c72bd
--- /dev/null
+++ b/chromium-wip/patches/patch-base_compiler__specific.h
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/compiler_specific.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/compiler_specific.h
+@@ -733,6 +733,7 @@ inline constexpr bool AnalyzerAssumeTrue
+ #if __has_cpp_attribute(clang::preserve_most) &&             \
+     (defined(ARCH_CPU_ARM64) || defined(ARCH_CPU_X86_64)) && \
+     !defined(COMPONENT_BUILD) &&                             \
++    !BUILDFLAG(IS_OPENBSD) &&                                \
+     !(BUILDFLAG(IS_WIN) && defined(ARCH_CPU_ARM64))
+ #define PRESERVE_MOST [[clang::preserve_most]]
+ #else
diff --git a/chromium-wip/patches/patch-base_debug_debugger__posix.cc b/chromium-wip/patches/patch-base_debug_debugger__posix.cc
new file mode 100644
index 0000000000..828e15766d
--- /dev/null
+++ b/chromium-wip/patches/patch-base_debug_debugger__posix.cc
@@ -0,0 +1,106 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/debug/debugger_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/debug/debugger_posix.cc
+@@ -38,6 +38,10 @@
+ #include <sys/sysctl.h>
+ #endif
+ 
++#if BUILDFLAG(IS_OPENBSD)
++#include <sys/proc.h>
++#endif
++
+ #if BUILDFLAG(IS_FREEBSD)
+ #include <sys/user.h>
+ #endif
+@@ -83,6 +87,7 @@ bool BeingDebugged() {
+ 
+   // Initialize mib, which tells sysctl what info we want.  In this case,
+   // we're looking for information about a specific process ID.
++#if !BUILDFLAG(IS_NETBSD)
+   int mib[] = {CTL_KERN,
+                KERN_PROC,
+                KERN_PROC_PID,
+@@ -93,37 +98,75 @@ bool BeingDebugged() {
+                0
+ #endif
+   };
++#else
++  int mib[] = {CTL_KERN,
++               KERN_PROC2,
++               KERN_PROC_PID,
++               getpid(),
++               sizeof(struct kinfo_proc2),
++               1
++  };
++#endif
+ 
+   // Caution: struct kinfo_proc is marked __APPLE_API_UNSTABLE.  The source and
+   // binary interfaces may change.
++#if BUILDFLAG(IS_OPENBSD)
++  struct kinfo_proc *info;
++  size_t info_size;
++#elif BUILDFLAG(IS_NETBSD)
++  struct kinfo_proc2 info;
++  size_t info_size = sizeof(info);
++#else
+   struct kinfo_proc info;
+   size_t info_size = sizeof(info);
++#endif
+ 
+ #if BUILDFLAG(IS_OPENBSD)
+   if (sysctl(mib, std::size(mib), NULL, &info_size, NULL, 0) < 0) {
+     return -1;
+   }
+ 
+-  mib[5] = (info_size / sizeof(struct kinfo_proc));
++  mib[5] = static_cast<int>((info_size / sizeof(struct kinfo_proc)));
++  if ((info = reinterpret_cast<kinfo_proc*>(malloc(info_size))) == NULL) {
++    is_set = true;
++    being_debugged = false;
++    return being_debugged;
++  }
++
++  int sysctl_result = sysctl(mib, std::size(mib), info, &info_size, NULL, 0);
++#elif BUILDFLAG(IS_NETBSD)
++  if (sysctl(mib, std::size(mib), NULL, &info_size, NULL, 0) < 0)
++    return -1;
++
++  mib[5] = (info_size / sizeof(struct kinfo_proc2));
+ #endif
+ 
++#if !BUILDFLAG(IS_OPENBSD)
+   int sysctl_result = sysctl(mib, std::size(mib), &info, &info_size, NULL, 0);
++#endif
+   DCHECK_EQ(sysctl_result, 0);
+   if (sysctl_result != 0) {
+     is_set = true;
+     being_debugged = false;
+-    return being_debugged;
++    goto out;
+   }
+ 
+   // This process is being debugged if the P_TRACED flag is set.
+   is_set = true;
+ #if BUILDFLAG(IS_FREEBSD)
+   being_debugged = (info.ki_flag & P_TRACED) != 0;
+-#elif BUILDFLAG(IS_BSD)
++#elif BUILDFLAG(IS_OPENBSD)
++  being_debugged = (info->p_psflags & PS_TRACED) != 0;
++#elif BUILDFLAG(IS_NETBSD)
+   being_debugged = (info.p_flag & P_TRACED) != 0;
+ #else
+   being_debugged = (info.kp_proc.p_flag & P_TRACED) != 0;
+ #endif
++
++out:
++#if BUILDFLAG(IS_OPENBSD)
++  free(info);
++#endif
+   return being_debugged;
+ }
+ 
diff --git a/chromium-wip/patches/patch-base_debug_elf__reader.cc b/chromium-wip/patches/patch-base_debug_elf__reader.cc
new file mode 100644
index 0000000000..ef5c035010
--- /dev/null
+++ b/chromium-wip/patches/patch-base_debug_elf__reader.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/debug/elf_reader.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/debug/elf_reader.cc
+@@ -49,6 +49,10 @@ using Xword = Elf64_Xword;
+ 
+ constexpr char kGnuNoteName[] = "GNU";
+ 
++#ifndef NT_GNU_BUILD_ID
++#define NT_GNU_BUILD_ID 3
++#endif
++
+ // Returns a pointer to the header of the ELF binary mapped into memory, or a
+ // null pointer if the header is invalid. Here and below |elf_mapped_base| is a
+ // pointer to the start of the ELF image.
diff --git a/chromium-wip/patches/patch-base_debug_proc__maps__linux.cc b/chromium-wip/patches/patch-base_debug_proc__maps__linux.cc
new file mode 100644
index 0000000000..5478b8946b
--- /dev/null
+++ b/chromium-wip/patches/patch-base_debug_proc__maps__linux.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/debug/proc_maps_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/debug/proc_maps_linux.cc
+@@ -22,7 +22,7 @@
+ #include "base/strings/string_split.h"
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ #include <inttypes.h>
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-base_debug_stack__trace.cc b/chromium-wip/patches/patch-base_debug_stack__trace.cc
new file mode 100644
index 0000000000..bcc057b879
--- /dev/null
+++ b/chromium-wip/patches/patch-base_debug_stack__trace.cc
@@ -0,0 +1,45 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/debug/stack_trace.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/debug/stack_trace.cc
+@@ -268,7 +268,7 @@ bool StackTrace::WillSymbolizeToStreamFo
+   // Symbols are not expected to be reliable when gn args specifies
+   // symbol_level=0.
+   return false;
+-#elif defined(__UCLIBC__) || defined(_AIX)
++#elif defined(__UCLIBC__) || defined(_AIX) || BUILDFLAG(IS_BSD)
+   // StackTrace::OutputToStream() is not implemented under uclibc, nor AIX.
+   // See https://crbug.com/706728
+   return false;
+@@ -321,7 +321,9 @@ void StackTrace::OutputToStreamWithPrefi
+     }
+     return;
+   }
++#if !BUILDFLAG(IS_BSD)
+   OutputToStreamWithPrefixImpl(os, prefix_string);
++#endif
+ }
+ 
+ std::string StackTrace::ToString() const {
+@@ -330,7 +332,7 @@ std::string StackTrace::ToString() const
+ 
+ std::string StackTrace::ToStringWithPrefix(cstring_view prefix_string) const {
+   std::stringstream stream;
+-#if !defined(__UCLIBC__) && !defined(_AIX)
++#if !defined(__UCLIBC__) && !defined(_AIX) && !BUILDFLAG(IS_BSD)
+   OutputToStreamWithPrefix(&stream, prefix_string);
+ #endif
+   return stream.str();
+@@ -354,7 +356,7 @@ bool StackTrace::ShouldSuppressOutput() 
+ }
+ 
+ std::ostream& operator<<(std::ostream& os, const StackTrace& s) {
+-#if !defined(__UCLIBC__) && !defined(_AIX)
++#if !defined(__UCLIBC__) && !defined(_AIX) && !BUILDFLAG(IS_BSD)
+   s.OutputToStream(&os);
+ #else
+   os << "StackTrace::OutputToStream not implemented.";
diff --git a/chromium-wip/patches/patch-base_debug_stack__trace__posix.cc b/chromium-wip/patches/patch-base_debug_stack__trace__posix.cc
new file mode 100644
index 0000000000..4d35a9a66e
--- /dev/null
+++ b/chromium-wip/patches/patch-base_debug_stack__trace__posix.cc
@@ -0,0 +1,109 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/debug/stack_trace_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/debug/stack_trace_posix.cc
+@@ -50,8 +50,8 @@
+ // Surprisingly, uClibc defines __GLIBC__ in some build configs, but
+ // execinfo.h and backtrace(3) are really only present in glibc and in macOS
+ // libc.
+-#if BUILDFLAG(IS_APPLE) || \
+-    (defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(__AIX))
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_NETBSD) || \
++    (defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(__AIX) && !BUILDFLAG(IS_BSD))
+ #define HAVE_BACKTRACE
+ #include <execinfo.h>
+ #endif
+@@ -69,8 +69,10 @@
+ #include <AvailabilityMacros.h>
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
++#if !BUILDFLAG(IS_BSD)
+ #include <sys/prctl.h>
++#endif
+ 
+ #include "base/debug/proc_maps_linux.h"
+ #endif
+@@ -329,7 +331,7 @@ void PrintToStderr(const char* output) {
+   std::ignore = HANDLE_EINTR(write(STDERR_FILENO, output, strlen(output)));
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ void AlarmSignalHandler(int signal, siginfo_t* info, void* void_context) {
+   // We have seen rare cases on AMD linux where the default signal handler
+   // either does not run or a thread (Probably an AMD driver thread) prevents
+@@ -346,7 +348,11 @@ void AlarmSignalHandler(int signal, sigi
+       "Warning: Default signal handler failed to terminate process.\n");
+   PrintToStderr("Calling exit_group() directly to prevent timeout.\n");
+   // See: https://man7.org/linux/man-pages/man2/exit_group.2.html
++#if BUILDFLAG(IS_BSD) 
++  _exit(EXIT_FAILURE);
++#else
+   syscall(SYS_exit_group, EXIT_FAILURE);
++#endif
+ }
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) ||
+         // BUILDFLAG(IS_CHROMEOS)
+@@ -552,7 +558,7 @@ void StackDumpSignalHandler(int signal, 
+     _exit(EXIT_FAILURE);
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Set an alarm to trigger in case the default handler does not terminate
+   // the process. See 'AlarmSignalHandler' for more details.
+   struct sigaction action;
+@@ -577,6 +583,7 @@ void StackDumpSignalHandler(int signal, 
+   // signals that do not re-raise autonomously), such as signals delivered via
+   // kill() and asynchronous hardware faults such as SEGV_MTEAERR, which would
+   // otherwise be lost when re-raising the signal via raise().
++#if !BUILDFLAG(IS_BSD)
+   long retval = syscall(SYS_rt_tgsigqueueinfo, getpid(), syscall(SYS_gettid),
+                         info->si_signo, info);
+   if (retval == 0) {
+@@ -591,6 +598,7 @@ void StackDumpSignalHandler(int signal, 
+   if (errno != EPERM) {
+     _exit(EXIT_FAILURE);
+   }
++#endif
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) ||
+         // BUILDFLAG(IS_CHROMEOS)
+ 
+@@ -783,6 +791,7 @@ class SandboxSymbolizeHelper {
+     return -1;
+   }
+ 
++#if !BUILDFLAG(IS_BSD)
+   // This class is copied from
+   // third_party/crashpad/crashpad/util/linux/scoped_pr_set_dumpable.h.
+   // It aims at ensuring the process is dumpable before opening /proc/self/mem.
+@@ -875,11 +884,15 @@ class SandboxSymbolizeHelper {
+       r.base = cur_base;
+     }
+   }
++#endif
+ 
+   // Parses /proc/self/maps in order to compile a list of all object file names
+   // for the modules that are loaded in the current process.
+   // Returns true on success.
+   bool CacheMemoryRegions() {
++#if BUILDFLAG(IS_BSD)
++    return false;
++#else
+     // Reads /proc/self/maps.
+     std::string contents;
+     if (!ReadProcMaps(&contents)) {
+@@ -897,6 +910,7 @@ class SandboxSymbolizeHelper {
+ 
+     is_initialized_ = true;
+     return true;
++#endif
+   }
+ 
+   // Opens all object files and caches their file descriptors.
diff --git a/chromium-wip/patches/patch-base_files_dir__reader__linux.h b/chromium-wip/patches/patch-base_files_dir__reader__linux.h
new file mode 100644
index 0000000000..b3fbe40875
--- /dev/null
+++ b/chromium-wip/patches/patch-base_files_dir__reader__linux.h
@@ -0,0 +1,45 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/files/dir_reader_linux.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/files/dir_reader_linux.h
+@@ -21,10 +21,16 @@
+ #include "base/logging.h"
+ #include "base/posix/eintr_wrapper.h"
+ 
++#include "build/build_config.h"
++
+ // See the comments in dir_reader_posix.h about this.
+ 
+ namespace base {
+ 
++#if BUILDFLAG(IS_BSD)
++#include <dirent.h>
++typedef struct dirent linux_dirent;
++#else
+ struct linux_dirent {
+   uint64_t d_ino;
+   int64_t d_off;
+@@ -32,6 +38,7 @@ struct linux_dirent {
+   unsigned char d_type;
+   char d_name[0];
+ };
++#endif
+ 
+ class DirReaderLinux {
+  public:
+@@ -66,7 +73,11 @@ class DirReaderLinux {
+       return true;
+     }
+ 
++#if BUILDFLAG(IS_BSD)
++    const int r = getdents(fd_, reinterpret_cast<char *>(buf_), sizeof(buf_));
++#else
+     const long r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_));
++#endif
+     if (r == 0) {
+       return false;
+     }
diff --git a/chromium-wip/patches/patch-base_files_dir__reader__posix.h b/chromium-wip/patches/patch-base_files_dir__reader__posix.h
new file mode 100644
index 0000000000..4fb72c7b98
--- /dev/null
+++ b/chromium-wip/patches/patch-base_files_dir__reader__posix.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/files/dir_reader_posix.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/files/dir_reader_posix.h
+@@ -17,7 +17,7 @@
+ // seems worse than falling back to enumerating all file descriptors so we will
+ // probably never implement this on the Mac.
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ #include "base/files/dir_reader_linux.h"
+ #else
+ #include "base/files/dir_reader_fallback.h"
+@@ -25,7 +25,7 @@
+ 
+ namespace base {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ typedef DirReaderLinux DirReaderPosix;
+ #else
+ typedef DirReaderFallback DirReaderPosix;
diff --git a/chromium-wip/patches/patch-base_files_drive__info.h b/chromium-wip/patches/patch-base_files_drive__info.h
new file mode 100644
index 0000000000..804710956a
--- /dev/null
+++ b/chromium-wip/patches/patch-base_files_drive__info.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/files/drive_info.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/files/drive_info.h
+@@ -48,7 +48,7 @@ struct BASE_EXPORT DriveInfo {
+   std::optional<bool> has_seek_penalty;
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Whether the drive is a "removable" drive.
+   //
+   // In macOS's IOKit API, a drive is "removable" if "the media is removable
diff --git a/chromium-wip/patches/patch-base_files_drive__info__posix.cc b/chromium-wip/patches/patch-base_files_drive__info__posix.cc
new file mode 100644
index 0000000000..f2dea30013
--- /dev/null
+++ b/chromium-wip/patches/patch-base_files_drive__info__posix.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/files/drive_info_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/files/drive_info_posix.cc
+@@ -24,7 +24,7 @@ namespace base {
+ 
+ std::optional<DriveInfo> GetFileDriveInfo(const FilePath& file_path) {
+   DriveInfo drive_info;
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   drive_info.has_seek_penalty = false;
+   return drive_info;
+ #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
diff --git a/chromium-wip/patches/patch-base_files_file__path__watcher.h b/chromium-wip/patches/patch-base_files_file__path__watcher.h
new file mode 100644
index 0000000000..48d89093d1
--- /dev/null
+++ b/chromium-wip/patches/patch-base_files_file__path__watcher.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/files/file_path_watcher.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/files/file_path_watcher.h
+@@ -105,7 +105,7 @@ class BASE_EXPORT FilePathWatcher {
+     Type type = Type::kNonRecursive;
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+     // The callback will return the full path to a changed file instead of
+     // the watched path supplied as |path| when Watch is called.
+     // So the full path can be different from the watched path when a folder is
diff --git a/chromium-wip/patches/patch-base_files_file__path__watcher__bsd.cc b/chromium-wip/patches/patch-base_files_file__path__watcher__bsd.cc
new file mode 100644
index 0000000000..fc77162463
--- /dev/null
+++ b/chromium-wip/patches/patch-base_files_file__path__watcher__bsd.cc
@@ -0,0 +1,63 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/files/file_path_watcher_bsd.cc.orig	2025-08-12 17:48:59.357470505 +0000
++++ base/files/file_path_watcher_bsd.cc
+@@ -0,0 +1,54 @@
++// Copyright 2021 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.
++
++#include <memory>
++
++#include "base/files/file_path_watcher.h"
++#include "base/files/file_path_watcher_kqueue.h"
++#include "base/memory/ptr_util.h"
++#include "build/build_config.h"
++
++namespace base {
++
++namespace {
++
++class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate {
++ public:
++  FilePathWatcherImpl() = default;
++  FilePathWatcherImpl(const FilePathWatcherImpl&) = delete;
++  FilePathWatcherImpl& operator=(const FilePathWatcherImpl&) = delete;
++  ~FilePathWatcherImpl() override = default;
++
++  bool Watch(const FilePath& path,
++             Type type,
++             const FilePathWatcher::Callback& callback) override {
++    DCHECK(!impl_.get());
++    if (type == Type::kRecursive) {
++      if (!FilePathWatcher::RecursiveWatchAvailable())
++        return false;
++    } else {
++      impl_ = std::make_unique<FilePathWatcherKQueue>();
++    }
++    DCHECK(impl_.get());
++    return impl_->Watch(path, type, callback);
++  }
++
++  void Cancel() override {
++    if (impl_.get())
++      impl_->Cancel();
++    set_cancelled();
++  }
++
++ private:
++  std::unique_ptr<PlatformDelegate> impl_;
++};
++
++}  // namespace
++
++FilePathWatcher::FilePathWatcher() {
++  DETACH_FROM_SEQUENCE(sequence_checker_);
++  impl_ = std::make_unique<FilePathWatcherImpl>();
++}
++
++}  // namespace base
diff --git a/chromium-wip/patches/patch-base_files_file__path__watcher__kqueue.h b/chromium-wip/patches/patch-base_files_file__path__watcher__kqueue.h
new file mode 100644
index 0000000000..119c06aae5
--- /dev/null
+++ b/chromium-wip/patches/patch-base_files_file__path__watcher__kqueue.h
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/files/file_path_watcher_kqueue.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/files/file_path_watcher_kqueue.h
+@@ -5,6 +5,7 @@
+ #ifndef BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_
+ #define BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_
+ 
++#include <sys/time.h>
+ #include <sys/event.h>
+ 
+ #include <memory>
diff --git a/chromium-wip/patches/patch-base_files_file__path__watcher__unittest.cc b/chromium-wip/patches/patch-base_files_file__path__watcher__unittest.cc
new file mode 100644
index 0000000000..2afbc91236
--- /dev/null
+++ b/chromium-wip/patches/patch-base_files_file__path__watcher__unittest.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/files/file_path_watcher_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/files/file_path_watcher_unittest.cc
+@@ -902,7 +902,7 @@ TEST_F(FilePathWatcherTest, WatchDirecto
+   }
+   delegate.RunUntilEventsMatch(event_expecter);
+ 
+-#if !BUILDFLAG(IS_APPLE)
++#if !BUILDFLAG(IS_APPLE) && BUILDFLAG(IS_BSD)
+   ASSERT_TRUE(WriteFile(file1, "content v2"));
+   // Mac implementation does not detect files modified in a directory.
+   // TODO(crbug.com/40263777): Expect that no events are fired on Mac.
+@@ -1848,7 +1848,7 @@ namespace {
+ 
+ enum Permission { Read, Write, Execute };
+ 
+-#if BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
+ bool ChangeFilePermissions(const FilePath& path, Permission perm, bool allow) {
+   struct stat stat_buf;
+ 
+@@ -1882,7 +1882,7 @@ bool ChangeFilePermissions(const FilePat
+ 
+ }  // namespace
+ 
+-#if BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_APPLE) && BUILDFLAG(IS_BSD)
+ // Linux implementation of FilePathWatcher doesn't catch attribute changes.
+ // http://crbug.com/78043
+ // Windows implementation of FilePathWatcher catches attribute changes that
diff --git a/chromium-wip/patches/patch-base_files_file__util__posix.cc b/chromium-wip/patches/patch-base_files_file__util__posix.cc
new file mode 100644
index 0000000000..8b9090ca6b
--- /dev/null
+++ b/chromium-wip/patches/patch-base_files_file__util__posix.cc
@@ -0,0 +1,54 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/files/file_util_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/files/file_util_posix.cc
+@@ -934,6 +934,7 @@ bool CreateNewTempDirectory(const FilePa
+ bool CreateDirectoryAndGetError(const FilePath& full_path, File::Error* error) {
+   ScopedBlockingCall scoped_blocking_call(
+       FROM_HERE, BlockingType::MAY_BLOCK);  // For call to mkdir().
++  const FilePath kFileSystemRoot("/");
+ 
+   // Avoid checking subdirs if directory already exists.
+   if (DirectoryExists(full_path)) {
+@@ -943,8 +944,8 @@ bool CreateDirectoryAndGetError(const Fi
+   // Collect a list of all missing directories.
+   std::vector<FilePath> missing_subpaths({full_path});
+   FilePath last_path = full_path;
+-  for (FilePath path = full_path.DirName(); path.value() != last_path.value();
+-       path = path.DirName()) {
++  for (FilePath path = full_path.DirName(); (path.value() != last_path.value() &&
++       (path != kFileSystemRoot)); path = path.DirName()) {
+     if (DirectoryExists(path)) {
+       break;
+     }
+@@ -962,21 +963,14 @@ bool CreateDirectoryAndGetError(const Fi
+     }
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+-    if (mkdir(subpath.value().c_str(), mode) == 0) {
+-      continue;
+-    }
+-    // Mkdir failed, but it might have failed with EEXIST, or some other error
+-    // due to the directory appearing out of thin air. This can occur if
+-    // two processes are trying to create the same file system tree at the same
+-    // time. Check to see if it exists and make sure it is a directory.
+-    int saved_errno = errno;
+-    if (!DirectoryExists(subpath)) {
+-      if (error) {
++    if ((mkdir(subpath.value().c_str(), mode) == -1) &&
++        ((full_path != subpath) ? (errno != ENOENT) : (-1))) {
++      int saved_errno = errno;
++      if (error)
+         *error = File::OSErrorToFileError(saved_errno);
+-      }
+-      errno = saved_errno;
+       return false;
+     }
++    errno = 0;
+   }
+   return true;
+ }
diff --git a/chromium-wip/patches/patch-base_files_file__util__unittest.cc b/chromium-wip/patches/patch-base_files_file__util__unittest.cc
new file mode 100644
index 0000000000..e73888613b
--- /dev/null
+++ b/chromium-wip/patches/patch-base_files_file__util__unittest.cc
@@ -0,0 +1,46 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/files/file_util_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/files/file_util_unittest.cc
+@@ -3920,7 +3920,7 @@ TEST_F(FileUtilTest, ReadFileToStringWit
+ }
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)
+ TEST_F(FileUtilTest, ReadFileToStringWithProcFileSystem) {
+   FilePath file_path("/proc/cpuinfo");
+   std::string data = "temp";
+@@ -4505,6 +4505,19 @@ TEST_F(FileUtilTest, CreateDirectoryOnly
+ 
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
++#if BUILDFLAG(IS_OPENBSD)
++TEST_F(FileUtilTest, CreateDirectoryInUnveiledPath) {
++  FilePath dir = PathService::CheckedGet(DIR_GEN_TEST_DATA_ROOT);
++  dir = dir.Append(FILE_PATH_LITERAL("base"));
++  dir = dir.Append(FILE_PATH_LITERAL("test"));
++  dir = dir.Append(FILE_PATH_LITERAL("unveil"));
++  unveil(dir.value().c_str(), "rwc");
++  EXPECT_TRUE(CreateDirectory(dir));
++  dir = dir.Append(FILE_PATH_LITERAL("test"));
++  EXPECT_FALSE(CreateDirectory(dir));
++}
++#endif
++
+ #if BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING) && \
+     defined(ARCH_CPU_32_BITS)
+ // TODO(crbug.com/327582285): Re-enable these tests. They may be failing due to
+@@ -4671,7 +4684,7 @@ TEST(FileUtilMultiThreadedTest, MultiThr
+                 NULL);
+ #else
+     size_t bytes_written =
+-        ::write(::fileno(output_file.get()), content.c_str(), content.length());
++        ::write(fileno(output_file.get()), content.c_str(), content.length());
+ #endif
+     EXPECT_EQ(content.length(), bytes_written);
+     ::fflush(output_file.get());
diff --git a/chromium-wip/patches/patch-base_files_important__file__writer__cleaner.cc b/chromium-wip/patches/patch-base_files_important__file__writer__cleaner.cc
new file mode 100644
index 0000000000..1b7df09f2b
--- /dev/null
+++ b/chromium-wip/patches/patch-base_files_important__file__writer__cleaner.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/files/important_file_writer_cleaner.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/files/important_file_writer_cleaner.cc
+@@ -25,7 +25,8 @@ namespace base {
+ namespace {
+ 
+ base::Time GetUpperBoundTime() {
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA)
++// needed because of .CreationTime() pledge
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   // If process creation time is not available then use instance creation
+   // time as the upper-bound for old files. Modification times may be
+   // rounded-down to coarse-grained increments, e.g. FAT has 2s granularity,
diff --git a/chromium-wip/patches/patch-base_files_scoped__file.cc b/chromium-wip/patches/patch-base_files_scoped__file.cc
new file mode 100644
index 0000000000..7cfd57cec0
--- /dev/null
+++ b/chromium-wip/patches/patch-base_files_scoped__file.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/files/scoped_file.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/files/scoped_file.cc
+@@ -32,7 +32,7 @@ void ScopedFDCloseTraits::Free(int fd) {
+   int ret = IGNORE_EINTR(close(fd));
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \
+-    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   // NB: Some file descriptors can return errors from close() e.g. network
+   // filesystems such as NFS and Linux input devices. On Linux, macOS, and
+   // Fuchsia's POSIX layer, errors from close other than EBADF do not indicate
diff --git a/chromium-wip/patches/patch-base_functional_unretained__traits.h b/chromium-wip/patches/patch-base_functional_unretained__traits.h
new file mode 100644
index 0000000000..136b25358b
--- /dev/null
+++ b/chromium-wip/patches/patch-base_functional_unretained__traits.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/functional/unretained_traits.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/functional/unretained_traits.h
+@@ -90,7 +90,7 @@ struct SupportsUnretainedImpl {
+ // official builds, and then in non-test code as well.
+ #if defined(FORCE_UNRETAINED_COMPLETENESS_CHECKS_FOR_TESTS) || \
+     (!defined(UNIT_TEST) && !defined(OFFICIAL_BUILD) &&        \
+-     (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)))
++     (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)))
+       static_assert(v,
+                     "Argument requires unretained storage, but type is not "
+                     "fully defined. This prevents determining whether "
diff --git a/chromium-wip/patches/patch-base_i18n_icu__util.cc b/chromium-wip/patches/patch-base_i18n_icu__util.cc
new file mode 100644
index 0000000000..68e8b0db0e
--- /dev/null
+++ b/chromium-wip/patches/patch-base_i18n_icu__util.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/i18n/icu_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/i18n/icu_util.cc
+@@ -52,7 +52,7 @@
+ #include "third_party/icu/source/common/unicode/unistr.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) || \
+     BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS))
+ #include "third_party/icu/source/i18n/unicode/timezone.h"
+ #endif
+@@ -318,7 +318,7 @@ void InitializeIcuTimeZone() {
+       FuchsiaIntlProfileWatcher::GetPrimaryTimeZoneIdForIcuInitialization();
+   icu::TimeZone::adoptDefault(
+       icu::TimeZone::createTimeZone(icu::UnicodeString::fromUTF8(zone_id)));
+-#elif BUILDFLAG(IS_CHROMEOS) || \
++#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) || \
+     (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_ANDROID)
+   // To respond to the time zone change properly, the default time zone
+   // cache in ICU has to be populated on starting up.
diff --git a/chromium-wip/patches/patch-base_linux__util.cc b/chromium-wip/patches/patch-base_linux__util.cc
new file mode 100644
index 0000000000..bbbfa4ee7d
--- /dev/null
+++ b/chromium-wip/patches/patch-base_linux__util.cc
@@ -0,0 +1,23 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/linux_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/linux_util.cc
+@@ -163,10 +163,14 @@ void SetLinuxDistro(const std::string& d
+ }
+ 
+ bool GetThreadsForProcess(pid_t pid, std::vector<pid_t>* tids) {
++#if BUILDFLAG(IS_BSD)
++  return false;
++#else
+   // 25 > strlen("/proc//task") + strlen(base::NumberToString(INT_MAX)) + 1 = 22
+   char buf[25];
+   strings::SafeSPrintf(buf, "/proc/%d/task", pid);
+   return GetThreadsFromProcessDir(buf, tids);
++#endif
+ }
+ 
+ bool GetThreadsForCurrentProcess(std::vector<pid_t>* tids) {
diff --git a/chromium-wip/patches/patch-base_logging__unittest.cc b/chromium-wip/patches/patch-base_logging__unittest.cc
new file mode 100644
index 0000000000..c766522a01
--- /dev/null
+++ b/chromium-wip/patches/patch-base_logging__unittest.cc
@@ -0,0 +1,37 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/logging_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/logging_unittest.cc
+@@ -40,7 +40,7 @@
+ #include "base/posix/eintr_wrapper.h"
+ #endif  // BUILDFLAG(IS_POSIX)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD)
+ #include <ucontext.h>
+ #endif
+ 
+@@ -586,14 +586,18 @@ void CheckCrashTestSighandler(int, sigin
+   // need the arch-specific boilerplate below, which is inspired by breakpad.
+   // At the same time, on OSX, ucontext.h is deprecated but si_addr works fine.
+   uintptr_t crash_addr = 0;
+-#if BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_NETBSD)
+   crash_addr = reinterpret_cast<uintptr_t>(info->si_addr);
+ #else  // OS_*
+   ucontext_t* context = reinterpret_cast<ucontext_t*>(context_ptr);
+ #if defined(ARCH_CPU_X86)
+   crash_addr = static_cast<uintptr_t>(context->uc_mcontext.gregs[REG_EIP]);
+ #elif defined(ARCH_CPU_X86_64)
++#if BUILDFLAG(IS_OPENBSD)
++  crash_addr = static_cast<uintptr_t>(context->sc_rip);
++#else
+   crash_addr = static_cast<uintptr_t>(context->uc_mcontext.gregs[REG_RIP]);
++#endif
+ #elif defined(ARCH_CPU_ARMEL)
+   crash_addr = static_cast<uintptr_t>(context->uc_mcontext.arm_pc);
+ #elif defined(ARCH_CPU_ARM64)
diff --git a/chromium-wip/patches/patch-base_memory_discardable__memory.cc b/chromium-wip/patches/patch-base_memory_discardable__memory.cc
new file mode 100644
index 0000000000..ea0e6bf665
--- /dev/null
+++ b/chromium-wip/patches/patch-base_memory_discardable__memory.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/memory/discardable_memory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/memory/discardable_memory.cc
+@@ -26,7 +26,7 @@ BASE_FEATURE(kMadvFreeDiscardableMemory,
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ #endif  // BUILDFLAG(IS_POSIX)
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kDiscardableMemoryBackingTrial,
+              "DiscardableMemoryBackingTrial",
+              base::FEATURE_DISABLED_BY_DEFAULT);
+@@ -44,7 +44,7 @@ BASE_FEATURE_ENUM_PARAM(DiscardableMemor
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ 
+ DiscardableMemoryBacking GetBackingForFieldTrial() {
+   DiscardableMemoryTrialGroup trial_group =
+@@ -63,7 +63,7 @@ DiscardableMemoryBacking GetBackingForFi
+ 
+ }  // namespace
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ 
+ // Probe capabilities of this device to determine whether we should participate
+ // in the discardable memory backing trial.
+@@ -95,7 +95,7 @@ DiscardableMemory::DiscardableMemory() =
+ DiscardableMemory::~DiscardableMemory() = default;
+ 
+ DiscardableMemoryBacking GetDiscardableMemoryBacking() {
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (DiscardableMemoryBackingFieldTrialIsEnabled()) {
+     return GetBackingForFieldTrial();
+   }
diff --git a/chromium-wip/patches/patch-base_memory_discardable__memory__internal.h b/chromium-wip/patches/patch-base_memory_discardable__memory__internal.h
new file mode 100644
index 0000000000..10826419e8
--- /dev/null
+++ b/chromium-wip/patches/patch-base_memory_discardable__memory__internal.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/memory/discardable_memory_internal.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/memory/discardable_memory_internal.h
+@@ -12,7 +12,7 @@
+ #include "base/metrics/field_trial_params.h"
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ 
+ namespace base {
+ 
diff --git a/chromium-wip/patches/patch-base_memory_madv__free__discardable__memory__posix.cc b/chromium-wip/patches/patch-base_memory_madv__free__discardable__memory__posix.cc
new file mode 100644
index 0000000000..4a4ca036c9
--- /dev/null
+++ b/chromium-wip/patches/patch-base_memory_madv__free__discardable__memory__posix.cc
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/memory/madv_free_discardable_memory_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/memory/madv_free_discardable_memory_posix.cc
+@@ -298,6 +298,10 @@ void MadvFreeDiscardableMemoryPosix::Set
+ 
+ bool MadvFreeDiscardableMemoryPosix::IsResident() const {
+   DFAKE_SCOPED_RECURSIVE_LOCK(thread_collision_warner_);
++// XXX mincore
++#if BUILDFLAG(IS_BSD)
++  return false;
++#else
+ #if BUILDFLAG(IS_APPLE)
+   std::vector<char> vec(allocated_pages_);
+ #else
+@@ -314,6 +318,7 @@ bool MadvFreeDiscardableMemoryPosix::IsR
+     }
+   }
+   return true;
++#endif
+ }
+ 
+ bool MadvFreeDiscardableMemoryPosix::IsDiscarded() const {
diff --git a/chromium-wip/patches/patch-base_memory_platform__shared__memory__region.h b/chromium-wip/patches/patch-base_memory_platform__shared__memory__region.h
new file mode 100644
index 0000000000..4da449f244
--- /dev/null
+++ b/chromium-wip/patches/patch-base_memory_platform__shared__memory__region.h
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/memory/platform_shared_memory_region.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/memory/platform_shared_memory_region.h
+@@ -19,7 +19,7 @@
+ #include "base/unguessable_token.h"
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ namespace content {
+ class SandboxIPCHandler;
+ }
+@@ -86,7 +86,7 @@ class BASE_EXPORT PlatformSharedMemoryRe
+     kMaxValue = GET_SHMEM_TEMP_DIR_FAILURE
+   };
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Structure to limit access to executable region creation.
+   struct ExecutableRegion {
+    private:
+@@ -125,7 +125,7 @@ class BASE_EXPORT PlatformSharedMemoryRe
+ #if BUILDFLAG(IS_FUCHSIA)
+     kNotVmo,
+ #endif
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     kFcntlFailed,
+     kReadOnlyFdNotReadOnly,
+     kUnexpectedReadOnlyFd,
+@@ -256,7 +256,7 @@ class BASE_EXPORT PlatformSharedMemoryRe
+                            CheckPlatformHandlePermissionsCorrespondToMode);
+   static PlatformSharedMemoryRegion Create(Mode mode,
+                                            size_t size
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+                                            ,
+                                            bool executable = false
+ #endif
diff --git a/chromium-wip/patches/patch-base_memory_platform__shared__memory__region__posix.cc b/chromium-wip/patches/patch-base_memory_platform__shared__memory__region__posix.cc
new file mode 100644
index 0000000000..19abf97849
--- /dev/null
+++ b/chromium-wip/patches/patch-base_memory_platform__shared__memory__region__posix.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/memory/platform_shared_memory_region_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/memory/platform_shared_memory_region_posix.cc
+@@ -59,7 +59,7 @@ std::optional<FDAccessModeError> CheckFD
+ 
+ }  // namespace
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // static
+ ScopedFD PlatformSharedMemoryRegion::ExecutableRegion::CreateFD(size_t size) {
+   PlatformSharedMemoryRegion region =
+@@ -184,7 +184,7 @@ bool PlatformSharedMemoryRegion::Convert
+ // static
+ PlatformSharedMemoryRegion PlatformSharedMemoryRegion::Create(Mode mode,
+                                                               size_t size
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+                                                               ,
+                                                               bool executable
+ #endif
+@@ -209,7 +209,7 @@ PlatformSharedMemoryRegion PlatformShare
+   // flag.
+   FilePath directory;
+   if (!GetShmemTempDir(
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+           executable,
+ #else
+           false /* executable */,
diff --git a/chromium-wip/patches/patch-base_memory_protected__memory.h b/chromium-wip/patches/patch-base_memory_protected__memory.h
new file mode 100644
index 0000000000..e388b68460
--- /dev/null
+++ b/chromium-wip/patches/patch-base_memory_protected__memory.h
@@ -0,0 +1,50 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/memory/protected_memory.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/memory/protected_memory.h
+@@ -120,12 +120,12 @@ __declspec(selectany) char __stop_protec
+ 
+ #define DECLARE_PROTECTED_DATA constinit
+ #define DEFINE_PROTECTED_DATA constinit __declspec(allocate("prot$mem"))
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ // This value is used to align the writers variable. That variable needs to be
+ // aligned to ensure that the protected memory section starts on a page
+ // boundary.
+ #if (PA_BUILDFLAG(IS_ANDROID) && PA_BUILDFLAG(PA_ARCH_CPU_64_BITS)) || \
+-    (PA_BUILDFLAG(IS_LINUX) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64))
++    ((PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_BSD)) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64))
+ // arm64 supports 4kb, 16kb, and 64kb pages. Set to the largest of 64kb as that
+ // will guarantee the section is page aligned regardless of the choice.
+ inline constexpr int kProtectedMemoryAlignment = 65536;
+@@ -340,7 +340,7 @@ class BASE_EXPORT AutoWritableMemoryBase
+     // where an attacker could overwrite it with a large value and invoke code
+     // that constructs and destructs an AutoWritableMemory. After such a call
+     // protected memory would still be set writable because writers > 0.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+     // On Linux, the protected memory section is not automatically page aligned.
+     // This means that attempts to reset the protected memory region to readonly
+     // will set some of the preceding section that is on the same page readonly
+@@ -354,7 +354,7 @@ class BASE_EXPORT AutoWritableMemoryBase
+ #endif
+     static inline size_t writers GUARDED_BY(writers_lock()) = 0;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+     // On Linux, there is no guarantee the section following the protected
+     // memory section is page aligned. This can result in attempts to change
+     // the access permissions of the end of the protected memory section
+@@ -412,7 +412,7 @@ class BASE_EXPORT AutoWritableMemoryInit
+     // the variable to something large before the section was read-only.
+     WriterData::writers = 0;
+     CHECK(SetProtectedSectionReadOnly());
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+     // Set the protected_memory_section_buffer to true to ensure the buffer
+     // section is created. If a variable is declared but not used the memory
+     // section won't be created.
diff --git a/chromium-wip/patches/patch-base_memory_protected__memory__posix.cc b/chromium-wip/patches/patch-base_memory_protected__memory__posix.cc
new file mode 100644
index 0000000000..7b1b222f75
--- /dev/null
+++ b/chromium-wip/patches/patch-base_memory_protected__memory__posix.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/memory/protected_memory_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/memory/protected_memory_posix.cc
+@@ -6,7 +6,7 @@
+ 
+ #include <sys/mman.h>
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ #include <sys/resource.h>
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+@@ -34,7 +34,7 @@ bool SetMemory(void* start, void* end, i
+ }  // namespace
+ 
+ namespace internal {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ void CheckMemoryReadOnly(const void* ptr) {
+   const uintptr_t page_start =
+       bits::AlignDown(reinterpret_cast<uintptr_t>(ptr), GetPageSize());
diff --git a/chromium-wip/patches/patch-base_message__loop_message__pump__epoll.cc b/chromium-wip/patches/patch-base_message__loop_message__pump__epoll.cc
new file mode 100644
index 0000000000..cac6171c08
--- /dev/null
+++ b/chromium-wip/patches/patch-base_message__loop_message__pump__epoll.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/message_loop/message_pump_epoll.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/message_loop/message_pump_epoll.cc
+@@ -49,7 +49,7 @@ std::atomic_bool g_use_batched_version =
+ std::atomic_bool g_use_poll = false;
+ 
+ constexpr std::pair<uint32_t, short int> kEpollToPollEvents[] = {
+-    {EPOLLIN, POLLIN},   {EPOLLOUT, POLLOUT}, {EPOLLRDHUP, POLLRDHUP},
++    {EPOLLIN, POLLIN},   {EPOLLOUT, POLLOUT},
+     {EPOLLPRI, POLLPRI}, {EPOLLERR, POLLERR}, {EPOLLHUP, POLLHUP}};
+ 
+ void SetEventsForPoll(const uint32_t epoll_events, struct pollfd* poll_entry) {
diff --git a/chromium-wip/patches/patch-base_message__loop_message__pump__epoll.h b/chromium-wip/patches/patch-base_message__loop_message__pump__epoll.h
new file mode 100644
index 0000000000..8799283d92
--- /dev/null
+++ b/chromium-wip/patches/patch-base_message__loop_message__pump__epoll.h
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/message_loop/message_pump_epoll.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/message_loop/message_pump_epoll.h
+@@ -51,7 +51,11 @@ namespace base {
+ // every call, don't do it when we have too many FDs.
+ BASE_FEATURE(kUsePollForMessagePumpEpoll,
+              "UsePollForMessagePumpEpoll",
++#if BUILDFLAG(IS_BSD)
++             base::FEATURE_ENABLED_BY_DEFAULT);
++#else
+              base::FEATURE_DISABLED_BY_DEFAULT);
++#endif
+ 
+ // A MessagePump implementation suitable for I/O message loops on Linux-based
+ // systems with epoll API support.
diff --git a/chromium-wip/patches/patch-base_message__loop_message__pump__glib.cc b/chromium-wip/patches/patch-base_message__loop_message__pump__glib.cc
new file mode 100644
index 0000000000..84a6d5a1aa
--- /dev/null
+++ b/chromium-wip/patches/patch-base_message__loop_message__pump__glib.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/message_loop/message_pump_glib.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/message_loop/message_pump_glib.cc
+@@ -8,6 +8,15 @@
+ #include <glib.h>
+ #include <math.h>
+ 
++#if BUILDFLAG(IS_BSD)
++#if BUILDFLAG(IS_NETBSD)
++#include <lwp.h>
++#else
++#include <pthread.h>
++#include <pthread_np.h>
++#endif
++#endif
++
+ #include "base/logging.h"
+ #include "base/memory/raw_ptr.h"
+ #include "base/notreached.h"
+@@ -52,9 +61,19 @@ int GetTimeIntervalMilliseconds(TimeTick
+ }
+ 
+ bool RunningOnMainThread() {
++#if BUILDFLAG(IS_BSD)
++#if BUILDFLAG(IS_NETBSD)
++  auto pid = getpid();
++  auto tid = _lwp_self();
++  return pid > 0 && tid > 0 && pid == tid;
++#else
++  return pthread_main_np();
++#endif
++#else
+   auto pid = getpid();
+   auto tid = PlatformThread::CurrentId().raw();
+   return pid > 0 && tid > 0 && pid == tid;
++#endif
+ }
+ 
+ // A brief refresher on GLib:
diff --git a/chromium-wip/patches/patch-base_native__library__posix.cc b/chromium-wip/patches/patch-base_native__library__posix.cc
new file mode 100644
index 0000000000..f23a3fa906
--- /dev/null
+++ b/chromium-wip/patches/patch-base_native__library__posix.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/native_library_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/native_library_posix.cc
+@@ -34,7 +34,7 @@ NativeLibrary LoadNativeLibraryWithOptio
+   // http://crbug.com/17943, http://crbug.com/17557, http://crbug.com/36892,
+   // and http://crbug.com/40794.
+   int flags = RTLD_LAZY;
+-#if BUILDFLAG(IS_ANDROID) || !defined(RTLD_DEEPBIND)
++#if BUILDFLAG(IS_ANDROID) || !defined(RTLD_DEEPBIND) || BUILDFLAG(IS_BSD)
+   // Certain platforms don't define RTLD_DEEPBIND. Android dlopen() requires
+   // further investigation, as it might vary across versions. Crash here to
+   // warn developers that they're trying to rely on uncertain behavior.
diff --git a/chromium-wip/patches/patch-base_native__library__unittest.cc b/chromium-wip/patches/patch-base_native__library__unittest.cc
new file mode 100644
index 0000000000..0d669fcb5c
--- /dev/null
+++ b/chromium-wip/patches/patch-base_native__library__unittest.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/native_library_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/native_library_unittest.cc
+@@ -135,7 +135,7 @@ TEST(NativeLibraryTest, LoadLibrary) {
+ // versions with respect to symbol resolution scope.
+ // TSan and MSan error out on RTLD_DEEPBIND, https://crbug.com/705255
+ #if !BUILDFLAG(IS_ANDROID) && !defined(THREAD_SANITIZER) && \
+-    !defined(MEMORY_SANITIZER)
++    !defined(MEMORY_SANITIZER) && !BUILDFLAG(IS_BSD)
+ 
+ // Verifies that the |prefer_own_symbols| option satisfies its guarantee that
+ // a loaded library will always prefer local symbol resolution before
diff --git a/chromium-wip/patches/patch-base_posix_can__lower__nice__to.cc b/chromium-wip/patches/patch-base_posix_can__lower__nice__to.cc
new file mode 100644
index 0000000000..81c638583b
--- /dev/null
+++ b/chromium-wip/patches/patch-base_posix_can__lower__nice__to.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/posix/can_lower_nice_to.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/posix/can_lower_nice_to.cc
+@@ -11,8 +11,12 @@
+ 
+ #include "build/build_config.h"
+ 
++#if BUILDFLAG(IS_FREEBSD)
++#include <sys/param.h>
++#endif
++
+ // Not defined on AIX by default.
+-#if BUILDFLAG(IS_AIX)
++#if BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+ #if defined(RLIMIT_NICE)
+ #error Assumption about OS_AIX is incorrect
+ #endif
diff --git a/chromium-wip/patches/patch-base_posix_file__descriptor__shuffle.h b/chromium-wip/patches/patch-base_posix_file__descriptor__shuffle.h
new file mode 100644
index 0000000000..9d575af431
--- /dev/null
+++ b/chromium-wip/patches/patch-base_posix_file__descriptor__shuffle.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/posix/file_descriptor_shuffle.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/posix/file_descriptor_shuffle.h
+@@ -26,6 +26,8 @@
+ #include "base/base_export.h"
+ #include "base/compiler_specific.h"
+ 
++#undef close
++
+ namespace base {
+ 
+ // A Delegate which performs the actions required to perform an injective
diff --git a/chromium-wip/patches/patch-base_posix_sysctl.cc b/chromium-wip/patches/patch-base_posix_sysctl.cc
new file mode 100644
index 0000000000..a12cadbb4c
--- /dev/null
+++ b/chromium-wip/patches/patch-base_posix_sysctl.cc
@@ -0,0 +1,38 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/posix/sysctl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/posix/sysctl.cc
+@@ -4,6 +4,7 @@
+ 
+ #include "base/posix/sysctl.h"
+ 
++#include <sys/types.h>
+ #include <sys/sysctl.h>
+ 
+ #include <initializer_list>
+@@ -16,17 +17,17 @@
+ #include "build/build_config.h"
+ 
+ namespace {
+-
++// NetBSD has sysctl_func macro in sys/sysctl.h, workaround: sysctl_func -> sysctl_func2
+ std::optional<std::string> StringSysctlImpl(
+-    base::FunctionRef<int(char* /*out*/, size_t* /*out_len*/)> sysctl_func) {
++    base::FunctionRef<int(char* /*out*/, size_t* /*out_len*/)> sysctl_func2) {
+   size_t buf_len;
+-  int result = sysctl_func(nullptr, &buf_len);
++  int result = sysctl_func2(nullptr, &buf_len);
+   if (result < 0 || buf_len < 1) {
+     return std::nullopt;
+   }
+ 
+   std::string value(buf_len - 1, '\0');
+-  result = sysctl_func(&value[0], &buf_len);
++  result = sysctl_func2(&value[0], &buf_len);
+   if (result < 0) {
+     return std::nullopt;
+   }
diff --git a/chromium-wip/patches/patch-base_posix_unix__domain__socket.cc b/chromium-wip/patches/patch-base_posix_unix__domain__socket.cc
new file mode 100644
index 0000000000..3680d9e8db
--- /dev/null
+++ b/chromium-wip/patches/patch-base_posix_unix__domain__socket.cc
@@ -0,0 +1,71 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/posix/unix_domain_socket.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/posix/unix_domain_socket.cc
+@@ -20,6 +20,7 @@
+ #include "base/files/scoped_file.h"
+ #include "base/logging.h"
+ #include "base/notreached.h"
++#include "base/notimplemented.h"
+ #include "base/numerics/safe_conversions.h"
+ #include "base/pickle.h"
+ #include "base/posix/eintr_wrapper.h"
+@@ -47,7 +48,7 @@ bool CreateSocketPair(ScopedFD* one, Sco
+ 
+ // static
+ bool UnixDomainSocket::EnableReceiveProcessId(int fd) {
+-#if !BUILDFLAG(IS_APPLE)
++#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)
+   const int enable = 1;
+   return setsockopt(fd, SOL_SOCKET, SO_PASSCRED, &enable, sizeof(enable)) == 0;
+ #else
+@@ -73,7 +74,7 @@ bool UnixDomainSocket::SendMsg(int fd,
+ 
+     struct cmsghdr* cmsg;
+     msg.msg_control = control_buffer;
+-#if BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
+     msg.msg_controllen = checked_cast<socklen_t>(control_len);
+ #else
+     msg.msg_controllen = control_len;
+@@ -81,7 +82,7 @@ bool UnixDomainSocket::SendMsg(int fd,
+     cmsg = CMSG_FIRSTHDR(&msg);
+     cmsg->cmsg_level = SOL_SOCKET;
+     cmsg->cmsg_type = SCM_RIGHTS;
+-#if BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
+     cmsg->cmsg_len = checked_cast<u_int>(CMSG_LEN(sizeof(int) * fds.size()));
+ #else
+     cmsg->cmsg_len = CMSG_LEN(sizeof(int) * fds.size());
+@@ -133,7 +134,7 @@ ssize_t UnixDomainSocket::RecvMsgWithFla
+ 
+   const size_t kControlBufferSize =
+       CMSG_SPACE(sizeof(int) * kMaxFileDescriptors)
+-#if !BUILDFLAG(IS_APPLE)
++#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)
+       // macOS does not support ucred.
+       // macOS supports xucred, but this structure is insufficient.
+       + CMSG_SPACE(sizeof(struct ucred))
+@@ -162,7 +163,7 @@ ssize_t UnixDomainSocket::RecvMsgWithFla
+         wire_fds = reinterpret_cast<int*>(CMSG_DATA(cmsg));
+         wire_fds_len = payload_len / sizeof(int);
+       }
+-#if !BUILDFLAG(IS_APPLE)
++#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)
+       // macOS does not support SCM_CREDENTIALS.
+       if (cmsg->cmsg_level == SOL_SOCKET &&
+           cmsg->cmsg_type == SCM_CREDENTIALS) {
+@@ -199,6 +200,9 @@ ssize_t UnixDomainSocket::RecvMsgWithFla
+     if (getsockopt(fd, SOL_LOCAL, LOCAL_PEERPID, &pid, &pid_size) != 0) {
+       pid = -1;
+     }
++#elif BUILDFLAG(IS_BSD)
++    NOTIMPLEMENTED();
++    pid = -1;
+ #else
+     // |pid| will legitimately be -1 if we read EOF, so only DCHECK if we
+     // actually received a message.  Unfortunately, Linux allows sending zero
diff --git a/chromium-wip/patches/patch-base_posix_unix__domain__socket__unittest.cc b/chromium-wip/patches/patch-base_posix_unix__domain__socket__unittest.cc
new file mode 100644
index 0000000000..2f7804ca91
--- /dev/null
+++ b/chromium-wip/patches/patch-base_posix_unix__domain__socket__unittest.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/posix/unix_domain_socket_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/posix/unix_domain_socket_unittest.cc
+@@ -15,6 +15,8 @@
+ #include <sys/types.h>
+ #include <unistd.h>
+ 
++#include <signal.h>
++
+ #include "base/files/file_util.h"
+ #include "base/files/scoped_file.h"
+ #include "base/functional/bind.h"
diff --git a/chromium-wip/patches/patch-base_process_internal__linux.h b/chromium-wip/patches/patch-base_process_internal__linux.h
new file mode 100644
index 0000000000..bc5c8134dc
--- /dev/null
+++ b/chromium-wip/patches/patch-base_process_internal__linux.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/process/internal_linux.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/process/internal_linux.h
+@@ -146,6 +146,9 @@ TimeDelta ClockTicksToTimeDelta(int64_t 
+ // arguments to the lambda.
+ template <typename Lambda>
+ void ForEachProcessTask(base::ProcessHandle process, Lambda&& lambda) {
++#if BUILDFLAG(IS_BSD)
++  return;
++#else
+   // Iterate through the different threads tracked in /proc/<pid>/task.
+   FilePath fd_path = GetProcPidDir(process).Append("task");
+ 
+@@ -169,6 +172,7 @@ void ForEachProcessTask(base::ProcessHan
+     FilePath task_path = fd_path.Append(tid_str);
+     lambda(tid, task_path);
+   }
++#endif
+ }
+ 
+ }  // namespace internal
diff --git a/chromium-wip/patches/patch-base_process_kill.h b/chromium-wip/patches/patch-base_process_kill.h
new file mode 100644
index 0000000000..793607c73d
--- /dev/null
+++ b/chromium-wip/patches/patch-base_process_kill.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/process/kill.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/process/kill.h
+@@ -123,7 +123,7 @@ BASE_EXPORT TerminationStatus GetTermina
+ BASE_EXPORT TerminationStatus
+ GetKnownDeadTerminationStatus(ProcessHandle handle, int* exit_code);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Spawns a thread to wait asynchronously for the child |process| to exit
+ // and then reaps it.
+ BASE_EXPORT void EnsureProcessGetsReaped(Process process);
diff --git a/chromium-wip/patches/patch-base_process_kill__posix.cc b/chromium-wip/patches/patch-base_process_kill__posix.cc
new file mode 100644
index 0000000000..0781d5473e
--- /dev/null
+++ b/chromium-wip/patches/patch-base_process_kill__posix.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/process/kill_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/process/kill_posix.cc
+@@ -161,7 +161,7 @@ void EnsureProcessTerminated(Process pro
+       0, new BackgroundReaper(std::move(process), Seconds(2)));
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ void EnsureProcessGetsReaped(Process process) {
+   DCHECK(!process.is_current());
+ 
diff --git a/chromium-wip/patches/patch-base_process_launch.h b/chromium-wip/patches/patch-base_process_launch.h
new file mode 100644
index 0000000000..13fb9c5bd2
--- /dev/null
+++ b/chromium-wip/patches/patch-base_process_launch.h
@@ -0,0 +1,31 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/process/launch.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/process/launch.h
+@@ -7,6 +7,13 @@
+ #ifndef BASE_PROCESS_LAUNCH_H_
+ #define BASE_PROCESS_LAUNCH_H_
+ 
++#if defined(__NetBSD__)
++#define _NETBSD_SOURCE 1
++#ifndef PTHREAD_STACK_MIN
++#define PTHREAD_STACK_MIN 4096
++#endif
++#endif
++
+ #include <limits.h>
+ #include <stddef.h>
+ 
+@@ -245,7 +252,7 @@ struct BASE_EXPORT LaunchOptions {
+   bool clear_environment = false;
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // If non-zero, start the process using clone(), using flags as provided.
+   // Unlike in clone, clone_flags may not contain a custom termination signal
+   // that is sent to the parent when the child dies. The termination signal will
diff --git a/chromium-wip/patches/patch-base_process_launch__posix.cc b/chromium-wip/patches/patch-base_process_launch__posix.cc
new file mode 100644
index 0000000000..4a19f65fa6
--- /dev/null
+++ b/chromium-wip/patches/patch-base_process_launch__posix.cc
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/process/launch_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/process/launch_posix.cc
+@@ -61,6 +61,9 @@
+ #error "macOS should use launch_mac.cc"
+ #endif
+ 
++#if defined(OS_FREEBSD)
++#pragma weak environ
++#endif
+ extern char** environ;
+ 
+ namespace base {
+@@ -218,6 +221,8 @@ static const char kFDDir[] = "/dev/fd";
+ static const char kFDDir[] = "/dev/fd";
+ #elif BUILDFLAG(IS_OPENBSD)
+ static const char kFDDir[] = "/dev/fd";
++#elif BUILDFLAG(IS_NETBSD)
++static const char kFDDir[] = "/dev/fd";
+ #elif BUILDFLAG(IS_ANDROID)
+ static const char kFDDir[] = "/proc/self/fd";
+ #endif
diff --git a/chromium-wip/patches/patch-base_process_memory__linux.cc b/chromium-wip/patches/patch-base_process_memory__linux.cc
new file mode 100644
index 0000000000..7503bb4213
--- /dev/null
+++ b/chromium-wip/patches/patch-base_process_memory__linux.cc
@@ -0,0 +1,50 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/process/memory_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/process/memory_linux.cc
+@@ -28,6 +28,7 @@ void __libc_free(void*);
+ 
+ namespace base {
+ 
++#if !BUILDFLAG(IS_BSD)
+ namespace {
+ 
+ void ReleaseReservationOrTerminate() {
+@@ -38,12 +39,14 @@ void ReleaseReservationOrTerminate() {
+ }
+ 
+ }  // namespace
++#endif
+ 
+ void EnableTerminationOnHeapCorruption() {
+   // On Linux, there nothing to do AFAIK.
+ }
+ 
+ void EnableTerminationOnOutOfMemory() {
++#if !BUILDFLAG(IS_BSD)
+   // Set the new-out of memory handler.
+   std::set_new_handler(&ReleaseReservationOrTerminate);
+   // If we're using glibc's allocator, the above functions will override
+@@ -52,8 +55,10 @@ void EnableTerminationOnOutOfMemory() {
+ #if PA_BUILDFLAG(USE_ALLOCATOR_SHIM)
+   allocator_shim::SetCallNewHandlerOnMallocFailure(true);
+ #endif
++#endif
+ }
+ 
++#if !BUILDFLAG(IS_BSD)
+ // ScopedAllowBlocking() has private constructor and it can only be used in
+ // friend classes/functions. Declaring a class is easier in this situation to
+ // avoid adding more dependency to thread_restrictions.h because of the
+@@ -111,6 +116,7 @@ bool AdjustOOMScoreHelper::AdjustOOMScor
+ bool AdjustOOMScore(ProcessId process, int score) {
+   return AdjustOOMScoreHelper::AdjustOOMScore(process, score);
+ }
++#endif
+ 
+ bool UncheckedMalloc(size_t size, void** result) {
+ #if PA_BUILDFLAG(USE_ALLOCATOR_SHIM)
diff --git a/chromium-wip/patches/patch-base_process_process__handle.cc b/chromium-wip/patches/patch-base_process_process__handle.cc
new file mode 100644
index 0000000000..7f410b07ff
--- /dev/null
+++ b/chromium-wip/patches/patch-base_process_process__handle.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/process/process_handle.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/process/process_handle.cc
+@@ -30,7 +30,7 @@ UniqueProcId GetUniqueIdForProcess() {
+              : UniqueProcId(GetCurrentProcId());
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_AIX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+ 
+ void InitUniqueIdForProcessInPidNamespace(ProcessId pid_outside_of_namespace) {
+   DCHECK(pid_outside_of_namespace != kNullProcessId);
diff --git a/chromium-wip/patches/patch-base_process_process__handle.h b/chromium-wip/patches/patch-base_process_process__handle.h
new file mode 100644
index 0000000000..9f0a16a268
--- /dev/null
+++ b/chromium-wip/patches/patch-base_process_process__handle.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/process/process_handle.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/process/process_handle.h
+@@ -86,7 +86,7 @@ BASE_EXPORT ProcessId GetCurrentProcId()
+ // processes may be reused.
+ BASE_EXPORT UniqueProcId GetUniqueIdForProcess();
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // When a process is started in a different PID namespace from the browser
+ // process, this function must be called with the process's PID in the browser's
+ // PID namespace in order to initialize its unique ID. Not thread safe.
diff --git a/chromium-wip/patches/patch-base_process_process__handle__freebsd.cc b/chromium-wip/patches/patch-base_process_process__handle__freebsd.cc
new file mode 100644
index 0000000000..7255dfe544
--- /dev/null
+++ b/chromium-wip/patches/patch-base_process_process__handle__freebsd.cc
@@ -0,0 +1,32 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/process/process_handle_freebsd.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/process/process_handle_freebsd.cc
+@@ -3,6 +3,7 @@
+ // found in the LICENSE file.
+ 
+ #include "base/process/process_handle.h"
++#include "base/files/file_util.h"
+ 
+ #include <limits.h>
+ #include <stddef.h>
+@@ -20,11 +21,14 @@ namespace base {
+ 
+ ProcessId GetParentProcessId(ProcessHandle process) {
+   struct kinfo_proc info;
+-  size_t length;
++  size_t length = sizeof(struct kinfo_proc);
+   int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, process};
+ 
+   if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) {
+     return -1;
++
++  if (length < sizeof(struct kinfo_proc))
++    return -1;
+   }
+ 
+   return info.ki_ppid;
diff --git a/chromium-wip/patches/patch-base_process_process__handle__netbsd.cc b/chromium-wip/patches/patch-base_process_process__handle__netbsd.cc
new file mode 100644
index 0000000000..909646a450
--- /dev/null
+++ b/chromium-wip/patches/patch-base_process_process__handle__netbsd.cc
@@ -0,0 +1,65 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/process/process_handle_netbsd.cc.orig	2025-08-12 17:48:59.362780798 +0000
++++ base/process/process_handle_netbsd.cc
+@@ -0,0 +1,56 @@
++// Copyright 2011 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#include "base/process/process_handle.h"
++#include "base/files/file_util.h"
++
++#include <stddef.h>
++#include <sys/param.h>
++#include <sys/proc.h>
++#include <sys/sysctl.h>
++#include <sys/types.h>
++#include <unistd.h>
++
++#include <optional>
++
++#include "base/files/file_path.h"
++#include "base/posix/sysctl.h"
++
++namespace base {
++
++ProcessId GetParentProcessId(ProcessHandle process) {
++  struct kinfo_proc2 *info;
++  size_t length;
++  pid_t ppid;
++  int mib[] = { CTL_KERN, KERN_PROC2, KERN_PROC_PID, process,
++                sizeof(struct kinfo_proc2), 1 };
++
++  if (sysctl(mib, std::size(mib), NULL, &length, NULL, 0) < 0) {
++    return -1;
++  }
++
++  info = (struct kinfo_proc2 *)malloc(length);
++
++  mib[5] = static_cast<int>((length / sizeof(struct kinfo_proc2)));
++
++  if (sysctl(mib, std::size(mib), info, &length, NULL, 0) < 0) {
++    ppid = -1;
++    goto out;
++  }
++
++  ppid = info->p_ppid;
++
++out:
++  free(info);
++  return ppid;
++}
++
++FilePath GetProcessExecutablePath(ProcessHandle process) {
++  std::optional<std::string> pathname =
++      base::StringSysctl({CTL_KERN, KERN_PROC_ARGS, process, KERN_PROC_PATHNAME});
++
++  return FilePath(pathname.value_or(std::string{}));
++}
++
++}  // namespace base
diff --git a/chromium-wip/patches/patch-base_process_process__handle__openbsd.cc b/chromium-wip/patches/patch-base_process_process__handle__openbsd.cc
new file mode 100644
index 0000000000..76be6a2a1e
--- /dev/null
+++ b/chromium-wip/patches/patch-base_process_process__handle__openbsd.cc
@@ -0,0 +1,145 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/process/process_handle_openbsd.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/process/process_handle_openbsd.cc
+@@ -3,17 +3,25 @@
+ // found in the LICENSE file.
+ 
+ #include "base/process/process_handle.h"
++#include "base/files/file_util.h"
+ 
+ #include <stddef.h>
++#include <stdlib.h>
++#include <sys/param.h>
++#include <sys/proc.h>
++#include <sys/stat.h>
+ #include <sys/sysctl.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+ 
++#include <kvm.h>
++
+ namespace base {
+ 
+ ProcessId GetParentProcessId(ProcessHandle process) {
+-  struct kinfo_proc info;
++  struct kinfo_proc *info;
+   size_t length;
++  pid_t ppid;
+   int mib[] = {
+       CTL_KERN, KERN_PROC, KERN_PROC_PID, process, sizeof(struct kinfo_proc),
+       0};
+@@ -22,37 +30,87 @@ ProcessId GetParentProcessId(ProcessHand
+     return -1;
+   }
+ 
+-  mib[5] = (length / sizeof(struct kinfo_proc));
++  info = (struct kinfo_proc *)malloc(length);
+ 
+-  if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) {
+-    return -1;
++  mib[5] = static_cast<int>((length / sizeof(struct kinfo_proc)));
++
++  if (sysctl(mib, std::size(mib), info, &length, NULL, 0) < 0) {
++    ppid = -1;
++    goto out;
+   }
+ 
+-  return info.p_ppid;
++  ppid = info->p_ppid;
++
++out:
++  free(info);
++  return ppid;
+ }
+ 
+ FilePath GetProcessExecutablePath(ProcessHandle process) {
+-  struct kinfo_proc kp;
++  struct kinfo_file *files;
++  kvm_t *kd = NULL;
++  char errbuf[_POSIX2_LINE_MAX];
++  char **retvalargs, *cpath, retval[PATH_MAX];
++  int cnt;
+   size_t len;
+-  int mib[] = {
+-      CTL_KERN, KERN_PROC, KERN_PROC_PID, process, sizeof(struct kinfo_proc),
+-      0};
+-
+-  if (sysctl(mib, std::size(mib), NULL, &len, NULL, 0) == -1) {
+-    return FilePath();
+-  }
+-  mib[5] = (len / sizeof(struct kinfo_proc));
+-  if (sysctl(mib, std::size(mib), &kp, &len, NULL, 0) < 0) {
+-    return FilePath();
+-  }
+-  if ((kp.p_flag & P_SYSTEM) != 0) {
+-    return FilePath();
+-  }
+-  if (strcmp(kp.p_comm, "chrome") == 0) {
+-    return FilePath(kp.p_comm);
++  char *tokens[2];
++  struct stat sb;
++  FilePath result;
++
++  int mib[] = { CTL_KERN, KERN_PROC_ARGS, process, KERN_PROC_ARGV };
++
++  if ((cpath = getenv("CHROME_EXE_PATH")) != NULL)
++    result = FilePath(cpath);
++  else
++    result = FilePath("@PREFIX@/lib/chromium/chrome");
++
++  if (sysctl(mib, std::size(mib), NULL, &len, NULL, 0) != -1) {
++    retvalargs = static_cast<char**>(malloc(len));
++    if (!retvalargs)
++      return result;
++
++    if (sysctl(mib, std::size(mib), retvalargs, &len, NULL, 0) < 0) {
++      free(retvalargs);
++      return result;
++    }
++
++    if ((*tokens = strtok(retvalargs[0], ":")) == NULL) {
++      free(retvalargs);
++      return result;
++    }
++
++    free(retvalargs);
++
++    if (tokens[0] == NULL)
++      return result;
++
++    if (realpath(tokens[0], retval) == NULL)
++      return result;
++
++    if (stat(retval, &sb) < 0)
++      return result;
++
++    if ((kd = kvm_openfiles(NULL, NULL, NULL, (int)KVM_NO_FILES,
++         errbuf)) == NULL)
++      return result;
++
++    if ((files = kvm_getfiles(kd, KERN_FILE_BYPID, process,
++        sizeof(struct kinfo_file), &cnt)) == NULL) {
++      kvm_close(kd);
++      return result;
++    }
++
++    for (int i = 0; i < cnt; i++) {
++      if (files[i].fd_fd == KERN_FILE_TEXT &&
++          files[i].va_fsid == static_cast<uint32_t>(sb.st_dev) &&
++          files[i].va_fileid == sb.st_ino) {
++            kvm_close(kd);
++            result = FilePath(retval);
++      }
++    }
+   }
+ 
+-  return FilePath();
++  return result;
+ }
+ 
+ }  // namespace base
diff --git a/chromium-wip/patches/patch-base_process_process__iterator.h b/chromium-wip/patches/patch-base_process_process__iterator.h
new file mode 100644
index 0000000000..6ea6a13b7d
--- /dev/null
+++ b/chromium-wip/patches/patch-base_process_process__iterator.h
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/process/process_iterator.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/process/process_iterator.h
+@@ -25,7 +25,7 @@
+ #include <windows.h>
+ 
+ #include <tlhelp32.h>
+-#elif BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_OPENBSD)
++#elif BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_NETBSD)
+ #include <sys/sysctl.h>
+ #elif BUILDFLAG(IS_FREEBSD)
+ #include <sys/user.h>
+@@ -117,7 +117,11 @@ class BASE_EXPORT ProcessIterator {
+   HANDLE snapshot_;
+   bool started_iteration_ = false;
+ #elif BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
++# if BUILDFLAG(IS_NETBSD)
++  std::vector<kinfo_proc2> kinfo_procs_;
++# else
+   std::vector<kinfo_proc> kinfo_procs_;
++# endif
+   size_t index_of_kinfo_proc_ = 0;
+ #elif BUILDFLAG(IS_POSIX)
+   struct DIRClose {
diff --git a/chromium-wip/patches/patch-base_process_process__iterator__freebsd.cc b/chromium-wip/patches/patch-base_process_process__iterator__freebsd.cc
new file mode 100644
index 0000000000..0cf4dc7b20
--- /dev/null
+++ b/chromium-wip/patches/patch-base_process_process__iterator__freebsd.cc
@@ -0,0 +1,58 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/process/process_iterator_freebsd.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/process/process_iterator_freebsd.cc
+@@ -18,7 +18,7 @@ namespace base {
+ 
+ ProcessIterator::ProcessIterator(const ProcessFilter* filter)
+     : filter_(filter) {
+-  int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_UID, getuid()};
++  int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_UID, (int) getuid()};
+ 
+   bool done = false;
+   int try_num = 1;
+@@ -37,7 +37,7 @@ ProcessIterator::ProcessIterator(const P
+       num_of_kinfo_proc += 16;
+       kinfo_procs_.resize(num_of_kinfo_proc);
+       len = num_of_kinfo_proc * sizeof(struct kinfo_proc);
+-      if (sysctl(mib, std::size(mib), &kinfo_procs_[0], &len, NULL, 0) < 0) {
++      if (sysctl(mib, std::size(mib), kinfo_procs_.data(), &len, NULL, 0) < 0) {
+         // If we get a mem error, it just means we need a bigger buffer, so
+         // loop around again.  Anything else is a real error and give up.
+         if (errno != ENOMEM) {
+@@ -47,7 +47,7 @@ ProcessIterator::ProcessIterator(const P
+         }
+       } else {
+         // Got the list, just make sure we're sized exactly right
+-        size_t num_of_kinfo_proc = len / sizeof(struct kinfo_proc);
++        num_of_kinfo_proc = len / sizeof(struct kinfo_proc);
+         kinfo_procs_.resize(num_of_kinfo_proc);
+         done = true;
+       }
+@@ -68,19 +68,14 @@ bool ProcessIterator::CheckForNextProces
+   for (; index_of_kinfo_proc_ < kinfo_procs_.size(); ++index_of_kinfo_proc_) {
+     size_t length;
+     struct kinfo_proc kinfo = kinfo_procs_[index_of_kinfo_proc_];
+-    int mib[] = {CTL_KERN, KERN_PROC_ARGS, kinfo.ki_pid};
++    int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_ARGS, kinfo.ki_pid };
+ 
+     if ((kinfo.ki_pid > 0) && (kinfo.ki_stat == SZOMB)) {
+       continue;
+     }
+ 
+-    length = 0;
+-    if (sysctl(mib, std::size(mib), NULL, &length, NULL, 0) < 0) {
+-      LOG(ERROR) << "failed to figure out the buffer size for a command line";
+-      continue;
+-    }
+-
+-    data.resize(length);
++    data.resize(ARG_MAX);
++    length = ARG_MAX;
+ 
+     if (sysctl(mib, std::size(mib), &data[0], &length, NULL, 0) < 0) {
+       LOG(ERROR) << "failed to fetch a commandline";
diff --git a/chromium-wip/patches/patch-base_process_process__iterator__netbsd.cc b/chromium-wip/patches/patch-base_process_process__iterator__netbsd.cc
new file mode 100644
index 0000000000..acec984497
--- /dev/null
+++ b/chromium-wip/patches/patch-base_process_process__iterator__netbsd.cc
@@ -0,0 +1,143 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/process/process_iterator_netbsd.cc.orig	2025-08-12 17:48:59.363276368 +0000
++++ base/process/process_iterator_netbsd.cc
+@@ -0,0 +1,134 @@
++// Copyright 2013 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#include "base/process/process_iterator.h"
++
++#include <errno.h>
++#include <stddef.h>
++#include <unistd.h>
++#include <sys/param.h>
++#include <sys/proc.h>
++#include <sys/sysctl.h>
++
++#include "base/logging.h"
++#include "base/strings/string_split.h"
++#include "base/strings/string_util.h"
++
++namespace base {
++
++ProcessIterator::ProcessIterator(const ProcessFilter* filter)
++    : filter_(filter) {
++  int mib[] = { CTL_KERN, KERN_PROC2, KERN_PROC_UID, static_cast<int>(getuid()),
++                sizeof(struct kinfo_proc2), 1 };
++
++  bool done = false;
++  int try_num = 1;
++  const int max_tries = 10;
++  size_t num_of_kinfo_proc;
++
++  do {
++    size_t len = 0;
++    if (sysctl(mib, std::size(mib), NULL, &len, NULL, 0) < 0) {
++      DLOG(ERROR) << "failed to get the size needed for the process list";
++      kinfo_procs_.resize(0);
++      done = true;
++    } else {
++      num_of_kinfo_proc = len / sizeof(struct kinfo_proc2);
++      // Leave some spare room for process table growth (more could show up
++      // between when we check and now)
++      num_of_kinfo_proc += 16;
++      kinfo_procs_.resize(num_of_kinfo_proc);
++      len = num_of_kinfo_proc * sizeof(struct kinfo_proc2);
++      if (sysctl(mib, std::size(mib), &kinfo_procs_[0], &len, NULL, 0) < 0) {
++        // If we get a mem error, it just means we need a bigger buffer, so
++        // loop around again.  Anything else is a real error and give up.
++        if (errno != ENOMEM) {
++          DLOG(ERROR) << "failed to get the process list";
++          kinfo_procs_.resize(0);
++          done = true;
++        }
++      } else {
++        // Got the list, just make sure we're sized exactly right
++        num_of_kinfo_proc = len / sizeof(struct kinfo_proc2);
++        kinfo_procs_.resize(num_of_kinfo_proc);
++        done = true;
++      }
++    }
++  } while (!done && (try_num++ < max_tries));
++
++  if (!done) {
++    DLOG(ERROR) << "failed to collect the process list in a few tries";
++    kinfo_procs_.resize(0);
++  }
++}
++
++ProcessIterator::~ProcessIterator() = default;
++
++bool ProcessIterator::CheckForNextProcess() {
++  std::string data;
++  for (; index_of_kinfo_proc_ < kinfo_procs_.size(); ++index_of_kinfo_proc_) {
++    kinfo_proc2& kinfo = kinfo_procs_[index_of_kinfo_proc_];
++
++    // Skip processes just awaiting collection
++    if ((kinfo.p_pid > 0) && (kinfo.p_stat == SZOMB)) {
++      continue;
++    }
++
++    int mib[] = { CTL_KERN, KERN_PROC_ARGS, kinfo.p_pid };
++
++    // Find out what size buffer we need.
++    size_t data_len = 0;
++    if (sysctl(mib, std::size(mib), NULL, &data_len, NULL, 0) < 0) {
++      DVPLOG(1) << "failed to figure out the buffer size for a commandline";
++      continue;
++    }
++
++    data.resize(data_len);
++    if (sysctl(mib, std::size(mib), &data[0], &data_len, NULL, 0) < 0) {
++      DVPLOG(1) << "failed to fetch a commandline";
++      continue;
++    }
++
++    // |data| contains all the command line parameters of the process, separated
++    // by blocks of one or more null characters. We tokenize |data| into a
++    // vector of strings using '\0' as a delimiter and populate
++    // |entry_.cmd_line_args_|.
++    std::string delimiters;
++    delimiters.push_back('\0');
++    entry_.cmd_line_args_ = SplitString(data, delimiters, KEEP_WHITESPACE,
++                                        SPLIT_WANT_NONEMPTY);
++
++    // |data| starts with the full executable path followed by a null character.
++    // We search for the first instance of '\0' and extract everything before it
++    // to populate |entry_.exe_file_|.
++    size_t exec_name_end = data.find('\0');
++    if (exec_name_end == std::string::npos) {
++      DLOG(ERROR) << "command line data didn't match expected format";
++      continue;
++    }
++
++    entry_.pid_ = kinfo.p_pid;
++    entry_.ppid_ = kinfo.p_ppid;
++    entry_.gid_ = kinfo.p__pgid;
++    size_t last_slash = data.rfind('/', exec_name_end);
++    if (last_slash == std::string::npos) {
++      entry_.exe_file_.assign(data, 0, exec_name_end);
++    } else {
++      entry_.exe_file_.assign(data, last_slash + 1,
++                              exec_name_end - last_slash - 1);
++    }
++    // Start w/ the next entry next time through
++    ++index_of_kinfo_proc_;
++    // Done
++    return true;
++  }
++  return false;
++}
++
++bool NamedProcessIterator::IncludeEntry() {
++  return (executable_name_ == entry().exe_file() &&
++          ProcessIterator::IncludeEntry());
++}
++
++}  // namespace base
diff --git a/chromium-wip/patches/patch-base_process_process__iterator__openbsd.cc b/chromium-wip/patches/patch-base_process_process__iterator__openbsd.cc
new file mode 100644
index 0000000000..ccc8b68137
--- /dev/null
+++ b/chromium-wip/patches/patch-base_process_process__iterator__openbsd.cc
@@ -0,0 +1,52 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/process/process_iterator_openbsd.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/process/process_iterator_openbsd.cc
+@@ -6,6 +6,9 @@
+ 
+ #include <errno.h>
+ #include <stddef.h>
++#include <unistd.h>
++#include <sys/param.h>
++#include <sys/proc.h>
+ #include <sys/sysctl.h>
+ 
+ #include "base/logging.h"
+@@ -17,12 +20,13 @@ namespace base {
+ ProcessIterator::ProcessIterator(const ProcessFilter* filter)
+     : filter_(filter) {
+   int mib[] = {
+-      CTL_KERN, KERN_PROC, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc),
+-      0};
++      CTL_KERN, KERN_PROC, KERN_PROC_UID, static_cast<int>(getuid()),
++      sizeof(struct kinfo_proc), 0 };
+ 
+   bool done = false;
+   int try_num = 1;
+   const int max_tries = 10;
++  size_t num_of_kinfo_proc;
+ 
+   do {
+     size_t len = 0;
+@@ -31,7 +35,7 @@ ProcessIterator::ProcessIterator(const P
+       kinfo_procs_.resize(0);
+       done = true;
+     } else {
+-      size_t num_of_kinfo_proc = len / sizeof(struct kinfo_proc);
++      num_of_kinfo_proc = len / sizeof(struct kinfo_proc);
+       // Leave some spare room for process table growth (more could show up
+       // between when we check and now)
+       num_of_kinfo_proc += 16;
+@@ -47,7 +51,7 @@ ProcessIterator::ProcessIterator(const P
+         }
+       } else {
+         // Got the list, just make sure we're sized exactly right
+-        size_t num_of_kinfo_proc = len / sizeof(struct kinfo_proc);
++        num_of_kinfo_proc = len / sizeof(struct kinfo_proc);
+         kinfo_procs_.resize(num_of_kinfo_proc);
+         done = true;
+       }
diff --git a/chromium-wip/patches/patch-base_process_process__metrics.cc b/chromium-wip/patches/patch-base_process_process__metrics.cc
new file mode 100644
index 0000000000..378db0041b
--- /dev/null
+++ b/chromium-wip/patches/patch-base_process_process__metrics.cc
@@ -0,0 +1,55 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/process/process_metrics.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/process/process_metrics.cc
+@@ -17,7 +17,7 @@ namespace base {
+ namespace {
+ 
+ #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_AIX)
++    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+ int CalculateEventsPerSecond(uint64_t event_count,
+                              uint64_t* last_event_count,
+                              base::TimeTicks* last_calculated) {
+@@ -54,7 +54,7 @@ SystemMetrics SystemMetrics::Sample() {
+   SystemMetrics system_metrics;
+ 
+   system_metrics.committed_memory_ = GetSystemCommitCharge();
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   GetSystemMemoryInfo(&system_metrics.memory_info_);
+   GetVmStatInfo(&system_metrics.vmstat_info_);
+   GetSystemDiskInfo(&system_metrics.disk_info_);
+@@ -73,7 +73,7 @@ Value::Dict SystemMetrics::ToDict() cons
+   Value::Dict res;
+ 
+   res.Set("committed_memory", static_cast<int>(committed_memory_));
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   Value::Dict meminfo = memory_info_.ToDict();
+   meminfo.Merge(vmstat_info_.ToDict());
+   res.Set("meminfo", std::move(meminfo));
+@@ -100,7 +100,6 @@ std::unique_ptr<ProcessMetrics> ProcessM
+ #endif  // !BUILDFLAG(IS_MAC)
+ }
+ 
+-#if !BUILDFLAG(IS_FREEBSD) || !BUILDFLAG(IS_POSIX)
+ double ProcessMetrics::GetPlatformIndependentCPUUsage(
+     TimeDelta cumulative_cpu) {
+   TimeTicks time = TimeTicks::Now();
+@@ -130,10 +129,9 @@ ProcessMetrics::GetPlatformIndependentCP
+     return GetPlatformIndependentCPUUsage(cpu_usage);
+   });
+ }
+-#endif
+ 
+ #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_AIX)
++    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+ int ProcessMetrics::CalculateIdleWakeupsPerSecond(
+     uint64_t absolute_idle_wakeups) {
+   return CalculateEventsPerSecond(absolute_idle_wakeups,
diff --git a/chromium-wip/patches/patch-base_process_process__metrics.h b/chromium-wip/patches/patch-base_process_process__metrics.h
new file mode 100644
index 0000000000..06b4cfad53
--- /dev/null
+++ b/chromium-wip/patches/patch-base_process_process__metrics.h
@@ -0,0 +1,112 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/process/process_metrics.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/process/process_metrics.h
+@@ -39,7 +39,7 @@
+ #endif
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_AIX)
++    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+ #include <string>
+ #include <utility>
+ #include <vector>
+@@ -49,7 +49,7 @@
+ 
+ namespace base {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ // Minor and major page fault counts since the process creation.
+ // Both counts are process-wide, and exclude child processes.
+ //
+@@ -179,7 +179,7 @@ class BASE_EXPORT ProcessMetrics {
+   base::expected<TimeDelta, ProcessCPUUsageError> GetCumulativeCPUUsage();
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_AIX)
++    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+   // Emits the cumulative CPU usage for all currently active threads since they
+   // were started into the output parameter (replacing its current contents).
+   // Threads that have already terminated will not be reported. Thus, the sum of
+@@ -224,7 +224,7 @@ class BASE_EXPORT ProcessMetrics {
+   int GetOpenFdSoftLimit() const;
+ #endif  // BUILDFLAG(IS_POSIX)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   // Minor and major page fault count as reported by /proc/[pid]/stat.
+   // Returns true for success.
+   bool GetPageFaultCounts(PageFaultCounts* counts) const;
+@@ -242,7 +242,7 @@ class BASE_EXPORT ProcessMetrics {
+ #endif  // !BUILDFLAG(IS_MAC)
+ 
+ #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_AIX)
++    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+   int CalculateIdleWakeupsPerSecond(uint64_t absolute_idle_wakeups);
+ #endif
+ #if BUILDFLAG(IS_APPLE)
+@@ -264,12 +264,10 @@ class BASE_EXPORT ProcessMetrics {
+   // Used to store the previous times and CPU usage counts so we can
+   // compute the CPU usage between calls.
+   TimeTicks last_cpu_time_;
+-#if !BUILDFLAG(IS_FREEBSD) || !BUILDFLAG(IS_POSIX)
+   TimeDelta last_cumulative_cpu_;
+-#endif
+ 
+ #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_AIX)
++    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+   // Same thing for idle wakeups.
+   TimeTicks last_idle_wakeups_time_;
+   uint64_t last_absolute_idle_wakeups_;
+@@ -310,7 +308,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsig
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) ||      \
+     BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_AIX) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ // Data about system-wide memory consumption. Values are in KB. Available on
+ // Windows, Mac, Linux, Android and Chrome OS.
+ //
+@@ -345,7 +343,7 @@ struct BASE_EXPORT SystemMemoryInfoKB {
+ #endif
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_AIX)
++    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+   // This provides an estimate of available memory as described here:
+   // https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773
+   // NOTE: this is ONLY valid in kernels 3.14 and up.  Its value will always
+@@ -360,7 +358,7 @@ struct BASE_EXPORT SystemMemoryInfoKB {
+ #endif
+ 
+ #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   int buffers = 0;
+   int cached = 0;
+   int active_anon = 0;
+@@ -397,7 +395,7 @@ BASE_EXPORT bool GetSystemMemoryInfo(Sys
+         // BUILDFLAG(IS_FUCHSIA)
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_AIX)
++    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+ // Parse the data found in /proc/<pid>/stat and return the sum of the
+ // CPU-related ticks.  Returns -1 on parse error.
+ // Exposed for testing.
+@@ -591,7 +589,7 @@ class BASE_EXPORT SystemMetrics {
+   FRIEND_TEST_ALL_PREFIXES(SystemMetricsTest, SystemMetrics);
+ 
+   size_t committed_memory_;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   SystemMemoryInfoKB memory_info_;
+   VmStatInfo vmstat_info_;
+   SystemDiskInfo disk_info_;
diff --git a/chromium-wip/patches/patch-base_process_process__metrics__freebsd.cc b/chromium-wip/patches/patch-base_process_process__metrics__freebsd.cc
new file mode 100644
index 0000000000..36c2909dec
--- /dev/null
+++ b/chromium-wip/patches/patch-base_process_process__metrics__freebsd.cc
@@ -0,0 +1,287 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/process/process_metrics_freebsd.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/process/process_metrics_freebsd.cc
+@@ -3,18 +3,37 @@
+ // found in the LICENSE file.
+ 
+ #include "base/process/process_metrics.h"
++#include "base/notimplemented.h"
+ 
+ #include <stddef.h>
++#include <sys/types.h>
+ #include <sys/sysctl.h>
+ #include <sys/user.h>
+ #include <unistd.h>
+ 
++#include <fcntl.h> /* O_RDONLY */
++#include <kvm.h>
++#include <libutil.h>
++
+ #include "base/memory/ptr_util.h"
++#include "base/values.h"
+ 
+ namespace base {
++namespace {
++int GetPageShift() {
++  int pagesize = getpagesize();
++  int pageshift = 0;
++
++  while (pagesize > 1) {
++    pageshift++;
++    pagesize >>= 1;
++  }
++
++  return pageshift;
++}
++}
+ 
+-ProcessMetrics::ProcessMetrics(ProcessHandle process)
+-    : process_(process), last_cpu_(0) {}
++ProcessMetrics::ProcessMetrics(ProcessHandle process) : process_(process) {}
+ 
+ // static
+ std::unique_ptr<ProcessMetrics> ProcessMetrics::CreateProcessMetrics(
+@@ -22,22 +41,54 @@ std::unique_ptr<ProcessMetrics> ProcessM
+   return WrapUnique(new ProcessMetrics(process));
+ }
+ 
+-base::expected<double, ProcessCPUUsageError>
+-ProcessMetrics::GetPlatformIndependentCPUUsage() {
+-  struct kinfo_proc info;
+-  int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, process_};
+-  size_t length = sizeof(info);
++base::expected<ProcessMemoryInfo, ProcessUsageError>
++ProcessMetrics::GetMemoryInfo() const {
++  ProcessMemoryInfo memory_info;
++  kvm_t *kd = kvm_open(nullptr, "/dev/null", nullptr, O_RDONLY, "kvm_open");
++  struct kinfo_proc *pp;
++  int nproc;
+ 
+-  if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) {
+-    return base::unexpected(ProcessCPUUsageError::kSystemError);
++  if (kd == nullptr) {
++    return base::unexpected(ProcessUsageError::kSystemError);
++  }
++
++  if ((pp = kvm_getprocs(kd, KERN_PROC_PID, process_, &nproc)) == nullptr) {
++    kvm_close(kd);
++    return base::unexpected(ProcessUsageError::kProcessNotFound);
++  }
++
++  if (nproc > 0) {
++    memory_info.resident_set_bytes = pp->ki_rssize << GetPageShift();
++  } else {
++    kvm_close(kd);
++    return base::unexpected(ProcessUsageError::kProcessNotFound);
+   }
+ 
+-  return base::ok(double{info.ki_pctcpu} / FSCALE * 100.0);
++  kvm_close(kd);
++  return memory_info;
+ }
+ 
+ base::expected<TimeDelta, ProcessCPUUsageError>
+ ProcessMetrics::GetCumulativeCPUUsage() {
+-  NOTREACHED();
++  struct kinfo_proc info;
++  size_t length = sizeof(struct kinfo_proc);
++  struct timeval tv;
++
++  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process_ };
++
++  if (process_ == 0) {
++    return base::unexpected(ProcessCPUUsageError::kSystemError);
++  }
++
++  if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) {
++    return base::unexpected(ProcessCPUUsageError::kSystemError);
++  }
++
++  if (length == 0) {
++    return base::unexpected(ProcessCPUUsageError::kProcessNotFound);
++  }
++
++  return base::ok(Microseconds(info.ki_runtime));
+ }
+ 
+ size_t GetSystemCommitCharge() {
+@@ -66,4 +117,174 @@ size_t GetSystemCommitCharge() {
+   return mem_total - (mem_free * pagesize) - (mem_inactive * pagesize);
+ }
+ 
++int64_t GetNumberOfThreads(ProcessHandle process) {
++  // Taken from FreeBSD top (usr.bin/top/machine.c)
++
++  kvm_t* kd = kvm_open(NULL, "/dev/null", NULL, O_RDONLY, "kvm_open");
++  if (kd == NULL)
++    return 0;
++
++  struct kinfo_proc* pbase;
++  int nproc;
++  pbase = kvm_getprocs(kd, KERN_PROC_PID, process, &nproc);
++  if (pbase == NULL)
++    return 0;
++
++  if (kvm_close(kd) == -1)
++    return 0;
++
++  return nproc;
++}
++
++bool GetSystemMemoryInfo(SystemMemoryInfoKB *meminfo) {
++  unsigned int mem_total, mem_free, swap_total, swap_used;
++  size_t length;
++  int pagesizeKB;
++
++  pagesizeKB = getpagesize() / 1024;
++
++  length = sizeof(mem_total);
++  if (sysctlbyname("vm.stats.vm.v_page_count", &mem_total,
++      &length, NULL, 0) != 0 || length != sizeof(mem_total))
++    return false;
++
++  length = sizeof(mem_free);
++  if (sysctlbyname("vm.stats.vm.v_free_count", &mem_free, &length, NULL, 0)
++      != 0 || length != sizeof(mem_free))
++    return false;
++
++  length = sizeof(swap_total);
++  if (sysctlbyname("vm.swap_size", &swap_total, &length, NULL, 0)
++      != 0 || length != sizeof(swap_total))
++    return false;
++
++  length = sizeof(swap_used);
++  if (sysctlbyname("vm.swap_anon_use", &swap_used, &length, NULL, 0)
++      != 0 || length != sizeof(swap_used))
++    return false;
++
++  meminfo->total = mem_total * pagesizeKB;
++  meminfo->free = mem_free * pagesizeKB;
++  meminfo->swap_total = swap_total * pagesizeKB;
++  meminfo->swap_free = (swap_total - swap_used) * pagesizeKB;
++
++  return true;
++}
++
++int ProcessMetrics::GetOpenFdCount() const {
++  struct kinfo_file * kif;
++  int cnt;
++
++  if ((kif = kinfo_getfile(process_, &cnt)) == NULL)
++    return -1;
++
++  free(kif);
++
++  return cnt;
++}
++
++int ProcessMetrics::GetOpenFdSoftLimit() const {
++  size_t length;
++  int total_count = 0;
++  int mib[] = { CTL_KERN, KERN_MAXFILESPERPROC };
++
++  length = sizeof(total_count);
++
++  if (sysctl(mib, std::size(mib), &total_count, &length, NULL, 0) < 0) {
++    total_count = -1;
++  }
++
++  return total_count;
++}
++
++int ProcessMetrics::GetIdleWakeupsPerSecond() {
++  NOTIMPLEMENTED();
++  return 0;
++}
++
++bool GetSystemDiskInfo(SystemDiskInfo* diskinfo) {
++  NOTIMPLEMENTED();
++  return false;
++}
++
++bool GetVmStatInfo(VmStatInfo* vmstat) {
++  NOTIMPLEMENTED();
++  return false;
++}
++
++SystemDiskInfo::SystemDiskInfo() {
++  reads = 0;
++  reads_merged = 0;
++  sectors_read = 0;
++  read_time = 0;
++  writes = 0;
++  writes_merged = 0;
++  sectors_written = 0;
++  write_time = 0;
++  io = 0;
++  io_time = 0;
++  weighted_io_time = 0;
++}
++
++SystemDiskInfo::SystemDiskInfo(const SystemDiskInfo& other) = default;
++
++SystemDiskInfo& SystemDiskInfo::operator=(const SystemDiskInfo&) = default;
++
++Value::Dict SystemDiskInfo::ToDict() const {
++  Value::Dict res;
++
++  // Write out uint64_t variables as doubles.
++  // Note: this may discard some precision, but for JS there's no other option.
++  res.Set("reads", static_cast<double>(reads));
++  res.Set("reads_merged", static_cast<double>(reads_merged));
++  res.Set("sectors_read", static_cast<double>(sectors_read));
++  res.Set("read_time", static_cast<double>(read_time));
++  res.Set("writes", static_cast<double>(writes));
++  res.Set("writes_merged", static_cast<double>(writes_merged));
++  res.Set("sectors_written", static_cast<double>(sectors_written));
++  res.Set("write_time", static_cast<double>(write_time));
++  res.Set("io", static_cast<double>(io));
++  res.Set("io_time", static_cast<double>(io_time));
++  res.Set("weighted_io_time", static_cast<double>(weighted_io_time));
++
++  NOTIMPLEMENTED();
++
++  return res;
++}
++
++Value::Dict SystemMemoryInfoKB::ToDict() const {
++  Value::Dict res;
++  res.Set("total", total);
++  res.Set("free", free);
++  res.Set("available", available);
++  res.Set("buffers", buffers);
++  res.Set("cached", cached);
++  res.Set("active_anon", active_anon);
++  res.Set("inactive_anon", inactive_anon);
++  res.Set("active_file", active_file);
++  res.Set("inactive_file", inactive_file);
++  res.Set("swap_total", swap_total);
++  res.Set("swap_free", swap_free);
++  res.Set("swap_used", swap_total - swap_free);
++  res.Set("dirty", dirty);
++  res.Set("reclaimable", reclaimable);
++
++  NOTIMPLEMENTED();
++
++  return res;
++}
++
++Value::Dict VmStatInfo::ToDict() const {
++  Value::Dict res;
++  // TODO(crbug.com/1334256): Make base::Value able to hold uint64_t and remove
++  // casts below.
++  res.Set("pswpin", static_cast<int>(pswpin));
++  res.Set("pswpout", static_cast<int>(pswpout));
++  res.Set("pgmajfault", static_cast<int>(pgmajfault));
++
++  NOTIMPLEMENTED();
++
++  return res;
++}
++
+ }  // namespace base
diff --git a/chromium-wip/patches/patch-base_process_process__metrics__netbsd.cc b/chromium-wip/patches/patch-base_process_process__metrics__netbsd.cc
new file mode 100644
index 0000000000..babd17a4d6
--- /dev/null
+++ b/chromium-wip/patches/patch-base_process_process__metrics__netbsd.cc
@@ -0,0 +1,237 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/process/process_metrics_netbsd.cc.orig	2025-08-12 17:48:59.363962288 +0000
++++ base/process/process_metrics_netbsd.cc
+@@ -0,0 +1,228 @@
++// Copyright 2013 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#include "base/process/process_metrics.h"
++
++#include <stddef.h>
++#include <stdint.h>
++#include <fcntl.h>
++#include <sys/param.h>
++#include <sys/sysctl.h>
++#include <sys/vmmeter.h>
++
++#include "base/files/dir_reader_posix.h" // DirReaderPosix
++#include "base/process/internal_linux.h" // GetProcPidDir()
++#include "base/memory/ptr_util.h"
++#include "base/types/expected.h"
++#include "base/values.h"
++#include "base/notimplemented.h"
++
++namespace base {
++
++ProcessMetrics::ProcessMetrics(ProcessHandle process) : process_(process) {}
++
++base::expected<ProcessMemoryInfo, ProcessUsageError>
++ProcessMetrics::GetMemoryInfo() const {
++  ProcessMemoryInfo memory_info;
++  struct kinfo_proc2 info;
++  size_t length = sizeof(struct kinfo_proc2);
++
++  int mib[] = { CTL_KERN, KERN_PROC2, KERN_PROC_PID, process_,
++                sizeof(struct kinfo_proc2), 1 };
++
++  if (process_ == 0) {
++    return base::unexpected(ProcessUsageError::kSystemError);
++  }
++
++  if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) {
++    return base::unexpected(ProcessUsageError::kSystemError);
++  }
++
++  if (length == 0) {
++    return base::unexpected(ProcessUsageError::kProcessNotFound);
++  }
++
++  memory_info.resident_set_bytes =
++    checked_cast<uint64_t>(info.p_vm_rssize * getpagesize());
++
++  return memory_info;
++}
++
++base::expected<TimeDelta, ProcessCPUUsageError>
++ProcessMetrics::GetCumulativeCPUUsage() {
++  struct kinfo_proc2 info;
++  size_t length = sizeof(struct kinfo_proc2);
++  struct timeval tv;
++
++  int mib[] = { CTL_KERN, KERN_PROC2, KERN_PROC_PID, process_,
++                sizeof(struct kinfo_proc2), 1 };
++
++  if (process_ == 0) {
++    return base::unexpected(ProcessCPUUsageError::kSystemError);
++  }
++
++  if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) {
++    return base::unexpected(ProcessCPUUsageError::kSystemError);
++  }
++
++  if (length == 0) {
++    return base::unexpected(ProcessCPUUsageError::kProcessNotFound);
++  }
++
++  tv.tv_sec = info.p_rtime_sec;
++  tv.tv_usec = info.p_rtime_usec;
++
++  return base::ok(Microseconds(TimeValToMicroseconds(tv)));
++}
++
++// static
++std::unique_ptr<ProcessMetrics> ProcessMetrics::CreateProcessMetrics(
++    ProcessHandle process) {
++  return WrapUnique(new ProcessMetrics(process));
++}
++
++size_t GetSystemCommitCharge() {
++  int mib[] = { CTL_VM, VM_METER };
++  size_t pagesize;
++  struct vmtotal vmtotal;
++  unsigned long mem_total, mem_free, mem_inactive;
++  size_t len = sizeof(vmtotal);
++
++  if (sysctl(mib, std::size(mib), &vmtotal, &len, NULL, 0) < 0) {
++    return 0;
++  }
++
++  mem_total = vmtotal.t_vm;
++  mem_free = vmtotal.t_free;
++  mem_inactive = vmtotal.t_vm - vmtotal.t_avm;
++
++  pagesize = checked_cast<size_t>(getpagesize());
++
++  return mem_total - (mem_free * pagesize) - (mem_inactive * pagesize);
++}
++
++int ProcessMetrics::GetOpenFdCount() const {
++  // Use /proc/<pid>/fd to count the number of entries there.
++  FilePath fd_path = internal::GetProcPidDir(process_).Append("fd");
++
++  DirReaderPosix dir_reader(fd_path.value().c_str());
++  if (!dir_reader.IsValid()) {
++    return -1;
++  }
++
++  int total_count = 0;
++  for (; dir_reader.Next();) {
++    const char* name = dir_reader.name();
++    if (strcmp(name, ".") != 0 && strcmp(name, "..") != 0) {
++      ++total_count;
++    }
++  }
++
++  return total_count;
++}
++
++int ProcessMetrics::GetOpenFdSoftLimit() const {
++  return getdtablesize();
++//  return GetMaxFds();
++}
++
++bool ProcessMetrics::GetPageFaultCounts(PageFaultCounts* counts) const {
++  NOTIMPLEMENTED();
++  return false;
++}
++
++bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo) {
++  NOTIMPLEMENTED();
++  return false;
++}
++
++bool GetSystemDiskInfo(SystemDiskInfo* diskinfo) {
++  NOTIMPLEMENTED();
++  return false;
++}
++
++bool GetVmStatInfo(VmStatInfo* vmstat) {
++  NOTIMPLEMENTED();
++  return false;
++}
++
++int ProcessMetrics::GetIdleWakeupsPerSecond() {
++  NOTIMPLEMENTED();
++  return 0;
++}
++
++Value::Dict SystemMemoryInfoKB::ToDict() const {
++  Value::Dict res;
++  res.Set("total", total);
++  res.Set("free", free);
++  res.Set("available", available);
++  res.Set("buffers", buffers);
++  res.Set("cached", cached);
++  res.Set("active_anon", active_anon);
++  res.Set("inactive_anon", inactive_anon);
++  res.Set("active_file", active_file);
++  res.Set("inactive_file", inactive_file);
++  res.Set("swap_total", swap_total);
++  res.Set("swap_free", swap_free);
++  res.Set("swap_used", swap_total - swap_free);
++  res.Set("dirty", dirty);
++  res.Set("reclaimable", reclaimable);
++
++  NOTIMPLEMENTED();
++
++  return res;
++}
++
++Value::Dict VmStatInfo::ToDict() const {
++  Value::Dict res;
++  res.Set("pswpin", static_cast<int>(pswpin));
++  res.Set("pswpout", static_cast<int>(pswpout));
++  res.Set("pgmajfault", static_cast<int>(pgmajfault));
++
++  NOTIMPLEMENTED();
++
++  return res;
++}
++
++SystemDiskInfo::SystemDiskInfo() {
++  reads = 0;
++  reads_merged = 0;
++  sectors_read = 0;
++  read_time = 0;
++  writes = 0;
++  writes_merged = 0;
++  sectors_written = 0;
++  write_time = 0;
++  io = 0;
++  io_time = 0;
++  weighted_io_time = 0;
++}
++
++SystemDiskInfo::SystemDiskInfo(const SystemDiskInfo&) = default;
++
++SystemDiskInfo& SystemDiskInfo::operator=(const SystemDiskInfo&) = default;
++
++Value::Dict SystemDiskInfo::ToDict() const {
++  Value::Dict res;
++
++  // Write out uint64_t variables as doubles.
++  // Note: this may discard some precision, but for JS there's no other option.
++  res.Set("reads", static_cast<double>(reads));
++  res.Set("reads_merged", static_cast<double>(reads_merged));
++  res.Set("sectors_read", static_cast<double>(sectors_read));
++  res.Set("read_time", static_cast<double>(read_time));
++  res.Set("writes", static_cast<double>(writes));
++  res.Set("writes_merged", static_cast<double>(writes_merged));
++  res.Set("sectors_written", static_cast<double>(sectors_written));
++  res.Set("write_time", static_cast<double>(write_time));
++  res.Set("io", static_cast<double>(io));
++  res.Set("io_time", static_cast<double>(io_time));
++  res.Set("weighted_io_time", static_cast<double>(weighted_io_time));
++
++  NOTIMPLEMENTED();
++
++  return res;
++}
++
++}  // namespace base
diff --git a/chromium-wip/patches/patch-base_process_process__metrics__openbsd.cc b/chromium-wip/patches/patch-base_process_process__metrics__openbsd.cc
new file mode 100644
index 0000000000..b3917b4248
--- /dev/null
+++ b/chromium-wip/patches/patch-base_process_process__metrics__openbsd.cc
@@ -0,0 +1,247 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/process/process_metrics_openbsd.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/process/process_metrics_openbsd.cc
+@@ -6,73 +6,85 @@
+ 
+ #include <stddef.h>
+ #include <stdint.h>
++#include <fcntl.h>
+ #include <sys/param.h>
+ #include <sys/sysctl.h>
++#include <sys/vmmeter.h>
++
++#include <kvm.h>
+ 
+ #include "base/memory/ptr_util.h"
+ #include "base/types/expected.h"
++#include "base/values.h"
++#include "base/notimplemented.h"
+ 
+ namespace base {
+ 
+-namespace {
++ProcessMetrics::ProcessMetrics(ProcessHandle process) : process_(process) {}
+ 
+-base::expected<int, ProcessCPUUsageError> GetProcessCPU(pid_t pid) {
++base::expected<ProcessMemoryInfo, ProcessUsageError>
++ProcessMetrics::GetMemoryInfo() const {
++  ProcessMemoryInfo memory_info;
+   struct kinfo_proc info;
+-  size_t length;
+-  int mib[] = {
+-      CTL_KERN, KERN_PROC, KERN_PROC_PID, pid, sizeof(struct kinfo_proc), 0};
++  size_t length = sizeof(struct kinfo_proc);
+ 
+-  if (sysctl(mib, std::size(mib), NULL, &length, NULL, 0) < 0) {
+-    return base::unexpected(ProcessCPUUsageError::kSystemError);
+-  }
++  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process_,
++                sizeof(struct kinfo_proc), 1 };
+ 
+-  mib[5] = (length / sizeof(struct kinfo_proc));
++  if (process_ == 0) {
++    return base::unexpected(ProcessUsageError::kSystemError);
++  }
+ 
+   if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) {
+-    return base::unexpected(ProcessCPUUsageError::kSystemError);
++    return base::unexpected(ProcessUsageError::kSystemError);
+   }
+ 
+-  return base::ok(info.p_pctcpu);
+-}
++  if (length == 0) {
++    return base::unexpected(ProcessUsageError::kProcessNotFound);
++  }
+ 
+-}  // namespace
++  memory_info.resident_set_bytes =
++    checked_cast<uint64_t>(info.p_vm_rssize * getpagesize());
+ 
+-// static
+-std::unique_ptr<ProcessMetrics> ProcessMetrics::CreateProcessMetrics(
+-    ProcessHandle process) {
+-  return WrapUnique(new ProcessMetrics(process));
++  return memory_info;
+ }
+ 
+-base::expected<double, ProcessCPUUsageError>
+-ProcessMetrics::GetPlatformIndependentCPUUsage() {
+-  TimeTicks time = TimeTicks::Now();
++base::expected<TimeDelta, ProcessCPUUsageError>
++ProcessMetrics::GetCumulativeCPUUsage() {
++  struct kinfo_proc info;
++  size_t length = sizeof(struct kinfo_proc);
++  struct timeval tv;
++
++  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process_,
++                sizeof(struct kinfo_proc), 1 };
+ 
+-  if (last_cpu_time_.is_zero()) {
+-    // First call, just set the last values.
+-    last_cpu_time_ = time;
+-    return base::ok(0.0);
++  if (process_ == 0) {
++    return base::unexpected(ProcessCPUUsageError::kSystemError);
+   }
+ 
+-  const base::expected<int, ProcessCPUUsageError> cpu = GetProcessCPU(process_);
+-  if (!cpu.has_value()) {
+-    return base::unexpected(cpu.error());
++  if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) {
++    return base::unexpected(ProcessCPUUsageError::kSystemError);
+   }
+ 
+-  last_cpu_time_ = time;
+-  return base::ok(double{cpu.value()} / FSCALE * 100.0);
+-}
++  if (length == 0) {
++    return base::unexpected(ProcessCPUUsageError::kProcessNotFound);
++  }
+ 
+-base::expected<TimeDelta, ProcessCPUUsageError>
+-ProcessMetrics::GetCumulativeCPUUsage() {
+-  NOTREACHED();
++  tv.tv_sec = info.p_rtime_sec;
++  tv.tv_usec = info.p_rtime_usec;
++
++  return base::ok(Microseconds(TimeValToMicroseconds(tv)));
+ }
+ 
+-ProcessMetrics::ProcessMetrics(ProcessHandle process)
+-    : process_(process), last_cpu_(0) {}
++// static
++std::unique_ptr<ProcessMetrics> ProcessMetrics::CreateProcessMetrics(
++    ProcessHandle process) {
++  return WrapUnique(new ProcessMetrics(process));
++}
+ 
+ size_t GetSystemCommitCharge() {
+   int mib[] = {CTL_VM, VM_METER};
+-  int pagesize;
++  size_t pagesize;
+   struct vmtotal vmtotal;
+   unsigned long mem_total, mem_free, mem_inactive;
+   size_t len = sizeof(vmtotal);
+@@ -85,9 +97,115 @@ size_t GetSystemCommitCharge() {
+   mem_free = vmtotal.t_free;
+   mem_inactive = vmtotal.t_vm - vmtotal.t_avm;
+ 
+-  pagesize = getpagesize();
++  pagesize = checked_cast<size_t>(getpagesize());
+ 
+   return mem_total - (mem_free * pagesize) - (mem_inactive * pagesize);
+ }
+ 
++int ProcessMetrics::GetOpenFdCount() const {
++  return (process_ == getpid()) ? getdtablecount() : -1;
++}
++
++int ProcessMetrics::GetOpenFdSoftLimit() const {
++  return getdtablesize();
++}
++
++bool ProcessMetrics::GetPageFaultCounts(PageFaultCounts* counts) const {
++  NOTIMPLEMENTED();
++  return false;
++}
++
++bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo) {
++  NOTIMPLEMENTED();
++  return false;
++}
++
++bool GetSystemDiskInfo(SystemDiskInfo* diskinfo) {
++  NOTIMPLEMENTED();
++  return false;
++}
++
++bool GetVmStatInfo(VmStatInfo* vmstat) {
++  NOTIMPLEMENTED();
++  return false;
++}
++
++int ProcessMetrics::GetIdleWakeupsPerSecond() {
++  NOTIMPLEMENTED();
++  return 0;
++}
++
++Value::Dict SystemMemoryInfoKB::ToDict() const {
++  Value::Dict res;
++  res.Set("total", total);
++  res.Set("free", free);
++  res.Set("available", available);
++  res.Set("buffers", buffers);
++  res.Set("cached", cached);
++  res.Set("active_anon", active_anon);
++  res.Set("inactive_anon", inactive_anon);
++  res.Set("active_file", active_file);
++  res.Set("inactive_file", inactive_file);
++  res.Set("swap_total", swap_total);
++  res.Set("swap_free", swap_free);
++  res.Set("swap_used", swap_total - swap_free);
++  res.Set("dirty", dirty);
++  res.Set("reclaimable", reclaimable);
++
++  NOTIMPLEMENTED();
++
++  return res;
++}
++
++Value::Dict VmStatInfo::ToDict() const {
++  Value::Dict res;
++  res.Set("pswpin", static_cast<int>(pswpin));
++  res.Set("pswpout", static_cast<int>(pswpout));
++  res.Set("pgmajfault", static_cast<int>(pgmajfault));
++
++  NOTIMPLEMENTED();
++
++  return res;
++}
++
++SystemDiskInfo::SystemDiskInfo() {
++  reads = 0;
++  reads_merged = 0;
++  sectors_read = 0;
++  read_time = 0;
++  writes = 0;
++  writes_merged = 0;
++  sectors_written = 0;
++  write_time = 0;
++  io = 0;
++  io_time = 0;
++  weighted_io_time = 0;
++}
++
++SystemDiskInfo::SystemDiskInfo(const SystemDiskInfo&) = default;
++
++SystemDiskInfo& SystemDiskInfo::operator=(const SystemDiskInfo&) = default;
++
++Value::Dict SystemDiskInfo::ToDict() const {
++  Value::Dict res;
++
++  // Write out uint64_t variables as doubles.
++  // Note: this may discard some precision, but for JS there's no other option.
++  res.Set("reads", static_cast<double>(reads));
++  res.Set("reads_merged", static_cast<double>(reads_merged));
++  res.Set("sectors_read", static_cast<double>(sectors_read));
++  res.Set("read_time", static_cast<double>(read_time));
++  res.Set("writes", static_cast<double>(writes));
++  res.Set("writes_merged", static_cast<double>(writes_merged));
++  res.Set("sectors_written", static_cast<double>(sectors_written));
++  res.Set("write_time", static_cast<double>(write_time));
++  res.Set("io", static_cast<double>(io));
++  res.Set("io_time", static_cast<double>(io_time));
++  res.Set("weighted_io_time", static_cast<double>(weighted_io_time));
++
++  NOTIMPLEMENTED();
++
++  return res;
++}
++
+ }  // namespace base
diff --git a/chromium-wip/patches/patch-base_process_process__metrics__posix.cc b/chromium-wip/patches/patch-base_process_process__metrics__posix.cc
new file mode 100644
index 0000000000..07069b8ff8
--- /dev/null
+++ b/chromium-wip/patches/patch-base_process_process__metrics__posix.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/process/process_metrics_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/process/process_metrics_posix.cc
+@@ -21,6 +21,8 @@
+ 
+ #if BUILDFLAG(IS_APPLE)
+ #include <malloc/malloc.h>
++#elif BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_NETBSD)
++#include <stdlib.h>
+ #else
+ #include <malloc.h>
+ #endif
+@@ -136,7 +138,7 @@ size_t ProcessMetrics::GetMallocUsage() 
+   return stats.size_in_use;
+ #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
+   return GetMallocUsageMallinfo();
+-#elif BUILDFLAG(IS_FUCHSIA)
++#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   // TODO(fuchsia): Not currently exposed. https://crbug.com/735087.
+   return 0;
+ #endif
diff --git a/chromium-wip/patches/patch-base_process_process__metrics__unittest.cc b/chromium-wip/patches/patch-base_process_process__metrics__unittest.cc
new file mode 100644
index 0000000000..11e2a639d5
--- /dev/null
+++ b/chromium-wip/patches/patch-base_process_process__metrics__unittest.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/process/process_metrics_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/process/process_metrics_unittest.cc
+@@ -61,7 +61,8 @@
+ #endif
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_APPLE)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_APPLE) || \
++    BUILDFLAG(IS_BSD)
+ #define ENABLE_CPU_TESTS 1
+ #else
+ #define ENABLE_CPU_TESTS 0
diff --git a/chromium-wip/patches/patch-base_process_process__posix.cc b/chromium-wip/patches/patch-base_process_process__posix.cc
new file mode 100644
index 0000000000..59fc932327
--- /dev/null
+++ b/chromium-wip/patches/patch-base_process_process__posix.cc
@@ -0,0 +1,100 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/process/process_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/process/process_posix.cc
+@@ -25,10 +25,15 @@
+ #include "base/trace_event/trace_event.h"
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ #include <sys/event.h>
+ #endif
+ 
++#if BUILDFLAG(IS_BSD)
++#include <sys/types.h>
++#include <sys/sysctl.h> 
++#endif
++
+ #if BUILDFLAG(CLANG_PROFILING)
+ #include "base/test/clang_profiling.h"
+ #endif
+@@ -104,7 +109,7 @@ bool WaitpidWithTimeout(base::ProcessHan
+ }
+ #endif
+ 
+-#if BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ // Using kqueue on Mac so that we can wait on non-child processes.
+ // We can't use kqueues on child processes because we need to reap
+ // our own children using wait.
+@@ -387,7 +392,7 @@ bool Process::WaitForExitWithTimeoutImpl
+   const bool exited = (parent_pid < 0);
+ 
+   if (!exited && parent_pid != our_pid) {
+-#if BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+     // On Mac we can wait on non child processes.
+     return WaitForSingleNonChildProcess(handle, timeout);
+ #else
+@@ -424,7 +429,56 @@ void Process::Exited(int exit_code) cons
+ 
+ int Process::GetOSPriority() const {
+   DCHECK(IsValid());
++// avoid pledge(2) violation
++#if BUILDFLAG(IS_BSD)
++  return 0;
++#else
+   return getpriority(PRIO_PROCESS, static_cast<id_t>(process_));
++#endif
++}
++
++Time Process::CreationTime() const {
++// avoid ps pledge in the network process
++#if !BUILDFLAG(IS_BSD)
++  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid(),
++               sizeof(struct kinfo_proc), 0 };
++  struct kinfo_proc *info = nullptr;
++  size_t info_size;
++#endif
++  Time ct = Time();
++
++#if !BUILDFLAG(IS_BSD)
++  if (sysctl(mib, std::size(mib), NULL, &info_size, NULL, 0) < 0)
++    goto out;
++
++  mib[5] = (info_size / sizeof(struct kinfo_proc));
++  if ((info = reinterpret_cast<kinfo_proc*>(malloc(info_size))) == NULL)
++    goto out;
++
++  if (sysctl(mib, std::size(mib), info, &info_size, NULL, 0) < 0)
++    goto out;
++
++  ct = Time::FromTimeT(info->p_ustart_sec);
++
++out:
++  if (info)
++    free(info);
++#endif
++  return ct;
++}
++
++#if BUILDFLAG(IS_BSD)
++Process::Priority Process::GetPriority() const {
++  return Priority::kUserBlocking;
+ }
+ 
++bool Process::SetPriority(Priority priority) {
++  return false;
++}
++
++bool Process::CanSetPriority() {
++  return false;
++}
++#endif
++
+ }  // namespace base
diff --git a/chromium-wip/patches/patch-base_process_process__unittest.cc b/chromium-wip/patches/patch-base_process_process__unittest.cc
new file mode 100644
index 0000000000..0d29f87d52
--- /dev/null
+++ b/chromium-wip/patches/patch-base_process_process__unittest.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/process/process_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/process/process_unittest.cc
+@@ -202,7 +202,7 @@ TEST_F(ProcessTest, CreationTimeOtherPro
+   // was spawned and a time recorded after it was spawned. However, since the
+   // base::Time and process creation clocks don't match, tolerate some error.
+   constexpr base::TimeDelta kTolerance =
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       // On Linux, process creation time is relative to boot time which has a
+       // 1-second resolution. Tolerate 1 second for the imprecise boot time and
+       // 100 ms for the imprecise clock.
diff --git a/chromium-wip/patches/patch-base_profiler_module__cache.cc b/chromium-wip/patches/patch-base_profiler_module__cache.cc
new file mode 100644
index 0000000000..8b653b7d49
--- /dev/null
+++ b/chromium-wip/patches/patch-base_profiler_module__cache.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/profiler/module_cache.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/profiler/module_cache.cc
+@@ -38,7 +38,7 @@ std::string TransformModuleIDToSymbolSer
+   // Android and Linux Chrome builds use the "breakpad" format to index their
+   // build id, so we transform the build id for these platforms. All other
+   // platforms keep their symbols indexed by the original build ID.
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Linux ELF module IDs are 160bit integers, which we need to mangle
+   // down to 128bit integers to match the id that Breakpad outputs.
+   // Example on version '66.0.3359.170' x64:
diff --git a/chromium-wip/patches/patch-base_profiler_sampling__profiler__thread__token.cc b/chromium-wip/patches/patch-base_profiler_sampling__profiler__thread__token.cc
new file mode 100644
index 0000000000..d79091705b
--- /dev/null
+++ b/chromium-wip/patches/patch-base_profiler_sampling__profiler__thread__token.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/profiler/sampling_profiler_thread_token.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/profiler/sampling_profiler_thread_token.cc
+@@ -6,7 +6,7 @@
+ 
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include <pthread.h>
+ 
+ #include "base/profiler/stack_base_address_posix.h"
+@@ -18,7 +18,7 @@ SamplingProfilerThreadToken GetSamplingP
+   PlatformThreadId id = PlatformThread::CurrentId();
+ #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE)
+   return {id, pthread_self()};
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   std::optional<uintptr_t> maybe_stack_base =
+       GetThreadStackBaseAddress(id, pthread_self());
+   return {id, maybe_stack_base};
diff --git a/chromium-wip/patches/patch-base_profiler_sampling__profiler__thread__token.h b/chromium-wip/patches/patch-base_profiler_sampling__profiler__thread__token.h
new file mode 100644
index 0000000000..04d66106df
--- /dev/null
+++ b/chromium-wip/patches/patch-base_profiler_sampling__profiler__thread__token.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/profiler/sampling_profiler_thread_token.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/profiler/sampling_profiler_thread_token.h
+@@ -13,7 +13,7 @@
+ 
+ #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE)
+ #include <pthread.h>
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include <stdint.h>
+ #endif
+ 
+@@ -27,7 +27,7 @@ struct SamplingProfilerThreadToken {
+   PlatformThreadId id;
+ #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE)
+   pthread_t pthread_id;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Due to the sandbox, we can only retrieve the stack base address for the
+   // current thread. We must grab it during
+   // GetSamplingProfilerCurrentThreadToken() and not try to get it later.
diff --git a/chromium-wip/patches/patch-base_profiler_stack__base__address__posix.cc b/chromium-wip/patches/patch-base_profiler_stack__base__address__posix.cc
new file mode 100644
index 0000000000..af7130dfe4
--- /dev/null
+++ b/chromium-wip/patches/patch-base_profiler_stack__base__address__posix.cc
@@ -0,0 +1,69 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/profiler/stack_base_address_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/profiler/stack_base_address_posix.cc
+@@ -18,6 +18,14 @@
+ #include "base/files/scoped_file.h"
+ #endif
+ 
++#if BUILDFLAG(IS_BSD)
++#if BUILDFLAG(IS_NETBSD)
++#include <pthread.h>
++#else
++#include <pthread_np.h>
++#endif
++#endif
++
+ #if BUILDFLAG(IS_CHROMEOS)
+ extern "C" void* __libc_stack_end;
+ #endif
+@@ -49,7 +57,21 @@ std::optional<uintptr_t> GetAndroidMainT
+ 
+ #if !BUILDFLAG(IS_LINUX)
+ uintptr_t GetThreadStackBaseAddressImpl(pthread_t pthread_id) {
++#if BUILDFLAG(IS_OPENBSD)
++  stack_t ss;
++  void *address;
++  size_t size;
++  if (pthread_stackseg_np(pthread_id, &ss) != 0)
++    return 0;
++  size = ss.ss_size;
++  address = (void*)((size_t) ss.ss_sp - ss.ss_size);
++#else
+   pthread_attr_t attr;
++#if BUILDFLAG(IS_FREEBSD)
++  int result;
++  pthread_attr_init(&attr);
++  pthread_attr_get_np(pthread_id, &attr);
++#else
+   // pthread_getattr_np will crash on ChromeOS & Linux if we are in the sandbox
+   // and pthread_id refers to a different thread, due to the use of
+   // sched_getaffinity().
+@@ -62,12 +84,14 @@ uintptr_t GetThreadStackBaseAddressImpl(
+                       << logging::SystemErrorCodeToString(result);
+   // See crbug.com/617730 for limitations of this approach on Linux-like
+   // systems.
++#endif
+   void* address;
+   size_t size;
+   result = pthread_attr_getstack(&attr, &address, &size);
+   CHECK_EQ(result, 0) << "pthread_attr_getstack returned "
+                       << logging::SystemErrorCodeToString(result);
+   pthread_attr_destroy(&attr);
++#endif
+   const uintptr_t base_address = reinterpret_cast<uintptr_t>(address) + size;
+   return base_address;
+ }
+@@ -84,7 +108,7 @@ std::optional<uintptr_t> GetThreadStackB
+   // trying to work around the problem.
+   return std::nullopt;
+ #else
+-  const bool is_main_thread = id.raw() == GetCurrentProcId();
++  const bool is_main_thread = id.raw() == (checked_cast<uint64_t>(GetCurrentProcId()));
+   if (is_main_thread) {
+ #if BUILDFLAG(IS_ANDROID)
+     // The implementation of pthread_getattr_np() in Bionic reads proc/self/maps
diff --git a/chromium-wip/patches/patch-base_profiler_stack__sampling__profiler__test__util.cc b/chromium-wip/patches/patch-base_profiler_stack__sampling__profiler__test__util.cc
new file mode 100644
index 0000000000..59af27fa79
--- /dev/null
+++ b/chromium-wip/patches/patch-base_profiler_stack__sampling__profiler__test__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/profiler/stack_sampling_profiler_test_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/profiler/stack_sampling_profiler_test_util.cc
+@@ -50,7 +50,7 @@
+ // Fortunately, it provides _alloca, which functions identically.
+ #include <malloc.h>
+ #define alloca _alloca
+-#else
++#elif !BUILDFLAG(IS_BSD)
+ #include <alloca.h>
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-base_profiler_stack__sampling__profiler__unittest.cc b/chromium-wip/patches/patch-base_profiler_stack__sampling__profiler__unittest.cc
new file mode 100644
index 0000000000..85e56f1267
--- /dev/null
+++ b/chromium-wip/patches/patch-base_profiler_stack__sampling__profiler__unittest.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/profiler/stack_sampling_profiler_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/profiler/stack_sampling_profiler_unittest.cc
+@@ -47,7 +47,7 @@
+ 
+ #include <intrin.h>
+ #include <malloc.h>
+-#else
++#elif !BUILDFLAG(IS_BSD)
+ #include <alloca.h>
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-base_profiler_thread__delegate__posix.cc b/chromium-wip/patches/patch-base_profiler_thread__delegate__posix.cc
new file mode 100644
index 0000000000..c36b912368
--- /dev/null
+++ b/chromium-wip/patches/patch-base_profiler_thread__delegate__posix.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/profiler/thread_delegate_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/profiler/thread_delegate_posix.cc
+@@ -15,7 +15,7 @@
+ #include "base/process/process_handle.h"
+ #include "build/build_config.h"
+ 
+-#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
++#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))
+ #include "base/profiler/stack_base_address_posix.h"
+ #endif
+ 
+@@ -24,7 +24,7 @@ namespace base {
+ std::unique_ptr<ThreadDelegatePosix> ThreadDelegatePosix::Create(
+     SamplingProfilerThreadToken thread_token) {
+   std::optional<uintptr_t> base_address;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   base_address = thread_token.stack_base_address;
+ #else
+   base_address =
diff --git a/chromium-wip/patches/patch-base_rand__util.h b/chromium-wip/patches/patch-base_rand__util.h
new file mode 100644
index 0000000000..3358fbe2a4
--- /dev/null
+++ b/chromium-wip/patches/patch-base_rand__util.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/rand_util.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/rand_util.h
+@@ -210,7 +210,7 @@ void RandomShuffle(Itr first, Itr last) 
+   std::shuffle(first, last, RandomBitGenerator());
+ }
+ 
+-#if BUILDFLAG(IS_POSIX)
++#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_BSD)
+ BASE_EXPORT int GetUrandomFD();
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-base_rand__util__posix.cc b/chromium-wip/patches/patch-base_rand__util__posix.cc
new file mode 100644
index 0000000000..3891942812
--- /dev/null
+++ b/chromium-wip/patches/patch-base_rand__util__posix.cc
@@ -0,0 +1,66 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/rand_util_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/rand_util_posix.cc
+@@ -30,7 +30,7 @@
+ #include "build/build_config.h"
+ #include "third_party/boringssl/src/include/openssl/rand.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD)
+ #include "third_party/lss/linux_syscall_support.h"
+ #elif BUILDFLAG(IS_MAC)
+ // TODO(crbug.com/40641285): Waiting for this header to appear in the iOS SDK.
+@@ -42,6 +42,7 @@ namespace base {
+ 
+ namespace {
+ 
++#if !BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(IS_AIX)
+ // AIX has no 64-bit support for O_CLOEXEC.
+ static constexpr int kOpenFlags = O_RDONLY;
+@@ -66,8 +67,9 @@ class URandomFd {
+  private:
+   const int fd_;
+ };
++#endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)) && !BUILDFLAG(IS_BSD)
+ 
+ bool KernelSupportsGetRandom() {
+   return base::SysInfo::KernelVersionNumber::Current() >=
+@@ -122,6 +124,7 @@ bool UseBoringSSLForRandBytes() {
+ namespace {
+ 
+ void RandBytesInternal(span<uint8_t> output, bool avoid_allocation) {
++#if !BUILDFLAG(IS_BSD)
+   // The BoringSSL experiment takes priority over everything else.
+   if (!avoid_allocation && internal::UseBoringSSLForRandBytes()) {
+     // BoringSSL's RAND_bytes always returns 1. Any error aborts the program.
+@@ -152,6 +155,9 @@ void RandBytesInternal(span<uint8_t> out
+   const int urandom_fd = GetUrandomFD();
+   const bool success = ReadFromFD(urandom_fd, as_writable_chars(output));
+   CHECK(success);
++#else
++  arc4random_buf(output.data(), output.size());
++#endif
+ }
+ 
+ }  // namespace
+@@ -171,9 +177,11 @@ void RandBytes(span<uint8_t> output) {
+   RandBytesInternal(output, /*avoid_allocation=*/false);
+ }
+ 
++#if !BUILDFLAG(IS_BSD)
+ int GetUrandomFD() {
+   static NoDestructor<URandomFd> urandom_fd;
+   return urandom_fd->fd();
+ }
++#endif
+ 
+ }  // namespace base
diff --git a/chromium-wip/patches/patch-base_strings_safe__sprintf__unittest.cc b/chromium-wip/patches/patch-base_strings_safe__sprintf__unittest.cc
new file mode 100644
index 0000000000..27c09d10df
--- /dev/null
+++ b/chromium-wip/patches/patch-base_strings_safe__sprintf__unittest.cc
@@ -0,0 +1,24 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/strings/safe_sprintf_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/strings/safe_sprintf_unittest.cc
+@@ -746,6 +746,7 @@ TEST(SafeSPrintfTest, EmbeddedNul) {
+ #endif
+ }
+ 
++#if !BUILDFLAG(IS_BSD)
+ TEST(SafeSPrintfTest, EmitNULL) {
+   char buf[40];
+ #if defined(__GNUC__)
+@@ -762,6 +763,7 @@ TEST(SafeSPrintfTest, EmitNULL) {
+ #pragma GCC diagnostic pop
+ #endif
+ }
++#endif
+ 
+ TEST(SafeSPrintfTest, PointerSize) {
+   // The internal data representation is a 64bit value, independent of the
diff --git a/chromium-wip/patches/patch-base_synchronization_cancelable__event.h b/chromium-wip/patches/patch-base_synchronization_cancelable__event.h
new file mode 100644
index 0000000000..9ff7fa0efc
--- /dev/null
+++ b/chromium-wip/patches/patch-base_synchronization_cancelable__event.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/synchronization/cancelable_event.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/synchronization/cancelable_event.h
+@@ -11,7 +11,7 @@
+ 
+ #if BUILDFLAG(IS_WIN)
+ #include <windows.h>
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include <semaphore.h>
+ #else
+ #include "base/synchronization/waitable_event.h"
+@@ -49,7 +49,7 @@ class BASE_EXPORT CancelableEvent {
+ 
+ #if BUILDFLAG(IS_WIN)
+   using NativeHandle = HANDLE;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   using NativeHandle = sem_t;
+ #else
+   using NativeHandle = WaitableEvent;
diff --git a/chromium-wip/patches/patch-base_synchronization_lock__impl.h b/chromium-wip/patches/patch-base_synchronization_lock__impl.h
new file mode 100644
index 0000000000..c48a11a3d2
--- /dev/null
+++ b/chromium-wip/patches/patch-base_synchronization_lock__impl.h
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/synchronization/lock_impl.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/synchronization/lock_impl.h
+@@ -110,6 +110,10 @@ void LockImpl::Unlock() {
+ }
+ 
+ #elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_FREEBSD)
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wthread-safety-analysis"
++#endif
+ 
+ #if DCHECK_IS_ON()
+ BASE_EXPORT void dcheck_trylock_result(int rv);
+@@ -130,6 +134,9 @@ void LockImpl::Unlock() {
+   dcheck_unlock_result(rv);
+ #endif
+ }
++#if BUILDFLAG(IS_FREEBSD)
++#pragma GCC diagnostic pop
++#endif
+ #endif
+ 
+ // This is an implementation used for AutoLock templated on the lock type.
diff --git a/chromium-wip/patches/patch-base_syslog__logging.cc b/chromium-wip/patches/patch-base_syslog__logging.cc
new file mode 100644
index 0000000000..3ee9f3466d
--- /dev/null
+++ b/chromium-wip/patches/patch-base_syslog__logging.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/syslog_logging.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/syslog_logging.cc
+@@ -17,7 +17,7 @@
+ #include "base/strings/string_util.h"
+ #include "base/win/scoped_handle.h"
+ #include "base/win/win_util.h"
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // <syslog.h> defines LOG_INFO, LOG_WARNING macros that could conflict with
+ // base::LOG_INFO, base::LOG_WARNING.
+ #include <syslog.h>
+@@ -151,7 +151,7 @@ EventLogMessage::~EventLogMessage() {
+   if (user_sid != nullptr) {
+     ::LocalFree(user_sid);
+   }
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   const char kEventSource[] = "chrome";
+   openlog(kEventSource, LOG_NOWAIT | LOG_PID, LOG_USER);
+   // We can't use the defined names for the logging severity from syslog.h
diff --git a/chromium-wip/patches/patch-base_system_sys__info.cc b/chromium-wip/patches/patch-base_system_sys__info.cc
new file mode 100644
index 0000000000..bc532c703d
--- /dev/null
+++ b/chromium-wip/patches/patch-base_system_sys__info.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/system/sys_info.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/system/sys_info.cc
+@@ -224,7 +224,7 @@ std::string SysInfo::SocManufacturer() {
+ #endif
+ 
+ void SysInfo::GetHardwareInfo(base::OnceCallback<void(HardwareInfo)> callback) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   constexpr base::TaskTraits kTraits = {base::MayBlock()};
+ #else
+   constexpr base::TaskTraits kTraits = {};
diff --git a/chromium-wip/patches/patch-base_system_sys__info.h b/chromium-wip/patches/patch-base_system_sys__info.h
new file mode 100644
index 0000000000..02487a8c8d
--- /dev/null
+++ b/chromium-wip/patches/patch-base_system_sys__info.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/system/sys_info.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/system/sys_info.h
+@@ -360,6 +360,8 @@ class BASE_EXPORT SysInfo {
+   static void ResetCpuSecurityMitigationsEnabledForTesting();
+ #endif
+ 
++  static uint64_t MaxSharedMemorySize();
++
+  private:
+   friend class test::ScopedAmountOfPhysicalMemoryOverride;
+   FRIEND_TEST_ALL_PREFIXES(SysInfoTest, AmountOfAvailablePhysicalMemory);
+@@ -372,7 +374,7 @@ class BASE_EXPORT SysInfo {
+   static HardwareInfo GetHardwareInfoSync();
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_AIX)
++    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+   static uint64_t AmountOfAvailablePhysicalMemory(
+       const SystemMemoryInfoKB& meminfo);
+ #endif
diff --git a/chromium-wip/patches/patch-base_system_sys__info__freebsd.cc b/chromium-wip/patches/patch-base_system_sys__info__freebsd.cc
new file mode 100644
index 0000000000..2da05d27c8
--- /dev/null
+++ b/chromium-wip/patches/patch-base_system_sys__info__freebsd.cc
@@ -0,0 +1,118 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/system/sys_info_freebsd.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/system/sys_info_freebsd.cc
+@@ -9,28 +9,103 @@
+ #include <sys/sysctl.h>
+ 
+ #include "base/notreached.h"
++#include "base/process/process_metrics.h"
++#include "base/strings/string_util.h"
+ 
+ namespace base {
+ 
+-int64_t SysInfo::AmountOfPhysicalMemoryImpl() {
+-  int pages, page_size;
++int SysInfo::NumberOfProcessors() {
++  int mib[] = {CTL_HW, HW_NCPU};
++  int ncpu;
++  size_t size = sizeof(ncpu);
++  if (sysctl(mib, std::size(mib), &ncpu, &size, NULL, 0) < 0) {
++    NOTREACHED();
++    return 1;
++  }
++  return ncpu;
++}
++  
++uint64_t SysInfo::AmountOfPhysicalMemoryImpl() {
++  int pages, page_size, r = 0;
+   size_t size = sizeof(pages);
+-  sysctlbyname("vm.stats.vm.v_page_count", &pages, &size, NULL, 0);
+-  sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0);
+-  if (pages == -1 || page_size == -1) {
++
++  if (r == 0)
++    r = sysctlbyname("vm.stats.vm.v_page_count", &pages, &size, NULL, 0);
++  if (r == 0)   
++    r = sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0);
++
++  if (r == -1) {
++    NOTREACHED();
++  }
++
++  return static_cast<uint64_t>(pages) * page_size;
++}
++
++uint64_t SysInfo::AmountOfAvailablePhysicalMemoryImpl() {
++  int page_size, r = 0;
++  unsigned int pgfree, pginact, pgcache;
++  size_t size = sizeof(page_size);
++  size_t szpg = sizeof(pgfree);
++ 
++  if (r == 0)
++    r = sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0);
++  if (r == 0)
++    r = sysctlbyname("vm.stats.vm.v_free_count", &pgfree, &szpg, NULL, 0);
++  if (r == 0)
++    r = sysctlbyname("vm.stats.vm.v_inactive_count", &pginact, &szpg, NULL, 0);
++  if (r == 0)
++    r = sysctlbyname("vm.stats.vm.v_cache_count", &pgcache, &szpg, NULL, 0);
++
++  if (r == -1) {
+     NOTREACHED();
++    return 0;
+   }
+-  return static_cast<int64_t>(pages) * page_size;
++
++  return static_cast<uint64_t>((pgfree + pginact + pgcache) * page_size);
++}
++
++// static
++uint64_t SysInfo::AmountOfAvailablePhysicalMemory(const SystemMemoryInfoKB& info) {
++  uint64_t res_kb = info.available != 0
++                       ? info.available - info.active_file
++                       : info.free + info.reclaimable + info.inactive_file;
++  return res_kb * 1024;
++}
++
++// static
++std::string SysInfo::CPUModelName() {
++  int mib[] = { CTL_HW, HW_MODEL };
++  char name[256];
++  size_t size = std::size(name);
++
++  if (sysctl(mib, std::size(mib), &name, &size, NULL, 0) == 0) {
++    return name;
++  }
++
++  return std::string();
+ }
+ 
+ // static
+ uint64_t SysInfo::MaxSharedMemorySize() {
+   size_t limit;
+   size_t size = sizeof(limit);
++
+   if (sysctlbyname("kern.ipc.shmmax", &limit, &size, NULL, 0) < 0) {
+     NOTREACHED();
+   }
+   return static_cast<uint64_t>(limit);
+ }
+ 
++SysInfo::HardwareInfo SysInfo::GetHardwareInfoSync() {
++  HardwareInfo info;
++
++  info.manufacturer = "FreeBSD";
++  info.model = HardwareModelName();
++
++  DCHECK(IsStringUTF8(info.manufacturer));
++  DCHECK(IsStringUTF8(info.model));
++
++  return info;
++}
++
+ }  // namespace base
diff --git a/chromium-wip/patches/patch-base_system_sys__info__netbsd.cc b/chromium-wip/patches/patch-base_system_sys__info__netbsd.cc
new file mode 100644
index 0000000000..8293a24805
--- /dev/null
+++ b/chromium-wip/patches/patch-base_system_sys__info__netbsd.cc
@@ -0,0 +1,107 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/system/sys_info_netbsd.cc.orig	2025-08-12 17:48:59.368419557 +0000
++++ base/system/sys_info_netbsd.cc
+@@ -0,0 +1,98 @@
++// Copyright 2011 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#include "base/system/sys_info.h"
++
++#include <stddef.h>
++#include <stdint.h>
++#include <sys/param.h>
++#include <sys/shm.h>
++#include <sys/sysctl.h>
++#include <uvm/uvm_extern.h>
++
++#include "base/notreached.h"
++#include "base/posix/sysctl.h"
++#include "base/strings/string_util.h"
++
++namespace {
++
++uint64_t AmountOfMemory(int pages_name) {
++  long pages = sysconf(pages_name);
++  long page_size = sysconf(_SC_PAGESIZE);
++  if (pages < 0 || page_size < 0) {
++    return 0;
++  }
++  return static_cast<uint64_t>(pages) * static_cast<uint64_t>(page_size);
++}
++
++}  // namespace
++
++namespace base {
++
++// static
++int SysInfo::NumberOfProcessors() {
++  int mib[] = {CTL_HW, HW_NCPU};
++  int ncpu;
++  size_t size = sizeof(ncpu);
++  if (sysctl(mib, std::size(mib), &ncpu, &size, NULL, 0) < 0) {
++    NOTREACHED();
++  }
++  return ncpu;
++}
++
++// static
++uint64_t SysInfo::AmountOfPhysicalMemoryImpl() {
++  return AmountOfMemory(_SC_PHYS_PAGES);
++}
++
++// static
++uint64_t SysInfo::AmountOfAvailablePhysicalMemoryImpl() {
++  // With NetBSD-11
++  //return AmountOfMemory(_SC_AVPHYS_PAGES);
++  struct uvmexp_sysctl uvmexp;
++  size_t len = sizeof(uvmexp);
++  int mib[] = { CTL_VM, VM_UVMEXP2 };
++  if (sysctl(mib, std::size(mib), &uvmexp, &len, NULL, 0) <0) {
++    NOTREACHED();
++  }
++  return static_cast<uint64_t>(uvmexp.free);
++}
++
++// static
++uint64_t SysInfo::MaxSharedMemorySize() {
++  int mib[] = {CTL_KERN, KERN_SYSVIPC, KERN_SYSVIPC_SHMMAX};
++  size_t limit;
++  size_t size = sizeof(limit);
++  if (sysctl(mib, std::size(mib), &limit, &size, NULL, 0) < 0) {
++    NOTREACHED();
++  }
++  return static_cast<uint64_t>(limit);
++}
++
++// static
++std::string SysInfo::CPUModelName() {
++  int mib[] = { CTL_HW, HW_MODEL };
++  char name[256];
++  size_t size = std::size(name);
++
++  if (sysctl(mib, std::size(mib), &name, &size, NULL, 0) == 0) {
++    return name;
++  }
++
++  return std::string();
++}
++
++// static
++SysInfo::HardwareInfo SysInfo::GetHardwareInfoSync() {
++  HardwareInfo info;
++  // Set the manufacturer to "NetBSD" and the model to
++  // an empty string.
++  info.manufacturer = "NetBSD";
++  info.model = HardwareModelName();
++  DCHECK(IsStringUTF8(info.manufacturer));
++  DCHECK(IsStringUTF8(info.model));
++  return info;
++}
++
++}  // namespace base
diff --git a/chromium-wip/patches/patch-base_system_sys__info__openbsd.cc b/chromium-wip/patches/patch-base_system_sys__info__openbsd.cc
new file mode 100644
index 0000000000..4fbfc3117f
--- /dev/null
+++ b/chromium-wip/patches/patch-base_system_sys__info__openbsd.cc
@@ -0,0 +1,88 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/system/sys_info_openbsd.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/system/sys_info_openbsd.cc
+@@ -12,6 +12,7 @@
+ 
+ #include "base/notreached.h"
+ #include "base/posix/sysctl.h"
++#include "base/strings/string_util.h"
+ 
+ namespace {
+ 
+@@ -28,9 +29,14 @@ uint64_t AmountOfMemory(int pages_name) 
+ 
+ namespace base {
+ 
++// pledge(2)
++uint64_t aofpmem = 0;
++uint64_t shmmax = 0;
++char cpumodel[256];
++
+ // static
+ int SysInfo::NumberOfProcessors() {
+-  int mib[] = {CTL_HW, HW_NCPU};
++  int mib[] = {CTL_HW, HW_NCPUONLINE};
+   int ncpu;
+   size_t size = sizeof(ncpu);
+   if (sysctl(mib, std::size(mib), &ncpu, &size, NULL, 0) < 0) {
+@@ -41,7 +47,23 @@ int SysInfo::NumberOfProcessors() {
+ 
+ // static
+ uint64_t SysInfo::AmountOfPhysicalMemoryImpl() {
+-  return AmountOfMemory(_SC_PHYS_PAGES);
++  // pledge(2)
++  if (!aofpmem)
++    aofpmem = AmountOfMemory(_SC_PHYS_PAGES);
++  return aofpmem;
++}
++
++// static
++std::string SysInfo::CPUModelName() {
++  int mib[] = {CTL_HW, HW_MODEL};
++  size_t len = std::size(cpumodel);
++  
++  if (cpumodel[0] == '\0') {
++    if (sysctl(mib, std::size(mib), cpumodel, &len, NULL, 0) < 0)
++      return std::string();
++  }
++ 
++  return std::string(cpumodel, len - 1);
+ }
+ 
+ // static
+@@ -56,15 +78,27 @@ uint64_t SysInfo::MaxSharedMemorySize() 
+   int mib[] = {CTL_KERN, KERN_SHMINFO, KERN_SHMINFO_SHMMAX};
+   size_t limit;
+   size_t size = sizeof(limit);
++  // pledge(2)
++  if (shmmax)
++    goto out;
+   if (sysctl(mib, std::size(mib), &limit, &size, NULL, 0) < 0) {
+     NOTREACHED();
+   }
+-  return static_cast<uint64_t>(limit);
++  shmmax = static_cast<uint64_t>(limit);
++out:
++  return shmmax;
+ }
+ 
+ // static
+-std::string SysInfo::CPUModelName() {
+-  return StringSysctl({CTL_HW, HW_MODEL}).value();
++SysInfo::HardwareInfo SysInfo::GetHardwareInfoSync() {
++  HardwareInfo info;
++  // Set the manufacturer to "OpenBSD" and the model to
++  // an empty string.
++  info.manufacturer = "OpenBSD";
++  info.model = HardwareModelName();
++  DCHECK(IsStringUTF8(info.manufacturer));
++  DCHECK(IsStringUTF8(info.model));
++  return info;
+ }
+ 
+ }  // namespace base
diff --git a/chromium-wip/patches/patch-base_system_sys__info__posix.cc b/chromium-wip/patches/patch-base_system_sys__info__posix.cc
new file mode 100644
index 0000000000..9992fb2a98
--- /dev/null
+++ b/chromium-wip/patches/patch-base_system_sys__info__posix.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/system/sys_info_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/system/sys_info_posix.cc
+@@ -143,7 +143,7 @@ void GetKernelVersionNumbers(int32_t* ma
+ 
+ namespace base {
+ 
+-#if !BUILDFLAG(IS_OPENBSD)
++#if !BUILDFLAG(IS_BSD)
+ // static
+ int SysInfo::NumberOfProcessors() {
+ #if BUILDFLAG(IS_MAC)
+@@ -199,7 +199,7 @@ int SysInfo::NumberOfProcessors() {
+ 
+   return cached_num_cpus;
+ }
+-#endif  // !BUILDFLAG(IS_OPENBSD)
++#endif  // !BUILDFLAG(IS_BSD)
+ 
+ // static
+ uint64_t SysInfo::AmountOfVirtualMemory() {
+@@ -285,6 +285,8 @@ std::string SysInfo::OperatingSystemArch
+     arch = "x86";
+   } else if (arch == "amd64") {
+     arch = "x86_64";
++  } else if (arch == "arm64") {
++    arch = "aarch64";
+   } else if (std::string(info.sysname) == "AIX") {
+     arch = "ppc64";
+   }
diff --git a/chromium-wip/patches/patch-base_system_sys__info__unittest.cc b/chromium-wip/patches/patch-base_system_sys__info__unittest.cc
new file mode 100644
index 0000000000..a37b114f02
--- /dev/null
+++ b/chromium-wip/patches/patch-base_system_sys__info__unittest.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/system/sys_info_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/system/sys_info_unittest.cc
+@@ -265,12 +265,16 @@ TEST_F(SysInfoTest, GetHardwareInfo) {
+   EXPECT_TRUE(IsStringUTF8(hardware_info->model));
+   bool empty_result_expected =
+ #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || \
++    BUILDFLAG(IS_BSD)
+       false;
+ #else
+       true;
+ #endif
+   EXPECT_EQ(hardware_info->manufacturer.empty(), empty_result_expected);
++#if BUILDFLAG(IS_BSD)
++  empty_result_expected = true;
++#endif
+   EXPECT_EQ(hardware_info->model.empty(), empty_result_expected);
+ }
+ 
diff --git a/chromium-wip/patches/patch-base_task_thread__pool_environment__config__unittest.cc b/chromium-wip/patches/patch-base_task_thread__pool_environment__config__unittest.cc
new file mode 100644
index 0000000000..445976a6c0
--- /dev/null
+++ b/chromium-wip/patches/patch-base_task_thread__pool_environment__config__unittest.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/task/thread_pool/environment_config_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/task/thread_pool/environment_config_unittest.cc
+@@ -14,7 +14,7 @@ TEST(ThreadPoolEnvironmentConfig, CanUse
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE)
+   EXPECT_TRUE(CanUseBackgroundThreadTypeForWorkerThread());
+ #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_NACL)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_NACL) || BUILDFLAG(IS_BSD)
+   EXPECT_FALSE(CanUseBackgroundThreadTypeForWorkerThread());
+ #else
+ #error Platform doesn't match any block
+@@ -23,7 +23,7 @@ TEST(ThreadPoolEnvironmentConfig, CanUse
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_ANDROID)
+   EXPECT_TRUE(CanUseUtilityThreadTypeForWorkerThread());
+ #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_NACL)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_NACL) || BUILDFLAG(IS_BSD)
+   EXPECT_FALSE(CanUseUtilityThreadTypeForWorkerThread());
+ #else
+ #error Platform doesn't match any block
diff --git a/chromium-wip/patches/patch-base_test_launcher_test__launcher.cc b/chromium-wip/patches/patch-base_test_launcher_test__launcher.cc
new file mode 100644
index 0000000000..2b7720cb0c
--- /dev/null
+++ b/chromium-wip/patches/patch-base_test_launcher_test__launcher.cc
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/test/launcher/test_launcher.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/test/launcher/test_launcher.cc
+@@ -73,6 +73,7 @@
+ #include "testing/gtest/include/gtest/gtest.h"
+ 
+ #if BUILDFLAG(IS_POSIX)
++#include <signal.h>
+ #include <fcntl.h>
+ 
+ #include "base/files/file_descriptor_watcher_posix.h"
+@@ -1836,6 +1837,10 @@ bool TestLauncher::Init(CommandLine* com
+   results_tracker_.AddGlobalTag("OS_OPENBSD");
+ #endif
+ 
++#if BUILDFLAG(IS_NETBSD)
++  results_tracker_.AddGlobalTag("OS_NETBSD");
++#endif
++
+ #if BUILDFLAG(IS_POSIX)
+   results_tracker_.AddGlobalTag("OS_POSIX");
+ #endif
diff --git a/chromium-wip/patches/patch-base_test_test__file__util__linux.cc b/chromium-wip/patches/patch-base_test_test__file__util__linux.cc
new file mode 100644
index 0000000000..c02078ca1b
--- /dev/null
+++ b/chromium-wip/patches/patch-base_test_test__file__util__linux.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/test/test_file_util_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/test/test_file_util_linux.cc
+@@ -57,9 +57,11 @@ bool EvictFileFromSystemCache(const File
+   if (fdatasync(fd.get()) != 0) {
+     return false;
+   }
++#if !BUILDFLAG(IS_BSD)
+   if (posix_fadvise(fd.get(), 0, 0, POSIX_FADV_DONTNEED) != 0) {
+     return false;
+   }
++#endif
+   return true;
+ }
+ 
diff --git a/chromium-wip/patches/patch-base_test_test__file__util__posix.cc b/chromium-wip/patches/patch-base_test_test__file__util__posix.cc
new file mode 100644
index 0000000000..8d44061901
--- /dev/null
+++ b/chromium-wip/patches/patch-base_test_test__file__util__posix.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/test/test_file_util_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/test/test_file_util_posix.cc
+@@ -93,7 +93,7 @@ void SyncPageCacheToDisk() {
+ }
+ 
+ #if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_APPLE) && \
+-    !BUILDFLAG(IS_ANDROID)
++    !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD)
+ bool EvictFileFromSystemCache(const FilePath& file) {
+   // There doesn't seem to be a POSIX way to cool the disk cache.
+   NOTIMPLEMENTED();
diff --git a/chromium-wip/patches/patch-base_threading_platform__thread.h b/chromium-wip/patches/patch-base_threading_platform__thread.h
new file mode 100644
index 0000000000..3a2571d63e
--- /dev/null
+++ b/chromium-wip/patches/patch-base_threading_platform__thread.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/threading/platform_thread.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/threading/platform_thread.h
+@@ -55,6 +55,8 @@ class BASE_EXPORT PlatformThreadId {
+   using UnderlyingType = zx_koid_t;
+ #elif BUILDFLAG(IS_APPLE)
+   using UnderlyingType = uint64_t;
++#elif BUILDFLAG(IS_BSD)
++  using UnderlyingType = uint64_t;
+ #elif BUILDFLAG(IS_POSIX)
+   using UnderlyingType = pid_t;
+ #endif
diff --git a/chromium-wip/patches/patch-base_threading_platform__thread__bsd.cc b/chromium-wip/patches/patch-base_threading_platform__thread__bsd.cc
new file mode 100644
index 0000000000..21c5c05e69
--- /dev/null
+++ b/chromium-wip/patches/patch-base_threading_platform__thread__bsd.cc
@@ -0,0 +1,40 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/threading/platform_thread_bsd.cc.orig	2025-08-12 17:48:59.369723445 +0000
++++ base/threading/platform_thread_bsd.cc
+@@ -0,0 +1,31 @@
++// Copyright 2023 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++// Description: These are stubs for *BSD.
++
++#include "base/threading/platform_thread.h"
++
++namespace base {
++namespace internal {
++
++bool CanSetThreadTypeToRealtimeAudio() {
++  return false;
++}
++
++bool SetCurrentThreadTypeForPlatform(ThreadType thread_type,
++                                MessagePumpType pump_type_hint) {
++  return false;
++}
++
++std::optional<ThreadPriorityForTest>
++GetCurrentThreadPriorityForPlatformForTest() {
++  return std::nullopt;
++}
++}  // namespace internal
++
++// static
++void PlatformThreadBase::SetName(const std::string& name) {
++  SetNameCommon(name);
++}
++
++}  // namespace base
diff --git a/chromium-wip/patches/patch-base_threading_platform__thread__internal__posix.cc b/chromium-wip/patches/patch-base_threading_platform__thread__internal__posix.cc
new file mode 100644
index 0000000000..2706aea1fa
--- /dev/null
+++ b/chromium-wip/patches/patch-base_threading_platform__thread__internal__posix.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/threading/platform_thread_internal_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/threading/platform_thread_internal_posix.cc
+@@ -31,7 +31,7 @@ ThreadPriorityForTest NiceValueToThreadP
+ }
+ 
+ int GetCurrentThreadNiceValue() {
+-#if BUILDFLAG(IS_NACL)
++#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_BSD)
+   NOTIMPLEMENTED();
+   return 0;
+ #else
diff --git a/chromium-wip/patches/patch-base_threading_platform__thread__metrics.cc b/chromium-wip/patches/patch-base_threading_platform__thread__metrics.cc
new file mode 100644
index 0000000000..582c788e91
--- /dev/null
+++ b/chromium-wip/patches/patch-base_threading_platform__thread__metrics.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/threading/platform_thread_metrics.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/threading/platform_thread_metrics.cc
+@@ -26,7 +26,7 @@ PlatformThreadMetrics::CreateForCurrentT
+ }
+ 
+ #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ 
+ // static
+ std::unique_ptr<PlatformThreadMetrics>
diff --git a/chromium-wip/patches/patch-base_threading_platform__thread__metrics.h b/chromium-wip/patches/patch-base_threading_platform__thread__metrics.h
new file mode 100644
index 0000000000..f3becab9dd
--- /dev/null
+++ b/chromium-wip/patches/patch-base_threading_platform__thread__metrics.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/threading/platform_thread_metrics.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/threading/platform_thread_metrics.h
+@@ -51,7 +51,7 @@ class BASE_EXPORT PlatformThreadMetrics 
+       PlatformThreadHandle handle);
+ #endif
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || \
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) || \
+     BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
+   static std::unique_ptr<PlatformThreadMetrics> CreateFromId(
+       PlatformThreadId tid);
+@@ -93,7 +93,7 @@ class BASE_EXPORT PlatformThreadMetrics 
+ 
+   PlatformThreadHandle handle_;
+ #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   explicit PlatformThreadMetrics(PlatformThreadId tid) : tid_(tid) {}
+ 
+   PlatformThreadId tid_;
diff --git a/chromium-wip/patches/patch-base_threading_platform__thread__posix.cc b/chromium-wip/patches/patch-base_threading_platform__thread__posix.cc
new file mode 100644
index 0000000000..809c5e378e
--- /dev/null
+++ b/chromium-wip/patches/patch-base_threading_platform__thread__posix.cc
@@ -0,0 +1,59 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/threading/platform_thread_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/threading/platform_thread_posix.cc
+@@ -79,11 +79,11 @@ void* ThreadFunc(void* params) {
+       base::DisallowSingleton();
+     }
+ 
+-#if PA_BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
++#if PA_BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && !BUILDFLAG(IS_BSD)
+     partition_alloc::internal::StackTopRegistry::Get().NotifyThreadCreated();
+ #endif
+ 
+-#if !BUILDFLAG(IS_NACL)
++#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(IS_APPLE)
+     PlatformThread::SetCurrentThreadRealtimePeriodValue(
+         delegate->GetRealtimePeriod());
+@@ -272,6 +272,8 @@ PlatformThreadId PlatformThreadBase::Cur
+   return PlatformThreadId(reinterpret_cast<int32_t>(pthread_self()));
+ #elif BUILDFLAG(IS_POSIX) && BUILDFLAG(IS_AIX)
+   return PlatformThreadId(pthread_self());
++#elif BUILDFLAG(IS_BSD)
++  return PlatformThreadId(reinterpret_cast<uint64_t>(pthread_self()));
+ #elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_AIX)
+   return PlatformThreadId(reinterpret_cast<int64_t>(pthread_self()));
+ #endif
+@@ -365,7 +367,7 @@ void PlatformThreadBase::Detach(Platform
+ 
+ // static
+ bool PlatformThreadBase::CanChangeThreadType(ThreadType from, ThreadType to) {
+-#if BUILDFLAG(IS_NACL)
++#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_BSD)
+   return false;
+ #else
+   if (from >= to) {
+@@ -386,6 +388,9 @@ void SetCurrentThreadTypeImpl(ThreadType
+                               MessagePumpType pump_type_hint) {
+ #if BUILDFLAG(IS_NACL)
+   NOTIMPLEMENTED();
++// avoid pledge(2) violation
++#elif BUILDFLAG(IS_BSD)
++  NOTIMPLEMENTED();
+ #else
+   if (internal::SetCurrentThreadTypeForPlatform(thread_type, pump_type_hint)) {
+     return;
+@@ -409,7 +414,7 @@ void SetCurrentThreadTypeImpl(ThreadType
+ 
+ // static
+ ThreadPriorityForTest PlatformThreadBase::GetCurrentThreadPriorityForTest() {
+-#if BUILDFLAG(IS_NACL)
++#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_BSD)
+   NOTIMPLEMENTED();
+   return ThreadPriorityForTest::kNormal;
+ #else
diff --git a/chromium-wip/patches/patch-base_threading_platform__thread__unittest.cc b/chromium-wip/patches/patch-base_threading_platform__thread__unittest.cc
new file mode 100644
index 0000000000..b95af7eafd
--- /dev/null
+++ b/chromium-wip/patches/patch-base_threading_platform__thread__unittest.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/threading/platform_thread_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/threading/platform_thread_unittest.cc
+@@ -36,7 +36,7 @@
+ #include "base/time/time.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include <pthread.h>
+ #include <sys/syscall.h>
+ #include <sys/types.h>
+@@ -370,7 +370,7 @@ TEST(PlatformThreadTest,
+ // and hardcodes what we know. Please inform scheduler-dev%chromium.org@localhost if this
+ // proprerty changes for a given platform.
+ TEST(PlatformThreadTest, CanChangeThreadType) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // On Ubuntu, RLIMIT_NICE and RLIMIT_RTPRIO are 0 by default, so we won't be
+   // able to increase priority to any level unless we are root (euid == 0).
+   bool kCanIncreasePriority = false;
+@@ -618,12 +618,16 @@ INSTANTIATE_TEST_SUITE_P(
+ 
+ #endif  // BUILDFLAG(IS_APPLE)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ 
+ namespace {
+ 
+ bool IsTidCacheCorrect() {
++#if BUILDFLAG(IS_BSD)
++  return PlatformThread::CurrentId().raw() == reinterpret_cast<int64_t>(pthread_self());
++#else
+   return PlatformThread::CurrentId().raw() == syscall(__NR_gettid);
++#endif
+ }
+ 
+ void* CheckTidCacheCorrectWrapper(void*) {
diff --git a/chromium-wip/patches/patch-base_time_time__now__posix.cc b/chromium-wip/patches/patch-base_time_time__now__posix.cc
new file mode 100644
index 0000000000..8e4683b1d5
--- /dev/null
+++ b/chromium-wip/patches/patch-base_time_time__now__posix.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/time/time_now_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/time/time_now_posix.cc
+@@ -27,7 +27,7 @@
+ #endif
+ 
+ // NaCl doesn't support CLOCK_MONOTONIC_COARSE.
+-#if BUILDFLAG(IS_NACL)
++#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_BSD)
+ #define TIMETICKS_LOW_RESOLUTION_CLOCK CLOCK_MONOTONIC
+ #else
+ #define TIMETICKS_LOW_RESOLUTION_CLOCK CLOCK_MONOTONIC_COARSE
diff --git a/chromium-wip/patches/patch-base_trace__event_malloc__dump__provider.cc b/chromium-wip/patches/patch-base_trace__event_malloc__dump__provider.cc
new file mode 100644
index 0000000000..670118614e
--- /dev/null
+++ b/chromium-wip/patches/patch-base_trace__event_malloc__dump__provider.cc
@@ -0,0 +1,36 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/trace_event/malloc_dump_provider.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/trace_event/malloc_dump_provider.cc
+@@ -31,6 +31,8 @@
+ 
+ #if BUILDFLAG(IS_APPLE)
+ #include <malloc/malloc.h>
++#elif BUILDFLAG(IS_BSD)
++#include <stdlib.h>
+ #else
+ #include <malloc.h>
+ #endif
+@@ -180,7 +182,7 @@ void ReportAppleAllocStats(size_t* total
+ 
+ #if (PA_BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(IS_ANDROID)) || \
+     (!PA_BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && !BUILDFLAG(IS_WIN) &&    \
+-     !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_FUCHSIA))
++     !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_BSD))
+ void ReportMallinfoStats(ProcessMemoryDump* pmd,
+                          size_t* total_virtual_size,
+                          size_t* resident_size,
+@@ -383,6 +385,9 @@ bool MallocDumpProvider::OnMemoryDump(co
+                      &allocated_objects_count);
+ #elif BUILDFLAG(IS_FUCHSIA)
+ // TODO(fuchsia): Port, see https://crbug.com/706592.
++#elif BUILDFLAG(IS_BSD)
++  total_virtual_size = 0;
++  allocated_objects_size = 0;
+ #else
+   ReportMallinfoStats(/*pmd=*/nullptr, &total_virtual_size, &resident_size,
+                       &allocated_objects_size, &allocated_objects_count);
diff --git a/chromium-wip/patches/patch-base_trace__event_memory__dump__manager.cc b/chromium-wip/patches/patch-base_trace__event_memory__dump__manager.cc
new file mode 100644
index 0000000000..a23d275577
--- /dev/null
+++ b/chromium-wip/patches/patch-base_trace__event_memory__dump__manager.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/trace_event/memory_dump_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/trace_event/memory_dump_manager.cc
+@@ -78,7 +78,7 @@ const char* const MemoryDumpManager::kSy
+ #if defined(MALLOC_MEMORY_TRACING_SUPPORTED)
+     MallocDumpProvider::kAllocatedObjects;
+ #else
+-    nullptr;
++    "";
+ #endif
+ 
+ // static
diff --git a/chromium-wip/patches/patch-base_trace__event_process__memory__dump.cc b/chromium-wip/patches/patch-base_trace__event_process__memory__dump.cc
new file mode 100644
index 0000000000..f8cf5dcb51
--- /dev/null
+++ b/chromium-wip/patches/patch-base_trace__event_process__memory__dump.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/trace_event/process_memory_dump.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/trace_event/process_memory_dump.cc
+@@ -47,7 +47,7 @@
+ #include <Psapi.h>
+ #endif
+ 
+-#if BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ #include <tuple>
+ 
+ #include "base/notreached.h"
+@@ -119,7 +119,7 @@ std::optional<size_t> ProcessMemoryDump:
+ #if BUILDFLAG(IS_WIN)
+   auto vec =
+       base::HeapArray<PSAPI_WORKING_SET_EX_INFORMATION>::WithSize(max_vec_size);
+-#elif BUILDFLAG(IS_APPLE)
++#elif BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
+   auto vec = base::HeapArray<char>::WithSize(max_vec_size);
+ #elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
+   auto vec = base::HeapArray<unsigned char>::WithSize(max_vec_size);
+@@ -143,7 +143,7 @@ std::optional<size_t> ProcessMemoryDump:
+     for (size_t i = 0; i < page_count; i++) {
+       resident_page_count += vec[i].VirtualAttributes.Valid;
+     }
+-#elif BUILDFLAG(IS_FUCHSIA)
++#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+     // TODO(crbug.com/42050620): Implement counting resident bytes.
+     // For now, log and avoid unused variable warnings.
+     NOTIMPLEMENTED_LOG_ONCE();
diff --git a/chromium-wip/patches/patch-base_tracing_trace__time.cc b/chromium-wip/patches/patch-base_tracing_trace__time.cc
new file mode 100644
index 0000000000..90bfafb0b2
--- /dev/null
+++ b/chromium-wip/patches/patch-base_tracing_trace__time.cc
@@ -0,0 +1,28 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/tracing/trace_time.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/tracing/trace_time.cc
+@@ -8,12 +8,18 @@
+ #include "build/build_config.h"
+ #include "third_party/perfetto/include/perfetto/base/time.h"
+ 
++#if BUILDFLAG(IS_FREEBSD)
++#define CLOCK_BOOTTIME CLOCK_UPTIME
++#elif BUILDFLAG(IS_NETBSD)
++#define CLOCK_BOOTTIME CLOCK_MONOTONIC
++#endif
++
+ namespace base::tracing {
+ 
+ int64_t TraceBootTicksNow() {
+   // On Windows and Mac, TRACE_TIME_TICKS_NOW() behaves like boottime already.
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   struct timespec ts;
+   int res = clock_gettime(CLOCK_BOOTTIME, &ts);
+   if (res != -1) {
diff --git a/chromium-wip/patches/patch-base_tracing_trace__time.h b/chromium-wip/patches/patch-base_tracing_trace__time.h
new file mode 100644
index 0000000000..e6490a0966
--- /dev/null
+++ b/chromium-wip/patches/patch-base_tracing_trace__time.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/tracing/trace_time.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/tracing/trace_time.h
+@@ -12,7 +12,7 @@ namespace base {
+ namespace tracing {
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ // Linux, Android, and Fuchsia all use CLOCK_MONOTONIC. See crbug.com/166153
+ // about efforts to unify base::TimeTicks across all platforms.
+ constexpr perfetto::protos::pbzero::BuiltinClock kTraceClockId =
diff --git a/chromium-wip/patches/patch-base_version__info_version__info.h b/chromium-wip/patches/patch-base_version__info_version__info.h
new file mode 100644
index 0000000000..5fd58f1069
--- /dev/null
+++ b/chromium-wip/patches/patch-base_version__info_version__info.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- base/version_info/version_info.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ base/version_info/version_info.h
+@@ -74,6 +74,8 @@ constexpr std::string_view GetOSType() {
+   return "FreeBSD";
+ #elif BUILDFLAG(IS_OPENBSD)
+   return "OpenBSD";
++#elif BUILDFLAG(IS_NETBSD)
++  return "NetBSD";
+ #elif BUILDFLAG(IS_SOLARIS)
+   return "Solaris";
+ #elif BUILDFLAG(IS_FUCHSIA)
diff --git a/chromium-wip/patches/patch-build_config_BUILD.gn b/chromium-wip/patches/patch-build_config_BUILD.gn
new file mode 100644
index 0000000000..ca52dff584
--- /dev/null
+++ b/chromium-wip/patches/patch-build_config_BUILD.gn
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/config/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ build/config/BUILD.gn
+@@ -215,6 +215,10 @@ config("default_libs") {
+     # Targets should choose to explicitly link frameworks they require. Since
+     # linking can have run-time side effects, nothing should be listed here.
+     libs = []
++  } else if (is_bsd) {
++    libs = [
++      "pthread",
++    ]
+   } else if (is_linux || is_chromeos) {
+     libs = [
+       "dl",
diff --git a/chromium-wip/patches/patch-build_config_BUILDCONFIG.gn b/chromium-wip/patches/patch-build_config_BUILDCONFIG.gn
new file mode 100644
index 0000000000..7720e42e3e
--- /dev/null
+++ b/chromium-wip/patches/patch-build_config_BUILDCONFIG.gn
@@ -0,0 +1,54 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/config/BUILDCONFIG.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ build/config/BUILDCONFIG.gn
+@@ -136,7 +136,8 @@ declare_args() {
+   is_official_build = false
+ 
+   # Set to true when compiling with the Clang compiler.
+-  is_clang = current_os != "linux" ||
++  is_clang = current_os != "linux" || current_os == "openbsd" ||
++             current_os == "freebsd" || current_os == "netbsd" ||
+              (current_cpu != "s390x" && current_cpu != "s390" &&
+               current_cpu != "ppc64" && current_cpu != "ppc" &&
+               current_cpu != "mips" && current_cpu != "mips64" &&
+@@ -242,6 +243,12 @@ if (host_toolchain == "") {
+     host_toolchain = "//build/toolchain/aix:$host_cpu"
+   } else if (host_os == "zos") {
+     host_toolchain = "//build/toolchain/zos:$host_cpu"
++  } else if (host_os == "openbsd") {
++    host_toolchain = "//build/toolchain/openbsd:clang_$host_cpu"
++  } else if (host_os == "freebsd") {
++    host_toolchain = "//build/toolchain/freebsd:clang_$host_cpu"
++  } else if (host_os == "netbsd") {
++    host_toolchain = "//build/toolchain/netbsd:clang_$host_cpu"
+   } else {
+     assert(false, "Unsupported host_os: $host_os")
+   }
+@@ -291,6 +298,8 @@ if (target_os == "android") {
+   assert(
+       false,
+       "emscripten is not a supported target_os. It is available only as secondary toolchain.")
++} else if (target_os == "openbsd" || target_os == "freebsd" || target_os == "netbsd") {
++  _default_toolchain = host_toolchain
+ } else {
+   assert(false, "Unsupported target_os: $target_os")
+ }
+@@ -325,7 +334,12 @@ is_android = current_os == "android"
+ is_chromeos = current_os == "chromeos"
+ is_fuchsia = current_os == "fuchsia"
+ is_ios = current_os == "ios"
+-is_linux = current_os == "linux"
++is_linux = current_os == "linux" || current_os == "openbsd" ||
++           current_os == "freebsd" || current_os == "netbsd"
++is_openbsd = current_os == "openbsd"
++is_freebsd = current_os == "freebsd"
++is_netbsd = current_os == "netbsd"
++is_bsd = current_os == "openbsd" || current_os == "freebsd" || current_os == "netbsd"
+ is_mac = current_os == "mac"
+ is_nacl = current_os == "nacl"
+ is_wasm = current_os == "emscripten"
diff --git a/chromium-wip/patches/patch-build_config_clang_BUILD.gn b/chromium-wip/patches/patch-build_config_clang_BUILD.gn
new file mode 100644
index 0000000000..6ed0b437b3
--- /dev/null
+++ b/chromium-wip/patches/patch-build_config_clang_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/config/clang/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ build/config/clang/BUILD.gn
+@@ -265,7 +265,12 @@ template("clang_lib") {
+ 
+ # Adds a dependency on the Clang runtime library clang_rt.builtins.
+ clang_lib("compiler_builtins") {
+-  if (is_mac) {
++  if (is_bsd) {
++    # Since there's no Rust in the toolchain, there's no concern that we'll use
++    # the Rust stdlib's intrinsics here.
++    #
++    # Don't define libname which makes this target do nothing.
++  } else if (is_mac) {
+     libname = "osx"
+   } else if (is_ios) {
+     if (target_platform == "iphoneos") {
diff --git a/chromium-wip/patches/patch-build_config_compiler_BUILD.gn b/chromium-wip/patches/patch-build_config_compiler_BUILD.gn
new file mode 100644
index 0000000000..d207693add
--- /dev/null
+++ b/chromium-wip/patches/patch-build_config_compiler_BUILD.gn
@@ -0,0 +1,164 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/config/compiler/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ build/config/compiler/BUILD.gn
+@@ -199,7 +199,7 @@ declare_args() {
+   # This greatly reduces the size of debug builds, at the cost of
+   # debugging information which is required by some specialized
+   # debugging tools.
+-  simple_template_names = is_clang && !is_nacl && !is_win && !is_apple
++  simple_template_names = is_clang && !is_nacl && !is_win && !is_apple && !is_bsd
+ }
+ 
+ declare_args() {
+@@ -248,7 +248,7 @@ assert(!(llvm_force_head_revision && use
+ # Since this is referenced both when passing the file and when deciding which
+ # warnings to enable, store it in a separate variable here.
+ use_clang_warning_suppression_file =
+-    !is_nacl && default_toolchain != "//build/toolchain/cros:target" &&
++    !is_bsd && !is_nacl && default_toolchain != "//build/toolchain/cros:target" &&
+     !llvm_android_mainline && is_clang && clang_warning_suppression_file != ""
+ 
+ # default_include_dirs ---------------------------------------------------------
+@@ -266,13 +266,16 @@ config("default_include_dirs") {
+ # Compiler instrumentation can introduce dependencies in DSOs to symbols in
+ # the executable they are loaded into, so they are unresolved at link-time.
+ config("no_unresolved_symbols") {
+-  if (!using_sanitizer &&
++  if (!using_sanitizer && !is_bsd &&
+       (is_linux || is_chromeos || is_android || is_fuchsia)) {
+     ldflags = [
+       "-Wl,-z,defs",
+       "-Wl,--as-needed",
+     ]
+   }
++  if (current_cpu == "x86" && is_openbsd) {
++    ldflags = [ "-Wl,-z,notext", "-Wl,--strip-all" ]
++  }
+ }
+ 
+ # compiler ---------------------------------------------------------------------
+@@ -531,6 +534,10 @@ config("compiler") {
+     }
+   }
+ 
++  if (is_openbsd) {
++    ldflags += [ "-Wl,-z,wxneeded" ]
++  }
++
+   # Linux-specific compiler flags setup.
+   # ------------------------------------
+   if (use_icf && (!is_apple || use_lld)) {
+@@ -602,7 +609,7 @@ config("compiler") {
+     ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
+   }
+ 
+-  if (is_clang && !is_nacl) {
++  if (is_clang && !is_nacl && !is_bsd) {
+     cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ]
+     if (save_reproducers_on_lld_crash && use_lld) {
+       ldflags += [
+@@ -1254,7 +1261,7 @@ config("compiler_cpu_abi") {
+     # simplicity we always explicitly set the architecture.
+     if (current_cpu == "x64") {
+       if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
+-          !is_chromeos_device) {
++          !is_chromeos_device && !is_bsd) {
+         cflags += [ "--target=x86_64-unknown-linux-gnu" ]
+         ldflags += [ "--target=x86_64-unknown-linux-gnu" ]
+       } else {
+@@ -1263,7 +1270,7 @@ config("compiler_cpu_abi") {
+       }
+       cflags += [ "-msse3" ]
+     } else if (current_cpu == "x86") {
+-      if (is_clang && !is_android && !is_nacl && !is_chromeos_device) {
++      if (is_clang && !is_android && !is_nacl && !is_chromeos_device && !is_bsd) {
+         cflags += [ "--target=i386-unknown-linux-gnu" ]
+         ldflags += [ "--target=i386-unknown-linux-gnu" ]
+       } else {
+@@ -1277,7 +1284,7 @@ config("compiler_cpu_abi") {
+         ]
+       }
+     } else if (current_cpu == "arm") {
+-      if (is_clang && !is_android && !is_nacl && !is_chromeos_device) {
++      if (is_clang && !is_android && !is_nacl && !is_chromeos_device && !is_bsd) {
+         cflags += [ "--target=arm-linux-gnueabihf" ]
+         ldflags += [ "--target=arm-linux-gnueabihf" ]
+       }
+@@ -1292,7 +1299,7 @@ config("compiler_cpu_abi") {
+       }
+     } else if (current_cpu == "arm64") {
+       if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
+-          !is_chromeos_device) {
++          !is_chromeos_device && !is_bsd) {
+         cflags += [ "--target=aarch64-linux-gnu" ]
+         ldflags += [ "--target=aarch64-linux-gnu" ]
+       }
+@@ -1638,7 +1645,7 @@ config("compiler_deterministic") {
+     # different build directory like "out/feature_a" and "out/feature_b" if
+     # we build same files with same compile flag.
+     # Other paths are already given in relative, no need to normalize them.
+-    if (is_nacl) {
++    if (is_nacl || is_bsd) {
+       # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here.
+       cflags += [
+         "-Xclang",
+@@ -1704,7 +1711,7 @@ config("compiler_deterministic") {
+ }
+ 
+ config("clang_revision") {
+-  if (is_clang && clang_base_path == default_clang_base_path &&
++  if (is_clang && !is_bsd && clang_base_path == default_clang_base_path &&
+       current_os != "zos") {
+     _perform_consistency_checks = current_toolchain == default_toolchain
+     if (llvm_force_head_revision) {
+@@ -2139,9 +2146,6 @@ config("default_warnings") {
+ 
+         # TODO(crbug.com/40284799): Fix and re-enable.
+         "-Wno-thread-safety-reference-return",
+-
+-        # TODO(crbug.com/376641662): Fix and re-enable.
+-        "-Wno-nontrivial-memcall",
+       ]
+ 
+       cflags_cc += [
+@@ -2487,7 +2491,7 @@ config("export_dynamic") {
+ # 2. Remove the thin_archive config, so that the .a file actually contains all
+ #    .o files, instead of just references to .o files in the build directoy
+ config("thin_archive") {
+-  if ((is_apple && use_lld) || (is_linux && !is_clang) || current_os == "aix") {
++  if ((is_apple && use_lld) || (is_linux && !is_clang) || current_os == "aix" || (is_netbsd)) {
+     # The macOS and iOS linker ld64.ldd doesn't support thin archive without
+     # symbol table, gcc on linux also throws the error `archive has no index`.
+     # AIX does support -s option, not -S option.
+@@ -2946,7 +2950,7 @@ config("afdo_optimize_size") {
+ # There are some targeted places that AFDO regresses, so we provide a separate
+ # config to allow AFDO to be disabled per-target.
+ config("afdo") {
+-  if (is_clang) {
++  if (is_clang && !is_bsd) {
+     cflags = []
+     if (clang_emit_debug_info_for_profiling) {
+       # Add the following flags to generate debug info for profiling.
+@@ -2973,7 +2977,7 @@ config("afdo") {
+       cflags += [ "-Wno-backend-plugin" ]
+       inputs = [ _clang_sample_profile ]
+     }
+-  } else if (auto_profile_path != "" && is_a_target_toolchain) {
++  } else if (auto_profile_path != "" && is_a_target_toolchain && !is_bsd) {
+     cflags = [ "-fauto-profile=${auto_profile_path}" ]
+     inputs = [ auto_profile_path ]
+   }
+@@ -3162,7 +3166,7 @@ config("symbols") {
+     cflags += [ "-gomit-unreferenced-methods" ]
+   }
+ 
+-  if (is_clang && (!is_nacl || is_nacl_saigo)) {
++  if (is_clang && (!is_nacl || is_nacl_saigo) && !is_bsd) {
+     if (is_apple) {
+       # TODO(crbug.com/40117949): Investigate missing debug info on mac.
+       # Make sure we don't use constructor homing on mac.
diff --git a/chromium-wip/patches/patch-build_config_gcc_BUILD.gn b/chromium-wip/patches/patch-build_config_gcc_BUILD.gn
new file mode 100644
index 0000000000..85802b8344
--- /dev/null
+++ b/chromium-wip/patches/patch-build_config_gcc_BUILD.gn
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/config/gcc/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ build/config/gcc/BUILD.gn
+@@ -32,7 +32,9 @@ declare_args() {
+ # See http://gcc.gnu.org/wiki/Visibility
+ config("symbol_visibility_hidden") {
+   cflags = [ "-fvisibility=hidden" ]
+-  rustflags = [ "-Zdefault-visibility=hidden" ]
++  if (!is_bsd) {
++    rustflags = [ "-Zdefault-visibility=hidden" ]
++  }
+ 
+   # Visibility attribute is not supported on AIX.
+   if (current_os != "aix") {
diff --git a/chromium-wip/patches/patch-build_config_linux_BUILD.gn b/chromium-wip/patches/patch-build_config_linux_BUILD.gn
new file mode 100644
index 0000000000..e5e8feb79f
--- /dev/null
+++ b/chromium-wip/patches/patch-build_config_linux_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/config/linux/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ build/config/linux/BUILD.gn
+@@ -41,7 +41,7 @@ config("runtime_library") {
+   }
+ 
+   if ((!is_chromeos || default_toolchain != "//build/toolchain/cros:target") &&
+-      (!use_custom_libcxx || current_cpu == "mipsel")) {
++      (!use_custom_libcxx || current_cpu == "mipsel") && !is_bsd) {
+     libs = [ "atomic" ]
+   }
+ }
diff --git a/chromium-wip/patches/patch-build_config_linux_libdrm_BUILD.gn b/chromium-wip/patches/patch-build_config_linux_libdrm_BUILD.gn
new file mode 100644
index 0000000000..3888bf6673
--- /dev/null
+++ b/chromium-wip/patches/patch-build_config_linux_libdrm_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/config/linux/libdrm/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ build/config/linux/libdrm/BUILD.gn
+@@ -15,7 +15,7 @@ declare_args() {
+ }
+ 
+ if (use_system_libdrm) {
+-  assert(!is_linux, "System libdrm is not supported in linux")
++#  assert(!is_linux, "System libdrm is not supported in linux")
+   pkg_config("libdrm_config") {
+     packages = [ "libdrm" ]
+   }
diff --git a/chromium-wip/patches/patch-build_config_linux_pkg-config.py b/chromium-wip/patches/patch-build_config_linux_pkg-config.py
new file mode 100644
index 0000000000..50a9002054
--- /dev/null
+++ b/chromium-wip/patches/patch-build_config_linux_pkg-config.py
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/config/linux/pkg-config.py.orig	2025-07-29 22:51:44.000000000 +0000
++++ build/config/linux/pkg-config.py
+@@ -108,7 +108,7 @@ def main():
+   # If this is run on non-Linux platforms, just return nothing and indicate
+   # success. This allows us to "kind of emulate" a Linux build from other
+   # platforms.
+-  if "linux" not in sys.platform:
++  if not sys.platform.startswith(tuple(['linux', 'openbsd', 'freebsd', 'netbsd'])):
+     print("[[],[],[],[],[]]")
+     return 0
+ 
diff --git a/chromium-wip/patches/patch-build_config_ozone.gni b/chromium-wip/patches/patch-build_config_ozone.gni
new file mode 100644
index 0000000000..0df6487120
--- /dev/null
+++ b/chromium-wip/patches/patch-build_config_ozone.gni
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/config/ozone.gni.orig	2025-07-29 22:51:44.000000000 +0000
++++ build/config/ozone.gni
+@@ -80,7 +80,19 @@ declare_args() {
+       ozone_platform = "x11"
+       ozone_platform_drm = true
+       ozone_platform_x11 = true
+-    } else if (is_linux) {
++    } else if (is_linux && !is_bsd) {
++      ozone_platform = "x11"
++      ozone_platform_wayland = true
++      ozone_platform_x11 = true
++    } else if (is_openbsd) {
++      ozone_platform = "x11"
++      ozone_platform_wayland = false
++      ozone_platform_x11 = true
++    } else if (is_netbsd) {
++      ozone_platform = "x11"
++      ozone_platform_wayland = false
++      ozone_platform_x11 = true
++    } else if (is_freebsd) {
+       ozone_platform = "x11"
+       ozone_platform_wayland = true
+       ozone_platform_x11 = true
diff --git a/chromium-wip/patches/patch-build_config_rust.gni b/chromium-wip/patches/patch-build_config_rust.gni
new file mode 100644
index 0000000000..2badfaeb71
--- /dev/null
+++ b/chromium-wip/patches/patch-build_config_rust.gni
@@ -0,0 +1,30 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/config/rust.gni.orig	2025-07-29 22:51:44.000000000 +0000
++++ build/config/rust.gni
+@@ -191,7 +191,7 @@ if (is_linux || is_chromeos) {
+     rust_abi_target = "aarch64-unknown-linux-gnu"
+     cargo_target_abi = ""
+   } else if (current_cpu == "x86") {
+-    rust_abi_target = "i686-unknown-linux-gnu"
++    rust_abi_target = "i586-unknown-linux-gnu"
+     cargo_target_abi = ""
+   } else if (current_cpu == "x64") {
+     rust_abi_target = "x86_64-unknown-linux-gnu"
+@@ -373,7 +373,11 @@ if (is_linux || is_chromeos) {
+   }
+ }
+ 
+-if (toolchain_has_rust) {
++if (is_bsd) {
++  rust_abi_target = string_replace(rust_abi_target, "linux-gnu", current_os)
++}
++
++if (toolchain_has_rust && !is_bsd) {
+   assert(rust_abi_target != "")
+ 
+   _known_rust_target_triples_filepath = "//build/rust/known-target-triples.txt"
diff --git a/chromium-wip/patches/patch-build_config_v8__target__cpu.gni b/chromium-wip/patches/patch-build_config_v8__target__cpu.gni
new file mode 100644
index 0000000000..e457f0b1e3
--- /dev/null
+++ b/chromium-wip/patches/patch-build_config_v8__target__cpu.gni
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/config/v8_target_cpu.gni.orig	2025-07-29 22:51:44.000000000 +0000
++++ build/config/v8_target_cpu.gni
+@@ -36,6 +36,10 @@ declare_args() {
+ if (v8_target_cpu == "") {
+   if (current_toolchain == "//build/toolchain/linux:clang_x64_v8_arm64") {
+     v8_target_cpu = "arm64"
++  } else if (current_toolchain == "//build/toolchain/openbsd:clang_arm64") {
++    v8_target_cpu = "arm64"
++  } else if (current_toolchain == "//build/toolchain/freebsd:clang_arm64") {
++    v8_target_cpu = "arm64"
+   } else if (current_toolchain == "//build/toolchain/linux:clang_x86_v8_arm") {
+     v8_target_cpu = "arm"
+   } else if (current_toolchain ==
diff --git a/chromium-wip/patches/patch-build_detect__host__arch.py b/chromium-wip/patches/patch-build_detect__host__arch.py
new file mode 100644
index 0000000000..e23a091399
--- /dev/null
+++ b/chromium-wip/patches/patch-build_detect__host__arch.py
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/detect_host_arch.py.orig	2025-07-29 22:51:44.000000000 +0000
++++ build/detect_host_arch.py
+@@ -20,6 +20,8 @@ def HostArch():
+     host_arch = 'ia32'
+   elif host_arch in ['x86_64', 'amd64']:
+     host_arch = 'x64'
++  elif host_arch.startswith('arm64'):
++    host_arch = 'arm64'
+   elif host_arch.startswith('arm'):
+     host_arch = 'arm'
+   elif host_arch.startswith('aarch64'):
diff --git a/chromium-wip/patches/patch-build_gn__run__binary.py b/chromium-wip/patches/patch-build_gn__run__binary.py
new file mode 100644
index 0000000000..3e61776cbc
--- /dev/null
+++ b/chromium-wip/patches/patch-build_gn__run__binary.py
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/gn_run_binary.py.orig	2025-07-29 22:51:44.000000000 +0000
++++ build/gn_run_binary.py
+@@ -23,7 +23,7 @@ if not os.path.isabs(path):
+ # The rest of the arguments are passed directly to the executable.
+ args = [path] + sys.argv[2:]
+ 
+-ret = subprocess.call(args)
++ret = subprocess.call(args, env={"CHROME_EXE_PATH":"@WRKSRC@/out/Release/chrome","LD_LIBRARY_PATH":"@WRKSRC@/out/Release"})
+ if ret != 0:
+   if ret <= -100:
+     # Windows error codes such as 0xC0000005 and 0xC0000409 are much easier to
diff --git a/chromium-wip/patches/patch-build_linux_chrome.map b/chromium-wip/patches/patch-build_linux_chrome.map
new file mode 100644
index 0000000000..6521d9f1f2
--- /dev/null
+++ b/chromium-wip/patches/patch-build_linux_chrome.map
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/linux/chrome.map.orig	2025-07-29 22:51:44.000000000 +0000
++++ build/linux/chrome.map
+@@ -20,6 +20,10 @@ global:
+   # Program entry point.
+   _start;
+ 
++  # FreeBSD specific variables.
++  __progname;
++  environ;
++
+   # Memory allocation symbols.  We want chrome and any libraries to
+   # share the same heap, so it is correct to export these symbols.
+   aligned_alloc;
diff --git a/chromium-wip/patches/patch-build_linux_strip__binary.py b/chromium-wip/patches/patch-build_linux_strip__binary.py
new file mode 100644
index 0000000000..8e1c3e6c1f
--- /dev/null
+++ b/chromium-wip/patches/patch-build_linux_strip__binary.py
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/linux/strip_binary.py.orig	2025-07-29 22:51:44.000000000 +0000
++++ build/linux/strip_binary.py
+@@ -10,6 +10,7 @@ import sys
+ 
+ 
+ def main() -> int:
++  return 0
+   parser = argparse.ArgumentParser(description="Strip binary using LLVM tools.")
+   parser.add_argument("--llvm-strip-binary-path",
+                       help="Path to llvm-strip executable.")
diff --git a/chromium-wip/patches/patch-build_linux_unbundle_icu.gn b/chromium-wip/patches/patch-build_linux_unbundle_icu.gn
new file mode 100644
index 0000000000..3a9c89f769
--- /dev/null
+++ b/chromium-wip/patches/patch-build_linux_unbundle_icu.gn
@@ -0,0 +1,49 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/linux/unbundle/icu.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ build/linux/unbundle/icu.gn
+@@ -17,6 +17,15 @@ config("icu_config") {
+     "USING_SYSTEM_ICU=1",
+     "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC",
+ 
++    # As of icu 73 C++ nullptr, char16_t, override, final and noexcept are used
++    # instead of defines. These definitions can be removed when the bundled icu
++    # gets updated to 73. For more details, see:
++    # https://unicode-org.atlassian.net/browse/ICU-21833 and
++    # https://github.com/unicode-org/icu/commit/28643799377ecf654564f6f31854b02788cebe33
++    "U_FINAL=final",
++    "U_NOEXCEPT=noexcept",
++    "U_OVERRIDE=override",
++
+     # U_EXPORT (defined in unicode/platform.h) is used to set public visibility
+     # on classes through the U_COMMON_API and U_I18N_API macros (among others).
+     # When linking against the system ICU library, we want its symbols to have
+@@ -34,6 +43,9 @@ config("icu_config") {
+     # to define U_IMPORT to have the same value as U_EXPORT. For more details,
+     # please see: https://crbug.com/822820
+     "U_IMPORT=U_EXPORT",
++
++    # Unbreak with icu 76 where private symbols are picked up
++    "U_HIDE_DRAFT_API",
+   ]
+ }
+ 
+@@ -53,6 +65,14 @@ source_set("icui18n") {
+   ]
+ }
+ 
++source_set("icui18n_hidden_visibility") {
++  deps = [ ":icui18n_shim" ]
++  public_configs = [
++    ":icu_config",
++    ":system_icui18n",
++  ]
++}
++
+ source_set("icuuc") {
+   deps = [ ":icuuc_shim" ]
+   public_configs = [
diff --git a/chromium-wip/patches/patch-build_linux_unbundle_libusb.gn b/chromium-wip/patches/patch-build_linux_unbundle_libusb.gn
new file mode 100644
index 0000000000..faa27f2696
--- /dev/null
+++ b/chromium-wip/patches/patch-build_linux_unbundle_libusb.gn
@@ -0,0 +1,36 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/linux/unbundle/libusb.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ build/linux/unbundle/libusb.gn
+@@ -1,3 +1,27 @@
++# 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.
++
++import("//build/config/linux/pkg_config.gni")
++import("//build/shim_headers.gni")
++
++pkg_config("system_libusb") {
++  packages = [ "libusb-1.0" ]
++}
++
++shim_headers("libusb_shim") {
++  root_path = "src/libusb"
++  headers = [
++    "libusb.h",
++  ]
++}
++
++source_set("libusb") {
++  deps = [
++    ":libusb_shim",
++  ]
++  public_configs = [ ":system_libusb" ]
++}
+ import("//build/config/linux/pkg_config.gni")
+ import("//build/shim_headers.gni")
+ 
diff --git a/chromium-wip/patches/patch-build_nocompile.gni b/chromium-wip/patches/patch-build_nocompile.gni
new file mode 100644
index 0000000000..9d6397dfd2
--- /dev/null
+++ b/chromium-wip/patches/patch-build_nocompile.gni
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/nocompile.gni.orig	2025-07-29 22:51:44.000000000 +0000
++++ build/nocompile.gni
+@@ -55,7 +55,7 @@ if (is_win) {
+ }
+ 
+ declare_args() {
+-  enable_nocompile_tests = is_clang && !is_nacl
++  enable_nocompile_tests = is_clang && !is_nacl && !is_bsd
+ }
+ 
+ if (enable_nocompile_tests) {
diff --git a/chromium-wip/patches/patch-build_rust_rust__bindgen.gni b/chromium-wip/patches/patch-build_rust_rust__bindgen.gni
new file mode 100644
index 0000000000..c109e42762
--- /dev/null
+++ b/chromium-wip/patches/patch-build_rust_rust__bindgen.gni
@@ -0,0 +1,25 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/rust/rust_bindgen.gni.orig	2025-07-29 22:51:44.000000000 +0000
++++ build/rust/rust_bindgen.gni
+@@ -12,14 +12,14 @@ if (is_win) {
+   import("//build/toolchain/win/win_toolchain_data.gni")
+ }
+ 
+-_bindgen_path = "${rust_bindgen_root}/bin/bindgen"
++_bindgen_path = "@PREFIX@/bin/bindgen"
+ if (host_os == "win") {
+   _bindgen_path = "${_bindgen_path}.exe"
+ }
+ 
+ # On Windows, the libclang.dll is beside the bindgen.exe, otherwise it is in
+ # ../lib.
+-_libclang_path = rust_bindgen_root
++_libclang_path = "@PREFIX@"
+ if (host_os == "win") {
+   _libclang_path += "/bin"
+ } else {
diff --git a/chromium-wip/patches/patch-build_rust_rust__bindgen__generator.gni b/chromium-wip/patches/patch-build_rust_rust__bindgen__generator.gni
new file mode 100644
index 0000000000..fb906b3444
--- /dev/null
+++ b/chromium-wip/patches/patch-build_rust_rust__bindgen__generator.gni
@@ -0,0 +1,25 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/rust/rust_bindgen_generator.gni.orig	2025-07-29 22:51:44.000000000 +0000
++++ build/rust/rust_bindgen_generator.gni
+@@ -11,14 +11,14 @@ if (is_win) {
+   import("//build/toolchain/win/win_toolchain_data.gni")
+ }
+ 
+-_bindgen_path = "${rust_bindgen_root}/bin/bindgen"
++_bindgen_path = "@PREFIX@/bin/bindgen"
+ if (host_os == "win") {
+   _bindgen_path = "${_bindgen_path}.exe"
+ }
+ 
+ # On Windows, the libclang.dll is beside the bindgen.exe, otherwise it is in
+ # ../lib.
+-_libclang_path = rust_bindgen_root
++_libclang_path = "@PREFIX@"
+ if (host_os == "win") {
+   _libclang_path += "/bin"
+ } else {
diff --git a/chromium-wip/patches/patch-build_rust_std_BUILD.gn b/chromium-wip/patches/patch-build_rust_std_BUILD.gn
new file mode 100644
index 0000000000..abaa8c6133
--- /dev/null
+++ b/chromium-wip/patches/patch-build_rust_std_BUILD.gn
@@ -0,0 +1,38 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/rust/std/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ build/rust/std/BUILD.gn
+@@ -50,13 +50,20 @@ if (toolchain_has_rust) {
+     # These are no longer present in the Windows toolchain.
+     stdlib_files += [
+       "addr2line",
+-      "adler2",
+       "gimli",
+       "libc",
+       "memchr",
+       "miniz_oxide",
+       "object",
+     ]
++
++    rust_revision_pieces = string_split(rustc_revision, " ")
++    rust_version_pieces = string_split(rust_revision_pieces[1], ".")
++    if (rust_version_pieces[1] == "85") {
++      stdlib_files += [ "adler" ]
++    } else {
++      stdlib_files += [ "adler2" ]
++    }
+   }
+ 
+   if (toolchain_for_rust_host_build_tools) {
+@@ -76,7 +83,6 @@ if (toolchain_has_rust) {
+   # don't need to pass to the C++ linker because they're used for specialized
+   # purposes.
+   skip_stdlib_files = [
+-    "profiler_builtins",
+     "rustc_std_workspace_alloc",
+     "rustc_std_workspace_core",
+     "rustc_std_workspace_std",
diff --git a/chromium-wip/patches/patch-build_toolchain_freebsd_BUILD.gn b/chromium-wip/patches/patch-build_toolchain_freebsd_BUILD.gn
new file mode 100644
index 0000000000..fca6aef223
--- /dev/null
+++ b/chromium-wip/patches/patch-build_toolchain_freebsd_BUILD.gn
@@ -0,0 +1,75 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/toolchain/freebsd/BUILD.gn.orig	2025-08-12 17:48:59.374232885 +0000
++++ build/toolchain/freebsd/BUILD.gn
+@@ -0,0 +1,66 @@
++# Copyright 2013 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/sysroot.gni")
++import("//build/toolchain/gcc_toolchain.gni")
++
++clang_toolchain("clang_x86") {
++  toolchain_args = {
++    current_cpu = "x86"
++    current_os = "freebsd"
++  }
++}
++
++gcc_toolchain("x86") {
++  cc = "gcc"
++  cxx = "g++"
++
++  readelf = "readelf"
++  nm = "nm"
++  ar = "ar"
++  ld = cxx
++
++  toolchain_args = {
++    current_cpu = "x86"
++    current_os = "freebsd"
++    is_clang = false
++  }
++}
++
++clang_toolchain("clang_x64") {
++  toolchain_args = {
++    current_cpu = "x64"
++    current_os = "freebsd"
++  }
++}
++
++gcc_toolchain("x64") {
++  cc = "gcc"
++  cxx = "g++"
++
++  readelf = "readelf"
++  nm = "nm"
++  ar = "ar"
++  ld = cxx
++
++  toolchain_args = {
++    current_cpu = "x64"
++    current_os = "freebsd"
++    is_clang = false
++  }
++}
++
++clang_toolchain("clang_arm") {
++  toolchain_args = {
++    current_cpu = "arm64"
++    current_os = "freebsd"
++  }
++}
++
++clang_toolchain("clang_arm64") {
++  toolchain_args = {
++    current_cpu = "arm64"
++    current_os = "freebsd"
++  }
++}
diff --git a/chromium-wip/patches/patch-build_toolchain_gcc__solink__wrapper.py b/chromium-wip/patches/patch-build_toolchain_gcc__solink__wrapper.py
new file mode 100644
index 0000000000..48ac837151
--- /dev/null
+++ b/chromium-wip/patches/patch-build_toolchain_gcc__solink__wrapper.py
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/toolchain/gcc_solink_wrapper.py.orig	2025-07-29 22:51:44.000000000 +0000
++++ build/toolchain/gcc_solink_wrapper.py
+@@ -39,7 +39,7 @@ def CollectDynSym(args):
+   """Replaces: nm --format=posix -g -D -p $sofile | cut -f1-2 -d' '"""
+   toc = ''
+   nm = subprocess.Popen(wrapper_utils.CommandToRun(
+-      [args.nm, '--format=posix', '-g', '-D', '-p', args.sofile]),
++      [args.nm, '-g', '-D', '-p', args.sofile]),
+                         stdout=subprocess.PIPE,
+                         bufsize=-1,
+                         universal_newlines=True)
diff --git a/chromium-wip/patches/patch-build_toolchain_gcc__toolchain.gni b/chromium-wip/patches/patch-build_toolchain_gcc__toolchain.gni
new file mode 100644
index 0000000000..f130a94fe9
--- /dev/null
+++ b/chromium-wip/patches/patch-build_toolchain_gcc__toolchain.gni
@@ -0,0 +1,59 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/toolchain/gcc_toolchain.gni.orig	2025-07-29 22:51:44.000000000 +0000
++++ build/toolchain/gcc_toolchain.gni
+@@ -56,6 +56,13 @@ if (enable_resource_allowlist_generation
+       "enable_resource_allowlist_generation=true does not work for target_os=$target_os")
+ }
+ 
++declare_args() {
++  extra_cflags = ""
++  extra_cppflags = ""
++  extra_cxxflags = ""
++  extra_ldflags = ""
++}
++
+ # This template defines a toolchain for something that works like gcc
+ # (including clang).
+ #
+@@ -609,7 +616,7 @@ template("single_gcc_toolchain") {
+       # We need to specify link groups, at least, for single pass linkers. I.e.
+       # Rust libraries are alpha-sorted instead of by dependencies so they fail
+       # to link if not properly ordered or grouped.
+-      link_command = "$ld {{ldflags}}${extra_ldflags} -o \"$unstripped_outfile\" $start_group_flag @\"$rspfile\" $end_group_flag {{solibs}} {{libs}} $start_group_flag {{rlibs}} $end_group_flag"
++      link_command = "$ld $start_group_flag {{ldflags}}${extra_ldflags} -o \"$unstripped_outfile\" @\"$rspfile\" {{solibs}} {{libs}} {{rlibs}} $end_group_flag"
+ 
+       # Generate a map file to be used for binary size analysis.
+       # Map file adds ~10% to the link time on a z620.
+@@ -896,22 +903,12 @@ template("gcc_toolchain") {
+ # actually just be doing a native compile.
+ template("clang_toolchain") {
+   gcc_toolchain(target_name) {
+-    _path = "$clang_base_path/bin"
+-    _is_path_absolute = get_path_info(_path, "abspath") == _path
+-
+-    # Preserve absolute paths for tools like distcc.
+-    if (_is_path_absolute && filter_include([ _path ], [ "//*" ]) == []) {
+-      prefix = _path
+-    } else {
+-      prefix = rebase_path(_path, root_build_dir)
+-    }
+-
+-    cc = "${prefix}/clang"
+-    cxx = "${prefix}/clang++"
++    cc = "cc"
++    cxx = "c++"
+     ld = cxx
+-    readelf = "${prefix}/llvm-readelf"
+-    ar = "${prefix}/llvm-ar"
+-    nm = "${prefix}/llvm-nm"
++    readelf = "readelf"
++    ar = "ar"
++    nm = "nm"
+ 
+     forward_variables_from(invoker, "*", [ "toolchain_args" ])
+ 
diff --git a/chromium-wip/patches/patch-build_toolchain_netbsd_BUILD.gn b/chromium-wip/patches/patch-build_toolchain_netbsd_BUILD.gn
new file mode 100644
index 0000000000..d603f1c40c
--- /dev/null
+++ b/chromium-wip/patches/patch-build_toolchain_netbsd_BUILD.gn
@@ -0,0 +1,75 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/toolchain/netbsd/BUILD.gn.orig	2025-08-12 17:48:59.374713386 +0000
++++ build/toolchain/netbsd/BUILD.gn
+@@ -0,0 +1,66 @@
++# Copyright 2013 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/sysroot.gni")
++import("//build/toolchain/gcc_toolchain.gni")
++
++clang_toolchain("clang_x86") {
++  toolchain_args = {
++    current_cpu = "x86"
++    current_os = "netbsd"
++  }
++}
++
++gcc_toolchain("x86") {
++  cc = "gcc"
++  cxx = "g++"
++
++  readelf = "readelf"
++  nm = "nm"
++  ar = "ar"
++  ld = cxx
++
++  toolchain_args = {
++    current_cpu = "x86"
++    current_os = "netbsd"
++    is_clang = false
++  }
++}
++
++clang_toolchain("clang_x64") {
++  toolchain_args = {
++    current_cpu = "x64"
++    current_os = "netbsd"
++  }
++}
++
++gcc_toolchain("x64") {
++  cc = "gcc"
++  cxx = "g++"
++
++  readelf = "readelf"
++  nm = "nm"
++  ar = "ar"
++  ld = cxx
++
++  toolchain_args = {
++    current_cpu = "x64"
++    current_os = "netbsd"
++    is_clang = false
++  }
++}
++
++clang_toolchain("clang_arm") {
++  toolchain_args = {
++    current_cpu = "arm64"
++    current_os = "netbsd"
++  }
++}
++
++clang_toolchain("clang_arm64") {
++  toolchain_args = {
++    current_cpu = "arm64"
++    current_os = "netbsd"
++  }
++}
diff --git a/chromium-wip/patches/patch-build_toolchain_openbsd_BUILD.gn b/chromium-wip/patches/patch-build_toolchain_openbsd_BUILD.gn
new file mode 100644
index 0000000000..045338db35
--- /dev/null
+++ b/chromium-wip/patches/patch-build_toolchain_openbsd_BUILD.gn
@@ -0,0 +1,75 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/toolchain/openbsd/BUILD.gn.orig	2025-08-12 17:48:59.374887574 +0000
++++ build/toolchain/openbsd/BUILD.gn
+@@ -0,0 +1,66 @@
++# Copyright 2013 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/sysroot.gni")
++import("//build/toolchain/gcc_toolchain.gni")
++
++clang_toolchain("clang_x86") {
++  toolchain_args = {
++    current_cpu = "x86"
++    current_os = "openbsd"
++  }
++}
++
++gcc_toolchain("x86") {
++  cc = "gcc"
++  cxx = "g++"
++
++  readelf = "readelf"
++  nm = "nm"
++  ar = "ar"
++  ld = cxx
++
++  toolchain_args = {
++    current_cpu = "x86"
++    current_os = "openbsd"
++    is_clang = false
++  }
++}
++
++clang_toolchain("clang_x64") {
++  toolchain_args = {
++    current_cpu = "x64"
++    current_os = "openbsd"
++  }
++}
++
++gcc_toolchain("x64") {
++  cc = "gcc"
++  cxx = "g++"
++
++  readelf = "readelf"
++  nm = "nm"
++  ar = "ar"
++  ld = cxx
++
++  toolchain_args = {
++    current_cpu = "x64"
++    current_os = "openbsd"
++    is_clang = false
++  }
++}
++
++clang_toolchain("clang_arm") {
++  toolchain_args = {
++    current_cpu = "arm64"
++    current_os = "openbsd"
++  }
++}
++
++clang_toolchain("clang_arm64") {
++  toolchain_args = {
++    current_cpu = "arm64"
++    current_os = "openbsd"
++  }
++}
diff --git a/chromium-wip/patches/patch-build_toolchain_toolchain.gni b/chromium-wip/patches/patch-build_toolchain_toolchain.gni
new file mode 100644
index 0000000000..85c9fdffa7
--- /dev/null
+++ b/chromium-wip/patches/patch-build_toolchain_toolchain.gni
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- build/toolchain/toolchain.gni.orig	2025-07-29 22:51:44.000000000 +0000
++++ build/toolchain/toolchain.gni
+@@ -60,7 +60,7 @@ if (host_os == "mac") {
+   host_shlib_extension = ".dylib"
+ } else if (host_os == "win") {
+   host_shlib_extension = ".dll"
+-} else if (host_os == "linux" || host_os == "aix" || host_os == "zos") {
++} else if (is_posix) {
+   host_shlib_extension = ".so"
+ } else {
+   assert(false, "Host platform not supported")
diff --git a/chromium-wip/patches/patch-cc_base_features.cc b/chromium-wip/patches/patch-cc_base_features.cc
new file mode 100644
index 0000000000..37c2580619
--- /dev/null
+++ b/chromium-wip/patches/patch-cc_base_features.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- cc/base/features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ cc/base/features.cc
+@@ -52,7 +52,7 @@ const base::FeatureParam<int> kDeferImpl
+ // be using a separate flag to control the launch on GL.
+ BASE_FEATURE(kUseDMSAAForTiles,
+              "UseDMSAAForTiles",
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+              base::FEATURE_ENABLED_BY_DEFAULT
+ #else
+              base::FEATURE_DISABLED_BY_DEFAULT
diff --git a/chromium-wip/patches/patch-chrome_app_chrome__command__ids.h b/chromium-wip/patches/patch-chrome_app_chrome__command__ids.h
new file mode 100644
index 0000000000..be7bc41102
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_app_chrome__command__ids.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/app/chrome_command_ids.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/app/chrome_command_ids.h
+@@ -72,11 +72,11 @@
+ #define IDC_TOGGLE_MULTITASK_MENU       34050
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #define IDC_USE_SYSTEM_TITLE_BAR        34051
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #define IDC_RESTORE_WINDOW              34052
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-chrome_app_chrome__main.cc b/chromium-wip/patches/patch-chrome_app_chrome__main.cc
new file mode 100644
index 0000000000..a7d40832d9
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_app_chrome__main.cc
@@ -0,0 +1,49 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/app/chrome_main.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/app/chrome_main.cc
+@@ -28,11 +28,11 @@
+ #include "chrome/app/chrome_main_mac.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "base/base_switches.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/app/chrome_main_linux.h"
+ #endif
+ 
+@@ -57,7 +57,7 @@
+ // sometime after old headless code is removed from Chrome.
+ // See https://crbug.com/373672160.
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #define ENABLE_OLD_HEADLESS_INFO
+ #endif
+ 
+@@ -115,7 +115,7 @@ int ChromeMain(int argc, const char** ar
+ #error Unknown platform.
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   PossiblyDetermineFallbackChromeChannel(argv[0]);
+ #endif
+ 
+@@ -181,7 +181,7 @@ int ChromeMain(int argc, const char** ar
+   SetUpBundleOverrides();
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   AppendExtraArgumentsToCommandLine(command_line);
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-chrome_app_chrome__main__delegate.cc b/chromium-wip/patches/patch-chrome_app_chrome__main__delegate.cc
new file mode 100644
index 0000000000..ae1f14b58f
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_app_chrome__main__delegate.cc
@@ -0,0 +1,153 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/app/chrome_main_delegate.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/app/chrome_main_delegate.cc
+@@ -146,7 +146,7 @@
+ #include "components/webui/about/credit_utils.h"
+ #endif
+ 
+-#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
++#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD)
+ #include "components/nacl/common/nacl_paths.h"
+ #include "components/nacl/zygote/nacl_fork_delegate_linux.h"
+ #endif
+@@ -186,17 +186,17 @@
+ #include "v8/include/v8.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) 
+ #include "base/environment.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "base/nix/scoped_xdg_activation_token_injector.h"
+ #include "ui/linux/display_server_utils.h"
+ #endif
+ 
+ #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/policy/policy_path_parser.h"
+ #include "components/crash/core/app/crashpad.h"
+ #endif
+@@ -314,7 +314,7 @@ void AdjustLinuxOOMScore(const std::stri
+ // and resources loaded.
+ bool SubprocessNeedsResourceBundle(const std::string& process_type) {
+   return
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       // The zygote process opens the resources for the renderers.
+       process_type == switches::kZygoteProcess ||
+ #endif
+@@ -397,7 +397,7 @@ bool HandleVersionSwitches(const base::C
+   return false;
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Show the man page if --help or -h is on the command line.
+ void HandleHelpSwitches(const base::CommandLine& command_line) {
+   if (command_line.HasSwitch(switches::kHelp) ||
+@@ -409,7 +409,7 @@ void HandleHelpSwitches(const base::Comm
+ }
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+-#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID)
++#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD)
+ void SIGTERMProfilingShutdown(int signal) {
+   content::Profiling::Stop();
+   struct sigaction sigact;
+@@ -491,7 +491,7 @@ std::optional<int> AcquireProcessSinglet
+   // process can be exited.
+   ChromeProcessSingleton::CreateInstance(user_data_dir);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Read the xdg-activation token and set it in the command line for the
+   // duration of the notification in order to ensure this is propagated to an
+   // already running browser process if it exists.
+@@ -569,7 +569,7 @@ void InitializeUserDataDir(base::Command
+   std::string process_type =
+       command_line->GetSwitchValueASCII(switches::kProcessType);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // On Linux, Chrome does not support running multiple copies under different
+   // DISPLAYs, so the profile directory can be specified in the environment to
+   // support the virtual desktop use-case.
+@@ -667,7 +667,7 @@ void RecordMainStartupMetrics(const Star
+ #endif
+ 
+ #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Record the startup process creation time on supported platforms. On Android
+   // this is recorded in ChromeMainDelegateAndroid.
+   startup_metric_utils::GetCommon().RecordStartupProcessCreationTime(
+@@ -826,7 +826,7 @@ std::optional<int> ChromeMainDelegate::P
+ #if BUILDFLAG(IS_OZONE)
+   // Initialize Ozone platform and add required feature flags as per platform's
+   // properties.
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   ui::SetOzonePlatformForLinuxIfNeeded(*base::CommandLine::ForCurrentProcess());
+ #endif
+   ui::OzonePlatform::PreEarlyInitialization();
+@@ -981,7 +981,7 @@ void ChromeMainDelegate::CommonEarlyInit
+   const bool is_canary_dev = IsCanaryDev();
+   const bool emit_crashes =
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+       is_canary_dev;
+ #else
+       false;
+@@ -1129,7 +1129,7 @@ std::optional<int> ChromeMainDelegate::B
+     return 0;  // Got a --credits switch; exit with a success error code.
+   }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // This will directly exit if the user asked for help.
+   HandleHelpSwitches(command_line);
+ #endif
+@@ -1154,7 +1154,7 @@ std::optional<int> ChromeMainDelegate::B
+   ash::RegisterPathProvider();
+   chromeos::dbus_paths::RegisterPathProvider();
+ #endif
+-#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
++#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))
+   nacl::RegisterPathProvider();
+ #endif
+ 
+@@ -1445,7 +1445,7 @@ void ChromeMainDelegate::PreSandboxStart
+     CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale;
+   }
+ 
+-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD)
+   // Zygote needs to call InitCrashReporter() in RunZygote().
+   if (process_type != switches::kZygoteProcess &&
+       !command_line.HasSwitch(switches::kDisableCrashpadForTesting)) {
+@@ -1533,13 +1533,13 @@ std::variant<int, content::MainFunctionP
+ #else
+ 
+ #if BUILDFLAG(IS_MAC) || (BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && \
+-                          !BUILDFLAG(IS_CHROMEOS))
++                          !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD))
+   static const MainFunction kMainFunctions[] = {
+ #if BUILDFLAG(IS_MAC)
+       {switches::kRelauncherProcess, mac_relauncher::internal::RelauncherMain},
+       {switches::kCodeSignCloneCleanupProcess,
+        code_sign_clone_manager::internal::ChromeCodeSignCloneCleanupMain},
+-#elif BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD)
+       // This entry is not needed on Linux, where the NaCl loader
+       // process is launched via nacl_helper instead.
+       {switches::kNaClLoaderProcess, NaClMain},
diff --git a/chromium-wip/patches/patch-chrome_browser_BUILD.gn b/chromium-wip/patches/patch-chrome_browser_BUILD.gn
new file mode 100644
index 0000000000..a470eca3cd
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/BUILD.gn
+@@ -7056,6 +7056,13 @@ static_library("browser") {
+           [ "//third_party/webrtc/modules/desktop_capture:pipewire_config" ]
+     }
+ 
++    if (is_bsd) {
++      sources -= [
++        "metrics/bluetooth_metrics_provider.cc",
++        "metrics/bluetooth_metrics_provider.h",
++      ]
++    }
++
+     if (use_dbus) {
+       sources += [
+         "dbus_memory_pressure_evaluator_linux.cc",
diff --git a/chromium-wip/patches/patch-chrome_browser_about__flags.cc b/chromium-wip/patches/patch-chrome_browser_about__flags.cc
new file mode 100644
index 0000000000..b27166d44f
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_about__flags.cc
@@ -0,0 +1,426 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/about_flags.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/about_flags.cc
+@@ -265,7 +265,7 @@
+ #include "extensions/common/extension_features.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)  
+ #include "base/allocator/buildflags.h"
+ #endif
+ 
+@@ -354,7 +354,7 @@
+ #include "device/vr/public/cpp/switches.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "ui/ozone/public/ozone_switches.h"
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+@@ -364,7 +364,7 @@
+ #include "chrome/browser/win/mica_titlebar.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/contextual_cueing/contextual_cueing_features.h"  // nogncheck
+ #include "chrome/browser/enterprise/profile_management/profile_management_features.h"
+ #include "chrome/browser/enterprise/webstore/features.h"
+@@ -376,7 +376,7 @@
+ #include "components/user_education/common/user_education_features.h"  // nogncheck
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/ui_features.h"
+ #include "ui/base/ui_base_features.h"
+ #endif
+@@ -537,7 +537,7 @@ const FeatureEntry::FeatureVariation kDX
+     {"Max 3 Frames", &kDXGIWaitableSwapChain3Frames, 1, nullptr}};
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ const FeatureEntry::Choice kOzonePlatformHintRuntimeChoices[] = {
+     {flag_descriptions::kOzonePlatformHintChoiceDefault, "", ""},
+     {flag_descriptions::kOzonePlatformHintChoiceAuto,
+@@ -958,6 +958,31 @@ const FeatureEntry::FeatureVariation
+          std::size(kWebIdentityDigitalIdentityCredentialHighRiskDialogParam),
+          nullptr}};
+ 
++#if BUILDFLAG(IS_BSD)
++const FeatureEntry::FeatureParam kAudioBackendPulseAudio[] = {
++        { "audio-backend", "pulseaudio" }};
++const FeatureEntry::FeatureParam kAudioBackendSndio[] = {
++        { "audio-backend", "sndio" }};
++const FeatureEntry::FeatureParam kAudioBackendAudioIO[] = {
++        { "audio-backend", "audioio" }};
++const FeatureEntry::FeatureParam kAudioBackendAlsa[] = {
++        { "audio-backend", "alsa" }};
++const FeatureEntry::FeatureVariation
++    kAudioBackendVariations[] = {
++        {"using PulseAudio by default if available", kAudioBackendPulseAudio,
++         std::size(kAudioBackendPulseAudio),
++         nullptr},
++        {"using sndio by default if available", kAudioBackendSndio,
++         std::size(kAudioBackendSndio),
++         nullptr},
++        {"using audioio by default if available", kAudioBackendAudioIO,
++         std::size(kAudioBackendAudioIO),
++         nullptr},
++        {"using ALSA by default if available", kAudioBackendAlsa,
++         std::size(kAudioBackendAlsa),
++         nullptr}};
++#endif
++
+ const FeatureEntry::FeatureParam kClipboardMaximumAge60Seconds[] = {
+     {"UIClipboardMaximumAge", "60"}};
+ const FeatureEntry::FeatureParam kClipboardMaximumAge90Seconds[] = {
+@@ -1331,7 +1356,7 @@ constexpr FeatureEntry::FeatureVariation
+ #endif  // !BUILDFLAG(IS_ANDROID)
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ const FeatureEntry::FeatureParam kHistoryEmbeddingsAtKeywordAcceleration[]{
+     {"AtKeywordAcceleration", "true"},
+ };
+@@ -1369,7 +1394,7 @@ const FeatureEntry::FeatureVariation kRe
+ };
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ 
+ // A limited number of combinations of the rich autocompletion params.
+ const FeatureEntry::FeatureParam kOmniboxRichAutocompletionAggressive1[] = {
+@@ -3888,7 +3913,7 @@ const FeatureEntry::FeatureVariation
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ const flags_ui::FeatureEntry::FeatureParam kPwaNavigationCapturingDefaultOn[] =
+     {{"link_capturing_state", "on_by_default"}};
+ const flags_ui::FeatureEntry::FeatureParam kPwaNavigationCapturingDefaultOff[] =
+@@ -4323,7 +4348,7 @@ const FeatureEntry::FeatureVariation kSk
+      std::size(kSkiaGraphite_DebugLabelsEnabled), nullptr},
+ };
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ const FeatureEntry::FeatureParam kTranslationAPI_SkipLanguagePackLimit[] = {
+     {"TranslationAPIAcceptLanguagesCheck", "false"},
+     {"TranslationAPILimitLanguagePackCount", "false"}};
+@@ -4364,7 +4389,7 @@ const FeatureEntry::FeatureVariation
+          1, nullptr},
+ };
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ const FeatureEntry::FeatureParam kContextualCueingEnabledNoEngagementCap[] = {
+     {"BackoffTime", "0h"},
+     {"BackoffMultiplierBase", "0.0"},
+@@ -5399,7 +5424,7 @@ const FeatureEntry kFeatureEntries[] = {
+     },
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     {
+         "fluent-overlay-scrollbars",
+         flag_descriptions::kFluentOverlayScrollbarsName,
+@@ -5700,7 +5725,7 @@ const FeatureEntry kFeatureEntries[] = {
+      flag_descriptions::kEnableIsolatedWebAppDevModeName,
+      flag_descriptions::kEnableIsolatedWebAppDevModeDescription, kOsDesktop,
+      FEATURE_VALUE_TYPE(features::kIsolatedWebAppDevMode)},
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     {"enable-iwa-key-distribution-component",
+      flag_descriptions::kEnableIwaKeyDistributionComponentName,
+      flag_descriptions::kEnableIwaKeyDistributionComponentDescription,
+@@ -5920,7 +5945,7 @@ const FeatureEntry kFeatureEntries[] = {
+      FEATURE_VALUE_TYPE(media::kUseSCContentSharingPicker)},
+ #endif  // BUILDFLAG(IS_MAC)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     {"pulseaudio-loopback-for-cast",
+      flag_descriptions::kPulseaudioLoopbackForCastName,
+      flag_descriptions::kPulseaudioLoopbackForCastDescription, kOsLinux,
+@@ -5961,6 +5986,16 @@ const FeatureEntry kFeatureEntries[] = {
+      flag_descriptions::kWaylandSessionManagementName,
+      flag_descriptions::kWaylandSessionManagementDescription, kOsLinux,
+      FEATURE_VALUE_TYPE(features::kWaylandSessionManagement)},
++
++#if BUILDFLAG(IS_BSD)
++    {"audio-backend",
++     flag_descriptions::kAudioBackendName,
++     flag_descriptions::kAudioBackendDescription, kOsLinux,
++     FEATURE_WITH_PARAMS_VALUE_TYPE(
++         media::kAudioBackend,
++         kAudioBackendVariations,
++         "AudioBackend")},
++#endif
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+ #if BUILDFLAG(ENABLE_VR)
+@@ -6880,7 +6915,7 @@ const FeatureEntry kFeatureEntries[] = {
+                                     "MlUrlScoring")},
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+     {"contextual-search-box-uses-contextual-search-provider",
+      flag_descriptions::kContextualSearchBoxUsesContextualSearchProviderName,
+      flag_descriptions::
+@@ -7245,7 +7280,7 @@ const FeatureEntry kFeatureEntries[] = {
+                                     kNumSrpZpsRelatedSearches,
+                                     "PowerTools")},
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+     {"history-embeddings", flag_descriptions::kHistoryEmbeddingsName,
+      flag_descriptions::kHistoryEmbeddingsDescription, kOsDesktop,
+      FEATURE_WITH_PARAMS_VALUE_TYPE(history_embeddings::kHistoryEmbeddings,
+@@ -7761,7 +7796,7 @@ const FeatureEntry kFeatureEntries[] = {
+      FEATURE_VALUE_TYPE(printing::features::kAddPrinterViaPrintscanmgr)},
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+     {"cups-ipp-printing-backend",
+      flag_descriptions::kCupsIppPrintingBackendName,
+      flag_descriptions::kCupsIppPrintingBackendDescription, kOsDesktop,
+@@ -8061,7 +8096,7 @@ const FeatureEntry kFeatureEntries[] = {
+      flag_descriptions::kSupportToolScreenshotDescription, kOsDesktop,
+      FEATURE_VALUE_TYPE(features::kSupportToolScreenshot)},
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+     {"wasm-tts-component-updater-enabled",
+      flag_descriptions::kWasmTtsComponentUpdaterEnabledName,
+      flag_descriptions::kWasmTtsComponentUpdaterEnabledDescription, kOsDesktop,
+@@ -8750,7 +8785,7 @@ const FeatureEntry kFeatureEntries[] = {
+      FEATURE_VALUE_TYPE(media::kGlobalMediaControlsUpdatedUI)},
+ #endif  // !BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     {"enable-network-service-sandbox",
+      flag_descriptions::kEnableNetworkServiceSandboxName,
+      flag_descriptions::kEnableNetworkServiceSandboxDescription,
+@@ -9400,7 +9435,7 @@ const FeatureEntry kFeatureEntries[] = {
+      FEATURE_VALUE_TYPE(ash::features::kWallpaperGooglePhotosSharedAlbums)},
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     {"enable-get-all-screens-media", flag_descriptions::kGetAllScreensMediaName,
+      flag_descriptions::kGetAllScreensMediaDescription, kOsCrOS | kOsLinux,
+      FEATURE_VALUE_TYPE(blink::features::kGetAllScreensMedia)},
+@@ -9425,7 +9460,7 @@ const FeatureEntry kFeatureEntries[] = {
+      flag_descriptions::kGlobalVaapiLockDescription, kOsCrOS | kOsLinux,
+      FEATURE_VALUE_TYPE(media::kGlobalVaapiLock)},
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+     {
+         "ui-debug-tools",
+         flag_descriptions::kUIDebugToolsName,
+@@ -9892,7 +9927,7 @@ const FeatureEntry kFeatureEntries[] = {
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     {"media-session-enter-picture-in-picture",
+      flag_descriptions::kMediaSessionEnterPictureInPictureName,
+      flag_descriptions::kMediaSessionEnterPictureInPictureDescription,
+@@ -10065,7 +10100,7 @@ const FeatureEntry kFeatureEntries[] = {
+      flag_descriptions::kReduceTransferSizeUpdatedIPCDescription, kOsAll,
+      FEATURE_VALUE_TYPE(network::features::kReduceTransferSizeUpdatedIPC)},
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     {"reduce-user-agent-data-linux-platform-version",
+      flag_descriptions::kReduceUserAgentDataLinuxPlatformVersionName,
+      flag_descriptions::kReduceUserAgentDataLinuxPlatformVersionDescription,
+@@ -10581,7 +10616,7 @@ const FeatureEntry kFeatureEntries[] = {
+      kOsDesktop | kOsAndroid,
+      FEATURE_VALUE_TYPE(features::kProcessPerSiteUpToMainFrameThreshold)},
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     {"camera-mic-effects", flag_descriptions::kCameraMicEffectsName,
+      flag_descriptions::kCameraMicEffectsDescription,
+      static_cast<unsigned short>(kOsMac | kOsWin | kOsLinux),
+@@ -10712,7 +10747,7 @@ const FeatureEntry kFeatureEntries[] = {
+      FEATURE_VALUE_TYPE(chrome::android::kReadAloudTapToSeek)},
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+     {"third-party-profile-management",
+      flag_descriptions::kThirdPartyProfileManagementName,
+      flag_descriptions::kThirdPartyProfileManagementDescription,
+@@ -10741,7 +10776,7 @@ const FeatureEntry kFeatureEntries[] = {
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     {"enable-user-navigation-capturing-pwa",
+      flag_descriptions::kPwaNavigationCapturingName,
+      flag_descriptions::kPwaNavigationCapturingDescription,
+@@ -11481,7 +11516,7 @@ const FeatureEntry kFeatureEntries[] = {
+      flag_descriptions::kCanvasHibernationDescription, kOsAll,
+      FEATURE_VALUE_TYPE(blink::features::kCanvas2DHibernation)},
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     {"enable-history-sync-optin",
+      flag_descriptions::kEnableHistorySyncOptinName,
+      flag_descriptions::kEnableHistorySyncOptinDescription,
+@@ -11592,7 +11627,7 @@ const FeatureEntry kFeatureEntries[] = {
+                                     "HistoryOptInEducationalTipVariations")},
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+     {"supervised-profile-safe-search",
+      flag_descriptions::kSupervisedProfileSafeSearchName,
+      flag_descriptions::kSupervisedProfileSafeSearchDescription,
+@@ -11841,7 +11876,7 @@ const FeatureEntry kFeatureEntries[] = {
+          segmentation_platform::features::kSegmentationSurveyPage)},
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     {"autofill-enable-buy-now-pay-later",
+      flag_descriptions::kAutofillEnableBuyNowPayLaterName,
+      flag_descriptions::kAutofillEnableBuyNowPayLaterDescription, kOsDesktop,
+@@ -11942,7 +11977,7 @@ const FeatureEntry kFeatureEntries[] = {
+      FEATURE_VALUE_TYPE(
+          autofill::features::kAutofillEnableCardInfoRuntimeRetrieval)},
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     {"translation-api", flag_descriptions::kTranslationAPIName,
+      flag_descriptions::kTranslationAPIDescription, kOsMac | kOsWin | kOsLinux,
+      FEATURE_WITH_PARAMS_VALUE_TYPE(blink::features::kTranslationAPI,
+@@ -11976,7 +12011,7 @@ const FeatureEntry kFeatureEntries[] = {
+      FEATURE_VALUE_TYPE(
+          password_manager::features::kPasswordFormClientsideClassifier)},
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     {"contextual-cueing", flag_descriptions::kContextualCueingName,
+      flag_descriptions::kContextualCueingDescription,
+      kOsLinux | kOsMac | kOsWin,
+@@ -12310,7 +12345,7 @@ const FeatureEntry kFeatureEntries[] = {
+      FEATURE_VALUE_TYPE(ui::kUseNewEtc1Encoder)},
+ #endif  // !BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     {"automatic-usb-detach", flag_descriptions::kAutomaticUsbDetachName,
+      flag_descriptions::kAutomaticUsbDetachDescription, kOsAndroid | kOsLinux,
+      FEATURE_VALUE_TYPE(features::kAutomaticUsbDetach)},
+@@ -12354,7 +12389,7 @@ const FeatureEntry kFeatureEntries[] = {
+ #endif  // !BUILDFLAG(IS_ANDROID)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     {"autofill-enable-amount-extraction-desktop",
+      flag_descriptions::kAutofillEnableAmountExtractionDesktopName,
+      flag_descriptions::kAutofillEnableAmountExtractionDesktopDescription,
+@@ -12374,7 +12409,7 @@ const FeatureEntry kFeatureEntries[] = {
+      FEATURE_VALUE_TYPE(blink::features::kClipboardContentsId)},
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     {"autofill-enable-amount-extraction-allowlist-desktop",
+      flag_descriptions::kAutofillEnableAmountExtractionAllowlistDesktopName,
+      flag_descriptions::
+@@ -12492,7 +12527,7 @@ const FeatureEntry kFeatureEntries[] = {
+          apps::chrome_app_deprecation::kAllowUserInstalledChromeApps)},
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+     {"chrome-web-store-navigation-throttle",
+      flag_descriptions::kChromeWebStoreNavigationThrottleName,
+      flag_descriptions::kChromeWebStoreNavigationThrottleDescription,
+@@ -12528,7 +12563,7 @@ const FeatureEntry kFeatureEntries[] = {
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+     {"autofill-enable-amount-extraction-testing",
+      flag_descriptions::kAutofillEnableAmountExtractionTestingName,
+      flag_descriptions::kAutofillEnableAmountExtractionTestingDescription,
+@@ -12543,7 +12578,7 @@ const FeatureEntry kFeatureEntries[] = {
+      flag_descriptions::kEnableWebAppUpdateTokenParsingDescription, kOsAll,
+      FEATURE_VALUE_TYPE(features::kWebAppEnableUpdateTokenParsing)},
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     {"root-scrollbar-follows-browser-theme",
+      flag_descriptions::kRootScrollbarFollowsTheme,
+      flag_descriptions::kRootScrollbarFollowsThemeDescription,
+@@ -12792,7 +12827,7 @@ const FeatureEntry kFeatureEntries[] = {
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     {"tab-group-home", tabs::flag_descriptions::kTabGroupHomeName,
+      tabs::flag_descriptions::kTabGroupHomeDescription, kOsDesktop,
+      FEATURE_VALUE_TYPE(tabs::kTabGroupHome)},
+@@ -12878,7 +12913,7 @@ const FeatureEntry kFeatureEntries[] = {
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     {"enable-site-search-allow-user-override-policy",
+      flag_descriptions::kEnableSiteSearchAllowUserOverridePolicyName,
+      flag_descriptions::kEnableSiteSearchAllowUserOverridePolicyDescription,
+@@ -13008,7 +13043,7 @@ const FeatureEntry kFeatureEntries[] = {
+      FEATURE_VALUE_TYPE(blink::features::kWebAppInstallation)},
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+     {"lens-search-side-panel-default-width-change",
+      flag_descriptions::kLensSearchSidePanelDefaultWidthChangeName,
+      flag_descriptions::kLensSearchSidePanelDefaultWidthChangeDescription,
+@@ -13032,7 +13067,7 @@ const FeatureEntry kFeatureEntries[] = {
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     {"autofill-enable-buy-now-pay-later-for-klarna",
+      flag_descriptions::kAutofillEnableBuyNowPayLaterForKlarnaName,
+      flag_descriptions::kAutofillEnableBuyNowPayLaterForKlarnaDescription,
+@@ -13073,7 +13108,7 @@ const FeatureEntry kFeatureEntries[] = {
+          autofill::features::kAutofillEnableDownstreamCardAwarenessIph)},
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+     {"enable-lens-overlay-back-to-page",
+      flag_descriptions::kLensOverlayBackToPageName,
+      flag_descriptions::kLensOverlayBackToPageDescription, kOsDesktop,
diff --git a/chromium-wip/patches/patch-chrome_browser_accessibility_page__colors.cc b/chromium-wip/patches/patch-chrome_browser_accessibility_page__colors.cc
new file mode 100644
index 0000000000..4abae175f6
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_accessibility_page__colors.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/accessibility/page_colors.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/accessibility/page_colors.cc
+@@ -12,7 +12,7 @@
+ #include "components/sync_preferences/pref_service_syncable.h"
+ #include "ui/native_theme/native_theme.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/linux/linux_ui.h"
+ #include "ui/linux/linux_ui_factory.h"
+ #endif  // BUILDFLAG(IS_LINUX)
+@@ -55,7 +55,7 @@ void PageColors::Init() {
+ 
+ void PageColors::OnPageColorsChanged() {
+   auto* native_theme = ui::NativeTheme::GetInstanceForNativeUi();
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Allow the Linux native theme to update its state for page colors.
+   if (auto* linux_ui_theme = ui::GetDefaultLinuxUiTheme()) {
+     if (auto* linux_native_theme = linux_ui_theme->GetNativeTheme()) {
diff --git a/chromium-wip/patches/patch-chrome_browser_after__startup__task__utils.cc b/chromium-wip/patches/patch-chrome_browser_after__startup__task__utils.cc
new file mode 100644
index 0000000000..09a8f749a6
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_after__startup__task__utils.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/after_startup_task_utils.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/after_startup_task_utils.cc
+@@ -112,7 +112,7 @@ void SetBrowserStartupIsComplete() {
+                        TRACE_EVENT_SCOPE_GLOBAL, "BrowserCount", browser_count);
+   GetStartupCompleteFlag().Set();
+ #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Process::Current().CreationTime() is not available on all platforms.
+   const base::Time process_creation_time =
+       base::Process::Current().CreationTime();
diff --git a/chromium-wip/patches/patch-chrome_browser_apps_app__service_publishers_extension__apps.cc b/chromium-wip/patches/patch-chrome_browser_apps_app__service_publishers_extension__apps.cc
new file mode 100644
index 0000000000..f2d2be4ed0
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_apps_app__service_publishers_extension__apps.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/apps/app_service/publishers/extension_apps.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/apps/app_service/publishers/extension_apps.cc
+@@ -23,7 +23,7 @@ ExtensionApps::ExtensionApps(AppServiceP
+ ExtensionApps::~ExtensionApps() = default;
+ 
+ bool ExtensionApps::Accepts(const extensions::Extension* extension) {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (extensions::IsExtensionUnsupportedDeprecatedApp(profile(),
+                                                       extension->id())) {
+     return false;
diff --git a/chromium-wip/patches/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc b/chromium-wip/patches/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc
new file mode 100644
index 0000000000..0a5d8615b5
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc
@@ -0,0 +1,71 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/apps/platform_apps/platform_app_launch.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/apps/platform_apps/platform_app_launch.cc
+@@ -19,7 +19,7 @@
+ #include "extensions/common/constants.h"
+ #include "extensions/common/extension.h"
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/browser.h"
+ #include "chrome/browser/ui/browser_navigator.h"
+ #include "chrome/browser/ui/browser_window.h"
+@@ -86,7 +86,7 @@ bool OpenExtensionApplicationWindow(Prof
+   if (launch_container == LaunchContainer::kLaunchContainerTab)
+     return false;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (OpenDeprecatedApplicationPrompt(profile, app_id)) {
+     return false;
+   }
+@@ -118,7 +118,7 @@ content::WebContents* OpenExtensionAppli
+   if (launch_container != apps::LaunchContainer::kLaunchContainerTab)
+     return nullptr;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (OpenDeprecatedApplicationPrompt(profile, app_id)) {
+     return nullptr;
+   }
+@@ -134,7 +134,7 @@ content::WebContents* OpenExtensionAppli
+   return app_tab;
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ bool OpenDeprecatedApplicationPrompt(Profile* profile,
+                                      const std::string& app_id) {
+   if (!extensions::IsExtensionUnsupportedDeprecatedApp(profile, app_id))
+@@ -170,7 +170,7 @@ bool OpenExtensionApplicationWithReenabl
+   if (!GetPlatformApp(profile, app_id))
+     return false;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (OpenDeprecatedApplicationPrompt(profile, app_id)) {
+     return false;
+   }
+@@ -192,7 +192,7 @@ content::WebContents* OpenExtensionAppSh
+                                          ->enabled_extensions()
+                                          .GetAppByURL(url);
+   if (app) {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     if (OpenDeprecatedApplicationPrompt(profile, app->id())) {
+       return nullptr;
+     }
+@@ -215,7 +215,7 @@ void RecordExtensionAppLaunchOnTabRestor
+   if (!extension)
+     return;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (OpenDeprecatedApplicationPrompt(profile, extension->id())) {
+     return;
+   }
diff --git a/chromium-wip/patches/patch-chrome_browser_apps_platform__apps_platform__app__launch.h b/chromium-wip/patches/patch-chrome_browser_apps_platform__apps_platform__app__launch.h
new file mode 100644
index 0000000000..4f72be28df
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_apps_platform__apps_platform__app__launch.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/apps/platform_apps/platform_app_launch.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/apps/platform_apps/platform_app_launch.h
+@@ -38,7 +38,7 @@ bool OpenExtensionApplicationWindow(Prof
+ content::WebContents* OpenExtensionApplicationTab(Profile* profile,
+                                                   const std::string& app_id);
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Opens the deprecated Chrome Apps flow if |app_id| refers to a Chrome App and
+ // Chrome Apps are deprecated on the |profile|. Returns true if that was the
+ // case, or false otherwise.
diff --git a/chromium-wip/patches/patch-chrome_browser_autocomplete_chrome__autocomplete__scheme__classifier.cc b/chromium-wip/patches/patch-chrome_browser_autocomplete_chrome__autocomplete__scheme__classifier.cc
new file mode 100644
index 0000000000..e02172e3ae
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_autocomplete_chrome__autocomplete__scheme__classifier.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc
+@@ -104,7 +104,7 @@ ChromeAutocompleteSchemeClassifier::GetI
+       return metrics::OmniboxInputType::QUERY;
+ 
+     case ExternalProtocolHandler::UNKNOWN: {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       // Linux impl of GetApplicationNameForScheme doesn't distinguish
+       // between URL schemes with handers and those without. This will
+       // make the default behaviour be search on Linux.
diff --git a/chromium-wip/patches/patch-chrome_browser_background_extensions_background__mode__manager.cc b/chromium-wip/patches/patch-chrome_browser_background_extensions_background__mode__manager.cc
new file mode 100644
index 0000000000..b5449e07c7
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_background_extensions_background__mode__manager.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/background/extensions/background_mode_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/background/extensions/background_mode_manager.cc
+@@ -879,7 +879,7 @@ gfx::ImageSkia GetStatusTrayIcon() {
+   }
+ 
+   return family->CreateExact(size).AsImageSkia();
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
+       IDR_PRODUCT_LOGO_128);
+ #elif BUILDFLAG(IS_MAC)
diff --git a/chromium-wip/patches/patch-chrome_browser_background_extensions_background__mode__optimizer.cc b/chromium-wip/patches/patch-chrome_browser_background_extensions_background__mode__optimizer.cc
new file mode 100644
index 0000000000..600de696d6
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_background_extensions_background__mode__optimizer.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/background/extensions/background_mode_optimizer.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/background/extensions/background_mode_optimizer.cc
+@@ -31,7 +31,7 @@ std::unique_ptr<BackgroundModeOptimizer>
+     return nullptr;
+   }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (base::FeatureList::IsEnabled(features::kBackgroundModeAllowRestart)) {
+     // Private ctor.
+     return base::WrapUnique(new BackgroundModeOptimizer());
diff --git a/chromium-wip/patches/patch-chrome_browser_background_glic_glic__status__icon.cc b/chromium-wip/patches/patch-chrome_browser_background_glic_glic__status__icon.cc
new file mode 100644
index 0000000000..d1b5188561
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_background_glic_glic__status__icon.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/background/glic/glic_status_icon.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/background/glic/glic_status_icon.cc
+@@ -92,7 +92,7 @@ GlicStatusIcon::GlicStatusIcon(GlicContr
+   if (!status_icon_) {
+     return;
+   }
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   //  Set a vector icon for proper themeing on Linux.
+   status_icon_->SetIcon(
+       GlicVectorIconManager::GetVectorIcon(IDR_GLIC_BUTTON_VECTOR_ICON));
+@@ -134,7 +134,7 @@ GlicStatusIcon::~GlicStatusIcon() {
+ 
+   context_menu_ = nullptr;
+   if (status_icon_) {
+-#if !BUILDFLAG(IS_LINUX)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)
+     status_icon_->RemoveObserver(this);
+ #endif
+     std::unique_ptr<StatusIcon> removed_icon =
+@@ -242,7 +242,7 @@ void GlicStatusIcon::UpdateHotkey(const 
+ }
+ 
+ void GlicStatusIcon::UpdateVisibilityOfExitInContextMenu() {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (context_menu_) {
+     const bool is_visible = BrowserList::GetInstance()->empty();
+     const std::optional<size_t> index =
+@@ -292,7 +292,7 @@ std::unique_ptr<StatusIconMenuModel> Gli
+   menu->AddItem(IDC_GLIC_STATUS_ICON_MENU_SETTINGS,
+                 l10n_util::GetStringUTF16(IDS_GLIC_STATUS_ICON_MENU_SETTINGS));
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   menu->AddSeparator(ui::NORMAL_SEPARATOR);
+   menu->AddItem(IDC_GLIC_STATUS_ICON_MENU_EXIT,
+                 l10n_util::GetStringUTF16(IDS_GLIC_STATUS_ICON_MENU_EXIT));
diff --git a/chromium-wip/patches/patch-chrome_browser_browser__features.cc b/chromium-wip/patches/patch-chrome_browser_browser__features.cc
new file mode 100644
index 0000000000..88edf3483d
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_browser__features.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/browser_features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/browser_features.cc
+@@ -75,7 +75,7 @@ BASE_FEATURE(kClearUserDataUponProfileDe
+              "ClearUserDataUponProfileDestruction",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Enables usage of os_crypt_async::SecretPortalKeyProvider.  Once
+ // `kSecretPortalKeyProviderUseForEncryption` is enabled, this flag cannot be
+ // disabled without losing data.
+@@ -94,7 +94,7 @@ BASE_FEATURE(kUseFreedesktopSecretKeyPro
+ // the browser exits.
+ BASE_FEATURE(kDestroyProfileOnBrowserClose,
+              "DestroyProfileOnBrowserClose",
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+              base::FEATURE_ENABLED_BY_DEFAULT);
+ #else
+              base::FEATURE_DISABLED_BY_DEFAULT);
+@@ -232,7 +232,7 @@ BASE_FEATURE(kSandboxExternalProtocolBlo
+              "SandboxExternalProtocolBlockedWarning",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // If true, encrypt new data with the key provided by SecretPortalKeyProvider.
+ // Otherwise, it will only decrypt existing data.
+ BASE_FEATURE(kSecretPortalKeyProviderUseForEncryption,
diff --git a/chromium-wip/patches/patch-chrome_browser_browser__features.h b/chromium-wip/patches/patch-chrome_browser_browser__features.h
new file mode 100644
index 0000000000..2d5fddfb04
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_browser__features.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/browser_features.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/browser_features.h
+@@ -38,7 +38,7 @@ BASE_DECLARE_FEATURE(kCertificateTranspa
+ BASE_DECLARE_FEATURE(kCertVerificationNetworkTime);
+ BASE_DECLARE_FEATURE(kClearUserDataUponProfileDestruction);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_DECLARE_FEATURE(kDbusSecretPortal);
+ BASE_DECLARE_FEATURE(kUseFreedesktopSecretKeyProvider);
+ #endif
+@@ -101,7 +101,7 @@ BASE_DECLARE_FEATURE(kRestartNetworkServ
+ BASE_DECLARE_FEATURE(kSandboxExternalProtocolBlocked);
+ BASE_DECLARE_FEATURE(kSandboxExternalProtocolBlockedWarning);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_DECLARE_FEATURE(kSecretPortalKeyProviderUseForEncryption);
+ BASE_DECLARE_FEATURE(kUseFreedesktopSecretKeyProviderForEncryption);
+ #endif
diff --git a/chromium-wip/patches/patch-chrome_browser_browser__process__impl.cc b/chromium-wip/patches/patch-chrome_browser_browser__process__impl.cc
new file mode 100644
index 0000000000..8294ec4c04
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_browser__process__impl.cc
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/browser_process_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/browser_process_impl.cc
+@@ -256,7 +256,7 @@
+ #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/browser_features.h"
+ #include "components/os_crypt/async/browser/fallback_linux_key_provider.h"
+ #include "components/os_crypt/async/browser/freedesktop_secret_key_provider.h"
+@@ -268,7 +268,7 @@
+ #include "chrome/browser/safe_browsing/safe_browsing_service.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // How often to check if the persistent instance of Chrome needs to restart
+ // to install an update.
+ static const int kUpdateCheckIntervalHours = 6;
+@@ -1168,7 +1168,7 @@ void BrowserProcessImpl::RegisterPrefs(P
+                                 GoogleUpdateSettings::GetCollectStatsConsent());
+   registry->RegisterBooleanPref(prefs::kDevToolsRemoteDebuggingAllowed, true);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   os_crypt_async::SecretPortalKeyProvider::RegisterLocalPrefs(registry);
+ #endif
+ }
+@@ -1436,7 +1436,7 @@ void BrowserProcessImpl::PreMainMessageL
+           local_state())));
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
+   if (cmd_line->GetSwitchValueASCII(password_manager::kPasswordStore) !=
+       "basic") {
+@@ -1716,7 +1716,7 @@ void BrowserProcessImpl::Unpin() {
+ }
+ 
+ // Mac is currently not supported.
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ 
+ bool BrowserProcessImpl::IsRunningInBackground() const {
+   // Check if browser is in the background.
diff --git a/chromium-wip/patches/patch-chrome_browser_browser__process__impl.h b/chromium-wip/patches/patch-chrome_browser_browser__process__impl.h
new file mode 100644
index 0000000000..457c3541fe
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_browser__process__impl.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/browser_process_impl.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/browser_process_impl.h
+@@ -416,7 +416,7 @@ class BrowserProcessImpl : public Browse
+ 
+   std::unique_ptr<BatteryMetrics> battery_metrics_;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   base::RepeatingTimer autoupdate_timer_;
+ 
+   // Gets called by autoupdate timer to see if browser needs restart and can be
diff --git a/chromium-wip/patches/patch-chrome_browser_chrome__browser__field__trials.cc b/chromium-wip/patches/patch-chrome_browser_chrome__browser__field__trials.cc
new file mode 100644
index 0000000000..74487ee685
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_chrome__browser__field__trials.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/chrome_browser_field_trials.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/chrome_browser_field_trials.cc
+@@ -44,7 +44,7 @@
+ #include "chromeos/ash/services/multidevice_setup/public/cpp/first_run_field_trial.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "base/nix/xdg_util.h"
+ #include "ui/base/ui_base_features.h"
+ #endif  // BUILDFLAG(IS_LINUX)
+@@ -100,7 +100,7 @@ void ChromeBrowserFieldTrials::RegisterF
+     base::FeatureList* feature_list) {
+   variations::FeatureOverrides feature_overrides(*feature_list);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // On Linux/Desktop platform variants, such as ozone/wayland, some features
+   // might need to be disabled as per OzonePlatform's runtime properties.
+   // OzonePlatform selection and initialization, in turn, depend on Chrome flags
diff --git a/chromium-wip/patches/patch-chrome_browser_chrome__browser__interface__binders.cc b/chromium-wip/patches/patch-chrome_browser_chrome__browser__interface__binders.cc
new file mode 100644
index 0000000000..eb2729e4e4
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_chrome__browser__interface__binders.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/chrome_browser_interface_binders.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/chrome_browser_interface_binders.cc
+@@ -82,7 +82,7 @@
+ #endif  // BUILDFLAG(ENABLE_UNHANDLED_TAP)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/screen_ai/screen_ai_service_router.h"
+ #include "chrome/browser/screen_ai/screen_ai_service_router_factory.h"
+ #include "chrome/browser/ui/web_applications/sub_apps_service_impl.h"
+@@ -365,7 +365,7 @@ void BindMediaFoundationPreferences(
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ void BindScreenAIAnnotator(
+     content::RenderFrameHost* frame_host,
+     mojo::PendingReceiver<screen_ai::mojom::ScreenAIAnnotator> receiver) {
+@@ -550,7 +550,7 @@ void PopulateChromeFrameBinders(
+ #endif  // BUILDFLAG(ENABLE_SPEECH_SERVICE)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (base::FeatureList::IsEnabled(blink::features::kDesktopPWAsSubApps) &&
+       !render_frame_host->GetParentOrOuterDocument()) {
+     // The service binder will reject non-primary main frames, but we still need
diff --git a/chromium-wip/patches/patch-chrome_browser_chrome__browser__interface__binders__webui.cc b/chromium-wip/patches/patch-chrome_browser_chrome__browser__interface__binders__webui.cc
new file mode 100644
index 0000000000..5731f10c6f
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_chrome__browser__interface__binders__webui.cc
@@ -0,0 +1,76 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/chrome_browser_interface_binders_webui.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/chrome_browser_interface_binders_webui.cc
+@@ -48,20 +48,20 @@
+ #include "content/public/browser/web_ui_controller_interface_binder.h"
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/webui/connectors_internals/connectors_internals.mojom.h"
+ #include "chrome/browser/ui/webui/connectors_internals/connectors_internals_ui.h"
+ #include "ui/webui/resources/cr_components/app_management/app_management.mojom.h"
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/webui/discards/discards.mojom.h"
+ #include "chrome/browser/ui/webui/discards/discards_ui.h"
+ #include "chrome/browser/ui/webui/discards/site_data.mojom.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/webui/app_settings/web_app_settings_ui.h"
+ #include "chrome/browser/ui/webui/on_device_translation_internals/on_device_translation_internals_ui.h"
+ #include "chrome/browser/ui/webui/signin/history_sync_optin/history_sync_optin.mojom.h"
+@@ -464,7 +464,7 @@ void PopulateChromeWebUIFrameBinders(
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   RegisterWebUIControllerInterfaceBinder<
+       connectors_internals::mojom::PageHandler,
+       enterprise_connectors::ConnectorsInternalsUI>(map);
+@@ -475,7 +475,7 @@ void PopulateChromeWebUIFrameBinders(
+                                          policy::DlpInternalsUI>(map);
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   RegisterWebUIControllerInterfaceBinder<
+       app_management::mojom::PageHandlerFactory, WebAppSettingsUI>(map);
+ 
+@@ -616,14 +616,14 @@ void PopulateChromeWebUIFrameBinders(
+         HistoryClustersSidePanelUI, NewTabPageUI, BookmarksSidePanelUI>(map);
+   }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   RegisterWebUIControllerInterfaceBinder<whats_new::mojom::PageHandlerFactory,
+                                          WhatsNewUI>(map);
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ 
+   RegisterWebUIControllerInterfaceBinder<
+       browser_command::mojom::CommandHandlerFactory,
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       WhatsNewUI,
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+       NewTabPageUI>(map);
+@@ -1166,7 +1166,7 @@ void PopulateChromeWebUIFrameBinders(
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID) || BUILDFLAG(IS_BSD)
+   RegisterWebUIControllerInterfaceBinder<discards::mojom::DetailsProvider,
+                                          DiscardsUI>(map);
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_chrome__browser__main.cc b/chromium-wip/patches/patch-chrome_browser_chrome__browser__main.cc
new file mode 100644
index 0000000000..db858a46a7
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_chrome__browser__main.cc
@@ -0,0 +1,121 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/chrome_browser_main.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/chrome_browser_main.cc
+@@ -152,7 +152,7 @@
+ #endif
+ 
+ #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "sql/database.h"
+ #endif
+ 
+@@ -178,11 +178,11 @@
+ #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h"
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/first_run/upgrade_util_linux.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/headless/headless_mode_metrics.h"  // nogncheck
+ #include "chrome/browser/headless/headless_mode_util.h"     // nogncheck
+ #include "chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h"
+@@ -193,7 +193,7 @@
+ #include "ui/gfx/switches.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/first_run/upgrade_util.h"
+ #endif
+ 
+@@ -271,7 +271,7 @@
+ #include "chrome/browser/chrome_process_singleton.h"
+ #include "chrome/browser/ui/startup/startup_browser_creator.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "base/nix/xdg_util.h"
+ #endif
+ #endif  // BUILDFLAG(ENABLE_PROCESS_SINGLETON)
+@@ -294,7 +294,7 @@
+ 
+ namespace {
+ #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ constexpr base::FilePath::CharType kMediaHistoryDatabaseName[] =
+     FILE_PATH_LITERAL("Media History");
+ 
+@@ -445,7 +445,7 @@ void ProcessSingletonNotificationCallbac
+   }
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Set the global activation token sent as a command line switch by another
+   // browser process. This also removes the switch after use to prevent any side
+   // effects of leaving it in the command line after this point.
+@@ -1012,7 +1012,7 @@ int ChromeBrowserMainParts::PreCreateThr
+ 
+ #if BUILDFLAG(ENABLE_EXTENSIONS_CORE) &&                                   \
+     (BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-     BUILDFLAG(IS_ANDROID))
++     BUILDFLAG(IS_ANDROID)) || BUILDFLAG(IS_BSD)
+   // Create directory for user-level Native Messaging manifest files. This
+   // makes it less likely that the directory will be created by third-party
+   // software with incorrect owner or permission. See crbug.com/725513 .
+@@ -1056,7 +1056,7 @@ int ChromeBrowserMainParts::PreCreateThr
+ 
+ #endif  // BUILDFLAG(IS_MAC)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   metrics::DesktopSessionDurationTracker::Initialize();
+   ProfileActivityMetricsRecorder::Initialize();
+   TouchModeStatsTracker::Initialize(
+@@ -1258,7 +1258,7 @@ void ChromeBrowserMainParts::PostProfile
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+ #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   // Delete the media history database if it still exists.
+   // TODO(crbug.com/40177301): Remove this.
+   base::ThreadPool::PostTask(
+@@ -1309,7 +1309,7 @@ void ChromeBrowserMainParts::PostProfile
+       *UrlLanguageHistogramFactory::GetForBrowserContext(profile));
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   if (headless::IsHeadlessMode()) {
+     headless::ReportHeadlessActionMetrics();
+   }
+@@ -1418,7 +1418,7 @@ int ChromeBrowserMainParts::PreMainMessa
+   // In headless mode provide alternate SelectFileDialog factory overriding
+   // any platform specific SelectFileDialog implementation that may have been
+   // set.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   if (headless::IsHeadlessMode()) {
+     headless::HeadlessSelectFileDialogFactory::SetUp();
+   }
+@@ -1963,7 +1963,7 @@ bool ChromeBrowserMainParts::ProcessSing
+ 
+   // Drop the request if headless mode is in effect or the request is from
+   // a headless Chrome process.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   if (headless::IsHeadlessMode() ||
+       command_line.HasSwitch(switches::kHeadless)) {
+     return false;
diff --git a/chromium-wip/patches/patch-chrome_browser_chrome__browser__main__extra__parts__linux.cc b/chromium-wip/patches/patch-chrome_browser_chrome__browser__main__extra__parts__linux.cc
new file mode 100644
index 0000000000..1de7fa98a5
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_chrome__browser__main__extra__parts__linux.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/chrome_browser_main_extra_parts_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/chrome_browser_main_extra_parts_linux.cc
+@@ -60,7 +60,7 @@ void ChromeBrowserMainExtraPartsLinux::P
+ 
+ // static
+ void ChromeBrowserMainExtraPartsLinux::InitOzonePlatformHint() {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   base::CommandLine* const command_line =
+       base::CommandLine::ForCurrentProcess();
+   std::unique_ptr<base::Environment> env = base::Environment::Create();
diff --git a/chromium-wip/patches/patch-chrome_browser_chrome__browser__main__extra__parts__ozone.cc b/chromium-wip/patches/patch-chrome_browser_chrome__browser__main__extra__parts__ozone.cc
new file mode 100644
index 0000000000..629cb394bc
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_chrome__browser__main__extra__parts__ozone.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/chrome_browser_main_extra_parts_ozone.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/chrome_browser_main_extra_parts_ozone.cc
+@@ -28,7 +28,7 @@ void ChromeBrowserMainExtraPartsOzone::P
+ }
+ 
+ void ChromeBrowserMainExtraPartsOzone::PostMainMessageLoopRun() {
+-#if !BUILDFLAG(IS_LINUX)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)
+   ui::OzonePlatform::GetInstance()->PostMainMessageLoopRun();
+ #endif
+ }
diff --git a/chromium-wip/patches/patch-chrome_browser_chrome__browser__main__linux.cc b/chromium-wip/patches/patch-chrome_browser_chrome__browser__main__linux.cc
new file mode 100644
index 0000000000..09ad7d0481
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_chrome__browser__main__linux.cc
@@ -0,0 +1,45 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/chrome_browser_main_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/chrome_browser_main_linux.cc
+@@ -24,7 +24,7 @@
+ #include "device/bluetooth/dbus/bluez_dbus_thread_manager.h"
+ #include "ui/base/l10n/l10n_util.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/ozone/public/ozone_platform.h"
+ #endif
+ 
+@@ -65,7 +65,9 @@ void ChromeBrowserMainPartsLinux::PostCr
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+ #if !BUILDFLAG(IS_CHROMEOS)
++#if !BUILDFLAG(IS_BSD)
+   bluez::BluezDBusManager::Initialize(nullptr /* system_bus */);
++#endif
+ 
+   // Set up crypt config. This needs to be done before anything starts the
+   // network service, as the raw encryption key needs to be shared with the
+@@ -91,7 +93,7 @@ void ChromeBrowserMainPartsLinux::PostCr
+   ChromeBrowserMainPartsPosix::PostCreateMainMessageLoop();
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() {
+   ChromeBrowserMainPartsPosix::PostMainMessageLoopRun();
+   ui::OzonePlatform::GetInstance()->PostMainMessageLoopRun();
+@@ -129,7 +131,7 @@ void ChromeBrowserMainPartsLinux::PostBr
+ #endif  // BUILDFLAG(USE_DBUS) && !BUILDFLAG(IS_CHROMEOS)
+ 
+ void ChromeBrowserMainPartsLinux::PostDestroyThreads() {
+-#if BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // No-op; per PostBrowserStart() comment, this is done elsewhere.
+ #else
+   bluez::BluezDBusManager::Shutdown();
diff --git a/chromium-wip/patches/patch-chrome_browser_chrome__browser__main__linux.h b/chromium-wip/patches/patch-chrome_browser_chrome__browser__main__linux.h
new file mode 100644
index 0000000000..119c2e455a
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_chrome__browser__main__linux.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/chrome_browser_main_linux.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/chrome_browser_main_linux.h
+@@ -31,7 +31,7 @@ class ChromeBrowserMainPartsLinux : publ
+ 
+   // ChromeBrowserMainPartsPosix overrides.
+   void PostCreateMainMessageLoop() override;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   void PostMainMessageLoopRun() override;
+ #endif
+   void PreProfileInit() override;
diff --git a/chromium-wip/patches/patch-chrome_browser_chrome__browser__main__posix.cc b/chromium-wip/patches/patch-chrome_browser_chrome__browser__main__posix.cc
new file mode 100644
index 0000000000..3375f7227c
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_chrome__browser__main__posix.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/chrome_browser_main_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/chrome_browser_main_posix.cc
+@@ -81,7 +81,7 @@ void ExitHandler::ExitWhenPossibleOnUITh
+     // ExitHandler takes care of deleting itself.
+     new ExitHandler();
+   } else {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     switch (signal) {
+       case SIGINT:
+       case SIGHUP:
diff --git a/chromium-wip/patches/patch-chrome_browser_chrome__content__browser__client.cc b/chromium-wip/patches/patch-chrome_browser_chrome__content__browser__client.cc
new file mode 100644
index 0000000000..a51ef36264
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_chrome__content__browser__client.cc
@@ -0,0 +1,153 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/chrome_content_browser_client.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/chrome_content_browser_client.cc
+@@ -474,7 +474,7 @@
+ #include "components/user_manager/user_manager.h"
+ #include "services/service_manager/public/mojom/interface_provider_spec.mojom.h"
+ #include "storage/browser/file_system/external_mount_points.h"
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/chrome_browser_main_linux.h"
+ #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h"
+ #elif BUILDFLAG(IS_ANDROID)
+@@ -570,7 +570,7 @@
+ #include "services/network/public/mojom/permissions_policy/permissions_policy_feature.mojom.h"
+ #endif  //  !BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "components/crash/core/app/crash_switches.h"
+ #include "components/crash/core/app/crashpad.h"
+ #endif
+@@ -579,7 +579,7 @@
+ #include "components/crash/content/browser/crash_handler_host_linux.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/enterprise/chrome_browser_main_extra_parts_enterprise.h"
+ #endif
+ 
+@@ -587,7 +587,7 @@
+ #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/chrome_browser_main_extra_parts_linux.h"
+ #elif BUILDFLAG(IS_OZONE)
+ #include "chrome/browser/chrome_browser_main_extra_parts_ozone.h"
+@@ -1409,7 +1409,7 @@ void ChromeContentBrowserClient::Registe
+   registry->RegisterBooleanPref(prefs::kDataURLWhitespacePreservationEnabled,
+                                 true);
+   registry->RegisterBooleanPref(prefs::kEnableUnsafeSwiftShader, false);
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   registry->RegisterBooleanPref(prefs::kOutOfProcessSystemDnsResolutionEnabled,
+                                 true);
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)
+@@ -1622,7 +1622,7 @@ ChromeContentBrowserClient::CreateBrowse
+ #elif BUILDFLAG(IS_CHROMEOS)
+   main_parts = std::make_unique<ash::ChromeBrowserMainPartsAsh>(
+       is_integration_test, &startup_data_);
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   main_parts = std::make_unique<ChromeBrowserMainPartsLinux>(
+       is_integration_test, &startup_data_);
+ #elif BUILDFLAG(IS_ANDROID)
+@@ -1653,7 +1653,7 @@ ChromeContentBrowserClient::CreateBrowse
+   // Construct additional browser parts. Stages are called in the order in
+   // which they are added.
+ #if defined(TOOLKIT_VIEWS)
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   main_parts->AddParts(
+       std::make_unique<ChromeBrowserMainExtraPartsViewsLinux>());
+ #else
+@@ -1670,7 +1670,7 @@ ChromeContentBrowserClient::CreateBrowse
+   main_parts->AddParts(std::make_unique<ChromeBrowserMainExtraPartsAsh>());
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   main_parts->AddParts(std::make_unique<ChromeBrowserMainExtraPartsLinux>());
+ #elif BUILDFLAG(IS_OZONE)
+   main_parts->AddParts(std::make_unique<ChromeBrowserMainExtraPartsOzone>());
+@@ -1689,7 +1689,7 @@ ChromeContentBrowserClient::CreateBrowse
+ 
+   chrome::AddMetricsExtraParts(main_parts.get());
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   main_parts->AddParts(
+       std::make_unique<
+           enterprise_util::ChromeBrowserMainExtraPartsEnterprise>());
+@@ -2685,7 +2685,9 @@ void MaybeAppendBlinkSettingsSwitchForFi
+ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
+     base::CommandLine* command_line,
+     int child_process_id) {
++#ifdef notyet
+   crash_keys::AppendStringAnnotationsCommandLineSwitch(command_line);
++#endif
+ #if BUILDFLAG(IS_MAC)
+   std::unique_ptr<metrics::ClientInfo> client_info =
+       GoogleUpdateSettings::LoadMetricsClientInfo();
+@@ -2694,7 +2696,7 @@ void ChromeContentBrowserClient::AppendE
+                                     client_info->client_id);
+   }
+ #elif BUILDFLAG(IS_POSIX)
+-#if !BUILDFLAG(IS_ANDROID)
++#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD)
+   pid_t pid;
+   if (crash_reporter::GetHandlerSocket(nullptr, &pid)) {
+     command_line->AppendSwitchASCII(
+@@ -3052,7 +3054,7 @@ void ChromeContentBrowserClient::AppendE
+     }
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD)
+   // Opt into a hardened stack canary mitigation if it hasn't already been
+   // force-disabled.
+   if (!browser_command_line.HasSwitch(switches::kChangeStackGuardOnFork)) {
+@@ -4110,7 +4112,7 @@ bool UpdatePreferredColorScheme(WebPrefe
+   return old_preferred_color_scheme != web_prefs->preferred_color_scheme;
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ // Sets the `root_scrollbar_theme_color` web pref if the user has enabled a
+ // custom colored frame for the UI.
+ void UpdateRootScrollbarThemeColor(Profile* profile,
+@@ -4748,7 +4750,7 @@ void ChromeContentBrowserClient::Overrid
+ 
+   UpdatePreferredColorScheme(web_prefs, main_frame_site.GetSiteURL(),
+                              web_contents, GetWebTheme());
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   UpdateRootScrollbarThemeColor(profile, web_contents, web_prefs);
+ #endif  //  BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
+ 
+@@ -5085,7 +5087,7 @@ void ChromeContentBrowserClient::GetAddi
+   }
+ }
+ 
+-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD)
+ void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
+     const base::CommandLine& command_line,
+     int child_process_id,
+@@ -7232,7 +7234,7 @@ bool ChromeContentBrowserClient::ShouldS
+ bool ChromeContentBrowserClient::ShouldRunOutOfProcessSystemDnsResolution() {
+ // This enterprise policy is supported on Android, but the feature will not be
+ // launched there.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   // This is possibly called before `g_browser_process` is initialized.
+   PrefService* local_state;
+   if (g_browser_process) {
diff --git a/chromium-wip/patches/patch-chrome_browser_chrome__content__browser__client.h b/chromium-wip/patches/patch-chrome_browser_chrome__content__browser__client.h
new file mode 100644
index 0000000000..77a5f23e5b
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_chrome__content__browser__client.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/chrome_content_browser_client.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/chrome_content_browser_client.h
+@@ -587,7 +587,7 @@ class ChromeContentBrowserClient : publi
+   bool IsPluginAllowedToUseDevChannelAPIs(
+       content::BrowserContext* browser_context,
+       const GURL& url) override;
+-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD)
+   void GetAdditionalMappedFilesForChildProcess(
+       const base::CommandLine& command_line,
+       int child_process_id,
diff --git a/chromium-wip/patches/patch-chrome_browser_chrome__content__browser__client__navigation__throttles.cc b/chromium-wip/patches/patch-chrome_browser_chrome__content__browser__client__navigation__throttles.cc
new file mode 100644
index 0000000000..1f63ad28eb
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_chrome__content__browser__client__navigation__throttles.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/chrome_content_browser_client_navigation_throttles.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/chrome_content_browser_client_navigation_throttles.cc
+@@ -123,7 +123,7 @@
+ #include "chrome/browser/captive_portal/captive_portal_service_factory.h"
+ #endif  // BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/browser_switcher/browser_switcher_navigation_throttle.h"
+ #include "chrome/browser/enterprise/profile_management/oidc_auth_response_capture_navigation_throttle.h"
+ #include "chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.h"
+@@ -404,7 +404,7 @@ void CreateAndAddChromeThrottlesForNavig
+     TypedNavigationUpgradeThrottle::MaybeCreateAndAdd(registry);
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   WebAppSettingsNavigationThrottle::MaybeCreateAndAdd(registry);
+   profile_management::ProfileManagementNavigationThrottle::MaybeCreateAndAdd(
+       registry);
+@@ -422,7 +422,7 @@ void CreateAndAddChromeThrottlesForNavig
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   enterprise_connectors::DeviceTrustNavigationThrottle::MaybeCreateAndAdd(
+       registry);
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ||
+@@ -454,7 +454,7 @@ void CreateAndAddChromeThrottlesForNavig
+   }
+ #endif  // BUILDFLAG(SAFE_BROWSING_AVAILABLE)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   browser_switcher::BrowserSwitcherNavigationThrottle::MaybeCreateAndAdd(
+       registry);
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
diff --git a/chromium-wip/patches/patch-chrome_browser_collaboration_messaging_messaging__backend__service__factory.cc b/chromium-wip/patches/patch-chrome_browser_collaboration_messaging_messaging__backend__service__factory.cc
new file mode 100644
index 0000000000..be633ccf94
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_collaboration_messaging_messaging__backend__service__factory.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/collaboration/messaging/messaging_backend_service_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/collaboration/messaging/messaging_backend_service_factory.cc
+@@ -102,7 +102,7 @@ MessagingBackendServiceFactory::BuildSer
+   // This configuration object allows us to control platform specific behavior.
+   MessagingBackendConfiguration configuration;
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   configuration.clear_chip_on_tab_selection = false;
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_component__updater_iwa__key__distribution__component__installer.cc b/chromium-wip/patches/patch-chrome_browser_component__updater_iwa__key__distribution__component__installer.cc
new file mode 100644
index 0000000000..d54e3e380a
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_component__updater_iwa__key__distribution__component__installer.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/component_updater/iwa_key_distribution_component_installer.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/component_updater/iwa_key_distribution_component_installer.cc
+@@ -77,7 +77,7 @@ bool IsOnDemandUpdateSupported() {
+ 
+ namespace component_updater {
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kIwaKeyDistributionComponent,
+              "IwaKeyDistributionComponent",
+ #if BUILDFLAG(IS_CHROMEOS)
+@@ -102,7 +102,7 @@ bool IwaKeyDistributionComponentInstalle
+   // the main IWA feature.
+ #if BUILDFLAG(IS_WIN)
+   return base::FeatureList::IsEnabled(features::kIsolatedWebApps);
+-#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return base::FeatureList::IsEnabled(kIwaKeyDistributionComponent);
+ #else
+   return false;
diff --git a/chromium-wip/patches/patch-chrome_browser_component__updater_iwa__key__distribution__component__installer.h b/chromium-wip/patches/patch-chrome_browser_component__updater_iwa__key__distribution__component__installer.h
new file mode 100644
index 0000000000..11e3d0030d
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_component__updater_iwa__key__distribution__component__installer.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/component_updater/iwa_key_distribution_component_installer.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/component_updater/iwa_key_distribution_component_installer.h
+@@ -27,7 +27,7 @@ class IwaKeyDistributionInfoProvider;
+ 
+ namespace component_updater {
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_DECLARE_FEATURE(kIwaKeyDistributionComponent);
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_component__updater_registration.cc b/chromium-wip/patches/patch-chrome_browser_component__updater_registration.cc
new file mode 100644
index 0000000000..b47c49ba3f
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_component__updater_registration.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/component_updater/registration.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/component_updater/registration.cc
+@@ -96,7 +96,7 @@
+ #endif  // BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ #include "components/component_updater/installer_policies/amount_extraction_heuristic_regexes_component_installer.h"
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
+         // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
+@@ -109,7 +109,7 @@
+ #include "chrome/browser/component_updater/lacros_component_remover.h"
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/component_updater/wasm_tts_engine_component_installer.h"
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ 
+@@ -253,7 +253,7 @@ void RegisterComponentsForUpdate() {
+   RegisterCookieReadinessListComponent(cus);
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   RegisterAmountExtractionHeuristicRegexesComponent(cus);
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
+         // BUILDFLAG(IS_CHROMEOS)
+@@ -265,7 +265,7 @@ void RegisterComponentsForUpdate() {
+   }
+ #endif  // BUIDLFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (features::IsWasmTtsComponentUpdaterEnabled()) {
+     RegisterWasmTtsEngineComponent(cus);
+   }
diff --git a/chromium-wip/patches/patch-chrome_browser_component__updater_wasm__tts__engine__component__installer.cc b/chromium-wip/patches/patch-chrome_browser_component__updater_wasm__tts__engine__component__installer.cc
new file mode 100644
index 0000000000..0db5352d68
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_component__updater_wasm__tts__engine__component__installer.cc
@@ -0,0 +1,62 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/component_updater/wasm_tts_engine_component_installer.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/component_updater/wasm_tts_engine_component_installer.cc
+@@ -9,7 +9,7 @@
+ #include "base/logging.h"
+ #include "content/public/browser/browser_thread.h"
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/accessibility/embedded_a11y_extension_loader.h"
+ #include "chrome/common/extensions/extension_constants.h"
+ #include "ui/accessibility/accessibility_features.h"
+@@ -29,7 +29,7 @@ const base::FilePath::CharType kWorkletP
+     FILE_PATH_LITERAL("streaming_worklet_processor.js");
+ const base::FilePath::CharType kVoicesJsonFileName[] =
+     FILE_PATH_LITERAL("voices.json");
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ const base::FilePath::CharType kManifestV3FileName[] =
+     FILE_PATH_LITERAL("wasm_tts_manifest_v3.json");
+ const base::FilePath::CharType kOffscreenHtmlFileName[] =
+@@ -49,7 +49,7 @@ constexpr std::array<uint8_t, 32> kWasmT
+ 
+ const char kWasmTtsEngineManifestName[] = "WASM TTS Engine";
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ class WasmTTSEngineDirectory {
+  public:
+   static WasmTTSEngineDirectory* Get() {
+@@ -119,7 +119,7 @@ void WasmTtsEngineComponentInstallerPoli
+   VLOG(1) << "Component ready, version " << version.GetString() << " in "
+           << install_dir.value();
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (features::IsWasmTtsComponentUpdaterEnabled() &&
+       !features::IsWasmTtsEngineAutoInstallDisabled()) {
+     // Instead of installing the component extension as soon as it is ready,
+@@ -137,7 +137,7 @@ void WasmTtsEngineComponentInstallerPoli
+ bool WasmTtsEngineComponentInstallerPolicy::VerifyInstallation(
+     const base::Value::Dict& /* manifest */,
+     const base::FilePath& install_dir) const {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (features::IsWasmTtsComponentUpdaterV3Enabled()) {
+     return base::PathExists(install_dir.Append(kManifestV3FileName)) &&
+            base::PathExists(install_dir.Append(kBindingsMainWasmFileName)) &&
+@@ -186,7 +186,7 @@ void RegisterWasmTtsEngineComponent(Comp
+ 
+ void WasmTtsEngineComponentInstallerPolicy::GetWasmTTSEngineDirectory(
+     base::OnceCallback<void(const base::FilePath&)> callback) {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   WasmTTSEngineDirectory* wasm_directory = WasmTTSEngineDirectory::Get();
+   wasm_directory->Get(std::move(callback));
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
diff --git a/chromium-wip/patches/patch-chrome_browser_component__updater_widevine__cdm__component__installer.cc b/chromium-wip/patches/patch-chrome_browser_component__updater_widevine__cdm__component__installer.cc
new file mode 100644
index 0000000000..fa110df4d3
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_component__updater_widevine__cdm__component__installer.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/component_updater/widevine_cdm_component_installer.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/component_updater/widevine_cdm_component_installer.cc
+@@ -41,7 +41,7 @@
+ #include "third_party/widevine/cdm/buildflags.h"
+ #include "third_party/widevine/cdm/widevine_cdm_common.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "base/path_service.h"
+ #include "chrome/common/chrome_paths.h"
+ #include "chrome/common/media/component_widevine_cdm_hint_file_linux.h"
+@@ -73,7 +73,7 @@ static_assert(std::size(kWidevineSha2Has
+ const char ImageLoaderComponentName[] = "WidevineCdm";
+ #endif
+ 
+-#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD)
+ // On Linux and ChromeOS the Widevine CDM is loaded at startup before the
+ // zygote is locked down. As a result there is no need to register the CDM
+ // with Chrome as it can't be used until Chrome is restarted.
+@@ -101,7 +101,7 @@ void RegisterWidevineCdmWithChrome(const
+ }
+ #endif  // !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // On Linux and ChromeOS the Widevine CDM is loaded at startup before the
+ // zygote is locked down. To locate the Widevine CDM at startup, a hint file
+ // is used. Update the hint file with the new Widevine CDM path.
+@@ -392,7 +392,7 @@ void WidevineCdmComponentInstallerPolicy
+     return;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   VLOG(1) << "Updating hint file with Widevine CDM " << cdm_version;
+ 
+   // This is running on a thread that allows IO, so simply update the hint file.
diff --git a/chromium-wip/patches/patch-chrome_browser_custom__handlers_chrome__protocol__handler__registry__delegate.cc b/chromium-wip/patches/patch-chrome_browser_custom__handlers_chrome__protocol__handler__registry__delegate.cc
new file mode 100644
index 0000000000..f38b65086f
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_custom__handlers_chrome__protocol__handler__registry__delegate.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/custom_handlers/chrome_protocol_handler_registry_delegate.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/custom_handlers/chrome_protocol_handler_registry_delegate.cc
+@@ -68,7 +68,7 @@ void ChromeProtocolHandlerRegistryDelega
+ // If true default protocol handlers will be removed if the OS level
+ // registration for a protocol is no longer Chrome.
+ bool ChromeProtocolHandlerRegistryDelegate::ShouldRemoveHandlersNotInOS() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // We don't do this on Linux as the OS registration there is not reliable,
+   // and Chrome OS doesn't have any notion of OS registration.
+   // TODO(benwells): When Linux support is more reliable remove this
diff --git a/chromium-wip/patches/patch-chrome_browser_defaults.cc b/chromium-wip/patches/patch-chrome_browser_defaults.cc
new file mode 100644
index 0000000000..e783caafc8
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_defaults.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/defaults.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/defaults.cc
+@@ -31,7 +31,7 @@ const bool kAlwaysCreateTabbedBrowserOnS
+ const bool kShowHelpMenuItemIcon = false;
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ const bool kScrollEventChangesTab = true;
+ #else
+ const bool kScrollEventChangesTab = false;
diff --git a/chromium-wip/patches/patch-chrome_browser_device__identity_device__oauth2__token__service__factory.cc b/chromium-wip/patches/patch-chrome_browser_device__identity_device__oauth2__token__service__factory.cc
new file mode 100644
index 0000000000..13b4f6de5d
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_device__identity_device__oauth2__token__service__factory.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/device_identity/device_oauth2_token_service_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/device_identity/device_oauth2_token_service_factory.cc
+@@ -26,7 +26,7 @@ std::unique_ptr<DeviceOAuth2TokenStore> 
+ #if BUILDFLAG(IS_CHROMEOS)
+   return std::make_unique<chromeos::DeviceOAuth2TokenStoreChromeOS>(
+       local_state);
+-#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return std::make_unique<DeviceOAuth2TokenStoreDesktop>(local_state);
+ #else
+   NOTREACHED();
diff --git a/chromium-wip/patches/patch-chrome_browser_devtools_features.cc b/chromium-wip/patches/patch-chrome_browser_devtools_features.cc
new file mode 100644
index 0000000000..31d8d638cc
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_devtools_features.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/devtools/features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/devtools/features.cc
+@@ -164,7 +164,7 @@ BASE_FEATURE(kDevToolsNewPermissionDialo
+              "DevToolsNewPermissionDialog",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // If enabled, DevTools does not accept remote debugging connections unless
+ // using a non-default user data dir via the --user-data-dir switch.
+ BASE_FEATURE(kDevToolsDebuggingRestrictions,
diff --git a/chromium-wip/patches/patch-chrome_browser_devtools_features.h b/chromium-wip/patches/patch-chrome_browser_devtools_features.h
new file mode 100644
index 0000000000..d525128597
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_devtools_features.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/devtools/features.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/devtools/features.h
+@@ -92,7 +92,7 @@ BASE_DECLARE_FEATURE(kDevToolsAiGenerate
+ 
+ BASE_DECLARE_FEATURE(kDevToolsNewPermissionDialog);
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_DECLARE_FEATURE(kDevToolsDebuggingRestrictions);
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_devtools_remote__debugging__server.cc b/chromium-wip/patches/patch-chrome_browser_devtools_remote__debugging__server.cc
new file mode 100644
index 0000000000..343ef5971f
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_devtools_remote__debugging__server.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/devtools/remote_debugging_server.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/devtools/remote_debugging_server.cc
+@@ -109,7 +109,7 @@ IsRemoteDebuggingAllowed(const std::opti
+         RemoteDebuggingServer::NotStartedReason::kDisabledByPolicy);
+   }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (base::FeatureList::IsEnabled(features::kDevToolsDebuggingRestrictions) &&
+       is_default_user_data_dir.value_or(true)) {
+     return base::unexpected(
diff --git a/chromium-wip/patches/patch-chrome_browser_diagnostics_diagnostics__writer.h b/chromium-wip/patches/patch-chrome_browser_diagnostics_diagnostics__writer.h
new file mode 100644
index 0000000000..a4940377b2
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_diagnostics_diagnostics__writer.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/diagnostics/diagnostics_writer.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/diagnostics/diagnostics_writer.h
+@@ -16,6 +16,8 @@ namespace diagnostics {
+ // Console base class used internally.
+ class SimpleConsole;
+ 
++#undef MACHINE
++
+ class DiagnosticsWriter : public DiagnosticsModel::Observer {
+  public:
+   // The type of formatting done by this writer.
diff --git a/chromium-wip/patches/patch-chrome_browser_download_chrome__download__manager__delegate.cc b/chromium-wip/patches/patch-chrome_browser_download_chrome__download__manager__delegate.cc
new file mode 100644
index 0000000000..f4cbd05bce
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_download_chrome__download__manager__delegate.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/download/chrome_download_manager_delegate.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/download/chrome_download_manager_delegate.cc
+@@ -1925,7 +1925,7 @@ void ChromeDownloadManagerDelegate::OnDo
+ bool ChromeDownloadManagerDelegate::IsOpenInBrowserPreferredForFile(
+     const base::FilePath& path) {
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   if (path.MatchesExtension(FILE_PATH_LITERAL(".pdf"))) {
+     return !download_prefs_->ShouldOpenPdfInSystemReader();
+   }
+@@ -2061,7 +2061,7 @@ void ChromeDownloadManagerDelegate::Chec
+     content::CheckDownloadAllowedCallback check_download_allowed_cb) {
+   DCHECK_CURRENTLY_ON(BrowserThread::UI);
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   // Don't download pdf if it is a file URL, as that might cause an infinite
+   // download loop if Chrome is not the system pdf viewer.
+   if (url.SchemeIsFile() && download_prefs_->ShouldOpenPdfInSystemReader()) {
+@@ -2143,7 +2143,7 @@ void ChromeDownloadManagerDelegate::Chec
+   DCHECK(download_item->IsSavePackageDownload());
+ 
+ #if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-     BUILDFLAG(IS_MAC)) &&                                                 \
++     BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)) &&                                                 \
+     BUILDFLAG(SAFE_BROWSING_AVAILABLE)
+   std::optional<enterprise_connectors::AnalysisSettings> settings =
+       safe_browsing::ShouldUploadBinaryForDeepScanning(download_item);
diff --git a/chromium-wip/patches/patch-chrome_browser_download_download__commands.cc b/chromium-wip/patches/patch-chrome_browser_download_download__commands.cc
new file mode 100644
index 0000000000..4a199c07fd
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_download_download__commands.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/download/download_commands.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/download/download_commands.cc
+@@ -27,7 +27,7 @@
+ #include "ui/base/clipboard/scoped_clipboard_writer.h"
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/browser.h"
+ #include "chrome/browser/ui/browser_finder.h"
+ #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
+@@ -177,7 +177,7 @@ void DownloadCommands::ExecuteCommand(Co
+ }
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ 
+ Browser* DownloadCommands::GetBrowser() const {
+   if (!model_)
diff --git a/chromium-wip/patches/patch-chrome_browser_download_download__commands.h b/chromium-wip/patches/patch-chrome_browser_download_download__commands.h
new file mode 100644
index 0000000000..af7f5b89f9
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_download_download__commands.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/download/download_commands.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/download/download_commands.h
+@@ -66,7 +66,7 @@ class DownloadCommands {
+   void ExecuteCommand(Command command);
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   bool IsDownloadPdf() const;
+   bool CanOpenPdfInSystemViewer() const;
+   Browser* GetBrowser() const;
diff --git a/chromium-wip/patches/patch-chrome_browser_download_download__file__picker.cc b/chromium-wip/patches/patch-chrome_browser_download_download__file__picker.cc
new file mode 100644
index 0000000000..8a1c42ce3c
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_download_download__file__picker.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/download/download_file_picker.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/download/download_file_picker.cc
+@@ -18,7 +18,7 @@
+ #include "content/public/browser/web_contents.h"
+ #include "ui/shell_dialogs/selected_file_info.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/browser_list.h"
+ #include "chrome/browser/ui/browser_window.h"
+ #include "ui/aura/window.h"
+@@ -83,7 +83,7 @@ DownloadFilePicker::DownloadFilePicker(d
+   // dialog in Linux (See SelectFileImpl() in select_file_dialog_linux_gtk.cc).
+   // and windows.Here we make owning_window host to browser current active
+   // window if it is null. https://crbug.com/1301898
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   if (!owning_window || !owning_window->GetHost()) {
+     owning_window = BrowserList::GetInstance()
+                         ->GetLastActive()
diff --git a/chromium-wip/patches/patch-chrome_browser_download_download__item__model.cc b/chromium-wip/patches/patch-chrome_browser_download_download__item__model.cc
new file mode 100644
index 0000000000..3f14018e42
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_download_download__item__model.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/download/download_item_model.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/download/download_item_model.cc
+@@ -773,7 +773,7 @@ bool DownloadItemModel::IsCommandChecked
+              download_crx_util::IsExtensionDownload(*download_);
+     case DownloadCommands::ALWAYS_OPEN_TYPE:
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+       if (download_commands->CanOpenPdfInSystemViewer()) {
+         DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext(profile());
+         return prefs->ShouldOpenPdfInSystemReader();
+@@ -821,7 +821,7 @@ void DownloadItemModel::ExecuteCommand(D
+                                          DownloadCommands::ALWAYS_OPEN_TYPE);
+       DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext(profile());
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+       if (download_commands->CanOpenPdfInSystemViewer()) {
+         prefs->SetShouldOpenPdfInSystemReader(!is_checked);
+         SetShouldPreferOpeningInBrowser(is_checked);
+@@ -1211,7 +1211,7 @@ void DownloadItemModel::DetermineAndSetS
+     return;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (download_->GetOriginalMimeType() == "application/x-x509-user-cert") {
+     SetShouldPreferOpeningInBrowser(true);
+     return;
diff --git a/chromium-wip/patches/patch-chrome_browser_download_download__prefs.cc b/chromium-wip/patches/patch-chrome_browser_download_download__prefs.cc
new file mode 100644
index 0000000000..7f8087de5c
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_download_download__prefs.cc
@@ -0,0 +1,96 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/download/download_prefs.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/download/download_prefs.cc
+@@ -11,6 +11,7 @@
+ #include <vector>
+ 
+ #include "base/check.h"
++#include "base/command_line.h"
+ #include "base/feature_list.h"
+ #include "base/files/file_util.h"
+ #include "base/functional/bind.h"
+@@ -62,6 +63,10 @@
+ #include "components/safe_browsing/content/common/file_type_policies.h"
+ #endif
+ 
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#endif
++
+ using content::BrowserContext;
+ using content::BrowserThread;
+ using content::DownloadManager;
+@@ -75,7 +80,7 @@ namespace {
+ // Consider downloads 'dangerous' if they go to the home directory on Linux and
+ // to the desktop on any platform.
+ bool DownloadPathIsDangerous(const base::FilePath& download_path) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   base::FilePath home_dir = base::GetHomeDir();
+   if (download_path == home_dir) {
+     return true;
+@@ -181,7 +186,7 @@ DownloadPrefs::DownloadPrefs(Profile* pr
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   should_open_pdf_in_system_reader_ =
+       prefs->GetBoolean(prefs::kOpenPdfDownloadInSystemReader);
+ #endif
+@@ -308,7 +313,7 @@ void DownloadPrefs::RegisterProfilePrefs
+   registry->RegisterFilePathPref(prefs::kSaveFileDefaultDirectory,
+                                  default_download_path);
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   registry->RegisterBooleanPref(prefs::kOpenPdfDownloadInSystemReader, false);
+ #endif
+ #if BUILDFLAG(IS_ANDROID)
+@@ -481,7 +486,7 @@ void DownloadPrefs::DisableAutoOpenByUse
+ }
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ void DownloadPrefs::SetShouldOpenPdfInSystemReader(bool should_open) {
+   if (should_open_pdf_in_system_reader_ == should_open)
+     return;
+@@ -507,7 +512,7 @@ bool DownloadPrefs::ShouldOpenPdfInSyste
+ 
+ void DownloadPrefs::ResetAutoOpenByUser() {
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   SetShouldOpenPdfInSystemReader(false);
+ #endif
+   auto_open_by_user_.clear();
+@@ -544,7 +549,7 @@ void DownloadPrefs::SaveAutoOpenState() 
+ bool DownloadPrefs::CanPlatformEnableAutoOpenForPdf() const {
+ #if BUILDFLAG(IS_CHROMEOS)
+   return false;  // There is no UI for auto-open on ChromeOS.
+-#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   return ShouldOpenPdfInSystemReader();
+ #else
+   return false;
+@@ -626,7 +631,14 @@ base::FilePath DownloadPrefs::SanitizeDo
+ #else
+   // If the stored download directory is an absolute path, we presume it's
+   // correct; there's not really much more validation we can do here.
++#if BUILDFLAG(IS_OPENBSD)
++  // If unveil(2) is used, force the file dialog directory to something we
++  // know is available.
++  auto* sandbox = sandbox::policy::SandboxLinux::GetInstance();
++  if (!sandbox->unveil_initialized() && path.IsAbsolute())
++#else
+   if (path.IsAbsolute())
++#endif
+     return path;
+ 
+   // When the default download directory is *not* an absolute path, we use the
diff --git a/chromium-wip/patches/patch-chrome_browser_download_download__prefs.h b/chromium-wip/patches/patch-chrome_browser_download_download__prefs.h
new file mode 100644
index 0000000000..7f35050ee8
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_download_download__prefs.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/download/download_prefs.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/download/download_prefs.h
+@@ -107,7 +107,7 @@ class DownloadPrefs {
+   void DisableAutoOpenByUserBasedOnExtension(const base::FilePath& file_name);
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   // Store the user preference to disk. If |should_open| is true, also disable
+   // the built-in PDF plugin. If |should_open| is false, enable the PDF plugin.
+   void SetShouldOpenPdfInSystemReader(bool should_open);
+@@ -171,7 +171,7 @@ class DownloadPrefs {
+   std::unique_ptr<policy::URLBlocklist> auto_open_allowed_by_urls_;
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   bool should_open_pdf_in_system_reader_;
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_enterprise_browser__management_browser__management__service.cc b/chromium-wip/patches/patch-chrome_browser_enterprise_browser__management_browser__management__service.cc
new file mode 100644
index 0000000000..90966d5844
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_enterprise_browser__management_browser__management__service.cc
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/enterprise/browser_management/browser_management_service.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/enterprise/browser_management/browser_management_service.cc
+@@ -50,7 +50,7 @@ GetManagementStatusProviders(Profile* pr
+ 
+ BrowserManagementService::BrowserManagementService(Profile* profile)
+     : ManagementService(GetManagementStatusProviders(profile)) {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   base::SequencedTaskRunner::GetCurrentDefault()->PostTask(
+       FROM_HERE,
+       base::BindOnce(&BrowserManagementService::UpdateManagementIconForProfile,
+@@ -74,7 +74,7 @@ BrowserManagementService::BrowserManagem
+ }
+ 
+ ui::ImageModel* BrowserManagementService::GetManagementIconForProfile() {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return management_icon_for_profile_.IsEmpty() ? nullptr
+                                                 : &management_icon_for_profile_;
+ #else
+@@ -83,7 +83,7 @@ ui::ImageModel* BrowserManagementService
+ }
+ 
+ gfx::Image* BrowserManagementService::GetManagementIconForBrowser() {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return management_icon_for_browser_.IsEmpty() ? nullptr
+                                                 : &management_icon_for_browser_;
+ #else
+@@ -96,7 +96,7 @@ void BrowserManagementService::TriggerPo
+   OnPolicyStatusChanged();
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void BrowserManagementService::SetBrowserManagementIconForTesting(
+     const gfx::Image& management_icon) {
+   CHECK_IS_TEST();
+@@ -183,7 +183,7 @@ void BrowserManagementService::SetManage
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ 
+ void BrowserManagementService::OnPolicyStatusChanged() {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   NotifyEnterpriseLabelUpdated();
+ #endif
+ }
diff --git a/chromium-wip/patches/patch-chrome_browser_enterprise_browser__management_browser__management__service.h b/chromium-wip/patches/patch-chrome_browser_enterprise_browser__management_browser__management__service.h
new file mode 100644
index 0000000000..cf67c66fb7
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_enterprise_browser__management_browser__management__service.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/enterprise/browser_management/browser_management_service.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/enterprise/browser_management/browser_management_service.h
+@@ -41,7 +41,7 @@ class BrowserManagementService : public 
+ 
+   void TriggerPolicyStatusChangedForTesting() override;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   void SetBrowserManagementIconForTesting(
+       const gfx::Image& management_icon) override;
+ #endif
+@@ -50,7 +50,7 @@ class BrowserManagementService : public 
+   // PolicyStatusProvider::Observer:
+   void OnPolicyStatusChanged() override;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Starts listening to changes to policies that affect the enterprise label
+   // and pill.
+   void StartListeningToPrefChanges(Profile* profile);
diff --git a/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_analysis_analysis__service__settings.cc b/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_analysis_analysis__service__settings.cc
new file mode 100644
index 0000000000..77cdca1c9d
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_analysis_analysis__service__settings.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/enterprise/connectors/analysis/analysis_service_settings.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/enterprise/connectors/analysis/analysis_service_settings.cc
+@@ -151,7 +151,7 @@ AnalysisServiceSettings::AnalysisService
+   const char* verification_key = kKeyWindowsVerification;
+ #elif BUILDFLAG(IS_MAC)
+   const char* verification_key = kKeyMacVerification;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   const char* verification_key = kKeyLinuxVerification;
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_common.cc b/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_common.cc
new file mode 100644
index 0000000000..0daf7e61d8
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_common.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/enterprise/connectors/common.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/enterprise/connectors/common.cc
+@@ -17,7 +17,7 @@
+ #include "components/user_manager/user.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h"
+ #include "components/prefs/pref_service.h"
+ #endif
+@@ -192,7 +192,7 @@ std::string GetProfileEmail(Profile* pro
+   std::string email =
+       GetProfileEmail(IdentityManagerFactory::GetForProfile(profile));
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (email.empty()) {
+     email = profile->GetPrefs()->GetString(
+         enterprise_signin::prefs::kProfileUserEmail);
diff --git a/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_connectors__service.cc b/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_connectors__service.cc
new file mode 100644
index 0000000000..93a20d78d2
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_connectors__service.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/enterprise/connectors/connectors_service.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/enterprise/connectors/connectors_service.cc
+@@ -449,7 +449,7 @@ policy::PolicyScope ConnectorsService::G
+ bool ConnectorsService::ConnectorsEnabled() const {
+   Profile* profile = Profile::FromBrowserContext(context_);
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // On desktop, the guest profile is actually the primary OTR profile of
+   // the "regular" guest profile.  The regular guest profile is never used
+   // directly by users.  Also, user are not able to create child OTR profiles
diff --git a/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc b/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc
new file mode 100644
index 0000000000..8d60b8919c
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.cc
+@@ -10,7 +10,7 @@
+ #include "chrome/browser/profiles/profile.h"
+ #include "components/keyed_service/core/keyed_service.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/browser_process.h"
+ #include "chrome/browser/enterprise/connectors/device_trust/browser/signing_key_policy_observer.h"
+ #include "chrome/browser/policy/chrome_browser_policy_connector.h"
+@@ -40,7 +40,7 @@ DeviceTrustConnectorService* DeviceTrust
+ 
+ bool DeviceTrustConnectorServiceFactory::ServiceIsCreatedWithBrowserContext()
+     const {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   return true;
+ #else
+   return false;
+@@ -84,7 +84,7 @@ DeviceTrustConnectorServiceFactory::Buil
+   std::unique_ptr<DeviceTrustConnectorService> service =
+       std::make_unique<DeviceTrustConnectorService>(profile->GetPrefs());
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   auto* key_manager = g_browser_process->browser_policy_connector()
+                           ->chrome_browser_cloud_management_controller()
+                           ->GetDeviceTrustKeyManager();
diff --git a/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc b/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc
new file mode 100644
index 0000000000..886cc668ce
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.cc
+@@ -22,7 +22,7 @@
+ #include "components/policy/core/common/management/management_service.h"
+ #include "content/public/browser/browser_context.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/browser_process.h"
+ #include "chrome/browser/enterprise/connectors/device_trust/attestation/browser/browser_attestation_service.h"
+ #include "chrome/browser/enterprise/connectors/device_trust/attestation/browser/device_attester.h"
+@@ -53,7 +53,7 @@ bool IsProfileManaged(Profile* profile) 
+   return management_service && management_service->IsManaged();
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ policy::CloudPolicyStore* GetUserCloudPolicyStore(Profile* profile) {
+   policy::CloudPolicyManager* user_policy_manager =
+       profile->GetCloudPolicyManager();
+@@ -105,7 +105,7 @@ DeviceTrustServiceFactory::DeviceTrustSe
+   DependsOn(DeviceTrustConnectorServiceFactory::GetInstance());
+   DependsOn(policy::ManagementServiceFactory::GetInstance());
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Depends on this service via the SignalsService having a dependency on it.
+   DependsOn(enterprise_signals::SignalsAggregatorFactory::GetInstance());
+   // Depends on this service via the ProfileAttester having a dependency on it
diff --git a/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_device__trust_key__management_browser_commands_key__rotation__command__factory.cc b/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_device__trust_key__management_browser_commands_key__rotation__command__factory.cc
new file mode 100644
index 0000000000..32988282e6
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_device__trust_key__management_browser_commands_key__rotation__command__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/key_rotation_command_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/key_rotation_command_factory.cc
+@@ -19,7 +19,7 @@
+ 
+ #if BUILDFLAG(IS_WIN)
+ #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/win_key_rotation_command.h"
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/linux_key_rotation_command.h"
+ #elif BUILDFLAG(IS_MAC)
+ #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/mac_key_rotation_command.h"
+@@ -53,7 +53,7 @@ std::unique_ptr<KeyRotationCommand> KeyR
+     policy::DeviceManagementService* device_management_service) {
+ #if BUILDFLAG(IS_WIN)
+   return std::make_unique<WinKeyRotationCommand>();
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return std::make_unique<LinuxKeyRotationCommand>(url_loader_factory);
+ #elif BUILDFLAG(IS_MAC)
+   if (IsDTCKeyRotationUploadedBySharedAPI()) {
diff --git a/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_device__trust_key__management_core_persistence_key__persistence__delegate__factory.cc b/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_device__trust_key__management_core_persistence_key__persistence__delegate__factory.cc
new file mode 100644
index 0000000000..681e4254ac
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_device__trust_key__management_core_persistence_key__persistence__delegate__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence/key_persistence_delegate_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence/key_persistence_delegate_factory.cc
+@@ -13,7 +13,7 @@
+ #include "chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence/win_key_persistence_delegate.h"
+ #elif BUILDFLAG(IS_MAC)
+ #include "chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence/mac_key_persistence_delegate.h"
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence/linux_key_persistence_delegate.h"
+ #endif
+ 
+@@ -45,7 +45,7 @@ KeyPersistenceDelegateFactory::CreateKey
+   return std::make_unique<WinKeyPersistenceDelegate>();
+ #elif BUILDFLAG(IS_MAC)
+   return std::make_unique<MacKeyPersistenceDelegate>();
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return std::make_unique<LinuxKeyPersistenceDelegate>();
+ #else
+   NOTREACHED();
diff --git a/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc b/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc
new file mode 100644
index 0000000000..f24e404b32
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/enterprise/connectors/device_trust/signals/signals_service_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/enterprise/connectors/device_trust/signals/signals_service_factory.cc
+@@ -23,7 +23,7 @@
+ #include "chrome/browser/enterprise/connectors/connectors_service.h"
+ #endif  // BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ #include "base/check.h"
+ #include "chrome/browser/enterprise/connectors/device_trust/signals/decorators/browser/browser_signals_decorator.h"
+ #include "chrome/browser/enterprise/core/dependency_factory_impl.h"
+@@ -63,7 +63,7 @@ std::unique_ptr<SignalsService> CreateSi
+           profile, ConnectorsServiceFactory::GetForBrowserContext(profile))));
+ #endif  // BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ 
+   policy::CloudPolicyManager* browser_policy_manager = nullptr;
+   if (management_service->HasManagementAuthority(
diff --git a/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc b/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc
new file mode 100644
index 0000000000..8cf005cc7a
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.cc
+@@ -13,7 +13,7 @@ namespace enterprise_connectors {
+ 
+ BrowserCrashEventRouter::BrowserCrashEventRouter(
+     content::BrowserContext* context) {
+-#if !BUILDFLAG(IS_CHROMEOS)
++#if !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD)
+   CrashReportingContext* crash_reporting_context =
+       CrashReportingContext::GetInstance();
+   Profile* profile = Profile::FromBrowserContext(context);
+@@ -23,7 +23,7 @@ BrowserCrashEventRouter::BrowserCrashEve
+ }
+ 
+ BrowserCrashEventRouter::~BrowserCrashEventRouter() {
+-#if !BUILDFLAG(IS_CHROMEOS)
++#if !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD)
+   CrashReportingContext* crash_reporting_context =
+       CrashReportingContext::GetInstance();
+   crash_reporting_context->RemoveProfile(this);
diff --git a/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_reporting_crash__reporting__context.cc b/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_reporting_crash__reporting__context.cc
new file mode 100644
index 0000000000..14f4935044
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_reporting_crash__reporting__context.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/enterprise/connectors/reporting/crash_reporting_context.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/enterprise/connectors/reporting/crash_reporting_context.cc
+@@ -29,7 +29,7 @@
+ 
+ namespace enterprise_connectors {
+ 
+-#if !BUILDFLAG(IS_CHROMEOS)
++#if !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD)
+ 
+ namespace {
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.cc b/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.cc
new file mode 100644
index 0000000000..18e1234ac5
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.cc
+@@ -52,7 +52,7 @@
+ #include "base/strings/utf_string_conversions.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/enterprise/signals/signals_aggregator_factory.h"
+ #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h"
+ #include "components/device_signals/core/browser/signals_aggregator.h"
+@@ -157,7 +157,7 @@ void RealtimeReportingClient::ReportPast
+                                      /*include_profile_user_name=*/false);
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ 
+ void AddCrowdstrikeSignalsToEvent(
+     base::Value::Dict& event,
+@@ -193,7 +193,7 @@ std::string RealtimeReportingClient::Get
+   username_ =
+       identity_manager_ ? GetProfileEmail(identity_manager_) : std::string();
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (username_.empty()) {
+     username_ = Profile::FromBrowserContext(context_)->GetPrefs()->GetString(
+         enterprise_signin::prefs::kProfileUserEmail);
+@@ -245,7 +245,7 @@ std::string RealtimeReportingClient::Get
+   return client_id;
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(notyet)
+ void RealtimeReportingClient::MaybeCollectDeviceSignalsAndReportEvent(
+     ::chrome::cros::reporting::proto::Event event,
+     policy::CloudPolicyClient* client,
diff --git a/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.h b/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.h
new file mode 100644
index 0000000000..eae9ed890c
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.h
+@@ -19,7 +19,7 @@
+ #include "components/keyed_service/core/keyed_service.h"
+ #include "components/policy/core/common/cloud/cloud_policy_client.h"
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "components/device_signals/core/browser/signals_types.h"
+ #endif
+ 
+@@ -118,7 +118,7 @@ class RealtimeReportingClient : public R
+       const std::string& dm_token) override;
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(notyet)
+   // DEPRECATED: Use MaybeCollectDeviceSignalsAndReportEvent(Event, ...).
+   void MaybeCollectDeviceSignalsAndReportEventDeprecated(
+       base::Value::Dict event,
+@@ -168,7 +168,7 @@ class RealtimeReportingClient : public R
+   base::WeakPtrFactory<RealtimeReportingClient> weak_ptr_factory_{this};
+ };
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Populate event dict with CrowdStrike signal values. If those signals are
+ // available in `response`, this function returns a Dict with the following
+ // fields added:
diff --git a/chromium-wip/patches/patch-chrome_browser_enterprise_profile__management_profile__management__navigation__throttle.cc b/chromium-wip/patches/patch-chrome_browser_enterprise_profile__management_profile__management__navigation__throttle.cc
new file mode 100644
index 0000000000..75c3bae262
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_enterprise_profile__management_profile__management__navigation__throttle.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc
+@@ -67,8 +67,8 @@ base::flat_map<std::string, SAMLProfileA
+   // TODO(crbug.com/40267996): Add actual domains with attribute names.
+   profile_attributes->insert(std::make_pair(
+       "supported.test",
+-      SAMLProfileAttributes("placeholderName", "placeholderDomain",
+-                            "placeholderToken")));
++      SAMLProfileAttributes(SAMLProfileAttributes{"placeholderName", "placeholderDomain",
++                            "placeholderToken"})));
+ 
+   // Extract domains and attributes from the command line switch.
+   const base::CommandLine& command_line =
diff --git a/chromium-wip/patches/patch-chrome_browser_enterprise_remote__commands_cbcm__remote__commands__factory.cc b/chromium-wip/patches/patch-chrome_browser_enterprise_remote__commands_cbcm__remote__commands__factory.cc
new file mode 100644
index 0000000000..6f56868279
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_enterprise_remote__commands_cbcm__remote__commands__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/enterprise/remote_commands/cbcm_remote_commands_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/enterprise/remote_commands/cbcm_remote_commands_factory.cc
+@@ -11,7 +11,7 @@
+ #include "chrome/browser/profiles/profile_manager.h"
+ #include "components/policy/core/common/remote_commands/remote_command_job.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/enterprise/remote_commands/rotate_attestation_credential_job.h"
+ #include "chrome/browser/policy/chrome_browser_policy_connector.h"
+ #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h"
+@@ -30,7 +30,7 @@ CBCMRemoteCommandsFactory::BuildJobForTy
+         g_browser_process->profile_manager());
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   if (type == enterprise_management::
+                   RemoteCommand_Type_BROWSER_ROTATE_ATTESTATION_CREDENTIAL) {
+     return std::make_unique<RotateAttestationCredentialJob>(
diff --git a/chromium-wip/patches/patch-chrome_browser_enterprise_reporting_cloud__profile__reporting__service.cc b/chromium-wip/patches/patch-chrome_browser_enterprise_reporting_cloud__profile__reporting__service.cc
new file mode 100644
index 0000000000..153bf9f2fb
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_enterprise_reporting_cloud__profile__reporting__service.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/enterprise/reporting/cloud_profile_reporting_service.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/enterprise/reporting/cloud_profile_reporting_service.cc
+@@ -34,7 +34,7 @@
+ #include "extensions/buildflags/buildflags.h"
+ #include "services/network/public/cpp/shared_url_loader_factory.h"
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/enterprise/signals/signals_aggregator_factory.h"
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ 
+@@ -113,7 +113,7 @@ void CloudProfileReportingService::Creat
+   params.profile_request_generator =
+       std::make_unique<ChromeProfileRequestGenerator>(
+           profile_->GetPath(), &delegate_factory,
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+           enterprise_signals::SignalsAggregatorFactory::GetForProfile(
+               profile_));
+ #else
diff --git a/chromium-wip/patches/patch-chrome_browser_enterprise_reporting_cloud__profile__reporting__service__factory.cc b/chromium-wip/patches/patch-chrome_browser_enterprise_reporting_cloud__profile__reporting__service__factory.cc
new file mode 100644
index 0000000000..c71e119fd2
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_enterprise_reporting_cloud__profile__reporting__service__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/enterprise/reporting/cloud_profile_reporting_service_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/enterprise/reporting/cloud_profile_reporting_service_factory.cc
+@@ -10,7 +10,7 @@
+ #include "components/enterprise/browser/reporting/report_scheduler.h"
+ #include "services/network/public/cpp/shared_url_loader_factory.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/enterprise/signals/signals_aggregator_factory.h"
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
+ 
+@@ -48,7 +48,7 @@ CloudProfileReportingServiceFactory::Clo
+                                  ProfileSelections::BuildForRegularProfile()) {
+   DependsOn(enterprise::ProfileIdServiceFactory::GetInstance());
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Depends on this service because
+   // `CloudProfileReportingService.profile_request_generator_` has a dependency
+   // on it.
diff --git a/chromium-wip/patches/patch-chrome_browser_enterprise_signals_context__info__fetcher.cc b/chromium-wip/patches/patch-chrome_browser_enterprise_signals_context__info__fetcher.cc
new file mode 100644
index 0000000000..372c2a1314
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_enterprise_signals_context__info__fetcher.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/enterprise/signals/context_info_fetcher.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/enterprise/signals/context_info_fetcher.cc
+@@ -181,6 +181,8 @@ std::vector<std::string> ContextInfoFetc
+ SettingValue ContextInfoFetcher::GetOSFirewall() {
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
+   return device_signals::GetOSFirewall();
++#elif BUILDFLAG(IS_OPENBSD)
++  return SettingValue::ENABLED;
+ #elif BUILDFLAG(IS_CHROMEOS)
+   return GetChromeosFirewall();
+ #else
+@@ -200,7 +202,7 @@ ScopedUfwConfigPathForTesting::~ScopedUf
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+ std::vector<std::string> ContextInfoFetcher::GetDnsServers() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   return device_signals::GetSystemDnsServers();
+ #else
+   return std::vector<std::string>();
diff --git a/chromium-wip/patches/patch-chrome_browser_enterprise_signals_device__info__fetcher.cc b/chromium-wip/patches/patch-chrome_browser_enterprise_signals_device__info__fetcher.cc
new file mode 100644
index 0000000000..97d6edca7c
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_enterprise_signals_device__info__fetcher.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/enterprise/signals/device_info_fetcher.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/enterprise/signals/device_info_fetcher.cc
+@@ -10,7 +10,7 @@
+ #include "chrome/browser/enterprise/signals/device_info_fetcher_mac.h"
+ #elif BUILDFLAG(IS_WIN)
+ #include "chrome/browser/enterprise/signals/device_info_fetcher_win.h"
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/enterprise/signals/device_info_fetcher_linux.h"
+ #endif
+ 
+@@ -76,7 +76,7 @@ std::unique_ptr<DeviceInfoFetcher> Devic
+   return CreateInstanceInternal();
+ }
+ 
+-#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_WIN) && \
++#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_BSD) && \
+     !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
+ // static
+ std::unique_ptr<DeviceInfoFetcher> DeviceInfoFetcher::CreateInstanceInternal() {
diff --git a/chromium-wip/patches/patch-chrome_browser_enterprise_signin_enterprise__signin__service.h b/chromium-wip/patches/patch-chrome_browser_enterprise_signin_enterprise__signin__service.h
new file mode 100644
index 0000000000..4708827e6a
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_enterprise_signin_enterprise__signin__service.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/enterprise/signin/enterprise_signin_service.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/enterprise/signin/enterprise_signin_service.h
+@@ -9,7 +9,7 @@
+ 
+ #include "build/build_config.h"
+ 
+-#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN))
++#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD))
+ #error EnterpriseSigninService should only be built on desktop platforms.
+ #endif  // !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN))
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_enterprise_signin_interstitials_managed__profile__required__page.cc b/chromium-wip/patches/patch-chrome_browser_enterprise_signin_interstitials_managed__profile__required__page.cc
new file mode 100644
index 0000000000..f0b4624f51
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_enterprise_signin_interstitials_managed__profile__required__page.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/enterprise/signin/interstitials/managed_profile_required_page.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/enterprise/signin/interstitials/managed_profile_required_page.cc
+@@ -95,7 +95,7 @@ void ManagedProfileRequiredPage::Command
+ 
+   switch (cmd) {
+     case security_interstitials::CMD_DONT_PROCEED:
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       if (ManagedProfileRequiredNavigationThrottle::IsBlockingNavigations(
+               web_contents()->GetBrowserContext())) {
+         ManagedProfileRequiredNavigationThrottle::ShowBlockedWindow(
diff --git a/chromium-wip/patches/patch-chrome_browser_enterprise_util_managed__browser__utils.cc b/chromium-wip/patches/patch-chrome_browser_enterprise_util_managed__browser__utils.cc
new file mode 100644
index 0000000000..916cb34521
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_enterprise_util_managed__browser__utils.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/enterprise/util/managed_browser_utils.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/enterprise/util/managed_browser_utils.cc
+@@ -213,7 +213,7 @@ void SetUserAcceptedAccountManagement(Pr
+   // The updated consent screen also ask the user for consent to share device
+   // signals.
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (accepted && base::FeatureList::IsEnabled(
+                       features::kEnterpriseUpdatedProfileCreationScreen)) {
+     profile->GetPrefs()->SetBoolean(
+@@ -225,7 +225,7 @@ void SetUserAcceptedAccountManagement(Pr
+       profile_manager->GetProfileAttributesStorage()
+           .GetProfileAttributesWithPath(profile->GetPath());
+   if (entry) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+     SetEnterpriseProfileLabel(profile);
+ #endif
+     entry->SetUserAcceptedAccountManagement(accepted);
+@@ -344,7 +344,7 @@ bool CanShowEnterpriseProfileUI(Profile*
+ }
+ 
+ bool CanShowEnterpriseBadgingForNTPFooter(Profile* profile) {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (!policy::ManagementServiceFactory::GetForProfile(profile)
+            ->IsBrowserManaged()) {
+     return false;
diff --git a/chromium-wip/patches/patch-chrome_browser_extensions_BUILD.gn b/chromium-wip/patches/patch-chrome_browser_extensions_BUILD.gn
new file mode 100644
index 0000000000..e662a4f79e
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_extensions_BUILD.gn
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/extensions/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/extensions/BUILD.gn
+@@ -1493,6 +1493,10 @@ source_set("extensions") {
+       deps += [ "//chrome/services/printing/public/mojom" ]
+     }
+ 
++    if (is_bsd) {
++      sources -= [ "api/image_writer_private/removable_storage_provider_linux.cc" ]
++    }
++
+     if (enable_pdf) {
+       deps += [
+         "//chrome/browser/pdf",
diff --git a/chromium-wip/patches/patch-chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc b/chromium-wip/patches/patch-chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc
new file mode 100644
index 0000000000..6deeefeec7
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/extensions/api/enterprise_reporting_private/chrome_desktop_report_request_helper.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/extensions/api/enterprise_reporting_private/chrome_desktop_report_request_helper.cc
+@@ -24,7 +24,7 @@
+ #include "base/win/registry.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "base/environment.h"
+ #include "base/nix/xdg_util.h"
+ #endif
+@@ -264,7 +264,7 @@ base::FilePath GetEndpointVerificationDi
+   bool got_path = false;
+ #if BUILDFLAG(IS_WIN)
+   got_path = base::PathService::Get(base::DIR_LOCAL_APP_DATA, &path);
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<base::Environment> env(base::Environment::Create());
+   path = base::nix::GetXDGDirectory(env.get(), base::nix::kXdgConfigHomeEnvVar,
+                                     base::nix::kDotConfigDir);
+@@ -275,7 +275,7 @@ base::FilePath GetEndpointVerificationDi
+   if (!got_path)
+     return path;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   path = path.AppendASCII("google");
+ #else
+   path = path.AppendASCII("Google");
diff --git a/chromium-wip/patches/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc b/chromium-wip/patches/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc
new file mode 100644
index 0000000000..a504bc5fcd
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.cc
+@@ -8,7 +8,7 @@
+ 
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ 
+ #include <memory>
+ #include <utility>
diff --git a/chromium-wip/patches/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h b/chromium-wip/patches/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h
new file mode 100644
index 0000000000..87dc30942d
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.h
+@@ -7,7 +7,7 @@
+ 
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ 
+ #include <optional>
+ #include <vector>
diff --git a/chromium-wip/patches/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc b/chromium-wip/patches/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc
new file mode 100644
index 0000000000..57a34c7584
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc
+@@ -40,7 +40,7 @@
+ #include "components/reporting/util/statusor.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include <optional>
+ 
+ #include "base/strings/string_util.h"
+@@ -156,7 +156,7 @@ api::enterprise_reporting_private::Conte
+ }
+ 
+ bool AllowClientCertificateReportingForUsers() {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return base::FeatureList::IsEnabled(
+       enterprise_signals::features::kAllowClientCertificateReportingForUsers);
+ #else
+@@ -169,7 +169,7 @@ bool IsProfilePrefManaged(Profile* profi
+   return pref && pref->IsManaged();
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ 
+ device_signals::SignalsAggregationRequest CreateAggregationRequest(
+     device_signals::SignalName signal_name) {
+@@ -231,7 +231,7 @@ EnterpriseReportingPrivateGetDeviceIdFun
+ 
+ // getPersistentSecret
+ 
+-#if !BUILDFLAG(IS_LINUX)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)
+ 
+ EnterpriseReportingPrivateGetPersistentSecretFunction::
+     EnterpriseReportingPrivateGetPersistentSecretFunction() = default;
+@@ -671,7 +671,7 @@ void EnterpriseReportingPrivateEnqueueRe
+ }
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ 
+ // getFileSystemInfo
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h b/chromium-wip/patches/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h
new file mode 100644
index 0000000000..c2d1c00064
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h
+@@ -20,7 +20,7 @@
+ #include "components/reporting/proto/synced/record.pb.h"
+ #include "components/reporting/proto/synced/record_constants.pb.h"
+ #include "components/reporting/util/statusor.h"
+-#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "base/time/time.h"
+ #include "components/device_signals/core/browser/signals_types.h"
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+@@ -56,7 +56,7 @@ class EnterpriseReportingPrivateGetDevic
+   ~EnterpriseReportingPrivateGetDeviceIdFunction() override;
+ };
+ 
+-#if !BUILDFLAG(IS_LINUX)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)
+ 
+ class EnterpriseReportingPrivateGetPersistentSecretFunction
+     : public ExtensionFunction {
+@@ -266,7 +266,7 @@ class EnterpriseReportingPrivateEnqueueR
+ 
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ 
+ class EnterpriseReportingPrivateGetFileSystemInfoFunction
+     : public ExtensionFunction {
diff --git a/chromium-wip/patches/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc b/chromium-wip/patches/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc
new file mode 100644
index 0000000000..ac2b4e86a7
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc
+@@ -9,6 +9,8 @@
+ #include "base/task/thread_pool.h"
+ #include "content/public/browser/browser_thread.h"
+ 
++#include "base/notimplemented.h"
++
+ namespace extensions {
+ 
+ // A device list to be returned when testing.
+@@ -20,6 +22,7 @@ static base::LazyInstance<scoped_refptr<
+ 
+ void RemovableStorageProvider::GetAllDevices(DeviceListReadyCallback callback) {
+   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
++#if !BUILDFLAG(IS_BSD)
+   if (g_test_device_list.Get().get() != nullptr) {
+     base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(
+         FROM_HERE,
+@@ -33,6 +36,9 @@ void RemovableStorageProvider::GetAllDev
+        base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN},
+       base::BindOnce(&RemovableStorageProvider::PopulateDeviceList),
+       std::move(callback));
++#else
++  NOTIMPLEMENTED();
++#endif
+ }
+ 
+ // static
diff --git a/chromium-wip/patches/patch-chrome_browser_extensions_api_messaging_launch__context__posix.cc b/chromium-wip/patches/patch-chrome_browser_extensions_api_messaging_launch__context__posix.cc
new file mode 100644
index 0000000000..1ba5b4f399
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_extensions_api_messaging_launch__context__posix.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/extensions/api/messaging/launch_context_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/extensions/api/messaging/launch_context_posix.cc
+@@ -84,7 +84,7 @@ std::optional<LaunchContext::ProcessStat
+ 
+   options.current_directory = command_line.GetProgram().DirName();
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Don't use no_new_privs mode, e.g. in case the host needs to use sudo.
+   options.allow_new_privs = true;
+ #endif
diff --git a/chromium-wip/patches/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc b/chromium-wip/patches/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc
new file mode 100644
index 0000000000..a475debb16
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc
+@@ -635,7 +635,7 @@ void PasswordsPrivateDelegateImpl::OnFet
+ }
+ 
+ void PasswordsPrivateDelegateImpl::OsReauthTimeoutCall() {
+-#if !BUILDFLAG(IS_LINUX)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)
+   PasswordsPrivateEventRouter* router =
+       PasswordsPrivateEventRouterFactory::GetForProfile(profile_);
+   if (router) {
diff --git a/chromium-wip/patches/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc b/chromium-wip/patches/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc
new file mode 100644
index 0000000000..639f97de8a
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
+@@ -326,7 +326,11 @@ bool ChromeRuntimeAPIDelegate::GetPlatfo
+   } else if (strcmp(os, "linux") == 0) {
+     info->os = extensions::api::runtime::PlatformOs::kLinux;
+   } else if (strcmp(os, "openbsd") == 0) {
+-    info->os = extensions::api::runtime::PlatformOs::kOpenbsd;
++    info->os = extensions::api::runtime::PlatformOs::kLinux;
++  } else if (strcmp(os, "freebsd") == 0) {
++    info->os = extensions::api::runtime::PlatformOs::kLinux;
++  } else if (strcmp(os, "netbsd") == 0) {
++    info->os = extensions::api::runtime::PlatformOs::kLinux;
+   } else if (strcmp(os, "android") == 0) {
+     info->os = extensions::api::runtime::PlatformOs::kAndroid;
+   } else {
diff --git a/chromium-wip/patches/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc b/chromium-wip/patches/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc
new file mode 100644
index 0000000000..9edb302597
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/extensions/api/settings_private/prefs_util.cc
+@@ -197,7 +197,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
+   (*s_allowlist)[autofill::prefs::kAutofillPaymentCardBenefits] =
+       settings_api::PrefType::kBoolean;
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   (*s_allowlist)[autofill::prefs::kAutofillBnplEnabled] =
+       settings_api::PrefType::kBoolean;
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
+@@ -215,7 +215,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
+   (*s_allowlist)[tab_groups::prefs::kAutoPinNewTabGroups] =
+       settings_api::PrefType::kBoolean;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   (*s_allowlist)[::prefs::kUseCustomChromeFrame] =
+       settings_api::PrefType::kBoolean;
+ #endif
+@@ -229,7 +229,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
+   (*s_allowlist)[::prefs::kCurrentThemeID] = settings_api::PrefType::kString;
+   (*s_allowlist)[::prefs::kPinnedActions] = settings_api::PrefType::kList;
+   (*s_allowlist)[::prefs::kPolicyThemeColor] = settings_api::PrefType::kNumber;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   (*s_allowlist)[::prefs::kSystemTheme] = settings_api::PrefType::kNumber;
+ #endif
+   (*s_allowlist)[::prefs::kHomePage] = settings_api::PrefType::kUrl;
diff --git a/chromium-wip/patches/patch-chrome_browser_extensions_api_tabs_tabs__api.cc b/chromium-wip/patches/patch-chrome_browser_extensions_api_tabs_tabs__api.cc
new file mode 100644
index 0000000000..72b9f989f8
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_extensions_api_tabs_tabs__api.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/extensions/api/tabs/tabs_api.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/extensions/api/tabs/tabs_api.cc
+@@ -992,7 +992,7 @@ ExtensionFunction::ResponseAction Window
+ // created as minimized.
+ // TODO(crbug.com/40254339): Remove this workaround when linux is fixed.
+ // TODO(crbug.com/40254339): Find a fix for wayland as well.
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+   if (new_window->initial_show_state() ==
+       ui::mojom::WindowShowState::kMinimized) {
+     new_window->window()->Minimize();
diff --git a/chromium-wip/patches/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc b/chromium-wip/patches/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc
new file mode 100644
index 0000000000..ca759729af
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc
+@@ -28,7 +28,7 @@
+ #include "extensions/browser/process_manager.h"
+ #include "extensions/common/error_utils.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ #include "extensions/common/permissions/permissions_data.h"
+ #endif
+ 
+@@ -41,7 +41,7 @@ namespace {
+ bool CanEnableAudioDebugRecordingsFromExtension(
+     const extensions::Extension* extension) {
+   bool enabled_by_permissions = false;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   if (extension) {
+     enabled_by_permissions =
+         extension->permissions_data()->active_permissions().HasAPIPermission(
+@@ -580,7 +580,7 @@ void WebrtcLoggingPrivateStartEventLoggi
+ 
+ ExtensionFunction::ResponseAction
+ WebrtcLoggingPrivateGetLogsDirectoryFunction::Run() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   // Unlike other WebrtcLoggingPrivate functions that take a RequestInfo object,
+   // this function shouldn't be called by a component extension on behalf of
+   // some web code. It returns a DirectoryEntry for use directly in the calling
diff --git a/chromium-wip/patches/patch-chrome_browser_extensions_api_webstore__private_webstore__private__api.cc b/chromium-wip/patches/patch-chrome_browser_extensions_api_webstore__private_webstore__private__api.cc
new file mode 100644
index 0000000000..4c72894b85
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_extensions_api_webstore__private_webstore__private__api.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/extensions/api/webstore_private/webstore_private_api.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/extensions/api/webstore_private/webstore_private_api.cc
+@@ -912,7 +912,7 @@ void WebstorePrivateBeginInstallWithMani
+ #if BUILDFLAG(IS_CHROMEOS)
+       RequestExtensionApproval(contents);
+       return;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+       // Shows a parental permission dialog directly bypassing the extension
+       // install dialog view. The parental permission dialog contains a superset
+       // of data from the extension install dialog: requested extension
diff --git a/chromium-wip/patches/patch-chrome_browser_extensions_component__extensions__allowlist_allowlist.cc b/chromium-wip/patches/patch-chrome_browser_extensions_component__extensions__allowlist_allowlist.cc
new file mode 100644
index 0000000000..c9eb039868
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_extensions_component__extensions__allowlist_allowlist.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/extensions/component_extensions_allowlist/allowlist.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/extensions/component_extensions_allowlist/allowlist.cc
+@@ -48,7 +48,7 @@ bool IsComponentExtensionAllowlisted(con
+ #endif  // BUILDFLAG(GOOGLE_CHROME_BRANDING)
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+       extension_misc::kReadingModeGDocsHelperExtensionId,
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+       extension_misc::kTTSEngineExtensionId,
+       extension_misc::kComponentUpdaterTTSEngineExtensionId,
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
+@@ -85,7 +85,7 @@ bool IsComponentExtensionAllowlisted(int
+     case IDR_NETWORK_SPEECH_SYNTHESIS_MANIFEST:
+     case IDR_NETWORK_SPEECH_SYNTHESIS_MANIFEST_MV3:
+     case IDR_READING_MODE_GDOCS_HELPER_MANIFEST:
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+     case IDR_TTS_ENGINE_MANIFEST:
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
+     case IDR_WEBSTORE_MANIFEST:
diff --git a/chromium-wip/patches/patch-chrome_browser_extensions_external__provider__impl.cc b/chromium-wip/patches/patch-chrome_browser_extensions_external__provider__impl.cc
new file mode 100644
index 0000000000..3b41d7e303
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_extensions_external__provider__impl.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/extensions/external_provider_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/extensions/external_provider_impl.cc
+@@ -828,7 +828,7 @@ void ExternalProviderImpl::CreateExterna
+ 
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+   if (!profile->GetPrefs()->GetBoolean(pref_names::kBlockExternalExtensions)) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     provider_list->push_back(std::make_unique<ExternalProviderImpl>(
+         service,
+         base::MakeRefCounted<ExternalPrefLoader>(
+@@ -856,7 +856,7 @@ void ExternalProviderImpl::CreateExterna
+         bundled_extension_creation_flags));
+ 
+     // Define a per-user source of external extensions.
+-#if BUILDFLAG(IS_MAC) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \
++#if BUILDFLAG(IS_MAC) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \
+                           BUILDFLAG(CHROMIUM_BRANDING))
+     provider_list->push_back(std::make_unique<ExternalProviderImpl>(
+         service,
diff --git a/chromium-wip/patches/patch-chrome_browser_feedback_system__logs_about__system__logs__fetcher.cc b/chromium-wip/patches/patch-chrome_browser_feedback_system__logs_about__system__logs__fetcher.cc
new file mode 100644
index 0000000000..30a9a33a49
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_feedback_system__logs_about__system__logs__fetcher.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/feedback/system_logs/about_system_logs_fetcher.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/feedback/system_logs/about_system_logs_fetcher.cc
+@@ -38,7 +38,7 @@
+ #include "chrome/browser/ash/system_logs/ui_hierarchy_log_source.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/feedback/system_logs/log_sources/ozone_platform_state_dump_source.h"
+ #endif
+ 
+@@ -85,7 +85,7 @@ SystemLogsFetcher* BuildAboutSystemLogsF
+   fetcher->AddSource(std::make_unique<KeyboardInfoLogSource>());
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   fetcher->AddSource(std::make_unique<OzonePlatformStateDumpSource>());
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_feedback_system__logs_chrome__system__logs__fetcher.cc b/chromium-wip/patches/patch-chrome_browser_feedback_system__logs_chrome__system__logs__fetcher.cc
new file mode 100644
index 0000000000..07ba8a5d30
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_feedback_system__logs_chrome__system__logs__fetcher.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/feedback/system_logs/chrome_system_logs_fetcher.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/feedback/system_logs/chrome_system_logs_fetcher.cc
+@@ -45,7 +45,7 @@
+ #include "services/network/public/cpp/shared_url_loader_factory.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/feedback/system_logs/log_sources/ozone_platform_state_dump_source.h"
+ #endif
+ 
+@@ -102,7 +102,7 @@ SystemLogsFetcher* BuildChromeSystemLogs
+   fetcher->AddSource(std::make_unique<UiHierarchyLogSource>(scrub_data));
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   fetcher->AddSource(std::make_unique<OzonePlatformStateDumpSource>());
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc b/chromium-wip/patches/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc
new file mode 100644
index 0000000000..fe4fb7c70f
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
+@@ -341,7 +341,7 @@ GenerateBlockedPath() {
+        FILE_PATH_LITERAL("Library/Mobile Documents/com~apple~CloudDocs"),
+        BlockType::kDontBlockChildren},
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+       // On Linux also block access to devices via /dev.
+       {kNoBasePathKey, FILE_PATH_LITERAL("/dev"), BlockType::kBlockAllChildren},
+       // And security sensitive data in /proc and /sys.
diff --git a/chromium-wip/patches/patch-chrome_browser_first__run_first__run__dialog.h b/chromium-wip/patches/patch-chrome_browser_first__run_first__run__dialog.h
new file mode 100644
index 0000000000..3ee052ee77
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_first__run_first__run__dialog.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/first_run/first_run_dialog.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/first_run/first_run_dialog.h
+@@ -9,7 +9,7 @@
+ #include "build/build_config.h"
+ 
+ // Hide this function on platforms where the dialog does not exist.
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ 
+ namespace first_run {
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_first__run_first__run__internal.h b/chromium-wip/patches/patch-chrome_browser_first__run_first__run__internal.h
new file mode 100644
index 0000000000..fa6c565ad5
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_first__run_first__run__internal.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/first_run/first_run_internal.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/first_run/first_run_internal.h
+@@ -53,7 +53,7 @@ FirstRunState DetermineFirstRunState(boo
+                                      bool force_first_run,
+                                      bool no_first_run);
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // For testing, forces the first run dialog to either be shown or not. If not
+ // called, the decision to show the dialog or not will be made by Chrome based
+ // on a number of factors (such as install type, whether it's a Chrome-branded
diff --git a/chromium-wip/patches/patch-chrome_browser_flag__descriptions.cc b/chromium-wip/patches/patch-chrome_browser_flag__descriptions.cc
new file mode 100644
index 0000000000..d35cf1f951
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_flag__descriptions.cc
@@ -0,0 +1,200 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/flag_descriptions.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/flag_descriptions.cc
+@@ -694,7 +694,7 @@ const char kAutofillEnableAllowlistForBm
+     "Autofill suggestions on the allowlisted merchant websites.";
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ const char kAutofillEnableAmountExtractionAllowlistDesktopName[] =
+     "Enable loading and querying the checkout amount extraction allowlist on "
+     "Chrome Desktop";
+@@ -712,7 +712,7 @@ const char kAutofillEnableAmountExtracti
+         // BUILDFLAG(IS_CHROMEOS)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ const char kAutofillEnableAmountExtractionTestingName[] =
+     "Enable amount extraction testing on Chrome desktop and Clank";
+ const char kAutofillEnableAmountExtractionTestingDescription[] =
+@@ -723,7 +723,7 @@ const char kAutofillEnableAmountExtracti
+         // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ const char kAutofillEnableBuyNowPayLaterName[] =
+     "Enable buy now pay later on Autofill";
+ const char kAutofillEnableBuyNowPayLaterDescription[] =
+@@ -1193,7 +1193,7 @@ const char kDevicePostureDescription[] =
+     "Enables Device Posture API (foldable devices)";
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ const char kDocumentPictureInPictureAnimateResizeName[] =
+     "Document Picture-in-Picture Animate Resize";
+ const char kDocumentPictureInPictureAnimateResizeDescription[] =
+@@ -1341,7 +1341,7 @@ const char kContextMenuEmptySpaceDescrip
+     "space, a context menu containing page-related items will be shown.";
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ const char kContextualCueingName[] = "Contextual cueing";
+ const char kContextualCueingDescription[] =
+     "Enables the contextual cueing system to support showing actions.";
+@@ -1735,7 +1735,7 @@ const char kEnableIsolatedWebAppDevModeN
+ const char kEnableIsolatedWebAppDevModeDescription[] =
+     "Enables the installation of unverified Isolated Web Apps";
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ const char kEnableIwaKeyDistributionComponentName[] =
+     "Enable the Iwa Key Distribution component";
+ const char kEnableIwaKeyDistributionComponentDescription[] =
+@@ -3725,7 +3725,7 @@ const char kReduceTransferSizeUpdatedIPC
+     "When enabled, the network service will send TransferSizeUpdatedIPC IPC "
+     "only when DevTools is attached or the request is for an ad request.";
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ const char kReduceUserAgentDataLinuxPlatformVersionName[] =
+     "Reduce Linux platform version Client Hint";
+ const char kReduceUserAgentDataLinuxPlatformVersionDescription[] =
+@@ -3757,7 +3757,7 @@ const char kRetainOmniboxOnFocusDescript
+     "exhibit a change in behavior.";
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ const char kRootScrollbarFollowsTheme[] = "Make scrollbar follow theme";
+ const char kRootScrollbarFollowsThemeDescription[] =
+     "If enabled makes the root scrollbar follow the browser's theme color.";
+@@ -4004,7 +4004,7 @@ const char kDefaultSiteInstanceGroupsDes
+     "SiteInstance.";
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ const char kPwaNavigationCapturingName[] = "Desktop PWA Link Capturing";
+ const char kPwaNavigationCapturingDescription[] =
+     "Enables opening links from Chrome in an installed PWA. Currently under "
+@@ -4273,7 +4273,7 @@ const char kTranslateForceTriggerOnEngli
+     "Force the Translate Triggering on English pages experiment to be enabled "
+     "with the selected language model active.";
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ const char kEnableHistorySyncOptinName[] = "History Sync Opt-in";
+ const char kEnableHistorySyncOptinDescription[] =
+     "Enables the History Sync Opt-in screen on Desktop platforms. The screen "
+@@ -6060,7 +6060,7 @@ const char kTranslateOpenSettingsDescrip
+     "Add an option to the translate bubble menu to open language settings.";
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ const char kWasmTtsComponentUpdaterEnabledName[] =
+     "Enable Wasm TTS Extension Component";
+ const char kWasmTtsComponentUpdaterEnabledDescription[] =
+@@ -8103,7 +8103,7 @@ const char kTetheringExperimentalFunctio
+ 
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ const char kGetAllScreensMediaName[] = "GetAllScreensMedia API";
+ const char kGetAllScreensMediaDescription[] =
+     "When enabled, the getAllScreensMedia API for capturing multiple screens "
+@@ -8332,7 +8332,7 @@ const char kEnableArmHwdrmDescription[] 
+ 
+ // Linux -----------------------------------------------------------------------
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ const char kOzonePlatformHintChoiceDefault[] = "Default";
+ const char kOzonePlatformHintChoiceAuto[] = "Auto";
+ const char kOzonePlatformHintChoiceX11[] = "X11";
+@@ -8382,6 +8382,20 @@ const char kWaylandUiScalingDescription[
+     "Enable experimental support for text scaling in the Wayland backend "
+     "backed by full UI scaling. Requires #wayland-per-window-scaling to be "
+     "enabled too.";
++
++#if BUILDFLAG(IS_BSD)
++const char kAudioBackendName[] =
++    "Audio Backend";
++const char kAudioBackendDescription[] =
++#if BUILDFLAG(IS_OPENBSD)
++    "Select the desired audio backend to use. The default is sndio.";
++#elif BUILDFLAG(IS_NETBSD)
++    "Select the desired audio backend to use. The default is audioio.";
++#elif BUILDFLAG(IS_FREEBSD)
++    "Select the desired audio backend to use. The default will automatically "
++    "enumerate through the supported backends.";
++#endif
++#endif
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+ // Random platform combinations -----------------------------------------------
+@@ -8394,7 +8408,7 @@ const char kZeroCopyVideoCaptureDescript
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ const char kFollowingFeedSidepanelName[] = "Following feed in the sidepanel";
+ const char kFollowingFeedSidepanelDescription[] =
+     "Enables the following feed in the sidepanel.";
+@@ -8444,7 +8458,7 @@ const char kGroupPromoPrototypeCpaDescri
+     "Enables contextual toolbar button for group promo prototype.";
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ const char kEnableNetworkServiceSandboxName[] =
+     "Enable the network service sandbox.";
+ const char kEnableNetworkServiceSandboxDescription[] =
+@@ -8465,7 +8479,7 @@ const char kWebBluetoothConfirmPairingSu
+     "Bluetooth";
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(ENABLE_PRINTING)
+ const char kCupsIppPrintingBackendName[] = "CUPS IPP Printing Backend";
+ const char kCupsIppPrintingBackendDescription[] =
+@@ -8614,7 +8628,7 @@ const char kElementCaptureDescription[] 
+     "media track into a track capturing just a specific DOM element.";
+ #endif  // !BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ const char kUIDebugToolsName[] = "Debugging tools for UI";
+ const char kUIDebugToolsDescription[] =
+     "Enables additional keyboard shortcuts to help debugging.";
+@@ -8665,7 +8679,7 @@ const char kComposeUpfrontInputModesDesc
+     "Enables upfront input modes in the Compose dialog";
+ #endif  // BUILDFLAG(ENABLE_COMPOSE)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ const char kThirdPartyProfileManagementName[] =
+     "Third party profile management";
+ const char kThirdPartyProfileManagementDescription[] =
+@@ -8783,7 +8797,7 @@ const char kSupervisedUserBlockInterstit
+ const char kSupervisedUserBlockInterstitialV3Description[] =
+     "Enables URL filter interstitial V3 for Family Link users.";
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ const char kSupervisedProfileHideGuestName[] = "Supervised Profile Hide Guest";
+ const char kSupervisedProfileHideGuestDescription[] =
+     "Hides Guest Profile entry points for supervised users";
diff --git a/chromium-wip/patches/patch-chrome_browser_flag__descriptions.h b/chromium-wip/patches/patch-chrome_browser_flag__descriptions.h
new file mode 100644
index 0000000000..077ff57365
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_flag__descriptions.h
@@ -0,0 +1,188 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/flag_descriptions.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/flag_descriptions.h
+@@ -437,7 +437,7 @@ extern const char
+     kAutofillEnableAllowlistForBmoCardCategoryBenefitsDescription[];
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ extern const char kAutofillEnableAmountExtractionAllowlistDesktopName[];
+ extern const char kAutofillEnableAmountExtractionAllowlistDesktopDescription[];
+ extern const char kAutofillEnableAmountExtractionDesktopName[];
+@@ -446,14 +446,14 @@ extern const char kAutofillEnableAmountE
+         // BUILDFLAG(IS_CHROMEOS)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ extern const char kAutofillEnableAmountExtractionTestingName[];
+ extern const char kAutofillEnableAmountExtractionTestingDescription[];
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
+         // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ extern const char kAutofillEnableBuyNowPayLaterName[];
+ extern const char kAutofillEnableBuyNowPayLaterDescription[];
+ 
+@@ -703,7 +703,7 @@ extern const char kContextMenuEmptySpace
+ extern const char kContextMenuEmptySpaceDescription[];
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ extern const char kContextualCueingName[];
+ extern const char kContextualCueingDescription[];
+ extern const char kGlicZeroStateSuggestionsName[];
+@@ -892,7 +892,7 @@ extern const char kDevicePostureName[];
+ extern const char kDevicePostureDescription[];
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ extern const char kDocumentPictureInPictureAnimateResizeName[];
+ extern const char kDocumentPictureInPictureAnimateResizeDescription[];
+ 
+@@ -1063,7 +1063,7 @@ extern const char kEnableIsolatedWebAppA
+ extern const char kEnableIsolatedWebAppDevModeName[];
+ extern const char kEnableIsolatedWebAppDevModeDescription[];
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ extern const char kEnableIwaKeyDistributionComponentName[];
+ extern const char kEnableIwaKeyDistributionComponentDescription[];
+ #endif  // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+@@ -2139,7 +2139,7 @@ extern const char kRetainOmniboxOnFocusN
+ extern const char kRetainOmniboxOnFocusDescription[];
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ extern const char kRootScrollbarFollowsTheme[];
+ extern const char kRootScrollbarFollowsThemeDescription[];
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
+@@ -2280,7 +2280,7 @@ extern const char kDefaultSiteInstanceGr
+ extern const char kDefaultSiteInstanceGroupsDescription[];
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ extern const char kPwaNavigationCapturingName[];
+ extern const char kPwaNavigationCapturingDescription[];
+ #endif
+@@ -2457,7 +2457,7 @@ extern const char kTouchTextEditingRedes
+ extern const char kTranslateForceTriggerOnEnglishName[];
+ extern const char kTranslateForceTriggerOnEnglishDescription[];
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ extern const char kEnableHistorySyncOptinName[];
+ extern const char kEnableHistorySyncOptinDescription[];
+ 
+@@ -2728,7 +2728,7 @@ extern const char kReduceAcceptLanguageD
+ extern const char kReduceTransferSizeUpdatedIPCName[];
+ extern const char kReduceTransferSizeUpdatedIPCDescription[];
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ extern const char kReduceUserAgentDataLinuxPlatformVersionName[];
+ extern const char kReduceUserAgentDataLinuxPlatformVersionDescription[];
+ #endif  // #if BUILDFLAG(IS_LINUX)
+@@ -3538,7 +3538,7 @@ extern const char kTranslateOpenSettings
+ extern const char kTranslateOpenSettingsDescription[];
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ extern const char kWasmTtsComponentUpdaterEnabledName[];
+ extern const char kWasmTtsComponentUpdaterEnabledDescription[];
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
+@@ -4747,7 +4747,7 @@ extern const char kTetheringExperimental
+ 
+ #endif  // #if BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ extern const char kGetAllScreensMediaName[];
+ extern const char kGetAllScreensMediaDescription[];
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+@@ -4882,7 +4882,7 @@ extern const char kEnableArmHwdrmDescrip
+ 
+ // Linux ---------------------------------------------------------------------
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ extern const char kOzonePlatformHintChoiceDefault[];
+ extern const char kOzonePlatformHintChoiceAuto[];
+ extern const char kOzonePlatformHintChoiceX11[];
+@@ -4913,6 +4913,9 @@ extern const char kWaylandTextInputV3Des
+ 
+ extern const char kWaylandUiScalingName[];
+ extern const char kWaylandUiScalingDescription[];
++
++extern const char kAudioBackendName[];
++extern const char kAudioBackendDescription[];
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+ // Random platform combinations -----------------------------------------------
+@@ -4927,7 +4930,7 @@ extern const char kWebBluetoothConfirmPa
+ extern const char kWebBluetoothConfirmPairingSupportDescription[];
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(ENABLE_PRINTING)
+ extern const char kCupsIppPrintingBackendName[];
+ extern const char kCupsIppPrintingBackendDescription[];
+@@ -4940,7 +4943,7 @@ extern const char kScreenlockReauthCardD
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ extern const char kFollowingFeedSidepanelName[];
+ extern const char kFollowingFeedSidepanelDescription[];
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
+@@ -4957,7 +4960,7 @@ extern const char kTaskManagerDesktopRef
+ extern const char kTaskManagerDesktopRefreshDescription[];
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ extern const char kEnableNetworkServiceSandboxName[];
+ extern const char kEnableNetworkServiceSandboxDescription[];
+ 
+@@ -5054,7 +5057,7 @@ extern const char kElementCaptureName[];
+ extern const char kElementCaptureDescription[];
+ #endif  // !BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ extern const char kUIDebugToolsName[];
+ extern const char kUIDebugToolsDescription[];
+ #endif
+@@ -5093,7 +5096,7 @@ extern const char kComposeUpfrontInputMo
+ extern const char kComposeUpfrontInputModesDescription[];
+ #endif  // BUILDFLAG(ENABLE_COMPOSE)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ extern const char kThirdPartyProfileManagementName[];
+ extern const char kThirdPartyProfileManagementDescription[];
+ 
+@@ -5167,7 +5170,7 @@ extern const char kEnablePolicyPromotion
+ extern const char kSupervisedUserBlockInterstitialV3Name[];
+ extern const char kSupervisedUserBlockInterstitialV3Description[];
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ extern const char kSupervisedProfileHideGuestName[];
+ extern const char kSupervisedProfileHideGuestDescription[];
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_gcm_gcm__profile__service__factory.cc b/chromium-wip/patches/patch-chrome_browser_gcm_gcm__profile__service__factory.cc
new file mode 100644
index 0000000000..55c5cc5c64
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_gcm_gcm__profile__service__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/gcm/gcm_profile_service_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/gcm/gcm_profile_service_factory.cc
+@@ -110,7 +110,7 @@ GCMProfileServiceFactory::ScopedTestingF
+ // static
+ GCMProfileService* GCMProfileServiceFactory::GetForProfile(
+     content::BrowserContext* profile) {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // On desktop, incognito profiles are checked with IsIncognitoProfile().
+   // It's possible for non-incognito profiles to also be off-the-record.
+   bool is_profile_supported =
+@@ -153,7 +153,7 @@ std::unique_ptr<KeyedService>
+ GCMProfileServiceFactory::BuildServiceInstanceForBrowserContext(
+     content::BrowserContext* context) const {
+   Profile* profile = Profile::FromBrowserContext(context);
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   DCHECK(!profile->IsIncognitoProfile());
+ #else
+   DCHECK(!profile->IsOffTheRecord());
diff --git a/chromium-wip/patches/patch-chrome_browser_gcm_instance__id_instance__id__profile__service__factory.cc b/chromium-wip/patches/patch-chrome_browser_gcm_instance__id_instance__id__profile__service__factory.cc
new file mode 100644
index 0000000000..a2d149f499
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_gcm_instance__id_instance__id__profile__service__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/gcm/instance_id/instance_id_profile_service_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/gcm/instance_id/instance_id_profile_service_factory.cc
+@@ -16,7 +16,7 @@ namespace instance_id {
+ // static
+ InstanceIDProfileService* InstanceIDProfileServiceFactory::GetForProfile(
+     content::BrowserContext* profile) {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // On desktop, the guest profile is actually the primary OTR profile of
+   // the "regular" guest profile.  The regular guest profile is never used
+   // directly by users.  Also, user are not able to create child OTR profiles
+@@ -65,7 +65,7 @@ std::unique_ptr<KeyedService>
+ InstanceIDProfileServiceFactory::BuildServiceInstanceForBrowserContext(
+     content::BrowserContext* context) const {
+   Profile* profile = Profile::FromBrowserContext(context);
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // On desktop, incognito profiles are checked with IsIncognitoProfile().
+   // It's possible for non-incognito profiles to also be off-the-record.
+   bool is_incognito = profile->IsIncognitoProfile();
diff --git a/chromium-wip/patches/patch-chrome_browser_global__features.cc b/chromium-wip/patches/patch-chrome_browser_global__features.cc
new file mode 100644
index 0000000000..72a624c587
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_global__features.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/global_features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/global_features.cc
+@@ -24,7 +24,7 @@
+ #include "chrome/browser/glic/host/glic_synthetic_trial_manager.h"  // nogncheck
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // This causes a gn error on Android builds, because gn does not understand
+ // buildflags, so we include it only on platforms where it is used.
+ #include "chrome/browser/ui/webui/whats_new/whats_new_registrar.h"
+@@ -70,7 +70,7 @@ void GlobalFeatures::ReplaceGlobalFeatur
+ 
+ void GlobalFeatures::Init() {
+   system_permissions_platform_handle_ = CreateSystemPermissionsPlatformHandle();
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   whats_new_registry_ = CreateWhatsNewRegistry();
+ #endif
+ 
+@@ -119,7 +119,7 @@ GlobalFeatures::CreateSystemPermissionsP
+   return system_permission_settings::PlatformHandle::Create();
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ std::unique_ptr<whats_new::WhatsNewRegistry>
+ GlobalFeatures::CreateWhatsNewRegistry() {
+   return whats_new::CreateWhatsNewRegistry();
diff --git a/chromium-wip/patches/patch-chrome_browser_global__features.h b/chromium-wip/patches/patch-chrome_browser_global__features.h
new file mode 100644
index 0000000000..aaaa9ec8f5
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_global__features.h
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/global_features.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/global_features.h
+@@ -15,7 +15,7 @@
+ namespace system_permission_settings {
+ class PlatformHandle;
+ }  // namespace system_permission_settings
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ namespace whats_new {
+ class WhatsNewRegistry;
+ }  // namespace whats_new
+@@ -63,7 +63,7 @@ class GlobalFeatures {
+   system_permissions_platform_handle() {
+     return system_permissions_platform_handle_.get();
+   }
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   whats_new::WhatsNewRegistry* whats_new_registry() {
+     return whats_new_registry_.get();
+   }
+@@ -103,7 +103,7 @@ class GlobalFeatures {
+ 
+   virtual std::unique_ptr<system_permission_settings::PlatformHandle>
+   CreateSystemPermissionsPlatformHandle();
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   virtual std::unique_ptr<whats_new::WhatsNewRegistry> CreateWhatsNewRegistry();
+ #endif
+ 
+@@ -113,7 +113,7 @@ class GlobalFeatures {
+ 
+   std::unique_ptr<system_permission_settings::PlatformHandle>
+       system_permissions_platform_handle_;
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<whats_new::WhatsNewRegistry> whats_new_registry_;
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_headless_headless__mode__util.cc b/chromium-wip/patches/patch-chrome_browser_headless_headless__mode__util.cc
new file mode 100644
index 0000000000..dd0bbbe061
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_headless_headless__mode__util.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/headless/headless_mode_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/headless/headless_mode_util.cc
+@@ -10,7 +10,7 @@
+ // New headless mode is available on Linux, Windows and Mac platforms.
+ // More platforms will be added later, so avoid function level clutter
+ // by providing stub implementations at the end of the file.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ 
+ #include "base/base_switches.h"
+ #include "base/files/file_path.h"
+@@ -19,7 +19,7 @@
+ #include "chrome/common/chrome_switches.h"
+ #include "content/public/common/content_switches.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/gl/gl_switches.h"               // nogncheck
+ #include "ui/ozone/public/ozone_switches.h"  // nogncheck
+ #endif  // BUILDFLAG(IS_LINUX)
+@@ -94,7 +94,7 @@ class HeadlessModeHandleImpl : public He
+       }
+     }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Headless mode on Linux relies on ozone/headless platform.
+   command_line->AppendSwitchASCII(::switches::kOzonePlatform,
+                                   switches::kHeadless);
diff --git a/chromium-wip/patches/patch-chrome_browser_intranet__redirect__detector.h b/chromium-wip/patches/patch-chrome_browser_intranet__redirect__detector.h
new file mode 100644
index 0000000000..ad322a3c1f
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_intranet__redirect__detector.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/intranet_redirect_detector.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/intranet_redirect_detector.h
+@@ -25,7 +25,7 @@ class SimpleURLLoader;
+ class PrefRegistrySimple;
+ 
+ #if !(BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \
+-      BUILDFLAG(IS_CHROMEOS))
++      BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))
+ #error "IntranetRedirectDetector should only be built on Desktop platforms."
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc b/chromium-wip/patches/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc
new file mode 100644
index 0000000000..d03b2b35be
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/media_galleries/fileapi/mtp_device_map_service.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/media_galleries/fileapi/mtp_device_map_service.cc
+@@ -39,10 +39,12 @@ void MTPDeviceMapService::RegisterMTPFil
+     // Note that this initializes the delegate asynchronously, but since
+     // the delegate will only be used from the IO thread, it is guaranteed
+     // to be created before use of it expects it to be there.
++#if !BUILDFLAG(IS_BSD) 
+     CreateMTPDeviceAsyncDelegate(
+         device_location, read_only,
+         base::BindOnce(&MTPDeviceMapService::AddAsyncDelegate,
+                        base::Unretained(this), device_location, read_only));
++#endif
+     mtp_device_usage_map_[key] = 0;
+   }
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_media__galleries_media__file__system__registry.cc b/chromium-wip/patches/patch-chrome_browser_media__galleries_media__file__system__registry.cc
new file mode 100644
index 0000000000..0a8906e557
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_media__galleries_media__file__system__registry.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/media_galleries/media_file_system_registry.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/media_galleries/media_file_system_registry.cc
+@@ -582,7 +582,12 @@ class MediaFileSystemRegistry::MediaFile
+ // Constructor in 'private' section because depends on private class definition.
+ MediaFileSystemRegistry::MediaFileSystemRegistry()
+     : file_system_context_(new MediaFileSystemContextImpl) {
+-  StorageMonitor::GetInstance()->AddObserver(this);
++  /*
++   * This conditional is needed for shutdown.  Destructors
++   * try to get the media file system registry.
++   */
++  if (StorageMonitor::GetInstance())
++    StorageMonitor::GetInstance()->AddObserver(this);
+ }
+ 
+ MediaFileSystemRegistry::~MediaFileSystemRegistry() {
diff --git a/chromium-wip/patches/patch-chrome_browser_media_audio__service__util.cc b/chromium-wip/patches/patch-chrome_browser_media_audio__service__util.cc
new file mode 100644
index 0000000000..431be17e3d
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_media_audio__service__util.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/media/audio_service_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/media/audio_service_util.cc
+@@ -20,7 +20,7 @@
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ const base::Value* GetPolicy(const char* policy_name) {
+   const policy::PolicyMap& policies =
+       g_browser_process->browser_policy_connector()
+@@ -39,7 +39,7 @@ bool GetPolicyOrFeature(const char* poli
+ }  // namespace
+ 
+ bool IsAudioServiceSandboxEnabled() {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return GetPolicyOrFeature(policy::key::kAudioSandboxEnabled,
+                             features::kAudioServiceSandbox);
+ #else
diff --git a/chromium-wip/patches/patch-chrome_browser_media_router_discovery_BUILD.gn b/chromium-wip/patches/patch-chrome_browser_media_router_discovery_BUILD.gn
new file mode 100644
index 0000000000..07c5ad0810
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_media_router_discovery_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/media/router/discovery/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/media/router/discovery/BUILD.gn
+@@ -79,7 +79,7 @@ static_library("discovery") {
+   ]
+   configs += [ "//build/config/compiler:wexit_time_destructors" ]
+ 
+-  if (is_linux || is_chromeos) {
++  if ((is_linux || is_chromeos) && !is_bsd) {
+     sources += [ "discovery_network_list_wifi_linux.cc" ]
+   }
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_media_router_discovery_discovery__network__list__posix.cc b/chromium-wip/patches/patch-chrome_browser_media_router_discovery_discovery__network__list__posix.cc
new file mode 100644
index 0000000000..29748341dc
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_media_router_discovery_discovery__network__list__posix.cc
@@ -0,0 +1,54 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/media/router/discovery/discovery_network_list_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/media/router/discovery/discovery_network_list_posix.cc
+@@ -10,11 +10,12 @@
+ #include "chrome/browser/media/router/discovery/discovery_network_list.h"
+ 
+ #include <ifaddrs.h>
++#include <sys/socket.h>
++#include <sys/types.h>
++#include <sys/time.h>
+ #include <net/if.h>
+ #include <net/if_arp.h>
+ #include <netinet/in.h>
+-#include <sys/socket.h>
+-#include <sys/types.h>
+ 
+ #include <algorithm>
+ 
+@@ -23,7 +24,7 @@
+ #include "chrome/browser/media/router/discovery/discovery_network_list_wifi.h"
+ #include "net/base/net_errors.h"
+ 
+-#if !BUILDFLAG(IS_MAC)
++#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD)
+ #include <netpacket/packet.h>
+ #else
+ #include <net/if_dl.h>
+@@ -32,7 +33,7 @@
+ namespace media_router {
+ namespace {
+ 
+-#if !BUILDFLAG(IS_MAC)
++#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD)
+ using sll = struct sockaddr_ll;
+ #define SOCKET_ARP_TYPE(s) ((s)->sll_hatype)
+ #define SOCKET_ADDRESS_LEN(s) ((s)->sll_halen)
+@@ -45,6 +46,12 @@ using sll = struct sockaddr_dl;
+ #define SOCKET_ADDRESS(s) (LLADDR(s))
+ #endif
+ 
++#if BUILDFLAG(IS_BSD)
++bool MaybeGetWifiSSID(const std::string& if_name, std::string* ssid_out) {
++  return false;
++}
++#endif
++
+ void GetDiscoveryNetworkInfoListImpl(
+     const struct ifaddrs* if_list,
+     std::vector<DiscoveryNetworkInfo>* network_info_list) {
diff --git a/chromium-wip/patches/patch-chrome_browser_media_router_discovery_discovery__network__list__wifi__linux.cc b/chromium-wip/patches/patch-chrome_browser_media_router_discovery_discovery__network__list__wifi__linux.cc
new file mode 100644
index 0000000000..aec29e5541
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_media_router_discovery_discovery__network__list__wifi__linux.cc
@@ -0,0 +1,36 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/media/router/discovery/discovery_network_list_wifi_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/media/router/discovery/discovery_network_list_wifi_linux.cc
+@@ -9,7 +9,11 @@
+ 
+ #include "chrome/browser/media/router/discovery/discovery_network_list_wifi.h"
+ 
++#include "build/build_config.h"
++
++#if !BUILDFLAG(IS_BSD)
+ #include <linux/wireless.h>
++#endif
+ #include <string.h>
+ #include <sys/ioctl.h>
+ #include <sys/socket.h>
+@@ -24,6 +28,7 @@ namespace media_router {
+ bool MaybeGetWifiSSID(const std::string& if_name, std::string* ssid_out) {
+   DCHECK(ssid_out);
+ 
++#if !BUILDFLAG(IS_BSD)
+   base::ScopedFD ioctl_socket(socket(AF_INET, SOCK_DGRAM, 0));
+   if (!ioctl_socket.is_valid()) {
+     // AF_INET is for IPv4, so it may fail for IPv6-only hosts even when there
+@@ -46,6 +51,7 @@ bool MaybeGetWifiSSID(const std::string&
+     ssid_out->assign(ssid);
+     return true;
+   }
++#endif
+   return false;
+ }
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.cc b/chromium-wip/patches/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.cc
new file mode 100644
index 0000000000..9e6624f32e
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.cc
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/media/webrtc/chrome_screen_enumerator.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/media/webrtc/chrome_screen_enumerator.cc
+@@ -21,7 +21,7 @@
+ #if BUILDFLAG(IS_CHROMEOS)
+ #include "ash/shell.h"
+ #include "ui/aura/window.h"
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "base/functional/callback.h"
+ #include "content/public/browser/desktop_capture.h"
+ #endif
+@@ -32,7 +32,7 @@ base::LazyInstance<std::vector<raw_ptr<a
+     DestructorAtExit root_windows_for_testing_ = LAZY_INSTANCE_INITIALIZER;
+ }  // namespace
+ 
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ namespace {
+ base::LazyInstance<std::unique_ptr<webrtc::DesktopCapturer>>::DestructorAtExit
+     g_desktop_capturer_for_testing = LAZY_INSTANCE_INITIALIZER;
+@@ -79,7 +79,7 @@ blink::mojom::StreamDevicesSetPtr Enumer
+   return stream_devices_set;
+ }
+ 
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ blink::mojom::StreamDevicesSetPtr EnumerateScreens(
+     blink::mojom::MediaStreamType stream_type) {
+   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+@@ -132,7 +132,7 @@ void ChromeScreenEnumerator::SetRootWind
+   root_windows_for_testing_.Get() = std::move(root_windows);
+ }
+ 
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void ChromeScreenEnumerator::SetDesktopCapturerForTesting(
+     std::unique_ptr<webrtc::DesktopCapturer> capturer) {
+   g_desktop_capturer_for_testing.Get() = std::move(capturer);
+@@ -145,7 +145,7 @@ void ChromeScreenEnumerator::EnumerateSc
+     ScreensCallback screens_callback) const {
+   DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   content::GetUIThreadTaskRunner({})->PostTaskAndReplyWithResult(
+       FROM_HERE, base::BindOnce(::EnumerateScreens, stream_type),
+       base::BindOnce(
diff --git a/chromium-wip/patches/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.h b/chromium-wip/patches/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.h
new file mode 100644
index 0000000000..542e4c7223
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/media/webrtc/chrome_screen_enumerator.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/media/webrtc/chrome_screen_enumerator.h
+@@ -18,7 +18,7 @@
+ namespace aura {
+ class Window;
+ }
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ namespace webrtc {
+ class DesktopCapturer;
+ }
+@@ -39,7 +39,7 @@ class ChromeScreenEnumerator : public me
+ #if BUILDFLAG(IS_CHROMEOS)
+   static void SetRootWindowsForTesting(
+       std::vector<raw_ptr<aura::Window, VectorExperimental>> root_windows);
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   static void SetDesktopCapturerForTesting(
+       std::unique_ptr<webrtc::DesktopCapturer> capturer);
+ #endif
diff --git a/chromium-wip/patches/patch-chrome_browser_media_webrtc_desktop__media__picker__controller.cc b/chromium-wip/patches/patch-chrome_browser_media_webrtc_desktop__media__picker__controller.cc
new file mode 100644
index 0000000000..91a617dd05
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_media_webrtc_desktop__media__picker__controller.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/media/webrtc/desktop_media_picker_controller.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/media/webrtc/desktop_media_picker_controller.cc
+@@ -93,7 +93,7 @@ bool DesktopMediaPickerController::IsSys
+ #if BUILDFLAG(IS_MAC)
+  return request_source == Params::RequestSource::kCast ||
+      base::FeatureList::IsEnabled(media::kMacLoopbackAudioForScreenShare);
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (request_source == Params::RequestSource::kCast) {
+     return base::FeatureList::IsEnabled(media::kPulseaudioLoopbackForCast);
+   } else {
diff --git a/chromium-wip/patches/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc b/chromium-wip/patches/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc
new file mode 100644
index 0000000000..96a7b5dd77
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/media/webrtc/webrtc_log_uploader.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/media/webrtc/webrtc_log_uploader.cc
+@@ -101,7 +101,7 @@ std::string GetLogUploadProduct() {
+   const char product[] = "Chrome";
+ #elif BUILDFLAG(IS_MAC)
+   const char product[] = "Chrome_Mac";
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #if !defined(ADDRESS_SANITIZER)
+   const char product[] = "Chrome_Linux";
+ #else
diff --git a/chromium-wip/patches/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc b/chromium-wip/patches/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc
new file mode 100644
index 0000000000..490ec12fe4
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/media/webrtc/webrtc_logging_controller.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/media/webrtc/webrtc_logging_controller.cc
+@@ -25,7 +25,7 @@
+ #include "components/webrtc_logging/browser/text_log_list.h"
+ #include "content/public/browser/render_process_host.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ #include "content/public/browser/child_process_security_policy.h"
+ #include "storage/browser/file_system/isolated_context.h"
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ||
+@@ -305,7 +305,7 @@ void WebRtcLoggingController::StartEvent
+       web_app_id, callback);
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ void WebRtcLoggingController::GetLogsDirectory(
+     LogsDirectoryCallback callback,
+     LogsDirectoryErrorCallback error_callback) {
diff --git a/chromium-wip/patches/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h b/chromium-wip/patches/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h
new file mode 100644
index 0000000000..829ac1ec04
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/media/webrtc/webrtc_logging_controller.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/media/webrtc/webrtc_logging_controller.h
+@@ -133,7 +133,7 @@ class WebRtcLoggingController
+                          size_t web_app_id,
+                          const StartEventLoggingCallback& callback);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   // Ensures that the WebRTC Logs directory exists and then grants render
+   // process access to the 'WebRTC Logs' directory, and invokes |callback| with
+   // the ids necessary to create a DirectoryEntry object.
+@@ -197,7 +197,7 @@ class WebRtcLoggingController
+ 
+   content::BrowserContext* GetBrowserContext() const;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   // Grants the render process access to the 'WebRTC Logs' directory, and
+   // invokes |callback| with the ids necessary to create a DirectoryEntry
+   // object. If the |logs_path| couldn't be created or found, |error_callback|
diff --git a/chromium-wip/patches/patch-chrome_browser_memory__details.cc b/chromium-wip/patches/patch-chrome_browser_memory__details.cc
new file mode 100644
index 0000000000..df6ea95341
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_memory__details.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/memory_details.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/memory_details.cc
+@@ -335,7 +335,7 @@ void MemoryDetails::CollectChildInfoOnUI
+           });
+     }
+ 
+-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD)
+     if (content::ZygoteHost::GetInstance()->IsZygotePid(process.pid)) {
+       process.process_type = content::PROCESS_TYPE_ZYGOTE;
+     }
diff --git a/chromium-wip/patches/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc b/chromium-wip/patches/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc
new file mode 100644
index 0000000000..ec5e510566
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc
@@ -0,0 +1,58 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
+@@ -86,7 +86,7 @@
+ #include "chrome/browser/flags/android/chrome_session_state.h"
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #if defined(__GLIBC__)
+ #include <gnu/libc-version.h>
+ #endif  // defined(__GLIBC__)
+@@ -111,7 +111,7 @@
+ #include "chrome/installer/util/taskbar_util.h"
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/metrics/pressure/pressure_metrics_reporter.h"
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+@@ -120,7 +120,7 @@
+ #include "components/user_manager/user_manager.h"
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "components/power_metrics/system_power_monitor.h"
+ #endif
+ 
+@@ -900,7 +900,7 @@ void RecordStartupMetrics() {
+ 
+   // Record whether Chrome is the default browser or not.
+   // Disabled on Linux due to hanging browser tests, see crbug.com/1216328.
+-#if !BUILDFLAG(IS_LINUX)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)
+   shell_integration::DefaultWebClientState default_state =
+       shell_integration::GetDefaultBrowser();
+   base::UmaHistogramEnumeration("DefaultBrowser.State", default_state,
+@@ -1211,11 +1211,11 @@ void ChromeBrowserMainExtraPartsMetrics:
+       std::make_unique<web_app::SamplingMetricsProvider>();
+ #endif  // !BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   pressure_metrics_reporter_ = std::make_unique<PressureMetricsReporter>();
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   base::trace_event::TraceLog::GetInstance()->AddEnabledStateObserver(
+       power_metrics::SystemPowerMonitor::GetInstance());
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
diff --git a/chromium-wip/patches/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.h b/chromium-wip/patches/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.h
new file mode 100644
index 0000000000..d3fc6ba1a9
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h
+@@ -29,7 +29,7 @@ class PowerMetricsReporter;
+ class ProcessMonitor;
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ class PressureMetricsReporter;
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+@@ -126,7 +126,7 @@ class ChromeBrowserMainExtraPartsMetrics
+   std::unique_ptr<web_app::SamplingMetricsProvider> web_app_metrics_provider_;
+ #endif  // !BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Reports pressure metrics.
+   std::unique_ptr<PressureMetricsReporter> pressure_metrics_reporter_;
+ #endif  // BUILDFLAG(IS_LINUX)
diff --git a/chromium-wip/patches/patch-chrome_browser_metrics_chrome__metrics__service__client.cc b/chromium-wip/patches/patch-chrome_browser_metrics_chrome__metrics__service__client.cc
new file mode 100644
index 0000000000..92cfbb4988
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_metrics_chrome__metrics__service__client.cc
@@ -0,0 +1,103 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/metrics/chrome_metrics_service_client.cc
+@@ -202,11 +202,11 @@
+ #include "chrome/browser/metrics/google_update_metrics_provider_mac.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "components/metrics/motherboard_metrics_provider.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/metrics/chrome_metrics_service_crash_reporter.h"
+ #endif
+ 
+@@ -238,7 +238,7 @@ const int kMaxHistogramGatheringWaitDura
+ // Needs to be kept in sync with the writer in
+ // third_party/crashpad/crashpad/handler/handler_main.cc.
+ const char kCrashpadHistogramAllocatorName[] = "CrashpadMetrics";
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ base::LazyInstance<ChromeMetricsServiceCrashReporter>::Leaky g_crash_reporter =
+     LAZY_INSTANCE_INITIALIZER;
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
+@@ -546,7 +546,7 @@ void ChromeMetricsServiceClient::Registe
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   metrics::structured::StructuredMetricsService::RegisterPrefs(registry);
+ 
+ #if !BUILDFLAG(IS_CHROMEOS)
+@@ -628,7 +628,7 @@ std::string ChromeMetricsServiceClient::
+ void ChromeMetricsServiceClient::OnEnvironmentUpdate(std::string* environment) {
+   // TODO(https://bugs.chromium.org/p/crashpad/issues/detail?id=135): call this
+   // on Mac when the Crashpad API supports it.
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Register the environment with the crash reporter. Note that there is a
+   // window from startup to this point during which crash reports will not have
+   // an environment set.
+@@ -730,7 +730,7 @@ void ChromeMetricsServiceClient::Initial
+         std::make_unique<metrics::dwa::DwaService>(this, local_state);
+   }
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   metrics::structured::Recorder::GetInstance()->SetUiTaskRunner(
+       base::SequencedTaskRunner::GetCurrentDefault());
+ #endif
+@@ -790,7 +790,7 @@ void ChromeMetricsServiceClient::Registe
+   metrics_service_->RegisterMetricsProvider(
+       std::make_unique<metrics::CPUMetricsProvider>());
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   metrics_service_->RegisterMetricsProvider(
+       std::make_unique<metrics::MotherboardMetricsProvider>());
+ #endif
+@@ -879,7 +879,7 @@ void ChromeMetricsServiceClient::Registe
+       std::make_unique<GoogleUpdateMetricsProviderMac>());
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   metrics_service_->RegisterMetricsProvider(
+       std::make_unique<DesktopPlatformFeaturesMetricsProvider>());
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+@@ -985,7 +985,7 @@ void ChromeMetricsServiceClient::Registe
+       std::make_unique<PowerMetricsProvider>());
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   metrics_service_->RegisterMetricsProvider(
+       metrics::CreateDesktopSessionMetricsProvider());
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX)
+@@ -1176,7 +1176,7 @@ bool ChromeMetricsServiceClient::Registe
+   }
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // This creates the DesktopProfileSessionDurationsServices if it didn't exist
+   // already.
+   metrics::DesktopProfileSessionDurationsServiceFactory::GetForBrowserContext(
+@@ -1525,7 +1525,7 @@ void ChromeMetricsServiceClient::CreateS
+   recorder =
+       base::MakeRefCounted<metrics::structured::AshStructuredMetricsRecorder>(
+           cros_system_profile_provider_.get());
+-#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ 
+   // Make sure that Structured Metrics recording delegates have been created
+   // before the service is created. This is handled in other places for ChromeOS
diff --git a/chromium-wip/patches/patch-chrome_browser_metrics_perf_cpu__identity.cc b/chromium-wip/patches/patch-chrome_browser_metrics_perf_cpu__identity.cc
new file mode 100644
index 0000000000..5fe0c9a5bc
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_metrics_perf_cpu__identity.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/metrics/perf/cpu_identity.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/metrics/perf/cpu_identity.cc
+@@ -146,7 +146,7 @@ CPUIdentity GetCPUIdentity() {
+   result.release =
+ #if BUILDFLAG(IS_CHROMEOS)
+       base::SysInfo::KernelVersion();
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       base::SysInfo::OperatingSystemVersion();
+ #else
+ #error "Unsupported configuration"
diff --git a/chromium-wip/patches/patch-chrome_browser_metrics_power_process__metrics__recorder__util.cc b/chromium-wip/patches/patch-chrome_browser_metrics_power_process__metrics__recorder__util.cc
new file mode 100644
index 0000000000..308a173af0
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_metrics_power_process__metrics__recorder__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/metrics/power/process_metrics_recorder_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/metrics/power/process_metrics_recorder_util.cc
+@@ -65,7 +65,7 @@ void RecordProcessHistograms(const char*
+                              const ProcessMonitor::Metrics& metrics) {
+   RecordAverageCPUUsage(histogram_suffix, metrics.cpu_usage);
+ #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_AIX)
++    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+   base::UmaHistogramCounts10000(
+       base::StrCat({"PerformanceMonitor.IdleWakeups2.", histogram_suffix}),
+       metrics.idle_wakeups);
diff --git a/chromium-wip/patches/patch-chrome_browser_metrics_power_process__monitor.cc b/chromium-wip/patches/patch-chrome_browser_metrics_power_process__monitor.cc
new file mode 100644
index 0000000000..6016bd0f4e
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_metrics_power_process__monitor.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/metrics/power/process_monitor.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/metrics/power/process_monitor.cc
+@@ -64,7 +64,7 @@ ProcessMonitor::Metrics SampleMetrics(ba
+       process_metrics.GetPlatformIndependentCPUUsage());
+ 
+ #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_AIX)
++    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+   metrics.idle_wakeups = process_metrics.GetIdleWakeupsPerSecond();
+ #endif
+ #if BUILDFLAG(IS_MAC)
+@@ -82,7 +82,7 @@ void ScaleMetrics(ProcessMonitor::Metric
+   }
+ 
+ #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_AIX)
++    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+   metrics->idle_wakeups *= factor;
+ #endif
+ 
+@@ -156,7 +156,7 @@ ProcessMonitor::Metrics& operator+=(Proc
+   }
+ 
+ #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_AIX)
++    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+   lhs.idle_wakeups += rhs.idle_wakeups;
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_metrics_power_process__monitor.h b/chromium-wip/patches/patch-chrome_browser_metrics_power_process__monitor.h
new file mode 100644
index 0000000000..c5ced7126b
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_metrics_power_process__monitor.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/metrics/power/process_monitor.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/metrics/power/process_monitor.h
+@@ -76,7 +76,7 @@ class ProcessMonitor : public content::B
+     std::optional<double> cpu_usage;
+ 
+ #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_AIX)
++    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+     // Returns the number of average idle cpu wakeups per second since the last
+     // time the metric was sampled.
+     int idle_wakeups = 0;
diff --git a/chromium-wip/patches/patch-chrome_browser_net_profile__network__context__service.cc b/chromium-wip/patches/patch-chrome_browser_net_profile__network__context__service.cc
new file mode 100644
index 0000000000..c67f2882d9
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_net_profile__network__context__service.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/net/profile_network_context_service.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/net/profile_network_context_service.cc
+@@ -136,7 +136,7 @@
+ #include "extensions/common/constants.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/enterprise/client_certificates/certificate_provisioning_service_factory.h"
+ #include "chrome/browser/policy/chrome_browser_policy_connector.h"
+ #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h"
+@@ -277,7 +277,7 @@ void UpdateCookieSettings(Profile* profi
+       });
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ std::unique_ptr<net::ClientCertStore> GetWrappedCertStore(
+     Profile* profile,
+     std::unique_ptr<net::ClientCertStore> platform_store) {
+@@ -1245,7 +1245,7 @@ ProfileNetworkContextService::CreateClie
+       std::make_unique<net::ClientCertStoreNSS>(
+           base::BindRepeating(&CreateCryptoModuleBlockingPasswordDelegate,
+                               kCryptoModulePasswordClientAuth));
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return GetWrappedCertStore(profile_, std::move(store));
+ #else
+   return store;
diff --git a/chromium-wip/patches/patch-chrome_browser_net_profile__network__context__service__factory.cc b/chromium-wip/patches/patch-chrome_browser_net_profile__network__context__service__factory.cc
new file mode 100644
index 0000000000..78c90dc464
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_net_profile__network__context__service__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/net/profile_network_context_service_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/net/profile_network_context_service_factory.cc
+@@ -32,7 +32,7 @@
+ #include "chrome/browser/net/server_certificate_database_service_factory.h"  // nogncheck
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/enterprise/client_certificates/certificate_provisioning_service_factory.h"
+ #endif
+ 
+@@ -76,7 +76,7 @@ ProfileNetworkContextServiceFactory::Pro
+ #if BUILDFLAG(CHROME_ROOT_STORE_CERT_MANAGEMENT_UI)
+   DependsOn(net::ServerCertificateDatabaseServiceFactory::GetInstance());
+ #endif
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   DependsOn(client_certificates::CertificateProvisioningServiceFactory::
+                 GetInstance());
+ #endif
diff --git a/chromium-wip/patches/patch-chrome_browser_net_system__network__context__manager.cc b/chromium-wip/patches/patch-chrome_browser_net_system__network__context__manager.cc
new file mode 100644
index 0000000000..934ff32c22
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_net_system__network__context__manager.cc
@@ -0,0 +1,144 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/net/system_network_context_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/net/system_network_context_manager.cc
+@@ -140,7 +140,7 @@ SystemNetworkContextManager* g_system_ne
+ // received a failed launch for a sandboxed network service.
+ bool g_previously_failed_to_launch_sandboxed_service = false;
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Whether kerberos library loading will work in the network service due to the
+ // sandbox.
+ bool g_network_service_will_allow_gssapi_library_load = false;
+@@ -148,7 +148,7 @@ bool g_network_service_will_allow_gssapi
+ const char* kGssapiDesiredPref =
+ #if BUILDFLAG(IS_CHROMEOS)
+     prefs::kKerberosEnabled;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     prefs::kReceivedHttpAuthNegotiateHeader;
+ #endif
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+@@ -194,7 +194,7 @@ network::mojom::HttpAuthDynamicParamsPtr
+   auth_dynamic_params->basic_over_http_enabled =
+       local_state->GetBoolean(prefs::kBasicAuthOverHttpEnabled);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   auth_dynamic_params->delegate_by_kdc_policy =
+       local_state->GetBoolean(prefs::kAuthNegotiateDelegateByKdcPolicy);
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
+@@ -209,7 +209,7 @@ network::mojom::HttpAuthDynamicParamsPtr
+       local_state->GetString(prefs::kAuthAndroidNegotiateAccountType);
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   auth_dynamic_params->allow_gssapi_library_load =
+       local_state->GetBoolean(kGssapiDesiredPref);
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+@@ -219,7 +219,7 @@ network::mojom::HttpAuthDynamicParamsPtr
+ 
+ void OnNewHttpAuthDynamicParams(
+     network::mojom::HttpAuthDynamicParamsPtr& params) {
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // The kerberos library is incompatible with the network service sandbox, so
+   // if library loading is now enabled, the network service needs to be
+   // restarted. It will be restarted unsandboxed because is
+@@ -261,11 +261,11 @@ NetworkSandboxState IsNetworkSandboxEnab
+   if (g_previously_failed_to_launch_sandboxed_service) {
+     return NetworkSandboxState::kDisabledBecauseOfFailedLaunch;
+   }
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   auto* local_state = g_browser_process->local_state();
+ #endif
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // The network service sandbox and the kerberos library are incompatible.
+   // If kerberos is enabled by policy, disable the network service sandbox.
+   if (g_network_service_will_allow_gssapi_library_load ||
+@@ -281,7 +281,7 @@ NetworkSandboxState IsNetworkSandboxEnab
+   }
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (local_state &&
+       local_state->HasPrefPath(prefs::kNetworkServiceSandboxEnabled)) {
+     return local_state->GetBoolean(prefs::kNetworkServiceSandboxEnabled)
+@@ -527,7 +527,7 @@ void SystemNetworkContextManager::Delete
+   g_system_network_context_manager = nullptr;
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ SystemNetworkContextManager::GssapiLibraryLoadObserver::
+     GssapiLibraryLoadObserver(SystemNetworkContextManager* owner)
+     : owner_(owner) {}
+@@ -585,7 +585,7 @@ SystemNetworkContextManager::SystemNetwo
+   pref_change_registrar_.Add(prefs::kAllHttpAuthSchemesAllowedForOrigins,
+                              auth_pref_callback);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   pref_change_registrar_.Add(prefs::kAuthNegotiateDelegateByKdcPolicy,
+                              auth_pref_callback);
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
+@@ -599,7 +599,7 @@ SystemNetworkContextManager::SystemNetwo
+                              auth_pref_callback);
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   pref_change_registrar_.Add(kGssapiDesiredPref, auth_pref_callback);
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+ 
+@@ -670,7 +670,7 @@ void SystemNetworkContextManager::Regist
+   registry->RegisterStringPref(prefs::kAuthNegotiateDelegateAllowlist,
+                                std::string());
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   registry->RegisterBooleanPref(prefs::kAuthNegotiateDelegateByKdcPolicy,
+                                 false);
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
+@@ -695,11 +695,11 @@ void SystemNetworkContextManager::Regist
+ 
+   registry->RegisterListPref(prefs::kExplicitlyAllowedNetworkPorts);
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   registry->RegisterBooleanPref(prefs::kNetworkServiceSandboxEnabled, true);
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   registry->RegisterBooleanPref(prefs::kReceivedHttpAuthNegotiateHeader, false);
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+@@ -753,7 +753,7 @@ void SystemNetworkContextManager::OnNetw
+   OnNewHttpAuthDynamicParams(http_auth_dynamic_params);
+   network_service->ConfigureHttpAuthPrefs(std::move(http_auth_dynamic_params));
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   gssapi_library_loader_observer_.Install(network_service);
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+@@ -980,7 +980,7 @@ bool SystemNetworkContextManager::IsNetw
+       break;
+   }
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (!enabled) {
+     g_network_service_will_allow_gssapi_library_load = true;
+   }
diff --git a/chromium-wip/patches/patch-chrome_browser_net_system__network__context__manager.h b/chromium-wip/patches/patch-chrome_browser_net_system__network__context__manager.h
new file mode 100644
index 0000000000..23503a6c9b
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_net_system__network__context__manager.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/net/system_network_context_manager.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/net/system_network_context_manager.h
+@@ -202,7 +202,7 @@ class SystemNetworkContextManager {
+   class URLLoaderFactoryForSystem;
+   class NetworkProcessLaunchWatcher;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   class GssapiLibraryLoadObserver
+       : public network::mojom::GssapiLibraryLoadObserver {
+    public:
+@@ -285,7 +285,7 @@ class SystemNetworkContextManager {
+   std::unique_ptr<NetworkAnnotationMonitor> network_annotation_monitor_;
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   GssapiLibraryLoadObserver gssapi_library_loader_observer_{this};
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_new__tab__page_modules_file__suggestion_drive__service.cc b/chromium-wip/patches/patch-chrome_browser_new__tab__page_modules_file__suggestion_drive__service.cc
new file mode 100644
index 0000000000..4106c73589
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_new__tab__page_modules_file__suggestion_drive__service.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/new_tab_page/modules/file_suggestion/drive_service.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/new_tab_page/modules/file_suggestion/drive_service.cc
+@@ -36,7 +36,7 @@
+ #include "services/network/public/cpp/resource_request.h"
+ 
+ namespace {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ constexpr char kPlatform[] = "LINUX";
+ #elif BUILDFLAG(IS_WIN)
+ constexpr char kPlatform[] = "WINDOWS";
diff --git a/chromium-wip/patches/patch-chrome_browser_new__tab__page_new__tab__page__util.cc b/chromium-wip/patches/patch-chrome_browser_new__tab__page_new__tab__page__util.cc
new file mode 100644
index 0000000000..eeccf1f0a2
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_new__tab__page_new__tab__page__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/new_tab_page/new_tab_page_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/new_tab_page/new_tab_page_util.cc
+@@ -32,7 +32,7 @@ bool IsOsSupportedForCart() {
+ }
+ 
+ bool IsOsSupportedForDrive() {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return true;
+ #else
+   return false;
diff --git a/chromium-wip/patches/patch-chrome_browser_notifications_notification__display__service__impl.cc b/chromium-wip/patches/patch-chrome_browser_notifications_notification__display__service__impl.cc
new file mode 100644
index 0000000000..65875f8705
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_notifications_notification__display__service__impl.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/notifications/notification_display_service_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/notifications/notification_display_service_impl.cc
+@@ -31,7 +31,7 @@
+ #endif
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/send_tab_to_self/desktop_notification_handler.h"
+ #include "chrome/browser/sharing/sharing_notification_handler.h"
+ #endif
+@@ -60,7 +60,7 @@ NotificationDisplayServiceImpl* Notifica
+ // static
+ void NotificationDisplayServiceImpl::RegisterProfilePrefs(
+     user_prefs::PrefRegistrySyncable* registry) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   registry->RegisterBooleanPref(prefs::kAllowSystemNotifications, true);
+ #endif
+ }
+@@ -76,7 +76,7 @@ NotificationDisplayServiceImpl::Notifica
+                            std::make_unique<PersistentNotificationHandler>());
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+     AddNotificationHandler(
+         NotificationHandler::Type::SEND_TAB_TO_SELF,
+         std::make_unique<send_tab_to_self::DesktopNotificationHandler>(
+@@ -84,7 +84,7 @@ NotificationDisplayServiceImpl::Notifica
+ #endif
+ 
+ #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-     BUILDFLAG(IS_WIN)) &&                                                 \
++     BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) &&                            \
+     BUILDFLAG(SAFE_BROWSING_AVAILABLE)
+     AddNotificationHandler(
+         NotificationHandler::Type::TAILORED_SECURITY,
diff --git a/chromium-wip/patches/patch-chrome_browser_notifications_notification__platform__bridge__delegator.cc b/chromium-wip/patches/patch-chrome_browser_notifications_notification__platform__bridge__delegator.cc
new file mode 100644
index 0000000000..172bae0d6c
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_notifications_notification__platform__bridge__delegator.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/notifications/notification_platform_bridge_delegator.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/notifications/notification_platform_bridge_delegator.cc
+@@ -55,7 +55,7 @@ bool SystemNotificationsEnabled(Profile*
+ #elif BUILDFLAG(IS_WIN)
+   return NotificationPlatformBridgeWin::SystemNotificationEnabled();
+ #else
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (profile) {
+     // Prefs take precedence over flags.
+     PrefService* prefs = profile->GetPrefs();
diff --git a/chromium-wip/patches/patch-chrome_browser_password__manager_chrome__password__manager__client.cc b/chromium-wip/patches/patch-chrome_browser_password__manager_chrome__password__manager__client.cc
new file mode 100644
index 0000000000..67f9aafb5f
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_password__manager_chrome__password__manager__client.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/password_manager/chrome_password_manager_client.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/password_manager/chrome_password_manager_client.cc
+@@ -764,7 +764,7 @@ void ChromePasswordManagerClient::
+ bool ChromePasswordManagerClient::IsReauthBeforeFillingRequired(
+     device_reauth::DeviceAuthenticator* authenticator) {
+ #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (!GetLocalStatePrefs() || !GetPrefs() || !authenticator) {
+     return false;
+   }
+@@ -1043,7 +1043,7 @@ void ChromePasswordManagerClient::Notify
+ }
+ 
+ void ChromePasswordManagerClient::NotifyKeychainError() {
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   PasswordsClientUIDelegate* manage_passwords_ui_controller =
+       PasswordsClientUIDelegateFromWebContents(web_contents());
+   if (manage_passwords_ui_controller) {
+@@ -2101,7 +2101,7 @@ void ChromePasswordManagerClient::HideFi
+ bool ChromePasswordManagerClient::IsPasswordManagementEnabledForCurrentPage(
+     const GURL& url) const {
+ #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (IsPasswordManagerForUrlDisallowedByPolicy(url)) {
+     return false;
+   }
+@@ -2140,7 +2140,7 @@ bool ChromePasswordManagerClient::IsPass
+ }
+ 
+ #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ bool ChromePasswordManagerClient::IsPasswordManagerForUrlDisallowedByPolicy(
+     const GURL& url) const {
+   if (!GetPrefs() || !GetPrefs()->HasPrefPath(
diff --git a/chromium-wip/patches/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc b/chromium-wip/patches/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc
new file mode 100644
index 0000000000..dee1dba457
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/password_manager/password_reuse_manager_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/password_manager/password_reuse_manager_factory.cc
+@@ -128,7 +128,7 @@ PasswordReuseManagerFactory::BuildServic
+   // Prepare password hash data for reuse detection.
+   reuse_manager->PreparePasswordHashData(GetSignInStateForMetrics(profile));
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<password_manager::PasswordReuseManagerSigninNotifier>
+       notifier = std::make_unique<
+           password_manager::PasswordReuseManagerSigninNotifierImpl>(
diff --git a/chromium-wip/patches/patch-chrome_browser_platform__util__linux.cc b/chromium-wip/patches/patch-chrome_browser_platform__util__linux.cc
new file mode 100644
index 0000000000..81428d07bd
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_platform__util__linux.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/platform_util_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/platform_util_linux.cc
+@@ -302,7 +302,9 @@ void OnLaunchOptionsCreated(const std::s
+   argv.push_back(command);
+   argv.push_back(arg);
+   options.current_directory = working_directory;
++#if !BUILDFLAG(IS_BSD)
+   options.allow_new_privs = true;
++#endif
+   // xdg-open can fall back on mailcap which eventually might plumb through
+   // to a command that needs a terminal.  Set the environment variable telling
+   // it that we definitely don't have a terminal available and that it should
diff --git a/chromium-wip/patches/patch-chrome_browser_policy_browser__signin__policy__handler.cc b/chromium-wip/patches/patch-chrome_browser_policy_browser__signin__policy__handler.cc
new file mode 100644
index 0000000000..847025ab02
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_policy_browser__signin__policy__handler.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/policy/browser_signin_policy_handler.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/policy/browser_signin_policy_handler.cc
+@@ -45,7 +45,7 @@ void BrowserSigninPolicyHandler::ApplyPo
+       policies.GetValue(policy_name(), base::Value::Type::INTEGER);
+   switch (static_cast<BrowserSigninMode>(value->GetInt())) {
+     case BrowserSigninMode::kForced:
+-#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD)
+       prefs->SetValue(prefs::kForceBrowserSignin, base::Value(true));
+ #endif
+       [[fallthrough]];
diff --git a/chromium-wip/patches/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc b/chromium-wip/patches/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc
new file mode 100644
index 0000000000..b7d7bf98ed
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/policy/chrome_browser_cloud_management_controller_desktop.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/policy/chrome_browser_cloud_management_controller_desktop.cc
+@@ -60,7 +60,7 @@
+ #include "chrome/browser/policy/browser_dm_token_storage_mac.h"
+ #endif  // BUILDFLAG(IS_MAC)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/policy/browser_dm_token_storage_linux.h"
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+@@ -69,7 +69,7 @@
+ #include "chrome/install_static/install_util.h"
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/enterprise/client_certificates/browser_context_delegate.h"
+ #include "chrome/browser/enterprise/client_certificates/cert_utils.h"
+ #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/device_trust_key_manager_impl.h"
+@@ -115,7 +115,7 @@ void ChromeBrowserCloudManagementControl
+ 
+ #if BUILDFLAG(IS_MAC)
+   storage_delegate = std::make_unique<BrowserDMTokenStorageMac>();
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   storage_delegate = std::make_unique<BrowserDMTokenStorageLinux>();
+ #elif BUILDFLAG(IS_WIN)
+   storage_delegate = std::make_unique<BrowserDMTokenStorageWin>();
+@@ -286,7 +286,7 @@ ChromeBrowserCloudManagementControllerDe
+ 
+ std::unique_ptr<enterprise_connectors::DeviceTrustKeyManager>
+ ChromeBrowserCloudManagementControllerDesktop::CreateDeviceTrustKeyManager() {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   auto* browser_dm_token_storage = BrowserDMTokenStorage::Get();
+   auto* device_management_service = GetDeviceManagementService();
+   auto shared_url_loader_factory = GetSharedURLLoaderFactory();
+@@ -308,7 +308,7 @@ ChromeBrowserCloudManagementControllerDe
+ std::unique_ptr<client_certificates::CertificateProvisioningService>
+ ChromeBrowserCloudManagementControllerDesktop::
+     CreateCertificateProvisioningService() {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   if (!certificate_store_) {
+     certificate_store_ =
+         std::make_unique<client_certificates::PrefsCertificateStore>(
diff --git a/chromium-wip/patches/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc b/chromium-wip/patches/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc
new file mode 100644
index 0000000000..bc70377bee
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc
@@ -0,0 +1,212 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/policy/configuration_policy_handler_list_factory.cc
+@@ -249,7 +249,7 @@
+ #include "components/spellcheck/browser/pref_names.h"
+ #endif  // BUILDFLAG(ENABLE_SPELLCHECK)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/browser_switcher/browser_switcher_prefs.h"
+ #include "chrome/browser/enterprise/idle/action.h"
+ #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h"
+@@ -574,7 +574,7 @@ const PolicyToPreferenceMapEntry kSimple
+     prefs::kManagedDefaultSmartCardConnectSetting,
+     base::Value::Type::INTEGER },
+ #endif
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   { key::kDeletingUndecryptablePasswordsEnabled,
+     password_manager::prefs::kDeletingUndecryptablePasswordsEnabled,
+     base::Value::Type::BOOLEAN },
+@@ -945,7 +945,7 @@ const PolicyToPreferenceMapEntry kSimple
+     base::Value::Type::LIST },
+ #endif // BUILDFLAG(ENABLE_EXTENSIONS_CORE)
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) \
+-     || BUILDFLAG(IS_MAC)
++     || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   { key::kRequireOnlineRevocationChecksForLocalAnchors,
+     prefs::kCertRevocationCheckingRequiredLocalAnchors,
+     base::Value::Type::BOOLEAN },
+@@ -957,7 +957,7 @@ const PolicyToPreferenceMapEntry kSimple
+     base::Value::Type::LIST },
+ #endif  // #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+         // || BUILDFLAG(IS_WIN)  || BUILDFLAG(IS_MAC)
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   { key::kFullscreenAllowed,
+     prefs::kFullscreenAllowed,
+     base::Value::Type::BOOLEAN },
+@@ -1839,7 +1839,7 @@ const PolicyToPreferenceMapEntry kSimple
+     base::Value::Type::INTEGER},
+ #endif // BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   { key::kGSSAPILibraryName,
+     prefs::kGSSAPILibraryName,
+     base::Value::Type::STRING },
+@@ -1898,7 +1898,7 @@ const PolicyToPreferenceMapEntry kSimple
+     base::Value::Type::BOOLEAN },
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   { key::kNetworkServiceSandboxEnabled,
+     prefs::kNetworkServiceSandboxEnabled,
+     base::Value::Type::BOOLEAN },
+@@ -1918,12 +1918,12 @@ const PolicyToPreferenceMapEntry kSimple
+     prefs::kTotalMemoryLimitMb,
+     base::Value::Type::INTEGER },
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   { key::kBackgroundModeEnabled,
+     prefs::kBackgroundModeEnabled,
+     base::Value::Type::BOOLEAN },
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   { key::kUnmanagedDeviceSignalsConsentFlowEnabled,
+     device_signals::prefs::kUnmanagedDeviceSignalsConsentFlowEnabled,
+     base::Value::Type::BOOLEAN },
+@@ -1937,7 +1937,7 @@ const PolicyToPreferenceMapEntry kSimple
+     prefs::kLiveTranslateEnabled,
+     base::Value::Type::BOOLEAN },
+ #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   { key::kDefaultBrowserSettingEnabled,
+     prefs::kDefaultBrowserSettingEnabled,
+     base::Value::Type::BOOLEAN },
+@@ -1949,7 +1949,7 @@ const PolicyToPreferenceMapEntry kSimple
+     base::Value::Type::BOOLEAN },
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) \
+-    || BUILDFLAG(IS_CHROMEOS)
++    || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   { key::kAutoplayAllowed,
+     prefs::kAutoplayAllowed,
+     base::Value::Type::BOOLEAN },
+@@ -2050,7 +2050,7 @@ const PolicyToPreferenceMapEntry kSimple
+     base::Value::Type::BOOLEAN },
+ #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   { key::kAlternativeBrowserPath,
+     browser_switcher::prefs::kAlternativeBrowserPath,
+     base::Value::Type::STRING },
+@@ -2149,7 +2149,7 @@ const PolicyToPreferenceMapEntry kSimple
+     base::Value::Type::BOOLEAN },
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   { key::kAuthNegotiateDelegateByKdcPolicy,
+     prefs::kAuthNegotiateDelegateByKdcPolicy,
+     base::Value::Type::BOOLEAN },
+@@ -2223,7 +2223,7 @@ const PolicyToPreferenceMapEntry kSimple
+     ash::prefs::kUrlParameterToAutofillSAMLUsername,
+     base::Value::Type::STRING },
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   { key::kNTPFooterExtensionAttributionEnabled,
+     prefs::kNTPFooterExtensionAttributionEnabled,
+     base::Value::Type::BOOLEAN },
+@@ -2255,7 +2255,7 @@ const PolicyToPreferenceMapEntry kSimple
+     prefs::kUiAutomationProviderEnabled,
+     base::Value::Type::BOOLEAN },
+ #endif  // BUILDFLAG(IS_WIN)
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   { key::kOutOfProcessSystemDnsResolutionEnabled,
+     prefs::kOutOfProcessSystemDnsResolutionEnabled,
+     base::Value::Type::BOOLEAN },
+@@ -2286,7 +2286,7 @@ const PolicyToPreferenceMapEntry kSimple
+     base::Value::Type::INTEGER },
+ #endif
+ #if BUILDFLAG(ENABLE_EXTENSIONS)
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   { key::kExtensionInstallTypeBlocklist,
+     extensions::pref_names::kExtensionInstallTypeBlocklist,
+     base::Value::Type::LIST},
+@@ -2309,7 +2309,7 @@ const PolicyToPreferenceMapEntry kSimple
+   { key::kTabCompareSettings,
+     optimization_guide::prefs::kProductSpecificationsEnterprisePolicyAllowed,
+     base::Value::Type::INTEGER},
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   { key::kChromeForTestingAllowed,
+     prefs::kChromeForTestingAllowed,
+     base::Value::Type::BOOLEAN },
+@@ -2390,7 +2390,7 @@ const PolicyToPreferenceMapEntry kSimple
+     policy_prefs::kBuiltInAIAPIsEnabled,
+     base::Value::Type::BOOLEAN },
+ #endif  // BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_FUCHSIA)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   { key::kNTPFooterManagementNoticeEnabled,
+     prefs::kNTPFooterManagementNoticeEnabled,
+     base::Value::Type::BOOLEAN },
+@@ -2524,7 +2524,7 @@ std::unique_ptr<ConfigurationPolicyHandl
+   // Policies for all platforms - End
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   handlers->AddHandler(std::make_unique<IntRangePolicyHandler>(
+       key::kMemorySaverModeSavings,
+       performance_manager::user_tuning::prefs::kMemorySaverModeAggressiveness,
+@@ -2803,7 +2803,7 @@ std::unique_ptr<ConfigurationPolicyHandl
+       key::kBrowsingDataLifetime, browsing_data::prefs::kBrowsingDataLifetime,
+       chrome_schema));
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   handlers->AddHandler(std::make_unique<GuestModePolicyHandler>());
+   handlers->AddHandler(std::make_unique<LocalSyncPolicyHandler>());
+   handlers->AddHandler(std::make_unique<ThemeColorPolicyHandler>());
+@@ -2903,7 +2903,7 @@ std::unique_ptr<ConfigurationPolicyHandl
+   std::vector<std::unique_ptr<ConfigurationPolicyHandler>>
+       signin_legacy_policies;
+ #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_LINUX)
++    BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   signin_legacy_policies.push_back(std::make_unique<SimplePolicyHandler>(
+       key::kForceBrowserSignin, prefs::kForceBrowserSignin,
+       base::Value::Type::BOOLEAN));
+@@ -3269,7 +3269,7 @@ std::unique_ptr<ConfigurationPolicyHandl
+ #endif
+ 
+ #if BUILDFLAG(ENABLE_SPELLCHECK)
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   handlers->AddHandler(std::make_unique<SpellcheckLanguagePolicyHandler>());
+   handlers->AddHandler(
+       std::make_unique<SpellcheckLanguageBlocklistPolicyHandler>(
+@@ -3277,7 +3277,7 @@ std::unique_ptr<ConfigurationPolicyHandl
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
+ #endif  // BUILDFLAG(ENABLE_SPELLCHECK)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   handlers->AddHandler(std::make_unique<SimplePolicyHandler>(
+       key::kAllowSystemNotifications, prefs::kAllowSystemNotifications,
+       base::Value::Type::BOOLEAN));
+@@ -3330,7 +3330,7 @@ std::unique_ptr<ConfigurationPolicyHandl
+   std::vector<GenAiDefaultSettingsPolicyHandler::GenAiPolicyDetails>
+       gen_ai_default_policies;
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   gen_ai_default_policies.emplace_back(
+       key::kAutofillPredictionSettings,
+       optimization_guide::prefs::
diff --git a/chromium-wip/patches/patch-chrome_browser_policy_device__management__service__configuration.cc b/chromium-wip/patches/patch-chrome_browser_policy_device__management__service__configuration.cc
new file mode 100644
index 0000000000..a343a6406d
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_policy_device__management__service__configuration.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/policy/device_management_service_configuration.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/policy/device_management_service_configuration.cc
+@@ -22,7 +22,7 @@
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) ||           \
+     ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \
+-     !BUILDFLAG(IS_ANDROID))
++     !BUILDFLAG(IS_ANDROID)) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/enterprise/connectors/common.h"
+ #include "chrome/browser/enterprise/connectors/connectors_service.h"
+ #endif
diff --git a/chromium-wip/patches/patch-chrome_browser_policy_policy__value__and__status__aggregator.cc b/chromium-wip/patches/patch-chrome_browser_policy_policy__value__and__status__aggregator.cc
new file mode 100644
index 0000000000..277c8f68d2
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_policy_policy__value__and__status__aggregator.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/policy/policy_value_and_status_aggregator.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/policy/policy_value_and_status_aggregator.cc
+@@ -49,7 +49,7 @@
+ #include "chrome/browser/policy/value_provider/extension_policies_value_provider.h"
+ #endif  // BUILDFLAG(ENABLE_EXTENSIONS)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "components/policy/core/common/cloud/profile_cloud_policy_manager.h"
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_prefs_browser__prefs.cc b/chromium-wip/patches/patch-chrome_browser_prefs_browser__prefs.cc
new file mode 100644
index 0000000000..724aa0a1ac
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_prefs_browser__prefs.cc
@@ -0,0 +1,73 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/prefs/browser_prefs.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/prefs/browser_prefs.cc
+@@ -327,7 +327,7 @@
+ #include "chrome/browser/devtools/devtools_window.h"
+ #endif  // BUILDFLAG(ENABLE_DEVTOOLS_FRONTEND)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/webui/whats_new/whats_new_ui.h"
+ #endif
+ 
+@@ -494,11 +494,11 @@
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "components/device_signals/core/browser/pref_names.h"  // nogncheck due to crbug.com/1125897
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/browser_switcher/browser_switcher_prefs.h"
+ #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h"
+ #endif
+@@ -526,7 +526,7 @@
+ #include "chrome/browser/sessions/session_service_log.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/color/system_theme.h"
+ #endif
+ 
+@@ -1791,7 +1791,7 @@ void RegisterLocalState(PrefRegistrySimp
+   on_device_translation::RegisterLocalStatePrefs(registry);
+ #endif  // BUILDFLAG(ENABLE_ON_DEVICE_TRANSLATION)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   WhatsNewUI::RegisterLocalStatePrefs(registry);
+ #endif
+ 
+@@ -1945,7 +1945,7 @@ void RegisterLocalState(PrefRegistrySimp
+ #endif  // BUILDFLAG(ENABLE_PDF)
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   registry->RegisterBooleanPref(prefs::kChromeForTestingAllowed, true);
+ #endif
+ 
+@@ -2310,12 +2310,12 @@ void RegisterProfilePrefs(user_prefs::Pr
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   device_signals::RegisterProfilePrefs(registry);
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
+         // BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   browser_switcher::BrowserSwitcherPrefs::RegisterProfilePrefs(registry);
+   enterprise_signin::RegisterProfilePrefs(registry);
+ #endif
diff --git a/chromium-wip/patches/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc b/chromium-wip/patches/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc
new file mode 100644
index 0000000000..d74b5c66c0
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/prefs/pref_service_incognito_allowlist.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/prefs/pref_service_incognito_allowlist.cc
+@@ -203,7 +203,7 @@ const char* const kPersistentPrefNames[]
+     prefs::kShowFullscreenToolbar,
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // Toggleing custom frames affects all open windows in the profile, hence
+     // should be written to the regular profile when changed in incognito mode.
+     prefs::kUseCustomChromeFrame,
diff --git a/chromium-wip/patches/patch-chrome_browser_printing_print__backend__service__manager.cc b/chromium-wip/patches/patch-chrome_browser_printing_print__backend__service__manager.cc
new file mode 100644
index 0000000000..4c301fc83d
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_printing_print__backend__service__manager.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/printing/print_backend_service_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/printing/print_backend_service_manager.cc
+@@ -37,7 +37,7 @@
+ #include "printing/printing_context.h"
+ #include "printing/printing_features.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "content/public/common/content_switches.h"
+ #include "ui/linux/linux_ui.h"
+ #endif
+@@ -909,7 +909,7 @@ PrintBackendServiceManager::GetServiceFr
+             << remote_id << "`";
+ 
+     std::vector<std::string> extra_switches;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     if (auto* linux_ui = ui::LinuxUi::instance()) {
+       extra_switches = linux_ui->GetCmdLineFlagsForCopy();
+     }
+@@ -1095,7 +1095,7 @@ PrintBackendServiceManager::DetermineIdl
+       return kNoClientsRegisteredResetOnIdleTimeout;
+ 
+     case ClientType::kQueryWithUi:
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       // No need to update if there were other query with UI clients.
+       if (HasQueryWithUiClientForRemoteId(remote_id)) {
+         return std::nullopt;
diff --git a/chromium-wip/patches/patch-chrome_browser_printing_printer__query.cc b/chromium-wip/patches/patch-chrome_browser_printing_printer__query.cc
new file mode 100644
index 0000000000..ca17084d47
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_printing_printer__query.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/printing/printer_query.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/printing/printer_query.cc
+@@ -342,7 +342,7 @@ void PrinterQuery::UpdatePrintSettings(b
+     crash_key = std::make_unique<crash_keys::ScopedPrinterInfo>(
+         printer_name, print_backend->GetPrinterDriverInfo(printer_name));
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS)
++#if (BUILDFLAG(IS_BSD) || BUILDFLAG(IS_LINUX)) && BUILDFLAG(USE_CUPS)
+     PrinterBasicInfo basic_info;
+     if (print_backend->GetPrinterBasicInfo(printer_name, &basic_info) ==
+         mojom::ResultCode::kSuccess) {
diff --git a/chromium-wip/patches/patch-chrome_browser_process__singleton__posix.cc b/chromium-wip/patches/patch-chrome_browser_process__singleton__posix.cc
new file mode 100644
index 0000000000..a9dfef1e82
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_process__singleton__posix.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/process_singleton_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/process_singleton_posix.cc
+@@ -102,7 +102,7 @@
+ #include "ui/base/l10n/l10n_util.h"
+ #include "ui/base/resource/scoped_startup_resource_bundle.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/process_singleton_dialog_linux.h"
+ #endif
+ 
+@@ -360,7 +360,7 @@ bool DisplayProfileInUseError(const base
+   if (g_disable_prompt)
+     return g_user_opted_unlock_in_use_profile;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   std::u16string relaunch_button_text =
+       l10n_util::GetStringUTF16(IDS_PROFILE_IN_USE_LINUX_RELAUNCH);
+   return ShowProcessSingletonDialog(error, relaunch_button_text);
diff --git a/chromium-wip/patches/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc b/chromium-wip/patches/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc
new file mode 100644
index 0000000000..5714a41e33
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc
@@ -0,0 +1,143 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
+@@ -368,7 +368,7 @@
+ #endif
+ 
+ #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/enterprise/idle/idle_service_factory.h"
+ #endif
+ 
+@@ -411,7 +411,7 @@
+ #endif
+ 
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.h"
+ #include "chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.h"
+ #include "chrome/browser/enterprise/signals/user_permission_service_factory.h"
+@@ -419,7 +419,7 @@
+ #include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_utils.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/policy/messaging_layer/util/manual_test_heartbeat_event_factory.h"
+ #endif
+ 
+@@ -427,7 +427,7 @@
+ #include "chrome/browser/history_embeddings/history_embeddings_service_factory.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/browser_switcher/browser_switcher_service_factory.h"
+ #include "chrome/browser/enterprise/client_certificates/certificate_provisioning_service_factory.h"
+ #include "chrome/browser/enterprise/client_certificates/certificate_store_factory.h"
+@@ -753,7 +753,7 @@ void ChromeBrowserMainExtraPartsProfiles
+   DiceBoundSessionCookieServiceFactory::GetInstance();
+ #endif
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   browser_switcher::BrowserSwitcherServiceFactory::GetInstance();
+ #endif
+   browser_sync::UserEventServiceFactory::GetInstance();
+@@ -812,13 +812,13 @@ void ChromeBrowserMainExtraPartsProfiles
+   collaboration::CollaborationServiceFactory::GetInstance();
+   collaboration::messaging::MessagingBackendServiceFactory::GetInstance();
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   tab_groups::CollaborationMessagingObserverFactory::GetInstance();
+ #endif
+   commerce::ShoppingServiceFactory::GetInstance();
+   ConsentAuditorFactory::GetInstance();
+   ContentIndexProviderFactory::GetInstance();
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   contextual_cueing::ContextualCueingServiceFactory::GetInstance();
+ #endif
+   CookieControlsServiceFactory::GetInstance();
+@@ -880,31 +880,31 @@ void ChromeBrowserMainExtraPartsProfiles
+   enterprise_connectors::ConnectorsServiceFactory::GetInstance();
+   enterprise_connectors::ReportingEventRouterFactory::GetInstance();
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   enterprise_connectors::DeviceTrustConnectorServiceFactory::GetInstance();
+   enterprise_connectors::DeviceTrustServiceFactory::GetInstance();
+ #endif
+-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)) && \
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) && \
+     BUILDFLAG(ENTERPRISE_LOCAL_CONTENT_ANALYSIS) &&                    \
+     BUILDFLAG(SAFE_BROWSING_AVAILABLE)
+   enterprise_connectors::LocalBinaryUploadServiceFactory::GetInstance();
+ #endif
+ #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   enterprise_idle::IdleServiceFactory::GetInstance();
+ #endif
+ #if !BUILDFLAG(IS_CHROMEOS)
+   enterprise_reporting::CloudProfileReportingServiceFactory::GetInstance();
+ #endif
+   enterprise_reporting::LegacyTechServiceFactory::GetInstance();
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   enterprise_signals::SignalsAggregatorFactory::GetInstance();
+ #endif
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   enterprise_signals::UserPermissionServiceFactory::GetInstance();
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   enterprise_signin::EnterpriseSigninServiceFactory::GetInstance();
+ #endif
+ #if BUILDFLAG(ENABLE_SESSION_SERVICE)
+@@ -1036,7 +1036,7 @@ void ChromeBrowserMainExtraPartsProfiles
+ #if BUILDFLAG(IS_ANDROID)
+   MerchantViewerDataManagerFactory::GetInstance();
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   metrics::DesktopProfileSessionDurationsServiceFactory::GetInstance();
+ #endif
+ #if !BUILDFLAG(IS_ANDROID)
+@@ -1163,7 +1163,7 @@ void ChromeBrowserMainExtraPartsProfiles
+ #if BUILDFLAG(IS_CHROMEOS)
+   policy::PolicyCertServiceFactory::GetInstance();
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   policy::ProfileTokenPolicyWebSigninServiceFactory::GetInstance();
+   policy::UserPolicyOidcSigninServiceFactory::GetInstance();
+ #endif
+@@ -1209,7 +1209,7 @@ void ChromeBrowserMainExtraPartsProfiles
+ #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
+   ProfileStatisticsFactory::GetInstance();
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   ProfileTokenWebSigninInterceptorFactory::GetInstance();
+   OidcAuthenticationSigninInterceptorFactory::GetInstance();
+ #endif
+@@ -1229,7 +1229,7 @@ void ChromeBrowserMainExtraPartsProfiles
+   ReduceAcceptLanguageFactory::GetInstance();
+   RendererUpdaterFactory::GetInstance();
+   regional_capabilities::RegionalCapabilitiesServiceFactory::GetInstance();
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   reporting::ManualTestHeartbeatEventFactory::GetInstance();
+ #endif
+ #if !BUILDFLAG(IS_ANDROID)
diff --git a/chromium-wip/patches/patch-chrome_browser_profiles_profile__impl.cc b/chromium-wip/patches/patch-chrome_browser_profiles_profile__impl.cc
new file mode 100644
index 0000000000..5f891bcaf8
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_profiles_profile__impl.cc
@@ -0,0 +1,46 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/profiles/profile_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/profiles/profile_impl.cc
+@@ -267,6 +267,10 @@
+ #include "chrome/browser/safe_browsing/safe_browsing_service.h"
+ #endif
+ 
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#endif
++
+ using bookmarks::BookmarkModel;
+ using content::BrowserThread;
+ using content::DownloadManagerDelegate;
+@@ -601,7 +605,7 @@ void ProfileImpl::LoadPrefsForNormalStar
+   policy_provider = GetUserCloudPolicyManagerAsh();
+ #else  // !BUILDFLAG(IS_CHROMEOS)
+   {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     ProfileManager* profile_manager = g_browser_process->profile_manager();
+     ProfileAttributesEntry* entry =
+         profile_manager->GetProfileAttributesStorage()
+@@ -884,7 +888,17 @@ void ProfileImpl::DoFinalInit(CreateMode
+ }
+ 
+ base::FilePath ProfileImpl::last_selected_directory() {
++#if BUILDFLAG(IS_OPENBSD)
++  // If unveil(2) is used, force the file dialog directory to something we
++  // know is available.
++  auto* sandbox = sandbox::policy::SandboxLinux::GetInstance();
++  if (sandbox->unveil_initialized())
++    return GetPrefs()->GetFilePath(prefs::kDownloadDefaultDirectory);
++  else
++    return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory);
++#else
+   return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory);
++#endif
+ }
+ 
+ void ProfileImpl::set_last_selected_directory(const base::FilePath& path) {
diff --git a/chromium-wip/patches/patch-chrome_browser_profiles_profiles__state.cc b/chromium-wip/patches/patch-chrome_browser_profiles_profiles__state.cc
new file mode 100644
index 0000000000..530f6ba0f1
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_profiles_profiles__state.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/profiles/profiles_state.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/profiles/profiles_state.cc
+@@ -191,7 +191,7 @@ bool IsGuestModeRequested(const base::Co
+                           PrefService* local_state,
+                           bool show_warning) {
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   DCHECK(local_state);
+ 
+   // Check if guest mode enforcement commandline switch or policy are provided.
+@@ -227,7 +227,7 @@ bool IsGuestModeEnabled() {
+     return false;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   // If there are any supervised profiles, disable guest mode.
+   if (std::ranges::any_of(g_browser_process->profile_manager()
+                               ->GetProfileAttributesStorage()
+@@ -243,7 +243,7 @@ bool IsGuestModeEnabled() {
+ }
+ 
+ bool IsGuestModeEnabled(const Profile& profile) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   ProfileAttributesEntry* profile_attributes =
+       g_browser_process->profile_manager()
+           ->GetProfileAttributesStorage()
diff --git a/chromium-wip/patches/patch-chrome_browser_regional__capabilities_regional__capabilities__service__factory.cc b/chromium-wip/patches/patch-chrome_browser_regional__capabilities_regional__capabilities__service__factory.cc
new file mode 100644
index 0000000000..19406e2594
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_regional__capabilities_regional__capabilities__service__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/regional_capabilities/regional_capabilities_service_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/regional_capabilities/regional_capabilities_service_factory.cc
+@@ -21,7 +21,7 @@
+ #include "chrome/browser/regional_capabilities/regional_capabilities_service_client_chromeos.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/regional_capabilities/regional_capabilities_service_client_linux.h"
+ #endif
+ 
+@@ -72,7 +72,7 @@ RegionalCapabilitiesServiceFactory::Buil
+ #elif BUILDFLAG(IS_CHROMEOS)
+       std::make_unique<RegionalCapabilitiesServiceClientChromeOS>(
+           g_browser_process->variations_service());
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       std::make_unique<RegionalCapabilitiesServiceClientLinux>(
+           g_browser_process->variations_service());
+ #else
diff --git a/chromium-wip/patches/patch-chrome_browser_renderer__preferences__util.cc b/chromium-wip/patches/patch-chrome_browser_renderer__preferences__util.cc
new file mode 100644
index 0000000000..ed5d7688a8
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_renderer__preferences__util.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/renderer_preferences_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/renderer_preferences_util.cc
+@@ -40,7 +40,7 @@
+ #include "ui/views/controls/textfield/textfield.h"
+ #endif
+ 
+-#if defined(USE_AURA) && BUILDFLAG(IS_LINUX)
++#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD))
+ #include "chrome/browser/themes/theme_service.h"
+ #include "chrome/browser/themes/theme_service_factory.h"
+ #include "ui/linux/linux_ui.h"
+@@ -180,7 +180,7 @@ void UpdateFromSystemSettings(blink::Ren
+   prefs->caret_blink_interval = views::Textfield::GetCaretBlinkInterval();
+ #endif
+ 
+-#if defined(USE_AURA) && BUILDFLAG(IS_LINUX)
++#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD))
+   auto* linux_ui_theme = ui::LinuxUiTheme::GetForProfile(profile);
+   if (linux_ui_theme) {
+     if (ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme()) {
+@@ -203,7 +203,7 @@ void UpdateFromSystemSettings(blink::Ren
+ #endif
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   content::UpdateFontRendererPreferencesFromSystemSettings(prefs);
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_resources_settings_autofill__page_passwords__shared.css b/chromium-wip/patches/patch-chrome_browser_resources_settings_autofill__page_passwords__shared.css
new file mode 100644
index 0000000000..6495877adb
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_resources_settings_autofill__page_passwords__shared.css
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/resources/settings/autofill_page/passwords_shared.css.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/resources/settings/autofill_page/passwords_shared.css
+@@ -100,7 +100,7 @@ cr-input.password-input::part(input),
+    * necessary to prevent Chrome from using the operating system's font
+    * instead of the Material Design font.
+    * TODO(dbeam): why not font: inherit? */
+-<if expr="is_linux or is_chromeos">
++<if expr="is_posix or is_chromeos">
+   font-family: 'DejaVu Sans Mono', monospace;
+ </if>
+ <if expr="is_win">
diff --git a/chromium-wip/patches/patch-chrome_browser_resources_signin_signin__shared.css b/chromium-wip/patches/patch-chrome_browser_resources_signin_signin__shared.css
new file mode 100644
index 0000000000..1d54cb4456
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_resources_signin_signin__shared.css
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/resources/signin/signin_shared.css.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/resources/signin/signin_shared.css
+@@ -54,7 +54,7 @@ a {
+   border-radius: var(--scrollbar-width);
+ }
+ 
+-<if expr="is_macosx or is_linux or is_chromeos">
++<if expr="is_macosx or is_posix or is_chromeos">
+ .action-container {
+   flex-flow: row-reverse;
+   justify-content: flex-start;
diff --git a/chromium-wip/patches/patch-chrome_browser_safe__browsing_chrome__password__protection__service.cc b/chromium-wip/patches/patch-chrome_browser_safe__browsing_chrome__password__protection__service.cc
new file mode 100644
index 0000000000..66a083bff7
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_safe__browsing_chrome__password__protection__service.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/safe_browsing/chrome_password_protection_service.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/safe_browsing/chrome_password_protection_service.cc
+@@ -1269,7 +1269,7 @@ std::string ChromePasswordProtectionServ
+     ReusedPasswordAccountType password_type) const {
+   if (base::FeatureList::IsEnabled(
+           safe_browsing::kEnterprisePasswordReuseUiRefresh)) {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     return GetPrefs()->GetString(prefs::kEnterpriseCustomLabelForProfile);
+ #else
+     return std::string();
diff --git a/chromium-wip/patches/patch-chrome_browser_safe__browsing_cloud__content__scanning_binary__upload__service.cc b/chromium-wip/patches/patch-chrome_browser_safe__browsing_cloud__content__scanning_binary__upload__service.cc
new file mode 100644
index 0000000000..fde6f4bb38
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_safe__browsing_cloud__content__scanning_binary__upload__service.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service.cc
+@@ -20,7 +20,7 @@
+ #include "components/safe_browsing/core/common/safebrowsing_switches.h"
+ #include "net/base/url_util.h"
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/enterprise/connectors/analysis/local_binary_upload_service_factory.h"
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_safe__browsing_incident__reporting_incident__reporting__service.cc b/chromium-wip/patches/patch-chrome_browser_safe__browsing_incident__reporting_incident__reporting__service.cc
new file mode 100644
index 0000000000..81e341a9b5
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_safe__browsing_incident__reporting_incident__reporting__service.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
+@@ -693,7 +693,7 @@ void IncidentReportingService::OnEnviron
+ 
+ // Process::Current().CreationTime() is missing on some platforms.
+ #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   base::TimeDelta uptime =
+       first_incident_time_ - base::Process::Current().CreationTime();
+   environment_data->mutable_process()->set_uptime_msec(uptime.InMilliseconds());
diff --git a/chromium-wip/patches/patch-chrome_browser_safe__browsing_safe__browsing__pref__change__handler.cc b/chromium-wip/patches/patch-chrome_browser_safe__browsing_safe__browsing__pref__change__handler.cc
new file mode 100644
index 0000000000..9fe406ca57
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_safe__browsing_safe__browsing__pref__change__handler.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/safe_browsing/safe_browsing_pref_change_handler.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/safe_browsing/safe_browsing_pref_change_handler.cc
+@@ -12,7 +12,7 @@
+ #include "content/public/browser/web_contents.h"
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/browser_finder.h"
+ #include "chrome/browser/ui/browser_window/public/browser_window_features.h"
+ #include "chrome/browser/ui/toasts/api/toast_id.h"
+@@ -59,7 +59,7 @@ SafeBrowsingPrefChangeHandler::~SafeBrow
+ void SafeBrowsingPrefChangeHandler::
+     MaybeShowEnhancedProtectionSettingChangeNotification() {
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   if (!profile_ ||
+       !base::FeatureList::IsEnabled(safe_browsing::kEsbAsASyncedSetting)) {
+     return;
diff --git a/chromium-wip/patches/patch-chrome_browser_screen__ai_screen__ai__install__state.cc b/chromium-wip/patches/patch-chrome_browser_screen__ai_screen__ai__install__state.cc
new file mode 100644
index 0000000000..590e4f4b8a
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_screen__ai_screen__ai__install__state.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/screen_ai/screen_ai_install_state.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/screen_ai/screen_ai_install_state.cc
+@@ -30,7 +30,7 @@ bool IsDeviceCompatible() {
+   // TODO(crbug.com/381256355): Update when ScreenAI library is compatible with
+   // older CPUs.
+   static const bool device_compatible = base::CPU().has_sse42();
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // On Linux, the library is only built for X86 CPUs.
+   static constexpr bool device_compatible = false;
+ #else
diff --git a/chromium-wip/patches/patch-chrome_browser_screen__ai_screen__ai__service__handler__base.cc b/chromium-wip/patches/patch-chrome_browser_screen__ai_screen__ai__service__handler__base.cc
new file mode 100644
index 0000000000..8b09991287
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_screen__ai_screen__ai__service__handler__base.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/screen_ai/screen_ai_service_handler_base.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/screen_ai/screen_ai_service_handler_base.cc
+@@ -253,7 +253,7 @@ void ScreenAIServiceHandlerBase::LaunchI
+   base::FilePath binary_path = state_instance->get_component_binary_path();
+ #if BUILDFLAG(IS_WIN)
+   std::vector<base::FilePath> preload_libraries = {binary_path};
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   std::vector<std::string> extra_switches = {
+       base::StringPrintf("--%s=%s", screen_ai::GetBinaryPathSwitch(),
+                          binary_path.MaybeAsASCII().c_str())};
+@@ -268,7 +268,7 @@ void ScreenAIServiceHandlerBase::LaunchI
+           .WithPreloadedLibraries(
+               preload_libraries,
+               content::ServiceProcessHostPreloadLibraries::GetPassKey())
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+           .WithExtraCommandLineSwitches(extra_switches)
+ #endif  // BUILDFLAG(IS_WIN)
+           .WithProcessCallback(
diff --git a/chromium-wip/patches/patch-chrome_browser_sessions_session__restore.cc b/chromium-wip/patches/patch-chrome_browser_sessions_session__restore.cc
new file mode 100644
index 0000000000..fc316c759b
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_sessions_session__restore.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/sessions/session_restore.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/sessions/session_restore.cc
+@@ -108,7 +108,7 @@
+ #include "ui/wm/core/scoped_animation_disabler.h"
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/webui/whats_new/whats_new_fetcher.h"
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ 
+@@ -1118,7 +1118,7 @@ class SessionRestoreImpl : public Browse
+     bool is_first_tab = true;
+     for (const auto& startup_tab : startup_tabs) {
+       const GURL& url = startup_tab.url;
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       if (url == whats_new::GetWebUIStartupURL()) {
+         whats_new::StartWhatsNewFetch(browser);
+         continue;
diff --git a/chromium-wip/patches/patch-chrome_browser_sharing_sharing__handler__registry__impl.cc b/chromium-wip/patches/patch-chrome_browser_sharing_sharing__handler__registry__impl.cc
new file mode 100644
index 0000000000..da494633ec
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_sharing_sharing__handler__registry__impl.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/sharing/sharing_handler_registry_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/sharing/sharing_handler_registry_impl.cc
+@@ -21,7 +21,7 @@
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/sharing/shared_clipboard/remote_copy_message_handler.h"
+ #endif
+ 
+@@ -72,7 +72,7 @@ SharingHandlerRegistryImpl::SharingHandl
+ #endif  // !BUILDFLAG(IS_ANDROID)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (sharing_device_registration->IsRemoteCopySupported()) {
+     AddSharingHandler(
+         std::make_unique<RemoteCopyMessageHandler>(profile),
diff --git a/chromium-wip/patches/patch-chrome_browser_shortcuts_icon__badging.cc b/chromium-wip/patches/patch-chrome_browser_shortcuts_icon__badging.cc
new file mode 100644
index 0000000000..370824792e
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_shortcuts_icon__badging.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/shortcuts/icon_badging.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/shortcuts/icon_badging.cc
+@@ -59,7 +59,7 @@ enum class BadgeSize {
+ constexpr ShortcutSize kSizesNeededForShortcutCreation[] = {
+     ShortcutSize::k16, ShortcutSize::k32, ShortcutSize::k128,
+     ShortcutSize::k256, ShortcutSize::k512};
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ constexpr ShortcutSize kSizesNeededForShortcutCreation[] = {ShortcutSize::k32,
+                                                             ShortcutSize::k128};
+ #elif BUILDFLAG(IS_WIN)
diff --git a/chromium-wip/patches/patch-chrome_browser_signin_accounts__policy__manager.cc b/chromium-wip/patches/patch-chrome_browser_signin_accounts__policy__manager.cc
new file mode 100644
index 0000000000..1197e7f3fa
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_signin_accounts__policy__manager.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/signin/accounts_policy_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/signin/accounts_policy_manager.cc
+@@ -41,7 +41,7 @@
+ #include "chrome/browser/ui/webui/profile_helper.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "components/policy/core/common/features.h"
+ #include "components/signin/public/identity_manager/accounts_mutator.h"
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+@@ -209,7 +209,7 @@ void AccountsPolicyManager::Initialize()
+           &AccountsPolicyManager::OnGoogleServicesUsernamePatternChanged,
+           weak_pointer_factory_.GetWeakPtr()));
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   auto* identity_manager = IdentityManagerFactory::GetForProfile(profile_);
+   identity_manager_observation_.Observe(identity_manager);
+   profile_pref_change_registrar_.Init(profile_->GetPrefs());
+@@ -224,7 +224,7 @@ void AccountsPolicyManager::Initialize()
+ }
+ 
+ void AccountsPolicyManager::Shutdown() {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   profile_pref_change_registrar_.RemoveAll();
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+   local_state_pref_registrar_.RemoveAll();
+@@ -332,7 +332,7 @@ void AccountsPolicyManager::OnUserConfir
+ }
+ #endif  // defined(TOOLKIT_VIEWS) && !BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void AccountsPolicyManager::OnRefreshTokensLoaded() {
+   RemoveUnallowedAccounts();
+   identity_manager_observation_.Reset();
diff --git a/chromium-wip/patches/patch-chrome_browser_signin_accounts__policy__manager.h b/chromium-wip/patches/patch-chrome_browser_signin_accounts__policy__manager.h
new file mode 100644
index 0000000000..6531050d79
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_signin_accounts__policy__manager.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/signin/accounts_policy_manager.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/signin/accounts_policy_manager.h
+@@ -13,7 +13,7 @@
+ #include "components/signin/public/base/signin_metrics.h"
+ #include "components/signin/public/identity_manager/identity_manager.h"
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "base/scoped_observation.h"
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ 
+@@ -64,7 +64,7 @@ class AccountsPolicyManager : public Key
+   }
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   void RemoveUnallowedAccounts();
+ 
+   // IdentityManager::Observer implementation.
+@@ -85,7 +85,7 @@ class AccountsPolicyManager : public Key
+   bool hide_ui_for_testing_ = false;
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   base::ScopedObservation<signin::IdentityManager,
+                           signin::IdentityManager::Observer>
+       identity_manager_observation_{this};
diff --git a/chromium-wip/patches/patch-chrome_browser_signin_signin__util.cc b/chromium-wip/patches/patch-chrome_browser_signin_signin__util.cc
new file mode 100644
index 0000000000..0b30a9f56c
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_signin_signin__util.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/signin/signin_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/signin/signin_util.cc
+@@ -84,7 +84,7 @@ CookiesMover::CookiesMover(base::WeakPtr
+ CookiesMover::~CookiesMover() = default;
+ 
+ void CookiesMover::StartMovingCookies() {
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   bool allow_cookies_to_be_moved = base::FeatureList::IsEnabled(
+       profile_management::features::kThirdPartyProfileManagement);
+ #else
+@@ -344,7 +344,7 @@ SignedInState GetSignedInState(
+   return SignedInState::kSignedOut;
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ bool ShouldShowHistorySyncOptinScreen(Profile& profile) {
+   if (GetSignedInState(IdentityManagerFactory::GetForProfile(&profile)) !=
+       signin_util::SignedInState::kSignedIn) {
diff --git a/chromium-wip/patches/patch-chrome_browser_signin_signin__util.h b/chromium-wip/patches/patch-chrome_browser_signin_signin__util.h
new file mode 100644
index 0000000000..07b1a29eea
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_signin_signin__util.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/signin/signin_util.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/signin/signin_util.h
+@@ -168,7 +168,7 @@ bool IsSigninPending(signin::IdentityMan
+ // Returns the current state of the primary account that is used in Chrome.
+ SignedInState GetSignedInState(const signin::IdentityManager* identity_manager);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ // Returns if the necessary conditions to show the History Sync Optin screen
+ // are met.
+ // This method does not take into account any feature flags related to the above
diff --git a/chromium-wip/patches/patch-chrome_browser_supervised__user_classify__url__navigation__throttle.cc b/chromium-wip/patches/patch-chrome_browser_supervised__user_classify__url__navigation__throttle.cc
new file mode 100644
index 0000000000..f182c6a3ed
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_supervised__user_classify__url__navigation__throttle.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/supervised_user/classify_url_navigation_throttle.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/supervised_user/classify_url_navigation_throttle.cc
+@@ -70,7 +70,7 @@ std::ostream& operator<<(std::ostream& s
+   }
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ bool ShouldShowReAuthInterstitial(
+     content::NavigationHandle& navigation_handle) {
+   Profile* profile = Profile::FromBrowserContext(
+@@ -232,7 +232,7 @@ void ClassifyUrlNavigationThrottle::OnIn
+     }
+     case InterstitialResultCallbackActions::kCancelWithInterstitial: {
+       CHECK(navigation_handle());
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+       if (ShouldShowReAuthInterstitial(*navigation_handle())) {
+         // Show the re-authentication interstitial if the user signed out of
+         // the content area, as parent's approval requires authentication.
diff --git a/chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__browser__utils.cc b/chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__browser__utils.cc
new file mode 100644
index 0000000000..8a31ee1525
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__browser__utils.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/supervised_user/supervised_user_browser_utils.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/supervised_user/supervised_user_browser_utils.cc
+@@ -40,7 +40,7 @@
+ #include "chrome/browser/ash/profiles/profile_helper.h"
+ #include "components/user_manager/user.h"
+ #include "components/user_manager/user_type.h"
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/supervised_user/supervised_user_verification_controller_client.h"
+ #include "chrome/browser/supervised_user/supervised_user_verification_page_blocked_sites.h"
+ #include "chrome/browser/supervised_user/supervised_user_verification_page_youtube.h"
+@@ -158,7 +158,7 @@ void AssertChildStatusOfTheUser(Profile*
+ #endif
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ std::string CreateReauthenticationInterstitialForYouTube(
+     content::NavigationHandle& navigation_handle) {
+   content::WebContents* web_contents = navigation_handle.GetWebContents();
diff --git a/chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__browser__utils.h b/chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__browser__utils.h
new file mode 100644
index 0000000000..c00c37258d
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__browser__utils.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/supervised_user/supervised_user_browser_utils.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/supervised_user/supervised_user_browser_utils.h
+@@ -52,7 +52,7 @@ std::string GetAccountGivenName(Profile&
+ // of the user.
+ void AssertChildStatusOfTheUser(Profile* profile, bool is_child);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ // Returns the html content of the reauthentication interstitial for blocked
+ // sites. This interstitial is associated with the given NavigationHandle.
+ std::string CreateReauthenticationInterstitialForBlockedSites(
diff --git a/chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__extensions__delegate__impl.cc b/chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__extensions__delegate__impl.cc
new file mode 100644
index 0000000000..6ad045f3fd
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__extensions__delegate__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/supervised_user/supervised_user_extensions_delegate_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/supervised_user/supervised_user_extensions_delegate_impl.cc
+@@ -197,7 +197,7 @@ void SupervisedUserExtensionsDelegateImp
+       return;
+     }
+   }
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   CHECK(contents.value());
+   content::WebContents* web_contents = contents.value().get();
+   // Always invoke the parent permission dialog.
diff --git a/chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.cc b/chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.cc
new file mode 100644
index 0000000000..18538fb201
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/supervised_user/supervised_user_extensions_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/supervised_user/supervised_user_extensions_manager.cc
+@@ -350,7 +350,7 @@ void SupervisedUserExtensionsManager::
+     ActivateManagementPolicyAndUpdateRegistration() {
+   SetActiveForSupervisedUsers();
+   UpdateManagementPolicyRegistration();
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   MaybeMarkExtensionsLocallyParentApproved();
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ }
+@@ -449,7 +449,7 @@ bool SupervisedUserExtensionsManager::Sh
+   return false;
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void SupervisedUserExtensionsManager::
+     MaybeMarkExtensionsLocallyParentApproved() {
+   supervised_user::LocallyParentApprovedExtensionsMigrationState
diff --git a/chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.h b/chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.h
new file mode 100644
index 0000000000..8b747864a8
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/supervised_user/supervised_user_extensions_manager.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/supervised_user/supervised_user_extensions_manager.h
+@@ -154,7 +154,7 @@ class SupervisedUserExtensionsManager : 
+   // launched.
+   bool ShouldBlockExtension(const std::string& extension_id) const;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Triggers an one-time migration of the present extensions as parent-approved
+   // when the feature
+   // `kEnableSupervisedUserSkipParentApprovalToInstallExtensions` becomes
diff --git a/chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__google__auth__navigation__throttle.cc b/chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__google__auth__navigation__throttle.cc
new file mode 100644
index 0000000000..bd56b87469
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__google__auth__navigation__throttle.cc
@@ -0,0 +1,32 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/supervised_user/supervised_user_google_auth_navigation_throttle.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/supervised_user/supervised_user_google_auth_navigation_throttle.cc
+@@ -33,12 +33,12 @@
+ #include "chrome/browser/supervised_user/child_accounts/child_account_service_android.h"
+ #include "components/signin/public/identity_manager/identity_manager.h"
+ #include "ui/android/view_android.h"
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/supervised_user/supervised_user_verification_controller_client.h"
+ #include "chrome/browser/supervised_user/supervised_user_verification_page.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ namespace {
+ bool IsYouTubeInfrastructureSubframe(content::NavigationHandle* handle) {
+   if (handle->GetNavigatingFrameType() != content::FrameType::kSubframe) {
+@@ -160,7 +160,7 @@ SupervisedUserGoogleAuthNavigationThrott
+     return content::NavigationThrottle::DEFER;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   // When an unauthenticated supervised user tries to access YouTube, we force
+   // re-authentication with an interstitial so that YouTube can be subject to
+   // content restrictions. This interstitial is only available on Desktop
diff --git a/chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__metrics__service__factory.cc b/chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__metrics__service__factory.cc
new file mode 100644
index 0000000000..92a232b165
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__metrics__service__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/supervised_user/supervised_user_metrics_service_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/supervised_user/supervised_user_metrics_service_factory.cc
+@@ -15,7 +15,7 @@
+ #include "content/public/browser/browser_context.h"
+ #include "chrome/browser/supervised_user/metrics_service_accessor_delegate.h"
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/supervised_user/linux_mac_windows/supervised_user_extensions_metrics_delegate_impl.h"
+ #endif
+ 
+@@ -63,7 +63,7 @@ SupervisedUserMetricsServiceFactory::Bui
+   std::unique_ptr<supervised_user::SupervisedUserMetricsService ::
+                       SupervisedUserMetricsServiceExtensionDelegate>
+       extensions_metrics_delegate = nullptr;
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   extensions_metrics_delegate =
+       std::make_unique<SupervisedUserExtensionsMetricsDelegateImpl>(
+           extensions::ExtensionRegistry::Get(profile), profile);
diff --git a/chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__navigation__observer.cc b/chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__navigation__observer.cc
new file mode 100644
index 0000000000..62a3227f14
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_supervised__user_supervised__user__navigation__observer.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/supervised_user/supervised_user_navigation_observer.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/supervised_user/supervised_user_navigation_observer.cc
+@@ -48,7 +48,7 @@
+ #include "chrome/browser/supervised_user/android/supervised_user_web_content_handler_impl.h"
+ #elif BUILDFLAG(IS_CHROMEOS)
+ #include "chrome/browser/supervised_user/chromeos/supervised_user_web_content_handler_impl.h"
+-#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/supervised_user/linux_mac_windows/supervised_user_web_content_handler_impl.h"
+ #endif
+ 
+@@ -68,7 +68,7 @@ std::unique_ptr<supervised_user::WebCont
+ #elif BUILDFLAG(IS_ANDROID)
+   return std::make_unique<SupervisedUserWebContentHandlerImpl>(
+       web_contents, frame_id, navigation_id);
+-#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   return std::make_unique<SupervisedUserWebContentHandlerImpl>(
+       web_contents, frame_id, navigation_id);
+ #endif
diff --git a/chromium-wip/patches/patch-chrome_browser_sync_chrome__sync__controller__builder.cc b/chromium-wip/patches/patch-chrome_browser_sync_chrome__sync__controller__builder.cc
new file mode 100644
index 0000000000..ab4f94802d
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_sync_chrome__sync__controller__builder.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/sync/chrome_sync_controller_builder.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/sync/chrome_sync_controller_builder.cc
+@@ -289,7 +289,7 @@ ChromeSyncControllerBuilder::Build(synce
+ #if BUILDFLAG(ENABLE_SPELLCHECK)
+     // Chrome prefers OS provided spell checkers where they exist. So only sync
+     // the custom dictionary on platforms that typically don't provide one.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+     // Dictionary sync is enabled by default.
+     if (spellcheck_service_.value()) {
+       controllers.push_back(
diff --git a/chromium-wip/patches/patch-chrome_browser_sync_device__info__sync__client__impl.cc b/chromium-wip/patches/patch-chrome_browser_sync_device__info__sync__client__impl.cc
new file mode 100644
index 0000000000..4ea579d3fd
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_sync_device__info__sync__client__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/sync/device_info_sync_client_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/sync/device_info_sync_client_impl.cc
+@@ -34,7 +34,7 @@ DeviceInfoSyncClientImpl::~DeviceInfoSyn
+ std::string DeviceInfoSyncClientImpl::GetSigninScopedDeviceId() const {
+ // Since the local sync backend is currently only supported on Windows, Mac and
+ // Linux don't even check the pref on other os-es.
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   syncer::SyncPrefs prefs(profile_->GetPrefs());
+   if (prefs.IsLocalSyncEnabled()) {
+     return "local_device";
diff --git a/chromium-wip/patches/patch-chrome_browser_sync_sync__service__factory.cc b/chromium-wip/patches/patch-chrome_browser_sync_sync__service__factory.cc
new file mode 100644
index 0000000000..63e1593e1c
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_sync_sync__service__factory.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/sync/sync_service_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/sync/sync_service_factory.cc
+@@ -115,7 +115,7 @@
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_keyed_service.h"
+ #include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_service_factory.h"
+ #include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_utils.h"
+@@ -142,7 +142,7 @@ namespace {
+ tab_groups::TabGroupSyncService* GetTabGroupSyncService(Profile* profile) {
+   CHECK(profile);
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   tab_groups::TabGroupSyncService* service =
+       tab_groups::SavedTabGroupUtils::GetServiceForProfile(profile);
+   CHECK(service);
+@@ -405,7 +405,7 @@ std::unique_ptr<KeyedService> BuildSyncS
+   bool local_sync_backend_enabled = false;
+   // Only check the local sync backend pref on the supported platforms of
+   // Windows, Mac and Linux.
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   syncer::SyncPrefs prefs(profile->GetPrefs());
+   local_sync_backend_enabled = prefs.IsLocalSyncEnabled();
+   base::UmaHistogramBoolean("Sync.Local.Enabled2", local_sync_backend_enabled);
+@@ -544,7 +544,7 @@ SyncServiceFactory::SyncServiceFactory()
+   DependsOn(ProfilePasswordStoreFactory::GetInstance());
+   DependsOn(PowerBookmarkServiceFactory::GetInstance());
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   DependsOn(tab_groups::SavedTabGroupServiceFactory::GetInstance());
+ #elif BUILDFLAG(IS_ANDROID)
+   DependsOn(tab_groups::TabGroupSyncServiceFactory::GetInstance());
diff --git a/chromium-wip/patches/patch-chrome_browser_task__manager_sampling_task__group.cc b/chromium-wip/patches/patch-chrome_browser_task__manager_sampling_task__group.cc
new file mode 100644
index 0000000000..60ac7ebdc6
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_task__manager_sampling_task__group.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/task_manager/sampling/task_group.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/task_manager/sampling/task_group.cc
+@@ -36,7 +36,7 @@ const int kBackgroundRefreshTypesMask =
+ #if BUILDFLAG(IS_WIN)
+     REFRESH_TYPE_START_TIME | REFRESH_TYPE_CPU_TIME |
+ #endif  // BUILDFLAG(IS_WIN)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+     REFRESH_TYPE_FD_COUNT |
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
+ #if BUILDFLAG(ENABLE_NACL)
+@@ -117,7 +117,7 @@ TaskGroup::TaskGroup(
+ #if BUILDFLAG(ENABLE_NACL)
+       nacl_debug_stub_port_(nacl::kGdbDebugStubPortUnknown),
+ #endif  // BUILDFLAG(ENABLE_NACL)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+       open_fd_count_(-1),
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
+       idle_wakeups_per_second_(-1),
+@@ -132,7 +132,7 @@ TaskGroup::TaskGroup(
+                             weak_ptr_factory_.GetWeakPtr()),
+         base::BindRepeating(&TaskGroup::OnIdleWakeupsRefreshDone,
+                             weak_ptr_factory_.GetWeakPtr()),
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+         base::BindRepeating(&TaskGroup::OnOpenFdCountRefreshDone,
+                             weak_ptr_factory_.GetWeakPtr()),
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
+@@ -302,7 +302,7 @@ void TaskGroup::OnRefreshNaClDebugStubPo
+ }
+ #endif  // BUILDFLAG(ENABLE_NACL)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ void TaskGroup::OnOpenFdCountRefreshDone(int open_fd_count) {
+   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_task__manager_sampling_task__group.h b/chromium-wip/patches/patch-chrome_browser_task__manager_sampling_task__group.h
new file mode 100644
index 0000000000..f835ff365f
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_task__manager_sampling_task__group.h
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/task_manager/sampling/task_group.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/task_manager/sampling/task_group.h
+@@ -41,7 +41,7 @@ inline constexpr int kUnsupportedVMRefre
+     REFRESH_TYPE_WEBCACHE_STATS | REFRESH_TYPE_NETWORK_USAGE |
+     REFRESH_TYPE_NACL | REFRESH_TYPE_IDLE_WAKEUPS | REFRESH_TYPE_HANDLES |
+     REFRESH_TYPE_START_TIME | REFRESH_TYPE_CPU_TIME | REFRESH_TYPE_PRIORITY |
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+     REFRESH_TYPE_FD_COUNT |
+ #endif
+     REFRESH_TYPE_HARD_FAULTS;
+@@ -144,7 +144,7 @@ class TaskGroup {
+   }
+ #endif  // BUILDFLAG(ENABLE_NACL)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   int open_fd_count() const { return open_fd_count_; }
+   void set_open_fd_count(int open_fd_count) { open_fd_count_ = open_fd_count; }
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
+@@ -164,7 +164,7 @@ class TaskGroup {
+   void RefreshNaClDebugStubPort(int child_process_unique_id);
+   void OnRefreshNaClDebugStubPortDone(int port);
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   void OnOpenFdCountRefreshDone(int open_fd_count);
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
+ 
+@@ -235,7 +235,7 @@ class TaskGroup {
+ #if BUILDFLAG(ENABLE_NACL)
+   int nacl_debug_stub_port_;
+ #endif  // BUILDFLAG(ENABLE_NACL)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   // The number of file descriptors currently open by the process.
+   int open_fd_count_;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
diff --git a/chromium-wip/patches/patch-chrome_browser_task__manager_sampling_task__group__sampler.cc b/chromium-wip/patches/patch-chrome_browser_task__manager_sampling_task__group__sampler.cc
new file mode 100644
index 0000000000..2f0075e96b
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_task__manager_sampling_task__group__sampler.cc
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/task_manager/sampling/task_group_sampler.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/task_manager/sampling/task_group_sampler.cc
+@@ -45,7 +45,7 @@ TaskGroupSampler::TaskGroupSampler(
+     const OnCpuRefreshCallback& on_cpu_refresh,
+     const OnSwappedMemRefreshCallback& on_swapped_mem_refresh,
+     const OnIdleWakeupsCallback& on_idle_wakeups,
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+     const OnOpenFdCountCallback& on_open_fd_count,
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
+     const OnProcessPriorityCallback& on_process_priority)
+@@ -55,7 +55,7 @@ TaskGroupSampler::TaskGroupSampler(
+       on_cpu_refresh_callback_(on_cpu_refresh),
+       on_swapped_mem_refresh_callback_(on_swapped_mem_refresh),
+       on_idle_wakeups_callback_(on_idle_wakeups),
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+       on_open_fd_count_callback_(on_open_fd_count),
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
+       on_process_priority_callback_(on_process_priority) {
+@@ -85,7 +85,7 @@ void TaskGroupSampler::Refresh(int64_t r
+         base::BindOnce(on_swapped_mem_refresh_callback_));
+   }
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (TaskManagerObserver::IsResourceRefreshEnabled(REFRESH_TYPE_IDLE_WAKEUPS,
+                                                     refresh_flags)) {
+     blocking_pool_runner_->PostTaskAndReplyWithResult(
+@@ -95,7 +95,7 @@ void TaskGroupSampler::Refresh(int64_t r
+   }
+ #endif  // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   if (TaskManagerObserver::IsResourceRefreshEnabled(REFRESH_TYPE_FD_COUNT,
+                                                     refresh_flags)) {
+     blocking_pool_runner_->PostTaskAndReplyWithResult(
+@@ -152,7 +152,7 @@ int TaskGroupSampler::RefreshIdleWakeups
+   return process_metrics_->GetIdleWakeupsPerSecond();
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ int TaskGroupSampler::RefreshOpenFdCount() {
+   DCHECK_CALLED_ON_VALID_SEQUENCE(worker_pool_sequenced_checker_);
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_task__manager_sampling_task__group__sampler.h b/chromium-wip/patches/patch-chrome_browser_task__manager_sampling_task__group__sampler.h
new file mode 100644
index 0000000000..d4240ead57
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_task__manager_sampling_task__group__sampler.h
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/task_manager/sampling/task_group_sampler.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/task_manager/sampling/task_group_sampler.h
+@@ -31,7 +31,7 @@ class TaskGroupSampler : public base::Re
+   using OnCpuRefreshCallback = base::RepeatingCallback<void(double)>;
+   using OnSwappedMemRefreshCallback = base::RepeatingCallback<void(int64_t)>;
+   using OnIdleWakeupsCallback = base::RepeatingCallback<void(int)>;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   using OnOpenFdCountCallback = base::RepeatingCallback<void(int)>;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
+   using OnProcessPriorityCallback =
+@@ -43,7 +43,7 @@ class TaskGroupSampler : public base::Re
+       const OnCpuRefreshCallback& on_cpu_refresh,
+       const OnSwappedMemRefreshCallback& on_memory_refresh,
+       const OnIdleWakeupsCallback& on_idle_wakeups,
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+       const OnOpenFdCountCallback& on_open_fd_count,
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
+       const OnProcessPriorityCallback& on_process_priority);
+@@ -63,7 +63,7 @@ class TaskGroupSampler : public base::Re
+   double RefreshCpuUsage();
+   int64_t RefreshSwappedMem();
+   int RefreshIdleWakeupsPerSecond();
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   int RefreshOpenFdCount();
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
+   base::Process::Priority RefreshProcessPriority();
+@@ -87,7 +87,7 @@ class TaskGroupSampler : public base::Re
+   const OnCpuRefreshCallback on_cpu_refresh_callback_;
+   const OnSwappedMemRefreshCallback on_swapped_mem_refresh_callback_;
+   const OnIdleWakeupsCallback on_idle_wakeups_callback_;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   const OnOpenFdCountCallback on_open_fd_count_callback_;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
+   const OnProcessPriorityCallback on_process_priority_callback_;
diff --git a/chromium-wip/patches/patch-chrome_browser_task__manager_sampling_task__manager__impl.cc b/chromium-wip/patches/patch-chrome_browser_task__manager_sampling_task__manager__impl.cc
new file mode 100644
index 0000000000..1492d06b9a
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_task__manager_sampling_task__manager__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/task_manager/sampling/task_manager_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/task_manager/sampling/task_manager_impl.cc
+@@ -235,7 +235,7 @@ void TaskManagerImpl::GetUSERHandles(Tas
+ }
+ 
+ int TaskManagerImpl::GetOpenFdCount(TaskId task_id) const {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   return GetTaskGroupByTaskId(task_id)->open_fd_count();
+ #else
+   return -1;
diff --git a/chromium-wip/patches/patch-chrome_browser_task__manager_task__manager__observer.h b/chromium-wip/patches/patch-chrome_browser_task__manager_task__manager__observer.h
new file mode 100644
index 0000000000..2bb31ebb55
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_task__manager_task__manager__observer.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/task_manager/task_manager_observer.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/task_manager/task_manager_observer.h
+@@ -46,7 +46,7 @@ enum RefreshType {
+   // or backgrounded.
+   REFRESH_TYPE_PRIORITY = 1 << 13,
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   // For observers interested in getting the number of open file descriptors of
+   // processes.
+   REFRESH_TYPE_FD_COUNT = 1 << 14,
diff --git a/chromium-wip/patches/patch-chrome_browser_themes_theme__helper.cc b/chromium-wip/patches/patch-chrome_browser_themes_theme__helper.cc
new file mode 100644
index 0000000000..1650c7381e
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_themes_theme__helper.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/themes/theme_helper.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/themes/theme_helper.cc
+@@ -16,7 +16,7 @@
+ #include "ui/gfx/image/image.h"
+ #include "ui/native_theme/native_theme.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/linux/linux_ui.h"
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_themes_theme__service.cc b/chromium-wip/patches/patch-chrome_browser_themes_theme__service.cc
new file mode 100644
index 0000000000..841c0ef30d
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_themes_theme__service.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/themes/theme_service.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/themes/theme_service.cc
+@@ -72,7 +72,7 @@
+ #include "extensions/browser/extension_registry_observer.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/linux/linux_ui.h"
+ #include "ui/ozone/public/ozone_platform.h"  // nogncheck
+ #endif
+@@ -331,7 +331,7 @@ CustomThemeSupplier* ThemeService::GetTh
+ }
+ 
+ bool ThemeService::ShouldUseCustomFrame() const {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (!ui::OzonePlatform::GetInstance()
+            ->GetPlatformRuntimeProperties()
+            .supports_server_side_window_decorations) {
diff --git a/chromium-wip/patches/patch-chrome_browser_themes_theme__service__aura__linux.cc b/chromium-wip/patches/patch-chrome_browser_themes_theme__service__aura__linux.cc
new file mode 100644
index 0000000000..276f56303a
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_themes_theme__service__aura__linux.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/themes/theme_service_aura_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/themes/theme_service_aura_linux.cc
+@@ -23,7 +23,7 @@ namespace {
+ ui::SystemTheme ValidateSystemTheme(ui::SystemTheme system_theme) {
+   switch (system_theme) {
+     case ui::SystemTheme::kDefault:
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     case ui::SystemTheme::kGtk:
+     case ui::SystemTheme::kQt:
+ #endif
diff --git a/chromium-wip/patches/patch-chrome_browser_themes_theme__service__factory.cc b/chromium-wip/patches/patch-chrome_browser_themes_theme__service__factory.cc
new file mode 100644
index 0000000000..000804ba06
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_themes_theme__service__factory.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/themes/theme_service_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/themes/theme_service_factory.cc
+@@ -25,7 +25,7 @@
+ #include "chrome/browser/themes/theme_helper_win.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/themes/theme_service_aura_linux.h"
+ #include "ui/linux/linux_ui_factory.h"
+ #endif
+@@ -105,7 +105,7 @@ ThemeServiceFactory::~ThemeServiceFactor
+ std::unique_ptr<KeyedService>
+ ThemeServiceFactory::BuildServiceInstanceForBrowserContext(
+     content::BrowserContext* profile) const {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   using ThemeService = ThemeServiceAuraLinux;
+ #endif
+ 
+@@ -117,7 +117,7 @@ ThemeServiceFactory::BuildServiceInstanc
+ 
+ void ThemeServiceFactory::RegisterProfilePrefs(
+     user_prefs::PrefRegistrySyncable* registry) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   registry->RegisterIntegerPref(prefs::kSystemTheme,
+                                 static_cast<int>(ui::GetDefaultSystemTheme()));
+ #endif
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_actions_chrome__action__id.h b/chromium-wip/patches/patch-chrome_browser_ui_actions_chrome__action__id.h
new file mode 100644
index 0000000000..fc3c7bd4de
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_actions_chrome__action__id.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/actions/chrome_action_id.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/actions/chrome_action_id.h
+@@ -504,7 +504,7 @@
+ #if BUILDFLAG(IS_CHROMEOS)
+ #define CHROME_PLATFORM_SPECIFIC_ACTION_IDS \
+   E(kToggleMultitaskMenu, IDC_TOGGLE_MULTITASK_MENU)
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #define CHROME_PLATFORM_SPECIFIC_ACTION_IDS \
+   E(kUseSystemTitleBar, IDC_USE_SYSTEM_TITLE_BAR) \
+   E(kRestoreWindow, IDC_RESTORE_WINDOW)
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.cc b/chromium-wip/patches/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.cc
new file mode 100644
index 0000000000..b4998f0c61
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/autofill/payments/desktop_payments_window_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/autofill/payments/desktop_payments_window_manager.cc
+@@ -58,7 +58,7 @@ gfx::Rect GetPopupSizeForBnpl() {
+ DesktopPaymentsWindowManager::DesktopPaymentsWindowManager(
+     ContentAutofillClient* client)
+     : client_(CHECK_DEREF(client)) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   scoped_observation_.Observe(BrowserList::GetInstance());
+ #endif  // BUILDFLAG(IS_LINUX)
+ }
+@@ -144,7 +144,7 @@ void DesktopPaymentsWindowManager::WebCo
+   }
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void DesktopPaymentsWindowManager::OnBrowserSetLastActive(Browser* browser) {
+   // If there is an ongoing payments window manager pop-up flow, and the
+   // original tab's WebContents become active, activate the pop-up's
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.h b/chromium-wip/patches/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.h
new file mode 100644
index 0000000000..5df56c8ff4
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.h
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/autofill/payments/desktop_payments_window_manager.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/autofill/payments/desktop_payments_window_manager.h
+@@ -14,7 +14,7 @@
+ #include "components/autofill/core/browser/payments/payments_window_manager.h"
+ #include "content/public/browser/web_contents_observer.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "base/scoped_observation.h"
+ #include "chrome/browser/ui/browser_list.h"
+ #include "chrome/browser/ui/browser_list_observer.h"
+@@ -39,7 +39,7 @@ class PaymentsWindowUserConsentDialogCon
+ // WebContents of the original tab that the pop-up is created in. If there is a
+ // pop-up currently present, `this` will observe the WebContents of that pop-up.
+ class DesktopPaymentsWindowManager : public PaymentsWindowManager,
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+                                      public BrowserListObserver,
+ #endif  // BUILDFLAG(IS_LINUX)
+                                      public content::WebContentsObserver {
+@@ -59,7 +59,7 @@ class DesktopPaymentsWindowManager : pub
+       content::NavigationHandle* navigation_handle) override;
+   void WebContentsDestroyed() override;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // BrowserListObserver:
+   void OnBrowserSetLastActive(Browser* browser) override;
+ #endif  // BUILDFLAG(IS_LINUX)
+@@ -165,7 +165,7 @@ class DesktopPaymentsWindowManager : pub
+   // Used in tests to notify the test infrastructure that the pop-up has closed.
+   base::RepeatingClosure popup_closed_closure_for_testing_;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   base::ScopedObservation<BrowserList, BrowserListObserver> scoped_observation_{
+       this};
+ #endif  // BUILDFLAG(IS_LINUX)
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_browser.h b/chromium-wip/patches/patch-chrome_browser_ui_browser.h
new file mode 100644
index 0000000000..c67f3612b7
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_browser.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/browser.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/browser.h
+@@ -293,7 +293,7 @@ class Browser : public TabStripModelObse
+     std::optional<int64_t> display_id;
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // When the browser window is shown, the desktop environment is notified
+     // using this ID.  In response, the desktop will stop playing the "waiting
+     // for startup" animation (if any).
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_browser__command__controller.cc b/chromium-wip/patches/patch-chrome_browser_ui_browser__command__controller.cc
new file mode 100644
index 0000000000..b0f9bb56f4
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_browser__command__controller.cc
@@ -0,0 +1,80 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/browser_command_controller.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/browser_command_controller.cc
+@@ -127,7 +127,7 @@
+ #include "components/user_manager/user_manager.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/base/ime/text_edit_commands.h"
+ #include "ui/base/ime/text_input_flags.h"
+ #include "ui/linux/linux_ui.h"
+@@ -137,7 +137,7 @@
+ #include "ui/ozone/public/ozone_platform.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/shortcuts/desktop_shortcuts_utils.h"
+ #endif  // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
+ 
+@@ -363,7 +363,7 @@ bool BrowserCommandController::IsReserve
+ #endif
+   }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // If this key was registered by the user as a content editing hotkey, then
+   // it is not reserved.
+   auto* linux_ui = ui::LinuxUi::instance();
+@@ -632,7 +632,7 @@ bool BrowserCommandController::ExecuteCo
+       break;
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     case IDC_MINIMIZE_WINDOW:
+       browser_->window()->Minimize();
+       break;
+@@ -849,7 +849,7 @@ bool BrowserCommandController::ExecuteCo
+       break;
+     case IDC_CREATE_SHORTCUT:
+       base::RecordAction(base::UserMetricsAction("CreateShortcut"));
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       chrome::CreateDesktopShortcutForActiveWebContents(browser_);
+ #else
+       web_app::CreateWebAppFromCurrentWebContents(
+@@ -1018,7 +1018,7 @@ bool BrowserCommandController::ExecuteCo
+ #endif  // BUILDFLAG(GOOGLE_CHROME_BRANDING)
+     case IDC_CHROME_WHATS_NEW:
+ #if BUILDFLAG(GOOGLE_CHROME_BRANDING) && \
+-    (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX))
++    (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD))
+       ShowChromeWhatsNew(browser_);
+       break;
+ #else
+@@ -1395,7 +1395,7 @@ void BrowserCommandController::InitComma
+   command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_4, true);
+   command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_5, true);
+ #endif
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   command_updater_.UpdateCommandEnabled(IDC_MINIMIZE_WINDOW, true);
+   command_updater_.UpdateCommandEnabled(IDC_MAXIMIZE_WINDOW, true);
+   command_updater_.UpdateCommandEnabled(IDC_RESTORE_WINDOW, true);
+@@ -1747,7 +1747,7 @@ void BrowserCommandController::UpdateCom
+   bool can_create_web_app = web_app::CanCreateWebApp(browser_);
+   command_updater_.UpdateCommandEnabled(IDC_INSTALL_PWA, can_create_web_app);
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   command_updater_.UpdateCommandEnabled(
+       IDC_CREATE_SHORTCUT,
+       shortcuts::CanCreateDesktopShortcut(current_web_contents));
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_browser__commands.cc b/chromium-wip/patches/patch-chrome_browser_ui_browser__commands.cc
new file mode 100644
index 0000000000..452729dee9
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_browser__commands.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/browser_commands.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/browser_commands.cc
+@@ -2195,7 +2195,7 @@ void OpenUpdateChromeDialog(Browser* bro
+   } else if (UpgradeDetector::GetInstance()->is_outdated_install_no_au()) {
+     UpgradeDetector::GetInstance()->NotifyOutdatedInstallNoAutoUpdate();
+   } else {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     if (base::FeatureList::IsEnabled(features::kFewerUpdateConfirmations)) {
+       chrome::AttemptRelaunch();
+       return;
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_browser__ui__prefs.cc b/chromium-wip/patches/patch-chrome_browser_ui_browser__ui__prefs.cc
new file mode 100644
index 0000000000..b86c909aad
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_browser__ui__prefs.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/browser_ui_prefs.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/browser_ui_prefs.cc
+@@ -80,7 +80,7 @@ void RegisterBrowserPrefs(PrefRegistrySi
+   registry->RegisterTimePref(prefs::kPdfInfoBarLastShown, base::Time());
+   registry->RegisterIntegerPref(prefs::kPdfInfoBarTimesShown, 0);
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   registry->RegisterStringPref(prefs::kEnterpriseCustomLabelForBrowser,
+                                std::string());
+   registry->RegisterStringPref(prefs::kEnterpriseLogoUrlForBrowser,
+@@ -203,7 +203,7 @@ void RegisterBrowserUserPrefs(user_prefs
+   registry->RegisterDictionaryPref(prefs::kHttpsUpgradeFallbacks);
+   registry->RegisterDictionaryPref(prefs::kHttpsUpgradeNavigations);
+   registry->RegisterBooleanPref(prefs::kHttpsOnlyModeAutoEnabled, false);
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   registry->RegisterStringPref(prefs::kEnterpriseLogoUrlForProfile,
+                                std::string());
+   registry->RegisterStringPref(prefs::kEnterpriseCustomLabelForProfile,
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_browser__view__prefs.cc b/chromium-wip/patches/patch-chrome_browser_ui_browser__view__prefs.cc
new file mode 100644
index 0000000000..8680e0926f
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_browser__view__prefs.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/browser_view_prefs.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/browser_view_prefs.cc
+@@ -14,7 +14,7 @@
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ bool GetCustomFramePrefDefault() {
+ #if BUILDFLAG(IS_OZONE)
+   return ui::OzonePlatform::GetInstance()
+@@ -30,7 +30,7 @@ bool GetCustomFramePrefDefault() {
+ 
+ void RegisterBrowserViewProfilePrefs(
+     user_prefs::PrefRegistrySyncable* registry) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   registry->RegisterBooleanPref(prefs::kUseCustomChromeFrame,
+                                 GetCustomFramePrefDefault());
+ #endif
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_chrome__pages.cc b/chromium-wip/patches/patch-chrome_browser_ui_chrome__pages.cc
new file mode 100644
index 0000000000..f23eeb27f8
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_chrome__pages.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/chrome_pages.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/chrome_pages.cc
+@@ -85,7 +85,7 @@
+ #include "components/signin/public/identity_manager/identity_manager.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/web_applications/web_app_utils.h"
+ #endif
+ 
+@@ -382,7 +382,7 @@ void ShowChromeTips(Browser* browser) {
+   ShowSingletonTab(browser, GURL(kChromeTipsURL));
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void ShowChromeWhatsNew(Browser* browser) {
+   ShowSingletonTab(browser, GURL(kChromeUIWhatsNewURL));
+ }
+@@ -706,7 +706,7 @@ void ShowShortcutCustomizationApp(Profil
+ }
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void ShowWebAppSettingsImpl(Browser* browser,
+                             Profile* profile,
+                             const std::string& app_id,
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_chrome__pages.h b/chromium-wip/patches/patch-chrome_browser_ui_chrome__pages.h
new file mode 100644
index 0000000000..c147070f09
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_chrome__pages.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/chrome_pages.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/chrome_pages.h
+@@ -39,7 +39,7 @@ namespace signin {
+ enum class ConsentLevel;
+ }  // namespace signin
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ namespace web_app {
+ enum class AppSettingsPageEntryPoint;
+ }  // namespace web_app
+@@ -177,7 +177,7 @@ void ShowShortcutCustomizationApp(Profil
+                                   const std::string& category);
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Show chrome://app-settings/<app-id> page.
+ void ShowWebAppSettings(Browser* browser,
+                         const std::string& app_id,
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_color_native__chrome__color__mixer.cc b/chromium-wip/patches/patch-chrome_browser_ui_color_native__chrome__color__mixer.cc
new file mode 100644
index 0000000000..ce2c3757c5
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_color_native__chrome__color__mixer.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/color/native_chrome_color_mixer.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/color/native_chrome_color_mixer.cc
+@@ -7,7 +7,7 @@
+ #include "build/build_config.h"
+ 
+ #if !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_MAC) && \
+-    !BUILDFLAG(IS_WIN)
++    !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_BSD)
+ void AddNativeChromeColorMixer(ui::ColorProvider* provider,
+                                const ui::ColorProviderKey& key) {}
+ #endif
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_managed__ui.cc b/chromium-wip/patches/patch-chrome_browser_ui_managed__ui.cc
new file mode 100644
index 0000000000..a5d802f29e
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_managed__ui.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/managed_ui.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/managed_ui.cc
+@@ -433,7 +433,7 @@ std::optional<std::string> GetDeviceMana
+       g_browser_process->platform_part()->browser_policy_connector_ash();
+   return connector->GetEnterpriseDomainManager();
+ #else
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (base::FeatureList::IsEnabled(
+           features::kEnterpriseManagementDisclaimerUsesCustomLabel)) {
+     std::string custom_management_label =
+@@ -463,7 +463,7 @@ std::optional<std::string> GetAccountMan
+     return std::nullopt;
+   }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (base::FeatureList::IsEnabled(
+           features::kEnterpriseManagementDisclaimerUsesCustomLabel)) {
+     std::string custom_management_label =
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc b/chromium-wip/patches/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc
new file mode 100644
index 0000000000..cee09fbbac
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/omnibox/omnibox_pedal_implementations.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/omnibox/omnibox_pedal_implementations.cc
+@@ -1985,7 +1985,7 @@ const gfx::VectorIcon& GetSharingHubVect
+   return omnibox::kShareMacChromeRefreshIcon;
+ #elif BUILDFLAG(IS_WIN)
+   return omnibox::kShareWinChromeRefreshIcon;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return omnibox::kShareLinuxChromeRefreshIcon;
+ #else
+   return omnibox::kShareChromeRefreshIcon;
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_passwords_bubble__controllers_relaunch__chrome__bubble__controller.cc b/chromium-wip/patches/patch-chrome_browser_ui_passwords_bubble__controllers_relaunch__chrome__bubble__controller.cc
new file mode 100644
index 0000000000..7ae2131b21
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_passwords_bubble__controllers_relaunch__chrome__bubble__controller.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/passwords/bubble_controllers/relaunch_chrome_bubble_controller.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/passwords/bubble_controllers/relaunch_chrome_bubble_controller.cc
+@@ -44,7 +44,7 @@ std::u16string RelaunchChromeBubbleContr
+ #if BUILDFLAG(IS_MAC)
+           ? IDS_PASSWORD_MANAGER_RELAUNCH_CHROME_BUBBLE_TITLE_BRANDED
+           : IDS_PASSWORD_MANAGER_RELAUNCH_CHROME_BUBBLE_TITLE_NON_BRANDED
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+           ? IDS_PASSWORD_MANAGER_RELAUNCH_CHROME_BUBBLE_TITLE_LINUX_BRANDED
+           : IDS_PASSWORD_MANAGER_RELAUNCH_CHROME_BUBBLE_TITLE_LINUX_NON_BRANDED
+ #endif
+@@ -57,7 +57,7 @@ std::u16string RelaunchChromeBubbleContr
+ #if BUILDFLAG(IS_MAC)
+           ? IDS_PASSWORD_MANAGER_RELAUNCH_CHROME_BUBBLE_DESCRIPTION_BRANDED
+           : IDS_PASSWORD_MANAGER_RELAUNCH_CHROME_BUBBLE_DESCRIPTION_NON_BRANDED
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+           ? IDS_PASSWORD_MANAGER_RELAUNCH_CHROME_BUBBLE_DESCRIPTION_LINUX_BRANDED
+           : IDS_PASSWORD_MANAGER_RELAUNCH_CHROME_BUBBLE_DESCRIPTION_LINUX_NON_BRANDED
+ #endif
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_passwords_manage__passwords__ui__controller.cc b/chromium-wip/patches/patch-chrome_browser_ui_passwords_manage__passwords__ui__controller.cc
new file mode 100644
index 0000000000..3344b607fd
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_passwords_manage__passwords__ui__controller.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/passwords/manage_passwords_ui_controller.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/passwords/manage_passwords_ui_controller.cc
+@@ -108,7 +108,7 @@ namespace {
+ 
+ using Logger = autofill::SavePasswordProgressLogger;
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Should be kept in sync with constant declared in
+ // bubble_controllers/relaunch_chrome_bubble_controller.cc.
+ constexpr int kMaxNumberOfTimesKeychainErrorBubbleIsShown = 3;
+@@ -567,7 +567,7 @@ void ManagePasswordsUIController::OnBiom
+ }
+ 
+ void ManagePasswordsUIController::OnKeychainError() {
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   CHECK(!dialog_controller_);
+   PrefService* prefs =
+       Profile::FromBrowserContext(web_contents()->GetBrowserContext())
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_prefs_prefs__tab__helper.cc b/chromium-wip/patches/patch-chrome_browser_ui_prefs_prefs__tab__helper.cc
new file mode 100644
index 0000000000..8a4da24e6b
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_prefs_prefs__tab__helper.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/prefs/prefs_tab_helper.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/prefs/prefs_tab_helper.cc
+@@ -68,7 +68,7 @@
+ #endif
+ 
+ #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(ENABLE_DESKTOP_ANDROID_EXTENSIONS)
++    BUILDFLAG(ENABLE_DESKTOP_ANDROID_EXTENSIONS) || BUILDFLAG(IS_BSD)
+ // If a font name in prefs default values starts with a comma, consider it's a
+ // comma-separated font list and resolve it to the first available font.
+ #define PREFS_FONT_LIST 1
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_sad__tab.cc b/chromium-wip/patches/patch-chrome_browser_ui_sad__tab.cc
new file mode 100644
index 0000000000..c92e78a81e
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_sad__tab.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/sad_tab.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/sad_tab.cc
+@@ -179,7 +179,7 @@ std::vector<int> SadTab::GetSubMessages(
+       if (!web_contents_->GetBrowserContext()->IsOffTheRecord()) {
+         message_ids.insert(message_ids.begin(), IDS_SAD_TAB_RELOAD_INCOGNITO);
+       }
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       // Note: on macOS, Linux and ChromeOS, the first bullet is either one of
+       // IDS_SAD_TAB_RELOAD_CLOSE_TABS or IDS_SAD_TAB_RELOAD_CLOSE_NOTABS
+       // followed by one of the above suggestions.
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_sharing__hub_sharing__hub__bubble__controller.h b/chromium-wip/patches/patch-chrome_browser_ui_sharing__hub_sharing__hub__bubble__controller.h
new file mode 100644
index 0000000000..481457adee
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_sharing__hub_sharing__hub__bubble__controller.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/sharing_hub/sharing_hub_bubble_controller.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/sharing_hub/sharing_hub_bubble_controller.h
+@@ -36,7 +36,7 @@ class SharingHubBubbleController {
+   // Returns true if the omnibox icon should be shown.
+   virtual bool ShouldOfferOmniboxIcon() = 0;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // This method returns the set of first-party actions, which are actions
+   // internal to Chrome. Third-party actions (those outside Chrome) are
+   // currently not supported.
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_signin_signin__view__controller.cc b/chromium-wip/patches/patch-chrome_browser_ui_signin_signin__view__controller.cc
new file mode 100644
index 0000000000..51b8429bbe
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_signin_signin__view__controller.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/signin/signin_view_controller.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/signin/signin_view_controller.cc
+@@ -472,7 +472,7 @@ void SigninViewController::ShowModalSync
+       GetOnModalDialogClosedCallback());
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void SigninViewController::ShowModalHistorySyncOptInDialog() {
+   CHECK(base::FeatureList::IsEnabled(switches::kEnableHistorySyncOptin));
+   CloseModalSignin();
+@@ -486,7 +486,7 @@ void SigninViewController::ShowModalHist
+ void SigninViewController::ShowModalManagedUserNoticeDialog(
+     std::unique_ptr<signin::EnterpriseProfileCreationDialogParams>
+         create_param) {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   CloseModalSignin();
+   dialog_ = std::make_unique<SigninModalDialogImpl>(
+       SigninViewControllerDelegate::CreateManagedUserNoticeDelegate(
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_signin_signin__view__controller.h b/chromium-wip/patches/patch-chrome_browser_ui_signin_signin__view__controller.h
new file mode 100644
index 0000000000..09f268b7bb
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_signin_signin__view__controller.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/signin/signin_view_controller.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/signin/signin_view_controller.h
+@@ -166,7 +166,7 @@ class SigninViewController {
+   void ShowModalSyncConfirmationDialog(bool is_signin_intercept,
+                                        bool is_sync_promo);
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Shows the modal history sync opt in dialog as a browser-modal dialog on top
+   // of the `browser_`'s window.
+   void ShowModalHistorySyncOptInDialog();
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_signin_signin__view__controller__delegate.h b/chromium-wip/patches/patch-chrome_browser_ui_signin_signin__view__controller__delegate.h
new file mode 100644
index 0000000000..81392d5db1
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_signin_signin__view__controller__delegate.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/signin/signin_view_controller_delegate.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/signin/signin_view_controller_delegate.h
+@@ -48,7 +48,7 @@ class SigninViewControllerDelegate {
+       SyncConfirmationStyle style,
+       bool is_sync_promo);
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Returns a platform-specific SigninViewControllerDelegate instance that
+   // displays the modal history sync opt in dialog. The returned object should
+   // delete itself when the window it's managing is closed.
+@@ -87,7 +87,7 @@ class SigninViewControllerDelegate {
+       SignoutConfirmationCallback callback);
+ #endif  // BUILDFLAG(ENABLE_DICE_SUPPORT)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Returns a platform-specific SigninViewContolllerDelegate instance that
+   // displays the managed user notice modal dialog. The returned object
+   // should delete itself when the window it's managing is closed.
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_startup_bad__flags__prompt.cc b/chromium-wip/patches/patch-chrome_browser_ui_startup_bad__flags__prompt.cc
new file mode 100644
index 0000000000..064aedd11d
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_startup_bad__flags__prompt.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/startup/bad_flags_prompt.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/startup/bad_flags_prompt.cc
+@@ -96,7 +96,7 @@ const char* const kBadFlags[] = {
+     extensions::switches::kExtensionsOnExtensionURLs,
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // Speech dispatcher is buggy, it can crash and it can make Chrome freeze.
+     // http://crbug.com/327295
+     switches::kEnableSpeechDispatcher,
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_startup_startup__browser__creator.cc b/chromium-wip/patches/patch-chrome_browser_ui_startup_startup__browser__creator.cc
new file mode 100644
index 0000000000..978fd1130e
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_startup_startup__browser__creator.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/startup/startup_browser_creator.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/startup/startup_browser_creator.cc
+@@ -134,7 +134,7 @@
+ #include "chrome/credential_provider/common/gcp_strings.h"
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/headless/headless_mode_util.h"
+ #include "chrome/browser/ui/startup/web_app_info_recorder_utils.h"
+ #include "components/headless/policy/headless_mode_policy.h"
+@@ -980,7 +980,7 @@ bool StartupBrowserCreator::ProcessCmdLi
+   TRACE_EVENT0("startup", "StartupBrowserCreator::ProcessCmdLineImpl");
+   ComputeAndRecordLaunchMode(command_line);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   if (headless::IsHeadlessMode() &&
+       headless::HeadlessModePolicy::IsHeadlessModeDisabled(
+           g_browser_process->local_state())) {
+@@ -1083,7 +1083,7 @@ bool StartupBrowserCreator::ProcessCmdLi
+     silent_launch = true;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   // Writes open and installed web apps to the specified file without
+   // launching a new browser window or tab.
+   if (base::FeatureList::IsEnabled(features::kListWebAppsSwitch) &&
+@@ -1300,7 +1300,7 @@ bool StartupBrowserCreator::ProcessCmdLi
+     CHECK_EQ(profile_info.mode, StartupProfileMode::kBrowserWindow)
+         << "Failed launch with app: couldn't pick a profile";
+     std::string app_id = command_line.GetSwitchValueASCII(switches::kAppId);
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // If Chrome Apps are deprecated and |app_id| is a Chrome App, display the
+     // deprecation UI instead of launching the app.
+     if (apps::OpenDeprecatedApplicationPrompt(privacy_safe_profile, app_id)) {
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_startup_startup__browser__creator__impl.cc b/chromium-wip/patches/patch-chrome_browser_ui_startup_startup__browser__creator__impl.cc
new file mode 100644
index 0000000000..cb26616770
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_startup_startup__browser__creator__impl.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/startup/startup_browser_creator_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/startup/startup_browser_creator_impl.cc
+@@ -74,7 +74,7 @@
+ #include "components/app_restore/full_restore_utils.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/webui/whats_new/whats_new_fetcher.h"
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ 
+@@ -206,7 +206,7 @@ Browser* StartupBrowserCreatorImpl::Open
+     // at the state of the MessageLoop.
+     Browser::CreateParams params = Browser::CreateParams(profile_, false);
+     params.creation_source = Browser::CreationSource::kStartupCreator;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     params.startup_id =
+         command_line_->GetSwitchValueASCII("desktop-startup-id");
+ #endif
+@@ -236,7 +236,7 @@ Browser* StartupBrowserCreatorImpl::Open
+       continue;
+     }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // Start the What's New fetch but don't add the tab at this point. The tab
+     // will open as the foreground tab only if the remote content can be
+     // retrieved successfully. This prevents needing to automatically close the
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_startup_startup__tab__provider.cc b/chromium-wip/patches/patch-chrome_browser_ui_startup_startup__tab__provider.cc
new file mode 100644
index 0000000000..9dbc7ab07e
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_startup_startup__tab__provider.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/startup/startup_tab_provider.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/startup/startup_tab_provider.cc
+@@ -63,7 +63,7 @@
+ #include "extensions/browser/extension_registry.h"
+ #endif  // !BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/headless/headless_mode_util.h"
+ #endif
+ 
+@@ -102,7 +102,7 @@ bool ValidateUrl(const GURL& url) {
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+   bool url_scheme_is_chrome = false;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   // In Headless mode, allow any URL pattern that matches chrome:// scheme if
+   // the user explicitly allowed it.
+   if (headless::IsHeadlessMode() && url.SchemeIs(content::kChromeUIScheme)) {
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_tab__helpers.cc b/chromium-wip/patches/patch-chrome_browser_ui_tab__helpers.cc
new file mode 100644
index 0000000000..37152df5e3
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_tab__helpers.cc
@@ -0,0 +1,32 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/tab_helpers.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/tab_helpers.cc
+@@ -218,7 +218,7 @@
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/blocked_content/framebust_block_tab_helper.h"
+ #include "chrome/browser/ui/hats/hats_helper.h"
+ #include "chrome/browser/ui/performance_controls/performance_controls_hats_service_factory.h"
+@@ -702,12 +702,12 @@ void TabHelpers::AttachTabHelpers(WebCon
+   webapps::PreRedirectionURLObserver::CreateForWebContents(web_contents);
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   metrics::DesktopSessionDurationObserver::CreateForWebContents(web_contents);
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (base::FeatureList::IsEnabled(
+           features::kHappinessTrackingSurveysForDesktopDemo) ||
+       base::FeatureList::IsEnabled(features::kTrustSafetySentimentSurvey) ||
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_tabs_features.cc b/chromium-wip/patches/patch-chrome_browser_ui_tabs_features.cc
new file mode 100644
index 0000000000..7541c6d574
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_tabs_features.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/tabs/features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/tabs/features.cc
+@@ -59,7 +59,7 @@ bool CanShowTabSearchPositionSetting() {
+   }
+ // Mac and other platforms will always have the tab search position in the
+ // correct location, cros/linux/win git the user the option to change.
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   return base::FeatureList::IsEnabled(kTabSearchPositionSetting);
+ #else
+   return false;
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_tabs_tab__dialog__manager.cc b/chromium-wip/patches/patch-chrome_browser_ui_tabs_tab__dialog__manager.cc
new file mode 100644
index 0000000000..f2aca11eae
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_tabs_tab__dialog__manager.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/tabs/tab_dialog_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/tabs/tab_dialog_manager.cc
+@@ -85,7 +85,7 @@ bool SupportsGlobalScreenCoordinates() {
+ }
+ 
+ bool PlatformClipsChildrenToViewport() {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return true;
+ #else
+   return false;
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_tabs_tab__features.cc b/chromium-wip/patches/patch-chrome_browser_ui_tabs_tab__features.cc
new file mode 100644
index 0000000000..74213130b8
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_tabs_tab__features.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/tabs/tab_features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/tabs/tab_features.cc
+@@ -338,7 +338,7 @@ void TabFeatures::Init(TabInterface& tab
+   task_manager::WebContentsTags::CreateForTabContents(tab.GetContents());
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   inactive_window_mouse_event_controller_ =
+       std::make_unique<InactiveWindowMouseEventController>();
+ #endif
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_tabs_tab__strip__prefs.cc b/chromium-wip/patches/patch-chrome_browser_ui_tabs_tab__strip__prefs.cc
new file mode 100644
index 0000000000..14a7bb92f4
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_tabs_tab__strip__prefs.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/tabs/tab_strip_prefs.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/tabs/tab_strip_prefs.cc
+@@ -21,7 +21,7 @@ namespace tabs {
+ 
+ bool GetDefaultTabSearchRightAligned() {
+   // These platforms are all left aligned, the others should be right.
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   return false;
+ #else
+   return true;
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_task__manager_task__manager__columns.h b/chromium-wip/patches/patch-chrome_browser_ui_task__manager_task__manager__columns.h
new file mode 100644
index 0000000000..a3ed841acb
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_task__manager_task__manager__columns.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/task_manager/task_manager_columns.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/task_manager/task_manager_columns.h
+@@ -277,7 +277,7 @@ inline constexpr std::array kColumns = {
+                     .default_visibility = false},
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+     TableColumnData{.id = IDS_TASK_MANAGER_OPEN_FD_COUNT_COLUMN,
+                     .align = ui::TableColumn::RIGHT,
+                     .width = -1,
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_task__manager_task__manager__table__model.cc b/chromium-wip/patches/patch-chrome_browser_ui_task__manager_task__manager__table__model.cc
new file mode 100644
index 0000000000..c3b041fb6d
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_task__manager_task__manager__table__model.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/task_manager/task_manager_table_model.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/task_manager/task_manager_table_model.cc
+@@ -419,7 +419,7 @@ TaskManagerTableModel::~TaskManagerTable
+   // Note: system_total_time_ is used for both since there is no functional
+   // difference between browser & system (they are essentially the same tab).
+   // Instead, the data is routed to the platform appropriate bucket.
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   task_manager::RecordTabSwitchEvent(CategoryRecord::kBrowser,
+                                      system_total_time_);
+ #elif BUILDFLAG(IS_CHROMEOS)
+@@ -560,7 +560,7 @@ std::u16string TaskManagerTableModel::Ge
+                  ? stringifier_->backgrounded_string()
+                  : stringifier_->foregrounded_string();
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+     case IDS_TASK_MANAGER_OPEN_FD_COUNT_COLUMN: {
+       const int fd_count = observed_task_manager()->GetOpenFdCount(tasks_[row]);
+       return fd_count >= 0 ? base::FormatNumber(fd_count)
+@@ -723,7 +723,7 @@ int TaskManagerTableModel::CompareValues
+       return BooleanCompare(is_proc1_bg, is_proc2_bg);
+     }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+     case IDS_TASK_MANAGER_OPEN_FD_COUNT_COLUMN: {
+       const int proc1_fd_count =
+           observed_task_manager()->GetOpenFdCount(tasks_[row1]);
+@@ -1040,7 +1040,7 @@ void TaskManagerTableModel::UpdateRefres
+       type = REFRESH_TYPE_KEEPALIVE_COUNT;
+       break;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+     case IDS_TASK_MANAGER_OPEN_FD_COUNT_COLUMN:
+       type = REFRESH_TYPE_FD_COUNT;
+       break;
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_test_popup__browsertest.cc b/chromium-wip/patches/patch-chrome_browser_ui_test_popup__browsertest.cc
new file mode 100644
index 0000000000..b6d4184dcf
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_test_popup__browsertest.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/test/popup_browsertest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/test/popup_browsertest.cc
+@@ -76,7 +76,7 @@ IN_PROC_BROWSER_TEST_F(PopupTest, OpenLe
+   const display::Display display = GetDisplayNearestBrowser(popup);
+   gfx::Rect expected(popup->window()->GetBounds().size());
+   expected.AdjustToFit(display.work_area());
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // TODO(crbug.com/40815883) Desktop Linux window bounds are inaccurate.
+   expected.Outset(50);
+   EXPECT_TRUE(expected.Contains(popup->window()->GetBounds()))
+@@ -108,7 +108,7 @@ IN_PROC_BROWSER_TEST_F(PopupTest, OpenCl
+     // The popup should be constrained to the opener's available display space.
+     EXPECT_EQ(display, GetDisplayNearestBrowser(popup));
+     gfx::Rect work_area(display.work_area());
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // TODO(crbug.com/40815883) Desktop Linux bounds flakily extend outside the
+     // work area on trybots, when opening with excessive width and height, e.g.:
+     // width=${screen.availWidth+300},height=${screen.availHeight+300} yields:
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_test_test__browser__ui.cc b/chromium-wip/patches/patch-chrome_browser_ui_test_test__browser__ui.cc
new file mode 100644
index 0000000000..d7203668e3
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_test_test__browser__ui.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/test/test_browser_ui.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/test/test_browser_ui.cc
+@@ -19,7 +19,7 @@
+ #include "ui/views/widget/widget.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "content/public/common/content_switches.h"
+ #include "ui/base/test/skia_gold_matching_algorithm.h"
+ #include "ui/compositor/compositor.h"
+@@ -33,7 +33,7 @@
+ #endif
+ 
+ // TODO(crbug.com/40625383) support Mac for pixel tests.
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #define SUPPORTS_PIXEL_TEST
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_ui__features.cc b/chromium-wip/patches/patch-chrome_browser_ui_ui__features.cc
new file mode 100644
index 0000000000..d08244a07a
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_ui__features.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/ui_features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/ui_features.cc
+@@ -38,7 +38,7 @@ BASE_FEATURE(kCloseOmniboxPopupOnInactiv
+              "CloseOmniboxPopupOnInactiveAreaClick",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Enables the feature to remove the last confirmation dialog when relaunching
+ // to update Chrome.
+ BASE_FEATURE(kFewerUpdateConfirmations,
+@@ -320,7 +320,7 @@ BASE_FEATURE(kViewsJSAppModalDialog,
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kUsePortalAccentColor,
+              "UsePortalAccentColor",
+              base::FEATURE_ENABLED_BY_DEFAULT);
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_ui__features.h b/chromium-wip/patches/patch-chrome_browser_ui_ui__features.h
new file mode 100644
index 0000000000..1d93020578
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_ui__features.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/ui_features.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/ui_features.h
+@@ -28,7 +28,7 @@ BASE_DECLARE_FEATURE(kAllowEyeDropperWGC
+ 
+ BASE_DECLARE_FEATURE(kCloseOmniboxPopupOnInactiveAreaClick);
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_DECLARE_FEATURE(kFewerUpdateConfirmations);
+ #endif
+ 
+@@ -311,7 +311,7 @@ BASE_DECLARE_FEATURE(kViewsFirstRunDialo
+ BASE_DECLARE_FEATURE(kViewsJSAppModalDialog);
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ BASE_DECLARE_FEATURE(kUsePortalAccentColor);
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_accelerator__table.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_accelerator__table.cc
new file mode 100644
index 0000000000..2a4de8990f
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_accelerator__table.cc
@@ -0,0 +1,40 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/accelerator_table.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/accelerator_table.cc
+@@ -72,11 +72,11 @@ const AcceleratorMapping kAcceleratorMap
+     {ui::VKEY_S, ui::EF_PLATFORM_ACCELERATOR, IDC_SAVE_PAGE},
+     {ui::VKEY_9, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_LAST_TAB},
+     {ui::VKEY_NUMPAD9, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_LAST_TAB},
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     {ui::VKEY_9, ui::EF_ALT_DOWN, IDC_SELECT_LAST_TAB},
+     {ui::VKEY_NUMPAD9, ui::EF_ALT_DOWN, IDC_SELECT_LAST_TAB},
+ #endif  // BUILDFLAG(IS_LINUX)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+     {ui::VKEY_NEXT, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, IDC_MOVE_TAB_NEXT},
+     {ui::VKEY_PRIOR, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN,
+      IDC_MOVE_TAB_PREVIOUS},
+@@ -104,7 +104,7 @@ const AcceleratorMapping kAcceleratorMap
+     {ui::VKEY_NUMPAD7, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_TAB_6},
+     {ui::VKEY_8, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_TAB_7},
+     {ui::VKEY_NUMPAD8, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_TAB_7},
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     {ui::VKEY_1, ui::EF_ALT_DOWN, IDC_SELECT_TAB_0},
+     {ui::VKEY_NUMPAD1, ui::EF_ALT_DOWN, IDC_SELECT_TAB_0},
+     {ui::VKEY_2, ui::EF_ALT_DOWN, IDC_SELECT_TAB_1},
+@@ -156,7 +156,7 @@ const AcceleratorMapping kAcceleratorMap
+      IDC_SHOW_AVATAR_MENU},
+ 
+ // Platform-specific key maps.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     {ui::VKEY_BROWSER_BACK, ui::EF_NONE, IDC_BACK},
+     {ui::VKEY_BROWSER_FORWARD, ui::EF_NONE, IDC_FORWARD},
+     {ui::VKEY_BROWSER_HOME, ui::EF_NONE, IDC_HOME},
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc
new file mode 100644
index 0000000000..f095bef19a
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc
+@@ -19,7 +19,7 @@
+ #include "ui/menus/simple_menu_model.h"
+ #include "ui/views/widget/widget.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/shell_integration_linux.h"
+ #endif
+ 
+@@ -49,7 +49,7 @@ void ChromeNativeAppWindowViewsAura::OnB
+     const AppWindow::CreateParams& create_params,
+     views::Widget::InitParams* init_params,
+     views::Widget* widget) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   std::string app_name =
+       web_app::GenerateApplicationNameFromAppId(app_window()->extension_id());
+   // Set up a custom WM_CLASS for app windows. This allows task switchers in
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_chrome__browser__main__extra__parts__views.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_chrome__browser__main__extra__parts__views.cc
new file mode 100644
index 0000000000..e06c325dcb
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_chrome__browser__main__extra__parts__views.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc
+@@ -39,7 +39,7 @@
+ #include "ui/wm/core/wm_state.h"
+ #endif  // defined(USE_AURA)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+@@ -143,7 +143,7 @@ void ChromeBrowserMainExtraPartsViews::P
+         return controller;
+       }));
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // On the Linux desktop, we want to prevent the user from logging in as root,
+   // so that we don't destroy the profile. Now that we have some minimal ui
+   // initialized, check to see if we're running as root and bail if we are.
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_chrome__views__delegate.h b/chromium-wip/patches/patch-chrome_browser_ui_views_chrome__views__delegate.h
new file mode 100644
index 0000000000..d107fa38d3
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_chrome__views__delegate.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/chrome_views_delegate.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/chrome_views_delegate.h
+@@ -52,7 +52,7 @@ class ChromeViewsDelegate : public views
+                              base::OnceClosure callback) override;
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   bool WindowManagerProvidesTitleBar(bool maximized) override;
+   gfx::ImageSkia* GetDefaultWindowIcon() const override;
+ #endif
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_chrome__views__delegate__linux.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_chrome__views__delegate__linux.cc
new file mode 100644
index 0000000000..3c5895f696
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_chrome__views__delegate__linux.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/chrome_views_delegate_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/chrome_views_delegate_linux.cc
+@@ -26,7 +26,7 @@ bool IsDesktopEnvironmentUnity() {
+   return desktop_env == base::nix::DESKTOP_ENVIRONMENT_UNITY;
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ int GetWindowIconResourceId() {
+ #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+   switch (chrome::GetChannel()) {
+@@ -80,7 +80,7 @@ views::NativeWidget* ChromeViewsDelegate
+                               delegate);
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ gfx::ImageSkia* ChromeViewsDelegate::GetDefaultWindowIcon() const {
+   ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
+   return rb.GetImageSkiaNamed(GetWindowIconResourceId());
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_compose_compose__dialog__view.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_compose_compose__dialog__view.cc
new file mode 100644
index 0000000000..393dbb8c76
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_compose_compose__dialog__view.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/compose/compose_dialog_view.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/compose/compose_dialog_view.cc
+@@ -160,7 +160,7 @@ void ComposeDialogView::OnBeforeBubbleWi
+     views::Widget::InitParams* params,
+     views::Widget* widget) const {
+   WebUIBubbleDialogView::OnBeforeBubbleWidgetInit(params, widget);
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // In linux, windows may be clipped to their anchors' bounds,
+   // resulting in visual errors, unless they use accelerated rendering. See
+   // crbug.com/1445770 for details.
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__frame.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__frame.cc
new file mode 100644
index 0000000000..b4bc41d1b7
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__frame.cc
@@ -0,0 +1,71 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/frame/browser_frame.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/frame/browser_frame.cc
+@@ -53,7 +53,7 @@
+ #include "ui/aura/window.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/display/screen.h"
+ #include "ui/linux/linux_ui.h"
+ #endif
+@@ -68,7 +68,7 @@ namespace {
+ constexpr double kTitlePaddingWidthFraction = 0.1;
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // These values are used for Linux/GTK.
+ constexpr int kIconTitleSpacing = 4;
+ constexpr int kCaptionSpacing = 5;
+@@ -98,7 +98,7 @@ class ThemeChangedObserver : public view
+ };
+ 
+ bool IsUsingLinuxSystemTheme(Profile* profile) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme();
+ #else
+   return false;
+@@ -196,7 +196,7 @@ void BrowserFrame::InitBrowserFrame() {
+ 
+   Init(std::move(params));
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   SelectNativeTheme();
+ #else
+   SetNativeTheme(ui::NativeTheme::GetInstanceForNativeUi());
+@@ -434,7 +434,7 @@ void BrowserFrame::OnNativeWidgetWorkspa
+   chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace());
+   chrome::SaveWindowVisibleOnAllWorkspaces(browser_view_->browser(),
+                                            IsVisibleOnAllWorkspaces());
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // If the window was sent to a different workspace, prioritize it if
+   // it was sent to the current workspace and deprioritize it
+   // otherwise.  This is done by MoveBrowsersInWorkspaceToFront()
+@@ -633,7 +633,7 @@ void BrowserFrame::OnMenuClosed() {
+ }
+ 
+ void BrowserFrame::SelectNativeTheme() {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Use the regular NativeTheme instance if running incognito mode, regardless
+   // of system theme (gtk, qt etc).
+   ui::NativeTheme* native_theme = ui::NativeTheme::GetInstanceForNativeUi();
+@@ -674,7 +674,7 @@ void BrowserFrame::OnTouchUiChanged() {
+ bool BrowserFrame::RegenerateFrameOnThemeChange(
+     BrowserThemeChangeType theme_change_type) {
+   bool need_regenerate = false;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // System and user theme changes can both change frame buttons, so the frame
+   // always needs to be regenerated on Linux.
+   need_regenerate = true;
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__frame.h b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__frame.h
new file mode 100644
index 0000000000..812b4f3d71
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__frame.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/frame/browser_frame.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/frame/browser_frame.h
+@@ -66,7 +66,7 @@ class BrowserFrame : public views::Widge
+ 
+   ~BrowserFrame() override;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Returns whether the frame is in a tiled state.
+   bool tiled() const { return tiled_; }
+   void set_tiled(bool tiled) { tiled_ = tiled; }
+@@ -227,7 +227,7 @@ class BrowserFrame : public views::Widge
+   // contents for smoother dragging.
+   TabDragKind tab_drag_kind_ = TabDragKind::kNone;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   bool tiled_ = false;
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__frame__view__layout__linux.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__frame__view__layout__linux.cc
new file mode 100644
index 0000000000..7988727a2b
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__frame__view__layout__linux.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/frame/browser_frame_view_layout_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/frame/browser_frame_view_layout_linux.cc
+@@ -55,7 +55,7 @@ gfx::Insets BrowserFrameViewLayoutLinux:
+         OpaqueBrowserFrameViewLayout::RestoredFrameBorderInsets());
+   }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   const bool tiled = delegate_->IsTiled();
+ #else
+   const bool tiled = false;
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__frame__view__layout__linux__native.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__frame__view__layout__linux__native.cc
new file mode 100644
index 0000000000..5b78a2e313
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__frame__view__layout__linux__native.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/frame/browser_frame_view_layout_linux_native.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/frame/browser_frame_view_layout_linux_native.cc
+@@ -18,7 +18,7 @@ BrowserFrameViewLayoutLinuxNative::~Brow
+ 
+ ui::WindowFrameProvider* BrowserFrameViewLayoutLinuxNative::GetFrameProvider()
+     const {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   const bool tiled = delegate_->IsTiled();
+   const bool maximized = delegate_->IsMaximized();
+ #else
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__frame__view__linux.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__frame__view__linux.cc
new file mode 100644
index 0000000000..463daa41bd
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__frame__view__linux.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/frame/browser_frame_view_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/frame/browser_frame_view_linux.cc
+@@ -70,7 +70,7 @@ gfx::ShadowValues BrowserFrameViewLinux:
+ 
+ void BrowserFrameViewLinux::PaintRestoredFrameBorder(
+     gfx::Canvas* canvas) const {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   const bool tiled = frame()->tiled();
+ #else
+   const bool tiled = false;
+@@ -125,7 +125,7 @@ int BrowserFrameViewLinux::NonClientHitT
+ }
+ 
+ float BrowserFrameViewLinux::GetRestoredCornerRadiusDip() const {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   const bool tiled = frame()->tiled();
+ #else
+   const bool tiled = false;
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__non__client__frame__view__factory__views.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__non__client__frame__view__factory__views.cc
new file mode 100644
index 0000000000..70e8373882
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__non__client__frame__view__factory__views.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/frame/browser_non_client_frame_view_factory_views.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/frame/browser_non_client_frame_view_factory_views.cc
+@@ -15,7 +15,7 @@
+ #include "chrome/browser/ui/views/frame/browser_frame_view_win.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/views/frame/browser_frame_view_layout_linux.h"
+ #include "chrome/browser/ui/views/frame/browser_frame_view_layout_linux_native.h"
+ #include "chrome/browser/ui/views/frame/browser_frame_view_linux_native.h"
+@@ -33,7 +33,7 @@ namespace {
+ std::unique_ptr<OpaqueBrowserFrameView> CreateOpaqueBrowserFrameView(
+     BrowserFrame* frame,
+     BrowserView* browser_view) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   auto* profile = browser_view->browser()->profile();
+   auto* linux_ui_theme = ui::LinuxUiTheme::GetForProfile(profile);
+   auto* theme_service_factory = ThemeServiceFactory::GetForProfile(profile);
+@@ -83,7 +83,7 @@ std::unique_ptr<BrowserNonClientFrameVie
+     BrowserFrame* frame,
+     BrowserView* browser_view) {
+   if (browser_view->browser()->is_type_picture_in_picture()) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     return std::make_unique<PictureInPictureBrowserFrameViewLinux>(
+         frame, browser_view);
+ #else
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__view.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__view.cc
new file mode 100644
index 0000000000..2338e7e254
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_browser__view.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/frame/browser_view.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/frame/browser_view.cc
+@@ -2608,7 +2608,7 @@ void BrowserView::ToolbarSizeChanged(boo
+ }
+ 
+ void BrowserView::TabDraggingStatusChanged(bool is_dragging) {
+-#if !BUILDFLAG(IS_LINUX)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)
+   GetContentsWebView()->SetFastResize(is_dragging);
+   if (multi_contents_view_) {
+     multi_contents_view_->GetInactiveContentsView()->SetFastResize(is_dragging);
+@@ -6027,7 +6027,7 @@ void BrowserView::MaybeShowProfileSwitch
+ }
+ 
+ void BrowserView::MaybeShowSupervisedUserProfileSignInIPH() {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (!ShouldShowAvatarToolbarIPH()) {
+     return;
+   }
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc
new file mode 100644
index 0000000000..1ad0831a48
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/frame/opaque_browser_frame_view.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+@@ -54,7 +54,7 @@
+ #include "ui/views/window/vector_icons/vector_icons.h"
+ #include "ui/views/window/window_shape.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "ui/views/controls/menu/menu_runner.h"
+ #endif
+ 
+@@ -566,7 +566,7 @@ bool OpaqueBrowserFrameView::EverHasVisi
+ 
+ OpaqueBrowserFrameView::FrameButtonStyle
+ OpaqueBrowserFrameView::GetFrameButtonStyle() const {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return FrameButtonStyle::kMdButton;
+ #else
+   return FrameButtonStyle::kImageButton;
+@@ -585,7 +585,7 @@ bool OpaqueBrowserFrameView::ShouldDrawR
+   return false;
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ bool OpaqueBrowserFrameView::IsTiled() const {
+   return frame()->tiled();
+ }
+@@ -788,7 +788,7 @@ gfx::Rect OpaqueBrowserFrameView::GetIco
+ }
+ 
+ void OpaqueBrowserFrameView::WindowIconPressed() {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Chrome OS doesn't show the window icon, and Windows handles this on its own
+   // due to the hit test being HTSYSMENU.
+   menu_runner_ = std::make_unique<views::MenuRunner>(
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.h b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.h
new file mode 100644
index 0000000000..75e359b7f4
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/frame/opaque_browser_frame_view.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/frame/opaque_browser_frame_view.h
+@@ -108,7 +108,7 @@ class OpaqueBrowserFrameView : public Br
+   FrameButtonStyle GetFrameButtonStyle() const override;
+   void UpdateWindowControlsOverlay(const gfx::Rect& bounding_rect) override;
+   bool ShouldDrawRestoredFrameShadow() const override;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   bool IsTiled() const override;
+ #endif
+   int WebAppButtonHeight() const override;
+@@ -225,7 +225,7 @@ class OpaqueBrowserFrameView : public Br
+   // Background painter for the window frame.
+   std::unique_ptr<views::FrameBackground> frame_background_;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<views::MenuRunner> menu_runner_;
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout__delegate.h b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout__delegate.h
new file mode 100644
index 0000000000..7982d45538
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout__delegate.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_delegate.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_delegate.h
+@@ -9,7 +9,7 @@
+ 
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/base/ui_base_types.h"
+ #endif
+ 
+@@ -92,7 +92,7 @@ class OpaqueBrowserFrameViewLayoutDelega
+   // Returns true if a client-side shadow should be drawn for restored windows.
+   virtual bool ShouldDrawRestoredFrameShadow() const = 0;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Returns whether the window is in a tiled state.
+   virtual bool IsTiled() const = 0;
+ #endif
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc
new file mode 100644
index 0000000000..81fb73fbc6
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc
+@@ -69,7 +69,7 @@
+ 
+ // Windows, Mac and CrOS do not clip child widgets to their parents, so we
+ // don't have to worry about resizing quite as much.
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #define PLATFORM_CLIPS_CHILD_WINDOWS
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc
new file mode 100644
index 0000000000..804127163c
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/frame/system_menu_model_builder.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/frame/system_menu_model_builder.cc
+@@ -75,7 +75,7 @@ void SystemMenuModelBuilder::BuildMenu(u
+ 
+ void SystemMenuModelBuilder::BuildSystemMenuForBrowserWindow(
+     ui::SimpleMenuModel* model) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   model->AddItemWithStringId(IDC_MINIMIZE_WINDOW, IDS_MINIMIZE_WINDOW_MENU);
+   model->AddItemWithStringId(IDC_MAXIMIZE_WINDOW, IDS_MAXIMIZE_WINDOW_MENU);
+   model->AddItemWithStringId(IDC_RESTORE_WINDOW, IDS_RESTORE_WINDOW_MENU);
+@@ -101,7 +101,7 @@ void SystemMenuModelBuilder::BuildSystem
+     model->AddSeparator(ui::NORMAL_SEPARATOR);
+     model->AddItemWithStringId(IDC_TASK_MANAGER_CONTEXT_MENU, IDS_TASK_MANAGER);
+   }
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   model->AddSeparator(ui::NORMAL_SEPARATOR);
+   bool supports_server_side_decorations = true;
+ #if BUILDFLAG(IS_OZONE) && !BUILDFLAG(IS_CHROMEOS)
+@@ -175,7 +175,7 @@ void SystemMenuModelBuilder::BuildSystem
+     model->AddSeparator(ui::NORMAL_SEPARATOR);
+     model->AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER);
+   }
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   model->AddSeparator(ui::NORMAL_SEPARATOR);
+   model->AddItemWithStringId(IDC_CLOSE_WINDOW, IDS_CLOSE);
+ #endif
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc
new file mode 100644
index 0000000000..a4dae16fbc
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/frame/system_menu_model_delegate.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/frame/system_menu_model_delegate.cc
+@@ -20,7 +20,7 @@
+ #include "chromeos/ui/frame/desks/move_to_desks_menu_model.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/common/pref_names.h"
+ #include "components/prefs/pref_service.h"
+ #endif
+@@ -39,7 +39,7 @@ SystemMenuModelDelegate::SystemMenuModel
+ SystemMenuModelDelegate::~SystemMenuModelDelegate() = default;
+ 
+ bool SystemMenuModelDelegate::IsCommandIdChecked(int command_id) const {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (command_id == IDC_USE_SYSTEM_TITLE_BAR) {
+     PrefService* prefs = browser_->profile()->GetPrefs();
+     return !prefs->GetBoolean(prefs::kUseCustomChromeFrame);
+@@ -65,7 +65,7 @@ bool SystemMenuModelDelegate::IsCommandI
+ }
+ 
+ bool SystemMenuModelDelegate::IsCommandIdVisible(int command_id) const {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   bool is_maximized = browser_->window()->IsMaximized();
+   switch (command_id) {
+     case IDC_MAXIMIZE_WINDOW:
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_frame_tab__strip__region__view.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_tab__strip__region__view.cc
new file mode 100644
index 0000000000..b414862fa5
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_frame_tab__strip__region__view.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/frame/tab_strip_region_view.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/frame/tab_strip_region_view.cc
+@@ -222,7 +222,7 @@ TabStripRegionView::TabStripRegionView(s
+       new_tab_button_->GetViewAccessibility().SetName(
+           l10n_util::GetStringUTF16(IDS_ACCNAME_NEWTAB));
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       // The New Tab Button can be middle-clicked on Linux.
+       new_tab_button_->SetTriggerableEventFlags(
+           new_tab_button_->GetTriggerableEventFlags() |
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_hung__renderer__view.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_hung__renderer__view.cc
new file mode 100644
index 0000000000..f08970ac20
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_hung__renderer__view.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/hung_renderer_view.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/hung_renderer_view.cc
+@@ -452,7 +452,7 @@ void HungRendererDialogView::ForceCrashH
+   content::RenderProcessHost* rph =
+       hung_pages_table_model_->GetRenderWidgetHost()->GetProcess();
+   if (rph) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     // A generic |CrashDumpHungChildProcess()| is not implemented for Linux.
+     // Instead we send an explicit IPC to crash on the renderer's IO thread.
+     rph->ForceCrash();
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_new__tab__footer_footer__controller.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_new__tab__footer_footer__controller.cc
new file mode 100644
index 0000000000..b4ce2b26cc
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_new__tab__footer_footer__controller.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/new_tab_footer/footer_controller.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/new_tab_footer/footer_controller.cc
+@@ -37,7 +37,7 @@ NewTabFooterController::NewTabFooterCont
+       base::BindRepeating(&NewTabFooterController::UpdateFooterVisibility,
+                           weak_factory_.GetWeakPtr(),
+                           /*log_on_load_metric=*/false));
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   local_state_pref_change_registrar_.Init(g_browser_process->local_state());
+   local_state_pref_change_registrar_.Add(
+       prefs::kNTPFooterManagementNoticeEnabled,
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_omnibox_omnibox__view__views.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_omnibox_omnibox__view__views.cc
new file mode 100644
index 0000000000..eff0703c46
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_omnibox_omnibox__view__views.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/omnibox/omnibox_view_views.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+@@ -2191,7 +2191,7 @@ void OmniboxViewViews::MaybeAddSendTabTo
+ }
+ 
+ void OmniboxViewViews::OnPopupOpened() {
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // It's not great for promos to overlap the omnibox if the user opens the
+   // drop-down after showing the promo. This especially causes issues on Mac and
+   // Linux due to z-order/rendering issues, see crbug.com/1225046 and
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_passwords_password__bubble__view__base.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_passwords_password__bubble__view__base.cc
new file mode 100644
index 0000000000..f3d61740c3
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_passwords_password__bubble__view__base.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/passwords/password_bubble_view_base.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/passwords/password_bubble_view_base.cc
+@@ -42,7 +42,7 @@
+ #include "ui/base/metadata/metadata_impl_macros.h"
+ #include "ui/views/controls/button/button.h"
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/views/passwords/password_relaunch_chrome_view.h"
+ #endif
+ 
+@@ -163,7 +163,7 @@ PasswordBubbleViewBase* PasswordBubbleVi
+   } else if (model_state ==
+              password_manager::ui::NOTIFY_RECEIVED_SHARED_CREDENTIALS) {
+     view = new SharedPasswordsNotificationView(web_contents, anchor_view);
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   } else if (model_state == password_manager::ui::KEYCHAIN_ERROR_STATE) {
+     view = new RelaunchChromeView(
+         web_contents, anchor_view,
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_profiles_avatar__toolbar__button.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_profiles_avatar__toolbar__button.cc
new file mode 100644
index 0000000000..3f4193bdeb
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_profiles_avatar__toolbar__button.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/profiles/avatar_toolbar_button.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/profiles/avatar_toolbar_button.cc
+@@ -331,7 +331,7 @@ void AvatarToolbarButton::MaybeShowProfi
+   }
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void AvatarToolbarButton::MaybeShowSupervisedUserSignInIPH() {
+   if (!base::FeatureList::IsEnabled(
+           feature_engagement::kIPHSupervisedUserProfileSigninFeature)) {
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_profiles_avatar__toolbar__button.h b/chromium-wip/patches/patch-chrome_browser_ui_views_profiles_avatar__toolbar__button.h
new file mode 100644
index 0000000000..bbe0105866
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_profiles_avatar__toolbar__button.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/profiles/avatar_toolbar_button.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/profiles/avatar_toolbar_button.h
+@@ -91,7 +91,7 @@ class AvatarToolbarButton : public Toolb
+   // Attempts showing the In-Produce-Help for profile Switching.
+   void MaybeShowProfileSwitchIPH();
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Attempts showing the In-Produce-Help when a supervised user signs-in in a
+   // profile.
+   void MaybeShowSupervisedUserSignInIPH();
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_profiles_profile__menu__coordinator.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_profiles_profile__menu__coordinator.cc
new file mode 100644
index 0000000000..dd287bc2bb
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_profiles_profile__menu__coordinator.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/profiles/profile_menu_coordinator.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
+@@ -47,7 +47,7 @@ void ProfileMenuCoordinator::Show(
+   user_education_->NotifyFeaturePromoFeatureUsed(
+       feature_engagement::kIPHProfileSwitchFeature,
+       FeaturePromoFeatureUsedAction::kClosePromoIfPresent);
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   user_education_->NotifyFeaturePromoFeatureUsed(
+       feature_engagement::kIPHSupervisedUserProfileSigninFeature,
+       FeaturePromoFeatureUsedAction::kClosePromoIfPresent);
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_profiles_profile__menu__view.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_profiles_profile__menu__view.cc
new file mode 100644
index 0000000000..f098d433ca
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_profiles_profile__menu__view.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/profiles/profile_menu_view.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/profiles/profile_menu_view.cc
+@@ -99,7 +99,7 @@
+ #include "ui/views/accessibility/view_accessibility.h"
+ #include "ui/views/widget/widget.h"
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h"
+ #endif
+ 
+@@ -399,7 +399,7 @@ void ProfileMenuView::OnSigninButtonClic
+   }
+   GetWidget()->CloseWithReason(views::Widget::ClosedReason::kUnspecified);
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // TODO(crbug.com/404807488): Update the button and the dialog strings.
+   if (base::FeatureList::IsEnabled(switches::kEnableHistorySyncOptin)) {
+     browser()
+@@ -538,7 +538,7 @@ void ProfileMenuView::SetMenuTitleForAcc
+     case signin_util::SignedInState::kSignedOut:
+     case signin_util::SignedInState::kWebOnlySignedIn: {
+       std::string profile_user_display_name, profile_user_email;
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       profile_user_display_name = profile().GetPrefs()->GetString(
+           enterprise_signin::prefs::kProfileUserDisplayName);
+       profile_user_email = profile().GetPrefs()->GetString(
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_profiles_profile__picker__view.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_profiles_profile__picker__view.cc
new file mode 100644
index 0000000000..c6e62d3d32
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_profiles_profile__picker__view.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/profiles/profile_picker_view.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/profiles/profile_picker_view.cc
+@@ -84,7 +84,7 @@
+ #include "chrome/browser/global_keyboard_shortcuts_mac.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/shell_integration_linux.h"
+ #endif
+ 
+@@ -114,7 +114,7 @@ class ProfilePickerWidget : public views
+     views::Widget::InitParams params(
+         views::Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET);
+     params.delegate = profile_picker_view_;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     params.wm_class_name = shell_integration_linux::GetProgramClassName();
+     params.wm_class_class = shell_integration_linux::GetProgramClassClass();
+     params.wayland_app_id = params.wm_class_class;
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc
new file mode 100644
index 0000000000..c41ca863a0
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc
@@ -0,0 +1,79 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc
+@@ -63,14 +63,14 @@
+ #include "chrome/browser/ui/webui/signin/signout_confirmation/signout_confirmation_ui.h"
+ #endif  // BUILDFLAG(ENABLE_DICE_SUPPORT)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/webui/signin/history_sync_optin/history_sync_optin_ui.h"
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
+ 
+ namespace {
+ 
+ const int kModalDialogWidth = 448;
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ const int kManagedUserNoticeConfirmationDialogWidth = 512;
+ const int kManagedUserNoticeConfirmationDialogHeight = 576;
+ const int kManagedUserNoticeConfirmationUpdatedDialogWidth = 780;
+@@ -139,7 +139,7 @@ SigninViewControllerDelegateViews::Creat
+       kSyncConfirmationDialogWidth, InitializeSigninWebDialogUI(true));
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ std::unique_ptr<views::WebView>
+ SigninViewControllerDelegateViews::CreateHistorySyncOptInWebView(
+     Browser* browser) {
+@@ -225,7 +225,7 @@ SigninViewControllerDelegateViews::Creat
+ }
+ #endif  // BUILDFLAG(ENABLE_DICE_SUPPORT)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // static
+ std::unique_ptr<views::WebView>
+ SigninViewControllerDelegateViews::CreateManagedUserNoticeConfirmationWebView(
+@@ -410,7 +410,7 @@ SigninViewControllerDelegateViews::Signi
+ 
+   SetButtons(static_cast<int>(ui::mojom::DialogButton::kNone));
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // On the local profile creation dialog, cancelling the dialog (for instance
+   // through the VKEY_ESCAPE accelerator) should delete the profile.
+   if (delete_profile_on_cancel) {
+@@ -502,7 +502,7 @@ void SigninViewControllerDelegateViews::
+   content_view_->RequestFocus();
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void SigninViewControllerDelegateViews::DeleteProfileOnCancel() {
+   ProfileAttributesEntry* entry =
+       g_browser_process->profile_manager()
+@@ -542,7 +542,7 @@ SigninViewControllerDelegate::CreateSync
+       /*animate_on_resize=*/true);
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // static
+ SigninViewControllerDelegate*
+ SigninViewControllerDelegate::CreateSyncHistoryOptInDelegate(Browser* browser) {
+@@ -596,7 +596,7 @@ SigninViewControllerDelegate::CreateSign
+ }
+ #endif  // BUILDFLAG(ENABLE_DICE_SUPPORT)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // static
+ SigninViewControllerDelegate*
+ SigninViewControllerDelegate::CreateManagedUserNoticeDelegate(
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.h b/chromium-wip/patches/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.h
new file mode 100644
index 0000000000..fd7c424a52
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.h
+@@ -57,7 +57,7 @@ class SigninViewControllerDelegateViews
+       SyncConfirmationStyle style,
+       bool is_sync_promo);
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   static std::unique_ptr<views::WebView> CreateHistorySyncOptInWebView(
+       Browser* browser);
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+@@ -78,7 +78,7 @@ class SigninViewControllerDelegateViews
+       SignoutConfirmationCallback callback);
+ #endif  // BUILDFLAG(ENABLE_DICE_SUPPORT)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   static std::unique_ptr<views::WebView>
+   CreateManagedUserNoticeConfirmationWebView(
+       Browser* browser,
+@@ -149,7 +149,7 @@ class SigninViewControllerDelegateViews
+       std::optional<int> dialog_width,
+       InitializeSigninWebDialogUI initialize_signin_web_dialog_ui);
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Deletes the ephemeral profile when cancelling the local profile creation
+   // dialog.
+   void DeleteProfileOnCancel();
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_tabs_dragging_tab__drag__controller.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_tabs_dragging_tab__drag__controller.cc
new file mode 100644
index 0000000000..e3f75a7086
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_tabs_dragging_tab__drag__controller.cc
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/tabs/dragging/tab_drag_controller.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/tabs/dragging/tab_drag_controller.cc
+@@ -193,7 +193,7 @@ bool IsWindowDragUsingSystemDragDropAllo
+ 
+ void UpdateSystemDnDDragImage(TabDragContext* attached_context,
+                               const gfx::ImageSkia& image) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   VLOG(1) << __func__ << " image size=" << image.size().ToString();
+   aura::Window* root_window =
+       attached_context->GetWidget()->GetNativeWindow()->GetRootWindow();
+@@ -384,7 +384,7 @@ TabDragController::Liveness TabDragContr
+   //     synchronous on desktop Linux, so use that.
+   // - ChromeOS Ash
+   //     Releasing capture on Ash cancels gestures so avoid it.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   ref->can_release_capture_ = false;
+ #endif
+   ref->start_point_in_screen_ =
+@@ -892,7 +892,7 @@ TabDragController::Liveness TabDragContr
+       CHECK_EQ(SetCapture(target_context), Liveness::ALIVE);
+     }
+ 
+-#if !BUILDFLAG(IS_LINUX)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)
+     // EndMoveLoop is going to snap the window back to its original location.
+     // Hide it so users don't see this. Hiding a window in Linux aura causes
+     // it to lose capture so skip it.
+@@ -2024,7 +2024,7 @@ void TabDragController::CompleteDrag() {
+     }
+ 
+     // If source window was maximized - maximize the new window as well.
+-#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_MAC)
++#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD)
+     // Keeping maximized state breaks snap to Grid on Windows when dragging
+     // tabs from maximized windows. TODO:(crbug.com/727051) Explore doing this
+     // for other desktop OS's. kMaximizedStateRetainedOnTabDrag in
+@@ -2441,7 +2441,7 @@ TabDragController::Liveness TabDragContr
+     }
+   }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Exclude windows which are pending deletion via Browser::TabStripEmpty().
+   // These windows can be returned in the Linux Aura port because the browser
+   // window which was used for dragging is not hidden once all of its tabs are
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_tabs_tab.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_tabs_tab.cc
new file mode 100644
index 0000000000..9815499bf2
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_tabs_tab.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/tabs/tab.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/tabs/tab.cc
+@@ -657,7 +657,7 @@ void Tab::MaybeUpdateHoverStatus(const u
+     return;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Move the hit test area for hovering up so that it is not overlapped by tab
+   // hover cards when they are shown.
+   // TODO(crbug.com/41467565): Once Linux/CrOS widget transparency is solved,
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_tabs_tab__hover__card__bubble__view.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_tabs_tab__hover__card__bubble__view.cc
new file mode 100644
index 0000000000..1e9c875e9b
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_tabs_tab__hover__card__bubble__view.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc
+@@ -380,7 +380,7 @@ TabHoverCardBubbleView::TabHoverCardBubb
+   // not become active. Setting this to false creates the need to explicitly
+   // hide the hovercard on press, touch, and keyboard events.
+   SetCanActivate(false);
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   set_accept_events(false);
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_tabs_tab__strip__combo__button.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_tabs_tab__strip__combo__button.cc
new file mode 100644
index 0000000000..cb4ea4df12
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_tabs_tab__strip__combo__button.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/tabs/tab_strip_combo_button.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/tabs/tab_strip_combo_button.cc
+@@ -94,7 +94,7 @@ TabStripComboButton::TabStripComboButton
+       base::BindRepeating(&TabStripComboButton::OnNewTabButtonStateChanged,
+                           base::Unretained(this))));
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // The New Tab Button can be middle-clicked on Linux.
+   new_tab_button->SetTriggerableEventFlags(
+       new_tab_button->GetTriggerableEventFlags() | ui::EF_MIDDLE_MOUSE_BUTTON);
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_tabs_tab__style__views.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_tabs_tab__style__views.cc
new file mode 100644
index 0000000000..14d148b353
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_tabs_tab__style__views.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/tabs/tab_style_views.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/tabs/tab_style_views.cc
+@@ -574,7 +574,7 @@ float TabStyleViewsImpl::GetCurrentActiv
+   if (!IsHoverAnimationActive()) {
+     return base_opacity;
+   }
+-  return std::lerp(base_opacity, GetHoverOpacity(), GetHoverAnimationValue());
++  return std::lerp(base_opacity, GetHoverOpacity(), static_cast<float>(GetHoverAnimationValue()));
+ }
+ 
+ TabActive TabStyleViewsImpl::GetApparentActiveState() const {
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_task__manager__search__bar__view.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_task__manager__search__bar__view.cc
new file mode 100644
index 0000000000..1d32bebcd4
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_task__manager__search__bar__view.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/task_manager_search_bar_view.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/task_manager_search_bar_view.cc
+@@ -27,7 +27,7 @@ TaskManagerSearchBarView::TaskManagerSea
+     const gfx::Insets& margins,
+     Delegate& delegate)
+     : delegate_(delegate)
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       ,
+       textfield_placeholder_color_id_(kColorTaskManagerSearchBarPlaceholderText)
+ #endif
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_user__education_browser__user__education__service.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_user__education_browser__user__education__service.cc
new file mode 100644
index 0000000000..ee3b7b7371
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_user__education_browser__user__education__service.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/user_education/browser_user_education_service.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/user_education/browser_user_education_service.cc
+@@ -1054,7 +1054,7 @@ void MaybeRegisterChromeFeaturePromos(
+                 "Triggered when a shared tab becomes the active tab.")));
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   // kIPHSupervisedUserProfileSigninFeature
+   registry.RegisterFeature(std::move(
+       FeaturePromoSpecification::CreateForCustomAction(
+@@ -1312,7 +1312,7 @@ void MaybeRegisterChromeFeaturePromos(
+                        "Triggered to inform users of the availability of the "
+                        "new translate screen feature on the Lens Overlay.")));
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   // kIPHDesktopPWAsLinkCapturingLaunch:
+   registry.RegisterFeature(std::move(
+       FeaturePromoSpecification::CreateForCustomAction(
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc b/chromium-wip/patches/patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc
new file mode 100644
index 0000000000..17d27b0126
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc
@@ -0,0 +1,89 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc
+@@ -516,7 +516,7 @@ std::string GetFileExtension(FileExtensi
+ }
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ SiteConfig GetSiteConfigurationFromAppName(const std::string& app_name) {
+   SiteConfig config;
+   bool is_app_found = false;
+@@ -2078,7 +2078,7 @@ void WebAppIntegrationTestDriver::Delete
+   if (app_name.empty()) {
+     app_name = GetSiteConfiguration(site).app_name;
+   }
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   ASSERT_TRUE(override_registration_->test_override().IsShortcutCreated(
+       profile(), app_id, app_name));
+   ASSERT_TRUE(
+@@ -3396,7 +3396,7 @@ void WebAppIntegrationTestDriver::CheckR
+           app_state->id, app_state->name);
+   ASSERT_TRUE(icon_color.has_value());
+   ASSERT_THAT(site_config.icon_color, testing::Eq(icon_color.value()));
+-#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   ASSERT_TRUE(override_registration_->test_override().IsRunOnOsLoginEnabled(
+       profile(), app_state->id, app_state->name));
+ #endif
+@@ -3411,7 +3411,7 @@ void WebAppIntegrationTestDriver::CheckR
+       GetAppBySiteMode(after_state_change_action_state_.get(), profile(), site);
+   ASSERT_TRUE(app_state);
+   base::ScopedAllowBlockingForTesting allow_blocking;
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   ASSERT_FALSE(override_registration_->test_override().IsRunOnOsLoginEnabled(
+       profile(), app_state->id, app_state->name));
+ #endif
+@@ -3421,7 +3421,7 @@ void WebAppIntegrationTestDriver::CheckR
+ void WebAppIntegrationTestDriver::CheckSiteHandlesFile(
+     Site site,
+     FileExtension file_extension) {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (!BeforeStateCheckAction(__FUNCTION__)) {
+     return;
+   }
+@@ -3437,7 +3437,7 @@ void WebAppIntegrationTestDriver::CheckS
+ void WebAppIntegrationTestDriver::CheckSiteNotHandlesFile(
+     Site site,
+     FileExtension file_extension) {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (!BeforeStateCheckAction(__FUNCTION__)) {
+     return;
+   }
+@@ -4262,7 +4262,7 @@ base::FilePath WebAppIntegrationTestDriv
+     base::FilePath shortcut_dir,
+     const std::string& app_name,
+     const webapps::AppId& app_id) {
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   return override_registration_->test_override().GetShortcutPath(
+       profile(), shortcut_dir, app_id, app_name);
+ #else
+@@ -4462,7 +4462,7 @@ bool WebAppIntegrationTestDriver::IsShor
+     const webapps::AppId& id) {
+   base::ScopedAllowBlockingForTesting allow_blocking;
+   bool is_shortcut_and_icon_correct = false;
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   bool is_shortcut_correct =
+       override_registration_->test_override().IsShortcutCreated(profile, id,
+                                                                 name);
+@@ -4506,7 +4506,7 @@ bool WebAppIntegrationTestDriver::DoIcon
+     do_icon_colors_match =
+         (expected_icon_pixel_color == shortcut_pixel_color_apps_folder.value());
+   }
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   SkColor expected_icon_pixel_color =
+       GetSiteConfigurationFromAppName(name).icon_color;
+   std::optional<SkColor> actual_color_install_icon_size =
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_web__applications_web__app__dialogs.h b/chromium-wip/patches/patch-chrome_browser_ui_web__applications_web__app__dialogs.h
new file mode 100644
index 0000000000..c7668a563e
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_web__applications_web__app__dialogs.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/web_applications/web_app_dialogs.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/web_applications/web_app_dialogs.h
+@@ -21,7 +21,7 @@
+ #include "ui/gfx/native_widget_types.h"
+ 
+ static_assert(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
+-              BUILDFLAG(IS_CHROMEOS));
++              BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD));
+ 
+ class GURL;
+ class Profile;
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.cc b/chromium-wip/patches/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.cc
new file mode 100644
index 0000000000..b057549cbf
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/web_applications/web_app_ui_manager_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/web_applications/web_app_ui_manager_impl.cc
+@@ -566,7 +566,7 @@ void WebAppUiManagerImpl::MaybeShowIPHPr
+     Browser* browser,
+     Profile* profile,
+     const std::string& app_id) {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   WebAppProvider* provider = WebAppProvider::GetForWebApps(profile);
+   CHECK(provider);
+ 
+@@ -795,7 +795,7 @@ void WebAppUiManagerImpl::ClearWebAppSit
+   }
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ 
+ const base::Feature& GetPromoFeatureEngagementFromBrowser(
+     const Browser* browser) {
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.h b/chromium-wip/patches/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.h
new file mode 100644
index 0000000000..efcf961b46
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/web_applications/web_app_ui_manager_impl.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/web_applications/web_app_ui_manager_impl.h
+@@ -245,7 +245,7 @@ class WebAppUiManagerImpl : public Brows
+       UninstallCompleteCallback uninstall_complete_callback,
+       webapps::UninstallResultCode uninstall_code);
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   void ShowIPHPromoForAppsLaunchedViaLinkCapturing(const Browser* browser,
+                                                    const webapps::AppId& app_id,
+                                                    bool is_activated);
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_about_about__ui.cc b/chromium-wip/patches/patch-chrome_browser_ui_webui_about_about__ui.cc
new file mode 100644
index 0000000000..1e37566b19
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_about_about__ui.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/about/about_ui.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/about/about_ui.cc
+@@ -415,7 +415,7 @@ using about_ui::AppendHeader;
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ std::string AboutLinuxProxyConfig() {
+   std::string data;
+   AppendHeader(&data,
+@@ -445,7 +445,7 @@ TermsUIConfig::TermsUIConfig()
+     : AboutUIConfigBase(chrome::kChromeUITermsHost) {}
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ LinuxProxyConfigUI::LinuxProxyConfigUI()
+     : AboutUIConfigBase(chrome::kChromeUILinuxProxyConfigHost) {}
+ #endif
+@@ -495,7 +495,7 @@ void AboutUIHTMLSource::StartDataRequest
+       response =
+           ui::ResourceBundle::GetSharedInstance().LoadDataResourceString(idr);
+     }
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   } else if (source_name_ == chrome::kChromeUILinuxProxyConfigHost) {
+     response = AboutLinuxProxyConfig();
+ #endif
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_about_about__ui.h b/chromium-wip/patches/patch-chrome_browser_ui_webui_about_about__ui.h
new file mode 100644
index 0000000000..bf4bf62be2
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_about_about__ui.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/about/about_ui.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/about/about_ui.h
+@@ -43,7 +43,7 @@ class TermsUIConfig : public AboutUIConf
+ };
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // chrome://linux-proxy-config
+ class LinuxProxyConfigUI : public AboutUIConfigBase {
+  public:
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.cc b/chromium-wip/patches/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.cc
new file mode 100644
index 0000000000..31aa729abb
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/app_home/app_home_page_handler.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/app_home/app_home_page_handler.cc
+@@ -62,7 +62,7 @@
+ #include "ui/base/window_open_disposition_utils.h"
+ #include "url/gurl.h"
+ 
+-static_assert(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX));
++static_assert(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD));
+ 
+ using content::WebUI;
+ using extensions::Extension;
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.h b/chromium-wip/patches/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.h
new file mode 100644
index 0000000000..1dc17c90b1
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/app_home/app_home_page_handler.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/app_home/app_home_page_handler.h
+@@ -23,7 +23,7 @@
+ #include "mojo/public/cpp/bindings/receiver.h"
+ #include "mojo/public/cpp/bindings/remote.h"
+ 
+-static_assert(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX));
++static_assert(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD));
+ 
+ class Browser;
+ class ExtensionEnableFlow;
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_app__settings_web__app__settings__ui.h b/chromium-wip/patches/patch-chrome_browser_ui_webui_app__settings_web__app__settings__ui.h
new file mode 100644
index 0000000000..b841c810ce
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_app__settings_web__app__settings__ui.h
@@ -0,0 +1,24 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/app_settings/web_app_settings_ui.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/app_settings/web_app_settings_ui.h
+@@ -14,13 +14,13 @@
+ #include "ui/webui/mojo_web_ui_controller.h"
+ #include "ui/webui/resources/cr_components/app_management/app_management.mojom-forward.h"
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/common/webui_url_constants.h"
+ #include "content/public/browser/webui_config.h"
+ #include "content/public/common/url_constants.h"
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ class WebAppSettingsUI;
+ 
+ class WebAppSettingsUIConfig
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_certificate__manager_certificate__manager__handler.cc b/chromium-wip/patches/patch-chrome_browser_ui_webui_certificate__manager_certificate__manager__handler.cc
new file mode 100644
index 0000000000..26d33a9051
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_certificate__manager_certificate__manager__handler.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/certificate_manager/certificate_manager_handler.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/certificate_manager/certificate_manager_handler.cc
+@@ -219,7 +219,7 @@ CertificateManagerPageHandler::GetCertSo
+                 CERTIFICATE_TRUST_TYPE_DISTRUSTED,
+             profile_, &remote_client_);
+         break;
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       case certificate_manager::mojom::CertificateSource::
+           kProvisionedClientCert:
+         source_ptr = CreateProvisionedClientCertSource(profile_);
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.cc b/chromium-wip/patches/patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.cc
new file mode 100644
index 0000000000..8cdc2fd21f
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.cc
@@ -0,0 +1,71 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/certificate_manager/client_cert_sources.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/certificate_manager/client_cert_sources.cc
+@@ -55,7 +55,7 @@
+ #include "net/ssl/client_cert_store_mac.h"
+ #endif  // BUILDFLAG(IS_MAC)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/browser_process.h"
+ #include "chrome/browser/enterprise/client_certificates/certificate_provisioning_service_factory.h"
+ #include "chrome/browser/policy/chrome_browser_policy_connector.h"
+@@ -178,7 +178,7 @@ class ClientCertStoreFactoryMac : public
+ };
+ #endif
+ 
+-#if !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_LINUX)
++#if !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)
+ std::unique_ptr<ClientCertStoreLoader> CreatePlatformClientCertLoader(
+     Profile* profile) {
+ #if BUILDFLAG(IS_WIN)
+@@ -193,7 +193,7 @@ std::unique_ptr<ClientCertStoreLoader> C
+ }
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // ClientCertStore implementation that always returns an empty list. The
+ // CertificateProvisioningService implementation expects to wrap a platform
+ // cert store, but here we only want to get results from the provisioning
+@@ -369,7 +369,7 @@ class ClientCertSource : public Certific
+   std::optional<net::CertificateList> certs_;
+ };
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // ChromeOS currently can use either Kcer or NSS for listing client certs, and
+ // Linux uses NSS only. This interface provides an abstraction to hide that
+ // from WritableClientCertSource. Currently this class only handles reading
+@@ -1099,7 +1099,7 @@ CreatePlatformClientCertSource(
+     mojo::Remote<certificate_manager::mojom::CertificateManagerPage>*
+         remote_client,
+     Profile* profile) {
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return std::make_unique<WritableClientCertSource>(remote_client, profile);
+ #else
+   return std::make_unique<ClientCertSource>(
+@@ -1107,7 +1107,7 @@ CreatePlatformClientCertSource(
+ #endif
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ std::unique_ptr<CertificateManagerPageHandler::CertSource>
+ CreateProvisionedClientCertSource(Profile* profile) {
+   return std::make_unique<ClientCertSource>(
+@@ -1157,7 +1157,7 @@ bool ClientCertManagementAccessControls:
+ 
+   return client_cert_policy_ == ClientCertificateManagementPermission::kAll;
+ }
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ ClientCertManagementAccessControls::ClientCertManagementAccessControls(
+     Profile* profile) {}
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.h b/chromium-wip/patches/patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.h
new file mode 100644
index 0000000000..e4568b4f27
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/certificate_manager/client_cert_sources.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/certificate_manager/client_cert_sources.h
+@@ -19,7 +19,7 @@ CreatePlatformClientCertSource(
+         remote_client,
+     Profile* profile);
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ std::unique_ptr<CertificateManagerPageHandler::CertSource>
+ CreateProvisionedClientCertSource(Profile* profile);
+ #endif
+@@ -29,7 +29,7 @@ std::unique_ptr<CertificateManagerPageHa
+ CreateExtensionsClientCertSource(Profile* profile);
+ #endif
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ class ClientCertManagementAccessControls {
+  public:
+   enum KeyStorage {
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_chrome__web__ui__configs.cc b/chromium-wip/patches/patch-chrome_browser_ui_webui_chrome__web__ui__configs.cc
new file mode 100644
index 0000000000..68b4b38b1e
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_chrome__web__ui__configs.cc
@@ -0,0 +1,91 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/chrome_web_ui_configs.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/chrome_web_ui_configs.cc
+@@ -144,7 +144,7 @@
+ #include "chrome/browser/ui/webui/conflicts/conflicts_ui.h"
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/webui/app_settings/web_app_settings_ui.h"
+ #include "chrome/browser/ui/webui/browser_switch/browser_switch_ui.h"
+ #include "chrome/browser/ui/webui/signin/history_sync_optin/history_sync_optin_ui.h"
+@@ -152,19 +152,19 @@
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/webui/sandbox/sandbox_internals_ui.h"
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ||
+         // BUILDFLAG(IS_ANDROID)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/webui/connectors_internals/connectors_internals_ui.h"
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
+         // BUILDFLAG(IS_CHROMEOS)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/webui/discards/discards_ui.h"
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
+         // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID)
+@@ -192,7 +192,7 @@
+ #include "chrome/browser/ui/webui/signin/signin_error_ui.h"
+ #endif  //  !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/webui/on_device_translation_internals/on_device_translation_internals_ui.h"
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ 
+@@ -333,7 +333,7 @@ void RegisterChromeWebUIConfigs() {
+   map.AddWebUIConfig(std::make_unique<WebUIJsErrorUIConfig>());
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   map.AddWebUIConfig(std::make_unique<LinuxProxyConfigUI>());
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ||
+         // BUILDFLAG(IS_OPENBSD)
+@@ -363,7 +363,7 @@ void RegisterChromeWebUIConfigs() {
+   map.AddWebUIConfig(std::make_unique<ConflictsUIConfig>());
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   map.AddWebUIConfig(std::make_unique<BrowserSwitchUIConfig>());
+   map.AddWebUIConfig(std::make_unique<HistorySyncOptinUIConfig>());
+   map.AddWebUIConfig(std::make_unique<OnDeviceTranslationInternalsUIConfig>());
+@@ -372,20 +372,20 @@ void RegisterChromeWebUIConfigs() {
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   map.AddWebUIConfig(std::make_unique<SandboxInternalsUIConfig>());
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ||
+         // BUILDFLAG(IS_ANDROID)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   map.AddWebUIConfig(
+       std::make_unique<enterprise_connectors::ConnectorsInternalsUIConfig>());
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
+         // BUILDFLAG(IS_CHROMEOS)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID) || BUILDFLAG(IS_BSD)
+   map.AddWebUIConfig(std::make_unique<DiscardsUIConfig>());
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
+         // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID)
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc b/chromium-wip/patches/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc
new file mode 100644
index 0000000000..f55f1ec12a
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc
@@ -0,0 +1,46 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
+@@ -117,16 +117,16 @@
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/webui/commerce/product_specifications_ui.h"
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/webui/sandbox/sandbox_internals_ui.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/webui/whats_new/whats_new_ui.h"
+ #endif
+ 
+@@ -410,7 +410,7 @@ base::RefCountedMemory* ChromeWebUIContr
+     return NewTabPageUI::GetFaviconResourceBytes(scale_factor);
+   }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (page_url.host_piece() == chrome::kChromeUIWhatsNewHost) {
+     return WhatsNewUI::GetFaviconResourceBytes(scale_factor);
+   }
+@@ -449,7 +449,7 @@ base::RefCountedMemory* ChromeWebUIContr
+   }
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (page_url.host_piece() == commerce::kChromeUICompareHost) {
+     return commerce::ProductSpecificationsUI::GetFaviconResourceBytes(
+         scale_factor);
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_connectors__internals_connectors__internals__page__handler.cc b/chromium-wip/patches/patch-chrome_browser_ui_webui_connectors__internals_connectors__internals__page__handler.cc
new file mode 100644
index 0000000000..eb79c1e506
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_connectors__internals_connectors__internals__page__handler.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/connectors_internals/connectors_internals_page_handler.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/connectors_internals/connectors_internals_page_handler.cc
+@@ -82,7 +82,7 @@ connectors_internals::mojom::ClientIdent
+ }
+ #endif  // BUILDFLAG(ENTERPRISE_CLIENT_CERTIFICATES)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ std::string GetStringFromTimestamp(base::Time timestamp) {
+   return (timestamp == base::Time()) ? std::string()
+                                      : base::UnlocalizedTimeFormatWithPattern(
+@@ -191,7 +191,7 @@ void ConnectorsInternalsPageHandler::Get
+ 
+ void ConnectorsInternalsPageHandler::GetSignalsReportingState(
+     GetSignalsReportingStateCallback callback) {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   auto* profile_prefs = profile_->GetPrefs();
+ 
+   std::string last_upload_attempt_time_string =
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc b/chromium-wip/patches/patch-chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc
new file mode 100644
index 0000000000..7ec8a6ad8d
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/connectors_internals/device_trust_utils.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/connectors_internals/device_trust_utils.cc
+@@ -7,7 +7,7 @@
+ #include "build/build_config.h"
+ #include "components/enterprise/buildflags/buildflags.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ #include "base/base64url.h"
+ #include "chrome/browser/browser_process.h"
+ #include "chrome/browser/policy/chrome_browser_policy_connector.h"
+@@ -39,7 +39,7 @@ namespace enterprise_connectors::utils {
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ 
+ connectors_internals::mojom::KeyTrustLevel ParseTrustLevel(
+     BPKUR::KeyTrustLevel trust_level) {
+@@ -176,7 +176,7 @@ connectors_internals::mojom::Certificate
+ }  // namespace
+ 
+ connectors_internals::mojom::KeyInfoPtr GetKeyInfo() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   auto* key_manager = g_browser_process->browser_policy_connector()
+                           ->chrome_browser_cloud_management_controller()
+                           ->GetDeviceTrustKeyManager();
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_interstitials_interstitial__ui.cc b/chromium-wip/patches/patch-chrome_browser_ui_webui_interstitials_interstitial__ui.cc
new file mode 100644
index 0000000000..8089cbf759
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_interstitials_interstitial__ui.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/interstitials/interstitial_ui.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/interstitials/interstitial_ui.cc
+@@ -77,7 +77,7 @@
+ #include "components/security_interstitials/content/captive_portal_blocking_page.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/supervised_user/supervised_user_verification_controller_client.h"
+ #include "chrome/browser/supervised_user/supervised_user_verification_page_blocked_sites.h"
+ #include "chrome/browser/supervised_user/supervised_user_verification_page_youtube.h"
+@@ -413,7 +413,7 @@ std::unique_ptr<EnterpriseWarnPage> Crea
+ }
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ std::unique_ptr<SupervisedUserVerificationPageForYouTube>
+ CreateSupervisedUserVerificationPageForYouTube(
+     content::WebContents* web_contents,
+@@ -640,7 +640,7 @@ void InterstitialHTMLSource::StartDataRe
+     interstitial_delegate = CreateInsecureFormPage(web_contents);
+   } else if (path_without_query == "/https_only") {
+     interstitial_delegate = CreateHttpsOnlyModePage(web_contents);
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   } else if (path_without_query == "/supervised-user-verify") {
+     interstitial_delegate = CreateSupervisedUserVerificationPageForYouTube(
+         web_contents, /*is_main_frame=*/true);
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_management_management__ui.cc b/chromium-wip/patches/patch-chrome_browser_ui_webui_management_management__ui.cc
new file mode 100644
index 0000000000..7b5d201935
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_management_management__ui.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/management/management_ui.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/management/management_ui.cc
+@@ -181,11 +181,11 @@ void ManagementUI::GetLocalizedStrings(
+        IDS_MANAGEMENT_FILE_TRANSFER_VISIBLE_DATA},
+       {kManagementReportFileEvents, IDS_MANAGEMENT_REPORT_FILE_EVENTS},
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       {kManagementScreenCaptureEvent, IDS_MANAGEMENT_SCREEN_CAPTURE_EVENT},
+       {kManagementScreenCaptureData, IDS_MANAGEMENT_SCREEN_CAPTURE_DATA},
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       {kManagementDeviceSignalsDisclosure,
+        IDS_MANAGEMENT_DEVICE_SIGNALS_DISCLOSURE},
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_management_management__ui__constants.cc b/chromium-wip/patches/patch-chrome_browser_ui_webui_management_management__ui__constants.cc
new file mode 100644
index 0000000000..5f4b17f844
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_management_management__ui__constants.cc
@@ -0,0 +1,23 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/management/management_ui_constants.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/management/management_ui_constants.cc
+@@ -89,12 +89,12 @@ const char kProfileReportingExtension[] 
+ const char kProfileReportingPolicy[] = "profileReportingPolicy";
+ const char kProfileReportingLearnMore[] = "profileReportingLearnMore";
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ const char kManagementScreenCaptureEvent[] = "managementScreenCaptureEvent";
+ const char kManagementScreenCaptureData[] = "managementScreenCaptureData";
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ const char kManagementDeviceSignalsDisclosure[] =
+     "managementDeviceSignalsDisclosure";
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_management_management__ui__constants.h b/chromium-wip/patches/patch-chrome_browser_ui_webui_management_management__ui__constants.h
new file mode 100644
index 0000000000..a2a16d0c20
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_management_management__ui__constants.h
@@ -0,0 +1,25 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/management/management_ui_constants.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/management/management_ui_constants.h
+@@ -7,14 +7,14 @@
+ 
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Constants defining the IDs for the localized strings sent to the page as
+ // load time data.
+ extern const char kManagementScreenCaptureEvent[];
+ extern const char kManagementScreenCaptureData[];
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ extern const char kManagementDeviceSignalsDisclosure[];
+ #endif  // #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_management_management__ui__handler.cc b/chromium-wip/patches/patch-chrome_browser_ui_webui_management_management__ui__handler.cc
new file mode 100644
index 0000000000..3ea6192e12
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_management_management__ui__handler.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/management/management_ui_handler.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/management/management_ui_handler.cc
+@@ -58,7 +58,7 @@
+ #include "ui/base/l10n/l10n_util.h"
+ #include "ui/base/webui/web_ui_util.h"
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/enterprise/signals/user_permission_service_factory.h"
+ #include "components/device_signals/core/browser/user_permission_service.h"  // nogncheck
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+@@ -359,7 +359,7 @@ void ManagementUIHandler::AddReportingIn
+       report_sources->Append(std::move(data));
+     }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     auto device_signal_data = GetDeviceSignalGrantedMessage();
+     if (!device_signal_data.empty()) {
+       report_sources->Append(std::move(device_signal_data));
+@@ -381,7 +381,7 @@ void ManagementUIHandler::AddReportingIn
+       report_sources->Append(std::move(data));
+     }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     auto device_signal_data = GetDeviceSignalGrantedMessage();
+     if (!device_signal_data.empty()) {
+       report_sources->Append(std::move(device_signal_data));
+@@ -567,7 +567,7 @@ policy::PolicyService* ManagementUIHandl
+       ->policy_service();
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ device_signals::UserPermissionService*
+ ManagementUIHandler::GetUserPermissionService() {
+   return enterprise_signals::UserPermissionServiceFactory::GetForProfile(
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_management_management__ui__handler.h b/chromium-wip/patches/patch-chrome_browser_ui_webui_management_management__ui__handler.h
new file mode 100644
index 0000000000..11da411db2
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_management_management__ui__handler.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/management/management_ui_handler.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/management/management_ui_handler.h
+@@ -29,7 +29,7 @@ namespace policy {
+ class PolicyService;
+ }  // namespace policy
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ namespace device_signals {
+ class UserPermissionService;
+ }  // namespace device_signals
+@@ -70,7 +70,7 @@ class ManagementUIHandler : public conte
+   base::Value::List GetManagedWebsitesInfo(Profile* profile) const;
+   base::Value::List GetApplicationsInfo(Profile* profile) const;
+   virtual policy::PolicyService* GetPolicyService();
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   virtual device_signals::UserPermissionService* GetUserPermissionService();
+   base::Value::Dict GetDeviceSignalGrantedMessage();
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_new__tab__page_new__tab__page__handler.cc b/chromium-wip/patches/patch-chrome_browser_ui_webui_new__tab__page_new__tab__page__handler.cc
new file mode 100644
index 0000000000..55557ad320
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_new__tab__page_new__tab__page__handler.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/new_tab_page/new_tab_page_handler.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/new_tab_page/new_tab_page_handler.cc
+@@ -540,7 +540,7 @@ NewTabPageHandler::NewTabPageHandler(
+       prefs::kNtpFooterVisible,
+       base::BindRepeating(&NewTabPageHandler::OnFooterVisibilityUpdated,
+                           base::Unretained(this)));
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   local_state_pref_change_registrar_.Init(g_browser_process->local_state());
+   local_state_pref_change_registrar_.Add(
+       prefs::kNTPFooterManagementNoticeEnabled,
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_password__manager_promo__cards__handler.cc b/chromium-wip/patches/patch-chrome_browser_ui_webui_password__manager_promo__cards__handler.cc
new file mode 100644
index 0000000000..704ca9d215
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_password__manager_promo__cards__handler.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/password_manager/promo_cards_handler.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/password_manager/promo_cards_handler.cc
+@@ -28,7 +28,7 @@
+ #include "chrome/browser/ui/webui/password_manager/promo_cards/web_password_manager_promo.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/webui/password_manager/promo_cards/relaunch_chrome_promo.h"
+ #endif
+ 
+@@ -71,7 +71,7 @@ std::vector<std::unique_ptr<PasswordProm
+           .get()));
+ #endif
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   promo_cards.push_back(
+       std::make_unique<RelaunchChromePromo>(profile->GetPrefs()));
+ #endif
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_password__manager_promo__cards_relaunch__chrome__promo.cc b/chromium-wip/patches/patch-chrome_browser_ui_webui_password__manager_promo__cards_relaunch__chrome__promo.cc
new file mode 100644
index 0000000000..a398dc7d40
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_password__manager_promo__cards_relaunch__chrome__promo.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/password_manager/promo_cards/relaunch_chrome_promo.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/password_manager/promo_cards/relaunch_chrome_promo.cc
+@@ -37,7 +37,7 @@ std::u16string RelaunchChromePromo::GetT
+   return l10n_util::GetStringUTF16(
+ #if BUILDFLAG(IS_MAC)
+       IDS_PASSWORD_MANAGER_UI_RELAUNCH_CHROME_PROMO_CARD_TITLE
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       IDS_PASSWORD_MANAGER_UI_RELAUNCH_CHROME_PROMO_CARD_TITLE_LINUX
+ #endif
+   );
+@@ -47,7 +47,7 @@ std::u16string RelaunchChromePromo::GetD
+   return l10n_util::GetStringUTF16(
+ #if BUILDFLAG(IS_MAC)
+       IDS_PASSWORD_MANAGER_UI_RELAUNCH_CHROME_PROMO_CARD_DESCRIPTION
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       IDS_PASSWORD_MANAGER_UI_RELAUNCH_CHROME_PROMO_CARD_DESCRIPTION_LINUX
+ #endif
+   );
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_searchbox_searchbox__handler.cc b/chromium-wip/patches/patch-chrome_browser_ui_webui_searchbox_searchbox__handler.cc
new file mode 100644
index 0000000000..3548f821ef
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_searchbox_searchbox__handler.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/searchbox/searchbox_handler.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/searchbox/searchbox_handler.cc
+@@ -128,7 +128,7 @@ const char* kMacShareIconResourceName =
+ #elif BUILDFLAG(IS_WIN)
+ const char* kWinShareIconResourceName =
+     "//resources/cr_components/searchbox/icons/win_share.svg";
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ const char* kLinuxShareIconResourceName =
+     "//resources/cr_components/searchbox/icons/share.svg";
+ #else
+@@ -188,7 +188,7 @@ static void DefineChromeRefreshRealboxIc
+ #elif BUILDFLAG(IS_WIN)
+   kWinShareIconResourceName =
+       "//resources/cr_components/searchbox/icons/win_share_cr23.svg";
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   kLinuxShareIconResourceName =
+       "//resources/cr_components/searchbox/icons/share_cr23.svg";
+ #else
+@@ -656,7 +656,7 @@ std::string SearchboxHandler::ActionVect
+       icon.name == omnibox::kShareWinChromeRefreshIcon.name) {
+     return kWinShareIconResourceName;
+   }
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (icon.name == omnibox::kShareIcon.name ||
+       icon.name == omnibox::kShareLinuxChromeRefreshIcon.name) {
+     return kLinuxShareIconResourceName;
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_settings_appearance__handler.cc b/chromium-wip/patches/patch-chrome_browser_ui_webui_settings_appearance__handler.cc
new file mode 100644
index 0000000000..df49334afc
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_settings_appearance__handler.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/settings/appearance_handler.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/settings/appearance_handler.cc
+@@ -32,7 +32,7 @@ void AppearanceHandler::RegisterMessages
+       "useDefaultTheme",
+       base::BindRepeating(&AppearanceHandler::HandleUseTheme,
+                           base::Unretained(this), ui::SystemTheme::kDefault));
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   web_ui()->RegisterMessageCallback(
+       "useGtkTheme",
+       base::BindRepeating(&AppearanceHandler::HandleUseTheme,
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc b/chromium-wip/patches/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc
new file mode 100644
index 0000000000..12fcf7725c
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc
@@ -0,0 +1,71 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+@@ -137,7 +137,7 @@
+ #include "chrome/browser/ui/webui/settings/system_handler.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/display/screen.h"
+ #endif
+ 
+@@ -153,7 +153,7 @@
+ #endif  // BUILDFLAG(GOOGLE_CHROME_BRANDING)
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/linux/linux_ui_factory.h"
+ #include "ui/ozone/public/ozone_platform.h"
+ #endif
+@@ -282,7 +282,7 @@ void AddA11yStrings(content::WebUIDataSo
+       {"toastAlertLevelDescription",
+        IDS_SETTINGS_ACCESSIBILITY_TOAST_FREQUENCY_DESCRIPTION},
+ #endif
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+       {"overscrollHistoryNavigationTitle",
+        IDS_SETTINGS_OVERSCROLL_HISTORY_NAVIGATION_TITLE},
+       {"overscrollHistoryNavigationSubtitle",
+@@ -551,7 +551,7 @@ void AddAppearanceStrings(content::WebUI
+       {"uiFeatureAlignLeft", IDS_SETTINGS_UI_FEATURE_ALIGN_LEFT},
+       {"uiFeatureAlignRight", IDS_SETTINGS_UI_FEATURE_ALIGN_RIGHT},
+       {"resetToDefault", IDS_SETTINGS_RESET_TO_DEFAULT},
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       {"gtkTheme", IDS_SETTINGS_GTK_THEME},
+       {"useGtkTheme", IDS_SETTINGS_USE_GTK_THEME},
+       {"qtTheme", IDS_SETTINGS_QT_THEME},
+@@ -559,7 +559,7 @@ void AddAppearanceStrings(content::WebUI
+       {"classicTheme", IDS_SETTINGS_CLASSIC_THEME},
+       {"useClassicTheme", IDS_SETTINGS_USE_CLASSIC_THEME},
+ #endif
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       {"showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS},
+ #endif
+ #if BUILDFLAG(IS_MAC)
+@@ -581,7 +581,7 @@ void AddAppearanceStrings(content::WebUI
+   html_source->AddBoolean("tabSearchIsRightAlignedAtStartup",
+                           tabs::GetTabSearchTrailingTabstrip(profile));
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   bool show_custom_chrome_frame = ui::OzonePlatform::GetInstance()
+                                       ->GetPlatformRuntimeProperties()
+                                       .supports_server_side_window_decorations;
+@@ -1556,7 +1556,7 @@ void AddSignOutDialogStrings(content::We
+           g_browser_process->GetApplicationLocale())
+           .spec();
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   html_source->AddString(
+       "syncDisconnectManagedProfileExplanation",
+       l10n_util::GetStringFUTF8(
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_side__panel_customize__chrome_customize__chrome__page__handler.cc b/chromium-wip/patches/patch-chrome_browser_ui_webui_side__panel_customize__chrome_customize__chrome__page__handler.cc
new file mode 100644
index 0000000000..d00348d06d
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_side__panel_customize__chrome_customize__chrome__page__handler.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_page_handler.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_page_handler.cc
+@@ -145,7 +145,7 @@ CustomizeChromePageHandler::CustomizeChr
+       base::BindRepeating(&CustomizeChromePageHandler::UpdateFooterSettings,
+                           base::Unretained(this)));
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   PrefService* local_state = g_browser_process->local_state();
+   if (local_state) {
+     browser_pref_change_registrar_.Init(local_state);
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_side__panel_customize__chrome_customize__chrome__page__handler.h b/chromium-wip/patches/patch-chrome_browser_ui_webui_side__panel_customize__chrome_customize__chrome__page__handler.h
new file mode 100644
index 0000000000..f76773c34a
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_side__panel_customize__chrome_customize__chrome__page__handler.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_page_handler.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_page_handler.h
+@@ -194,7 +194,7 @@ class CustomizeChromePageHandler
+   // value needs to be requeried by the page.
+   GURL last_source_url_{GURL(chrome::kChromeUINewTabPageURL)};
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   PrefChangeRegistrar browser_pref_change_registrar_;
+ #endif
+   PrefChangeRegistrar pref_change_registrar_;
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_signin_profile__picker__handler.cc b/chromium-wip/patches/patch-chrome_browser_ui_webui_signin_profile__picker__handler.cc
new file mode 100644
index 0000000000..1e72c3f0b5
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_signin_profile__picker__handler.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/signin/profile_picker_handler.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/signin/profile_picker_handler.cc
+@@ -168,7 +168,7 @@ base::Value::Dict CreateProfileEntry(con
+       IDS_PROFILE_PICKER_PROFILE_CARD_LABEL, local_profile_name);
+   if (entry->GetIsManaged() == signin::Tribool::kTrue) {
+     profile_entry.Set("avatarBadge", "cr:domain");
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   } else if (base::FeatureList::IsEnabled(
+                  supervised_user::kShowKiteForSupervisedUsers) &&
+              entry->IsSupervised()) {
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_webui_user__education__internals_user__education__internals__page__handler__impl.cc b/chromium-wip/patches/patch-chrome_browser_ui_webui_user__education__internals_user__education__internals__page__handler__impl.cc
new file mode 100644
index 0000000000..cda3c36721
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_webui_user__education__internals_user__education__internals__page__handler__impl.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/webui/user_education_internals/user_education_internals_page_handler_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/webui/user_education_internals/user_education_internals_page_handler_impl.cc
+@@ -47,7 +47,7 @@
+ #include "ui/base/l10n/l10n_util.h"
+ #include "ui/base/webui/resource_path.h"
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/browser_navigator.h"
+ #include "chrome/browser/ui/browser_navigator_params.h"
+ #include "net/base/url_util.h"
+@@ -87,7 +87,7 @@ user_education::NewBadgeRegistry* GetNew
+ }
+ 
+ whats_new::WhatsNewRegistry* GetWhatsNewRegistry() {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return g_browser_process->GetFeatures()->whats_new_registry();
+ #else
+   return nullptr;
+@@ -877,7 +877,7 @@ void UserEducationInternalsPageHandlerIm
+ }
+ 
+ void UserEducationInternalsPageHandlerImpl::LaunchWhatsNewStaging() {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   GURL url = net::AppendQueryParameter(GURL(chrome::kChromeUIWhatsNewURL),
+                                        "staging", "true");
+   NavigateParams params(profile_, url, ui::PAGE_TRANSITION_TYPED);
diff --git a/chromium-wip/patches/patch-chrome_browser_ui_window__sizer_window__sizer.cc b/chromium-wip/patches/patch-chrome_browser_ui_window__sizer_window__sizer.cc
new file mode 100644
index 0000000000..5bee2240e4
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_ui_window__sizer_window__sizer.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/ui/window_sizer/window_sizer.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/ui/window_sizer/window_sizer.cc
+@@ -219,7 +219,7 @@ void WindowSizer::GetBrowserWindowBounds
+       browser, window_bounds, show_state);
+ }
+ 
+-#if !BUILDFLAG(IS_LINUX)
++#if !BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Linux has its own implementation, see WindowSizerLinux.
+ // static
+ void WindowSizer::GetBrowserWindowBoundsAndShowState(
diff --git a/chromium-wip/patches/patch-chrome_browser_upgrade__detector_version__history__client.cc b/chromium-wip/patches/patch-chrome_browser_upgrade__detector_version__history__client.cc
new file mode 100644
index 0000000000..ae9b4988e7
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_upgrade__detector_version__history__client.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/upgrade_detector/version_history_client.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/upgrade_detector/version_history_client.cc
+@@ -175,7 +175,7 @@ GURL GetVersionReleasesUrl(base::Version
+ #define CURRENT_PLATFORM "win"
+ #endif
+ 
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ 
+ #define CURRENT_PLATFORM "linux"
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_visited__url__ranking_visited__url__ranking__service__factory.cc b/chromium-wip/patches/patch-chrome_browser_visited__url__ranking_visited__url__ranking__service__factory.cc
new file mode 100644
index 0000000000..1de4f68232
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_visited__url__ranking_visited__url__ranking__service__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/visited_url_ranking/visited_url_ranking_service_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/visited_url_ranking/visited_url_ranking_service_factory.cc
+@@ -45,7 +45,7 @@
+ #include "components/visited_url_ranking/public/visited_url_ranking_service.h"
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/visited_url_ranking/desktop_tab_model_url_visit_data_fetcher.h"
+ #elif BUILDFLAG(IS_ANDROID)
+ #include "chrome/browser/visited_url_ranking/android_tab_model_url_visit_data_fetcher.h"
+@@ -119,7 +119,7 @@ VisitedURLRankingServiceFactory::BuildSe
+ 
+   std::map<Fetcher, std::unique_ptr<URLVisitDataFetcher>> data_fetchers;
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   data_fetchers.emplace(
+       Fetcher::kTabModel,
+       std::make_unique<visited_url_ranking::DesktopTabModelURLVisitDataFetcher>(
diff --git a/chromium-wip/patches/patch-chrome_browser_web__applications_commands_launch__web__app__command.cc b/chromium-wip/patches/patch-chrome_browser_web__applications_commands_launch__web__app__command.cc
new file mode 100644
index 0000000000..82d6825326
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_web__applications_commands_launch__web__app__command.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/web_applications/commands/launch_web_app_command.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/web_applications/commands/launch_web_app_command.cc
+@@ -101,7 +101,7 @@ void LaunchWebAppCommand::StartWithLock(
+     // OsIntegrationTestOverride can use the xdg install command to detect
+     // install.
+     SynchronizeOsOptions options;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     options.add_shortcut_to_desktop = true;
+ #endif
+     lock_->os_integration_manager().Synchronize(
diff --git a/chromium-wip/patches/patch-chrome_browser_web__applications_commands_set__user__display__mode__command.cc b/chromium-wip/patches/patch-chrome_browser_web__applications_commands_set__user__display__mode__command.cc
new file mode 100644
index 0000000000..926403b567
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_web__applications_commands_set__user__display__mode__command.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/web_applications/commands/set_user_display_mode_command.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/web_applications/commands/set_user_display_mode_command.cc
+@@ -56,7 +56,7 @@ void SetUserDisplayModeCommand::StartWit
+     // OsIntegrationTestOverride can use the xdg install command to detect
+     // install.
+     SynchronizeOsOptions options;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     options.add_shortcut_to_desktop = true;
+ #endif
+     app_lock_->os_integration_manager().Synchronize(
diff --git a/chromium-wip/patches/patch-chrome_browser_web__applications_extension__status__utils.h b/chromium-wip/patches/patch-chrome_browser_web__applications_extension__status__utils.h
new file mode 100644
index 0000000000..421b90944b
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_web__applications_extension__status__utils.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/web_applications/extension_status_utils.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/web_applications/extension_status_utils.h
+@@ -50,7 +50,7 @@ bool IsExtensionDefaultInstalled(content
+ bool IsExternalExtensionUninstalled(content::BrowserContext* context,
+                                     const std::string& extension_id);
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // If this method returns true, then |extension_id| will not be launchable.
+ //
+ // The eventual goal is that this method should return true for all hosted apps,
diff --git a/chromium-wip/patches/patch-chrome_browser_web__applications_extensions_extension__status__utils.cc b/chromium-wip/patches/patch-chrome_browser_web__applications_extensions_extension__status__utils.cc
new file mode 100644
index 0000000000..b033055e54
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_web__applications_extensions_extension__status__utils.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/web_applications/extensions/extension_status_utils.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/web_applications/extensions/extension_status_utils.cc
+@@ -94,7 +94,7 @@ bool IsExternalExtensionUninstalled(cont
+   return prefs && prefs->IsExternalExtensionUninstalled(extension_id);
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ bool IsExtensionUnsupportedDeprecatedApp(content::BrowserContext* context,
+                                          const std::string& extension_id) {
+   if (testing::g_enable_chrome_apps_for_testing) {
diff --git a/chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_os__integration__manager.cc b/chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_os__integration__manager.cc
new file mode 100644
index 0000000000..868c3c79b4
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_os__integration__manager.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/web_applications/os_integration/os_integration_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/web_applications/os_integration/os_integration_manager.cc
+@@ -663,7 +663,7 @@ std::unique_ptr<ShortcutInfo> OsIntegrat
+     }
+   }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   const std::vector<WebAppShortcutsMenuItemInfo>& shortcuts_menu_item_infos =
+       app->shortcuts_menu_item_infos();
+   DCHECK_LE(shortcuts_menu_item_infos.size(), kMaxApplicationDockMenuItems);
diff --git a/chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_os__integration__test__override.h b/chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_os__integration__test__override.h
new file mode 100644
index 0000000000..2913f3112e
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_os__integration__test__override.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/web_applications/os_integration/os_integration_test_override.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/web_applications/os_integration/os_integration_test_override.h
+@@ -99,7 +99,7 @@ class OsIntegrationTestOverride
+   virtual base::FilePath chrome_apps_folder() = 0;
+   virtual void EnableOrDisablePathOnLogin(const base::FilePath& file_path,
+                                           bool enable_on_login) = 0;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   virtual base::Environment* environment() = 0;
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_run__on__os__login__sub__manager.cc b/chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_run__on__os__login__sub__manager.cc
new file mode 100644
index 0000000000..d1d89204c6
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_run__on__os__login__sub__manager.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/web_applications/os_integration/run_on_os_login_sub_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/web_applications/os_integration/run_on_os_login_sub_manager.cc
+@@ -54,7 +54,7 @@ proto::os_state::RunOnOsLogin::Mode Conv
+ // different from other platforms, see web_app_run_on_os_login_manager.h for
+ // more info.
+ bool DoesRunOnOsLoginRequireExecution() {
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return base::FeatureList::IsEnabled(features::kDesktopPWAsRunOnOsLogin);
+ #else
+   return false;
diff --git a/chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_shortcut__sub__manager.cc b/chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_shortcut__sub__manager.cc
new file mode 100644
index 0000000000..f1d3088902
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_shortcut__sub__manager.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/web_applications/os_integration/shortcut_sub_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/web_applications/os_integration/shortcut_sub_manager.cc
+@@ -199,7 +199,7 @@ void ShortcutSubManager::Execute(
+     return;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   // Protocol handler update detection. Shortcuts need to be updated in this
+   // case on Linux & Mac because the shortcut itself includes the protocol
+   // handling metadata.
diff --git a/chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h b/chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h
new file mode 100644
index 0000000000..8ae2445f90
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/web_applications/os_integration/web_app_file_handler_registration.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/web_applications/os_integration/web_app_file_handler_registration.h
+@@ -43,7 +43,7 @@ void UnregisterFileHandlersWithOs(const 
+                                   const base::FilePath& profile_path,
+                                   ResultCallback callback);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Exposed for testing purposes. Register the set of
+ // MIME-type-to-file-extensions mappings corresponding to |file_handlers|. File
+ // I/O and callouts to the Linux shell are performed asynchronously.
diff --git a/chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.cc b/chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.cc
new file mode 100644
index 0000000000..233185d9e7
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/web_applications/os_integration/web_app_shortcut.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/web_applications/os_integration/web_app_shortcut.cc
+@@ -71,7 +71,7 @@ namespace {
+ 
+ #if BUILDFLAG(IS_MAC)
+ const int kDesiredIconSizesForShortcut[] = {16, 32, 128, 256, 512};
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Linux supports icons of any size. FreeDesktop Icon Theme Specification states
+ // that "Minimally you should install a 48x48 icon in the hicolor theme."
+ const int kDesiredIconSizesForShortcut[] = {16, 32, 48, 128, 256, 512};
+@@ -253,7 +253,7 @@ std::unique_ptr<ShortcutInfo> BuildShort
+ 
+ // TODO(crbug.com/40257107): Implement tests on Linux for using shortcuts_menu
+ // actions.
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   const std::vector<WebAppShortcutsMenuItemInfo>& shortcuts_menu_item_infos =
+       CreateShortcutsMenuItemInfos(state.shortcut_menus());
+   DCHECK_LE(shortcuts_menu_item_infos.size(), kMaxApplicationDockMenuItems);
diff --git a/chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.h b/chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.h
new file mode 100644
index 0000000000..08751eb8a8
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/web_applications/os_integration/web_app_shortcut.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/web_applications/os_integration/web_app_shortcut.h
+@@ -22,7 +22,7 @@
+ #include "ui/gfx/image/image_family.h"
+ #include "url/gurl.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/web_applications/os_integration/web_app_shortcut_linux.h"
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+@@ -77,7 +77,7 @@ struct ShortcutInfo {
+   // the installed PWA experience and thus the icons are not designed to be
+   // displayed on an OS dock.
+   bool is_diy_app = false;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   std::set<DesktopActionInfo> actions;
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc b/chromium-wip/patches/patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc
new file mode 100644
index 0000000000..bd31b55208
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/web_applications/policy/web_app_policy_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/web_applications/policy/web_app_policy_manager.cc
+@@ -136,7 +136,7 @@ namespace web_app {
+ 
+ BASE_FEATURE(kDesktopPWAsForceUnregisterOSIntegration,
+              "DesktopPWAsForceUnregisterOSIntegration",
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+              base::FEATURE_ENABLED_BY_DEFAULT
+ #else
+              base::FEATURE_DISABLED_BY_DEFAULT
diff --git a/chromium-wip/patches/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.cc b/chromium-wip/patches/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.cc
new file mode 100644
index 0000000000..0cd7d3c007
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.cc
@@ -0,0 +1,125 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/web_applications/test/os_integration_test_override_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/web_applications/test/os_integration_test_override_impl.cc
+@@ -45,7 +45,7 @@
+ #include "third_party/skia/include/core/SkBitmap.h"
+ #include "third_party/skia/include/core/SkColor.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "base/nix/xdg_util.h"
+ #endif
+ 
+@@ -130,7 +130,7 @@ std::vector<std::wstring> GetFileExtensi
+ }
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Performs a blocking read of app icons from the disk.
+ std::optional<SkBitmap> IconManagerReadIconForSize(
+     WebAppIconManager& icon_manager,
+@@ -315,7 +315,7 @@ bool OsIntegrationTestOverrideImpl::Simu
+       GetShortcutPath(profile, chrome_apps_folder(), app_id, app_name);
+   CHECK(base::PathExists(app_folder_shortcut_path));
+   return base::DeletePathRecursively(app_folder_shortcut_path);
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   base::FilePath desktop_shortcut_path =
+       GetShortcutPath(profile, desktop(), app_id, app_name);
+   LOG(INFO) << desktop_shortcut_path;
+@@ -362,7 +362,7 @@ bool OsIntegrationTestOverrideImpl::Dele
+ }
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ bool OsIntegrationTestOverrideImpl::DeleteDesktopDirOnLinux() {
+   if (desktop_.IsValid()) {
+     return desktop_.Delete();
+@@ -376,7 +376,7 @@ bool OsIntegrationTestOverrideImpl::IsRu
+     Profile* profile,
+     const webapps::AppId& app_id,
+     const std::string& app_name) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   std::string shortcut_filename =
+       "chrome-" + app_id + "-" + profile->GetBaseName().value() + ".desktop";
+   return base::PathExists(startup().Append(shortcut_filename));
+@@ -431,7 +431,7 @@ bool OsIntegrationTestOverrideImpl::IsFi
+   is_file_handled =
+       shell_integration::CanApplicationHandleURL(app_path, test_file_url);
+   base::DeleteFile(test_file_path);
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   base::FilePath user_applications_dir = applications();
+   bool database_update_called = false;
+   for (const LinuxFileRegistration& command : linux_file_registration_) {
+@@ -481,7 +481,7 @@ std::optional<SkBitmap> OsIntegrationTes
+     return std::nullopt;
+   }
+   return GetIconFromShortcutFile(shortcut_path);
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   WebAppProvider* provider = WebAppProvider::GetForLocalAppsUnchecked(profile);
+   if (!provider) {
+     return std::nullopt;
+@@ -547,7 +547,7 @@ base::FilePath OsIntegrationTestOverride
+       app_installed_profiles.end()) {
+     return shortcut_path;
+   }
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   std::string shortcut_filename =
+       "chrome-" + app_id + "-" + profile->GetBaseName().value() + ".desktop";
+   base::FilePath shortcut_path = shortcut_dir.Append(shortcut_filename);
+@@ -572,7 +572,7 @@ bool OsIntegrationTestOverrideImpl::IsSh
+   base::FilePath app_shortcut_path =
+       GetShortcutPath(profile, chrome_apps_folder(), app_id, app_name);
+   return base::PathExists(app_shortcut_path);
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   base::FilePath desktop_shortcut_path =
+       GetShortcutPath(profile, desktop(), app_id, app_name);
+   return base::PathExists(desktop_shortcut_path);
+@@ -764,7 +764,7 @@ void OsIntegrationTestOverrideImpl::Enab
+ }
+ #endif  // BUILDFLAG(IS_MAC)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ base::FilePath OsIntegrationTestOverrideImpl::desktop() {
+   return desktop_.GetPath();
+ }
+@@ -815,7 +815,7 @@ OsIntegrationTestOverrideImpl::OsIntegra
+   success = chrome_apps_folder_.CreateUniqueTempDirUnderPath(
+       outer_temp_dir_.GetPath());
+   CHECK(success);
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   success = desktop_.CreateUniqueTempDirUnderPath(outer_temp_dir_.GetPath());
+   CHECK(success);
+   success = startup_.CreateUniqueTempDirUnderPath(outer_temp_dir_.GetPath());
+@@ -828,7 +828,7 @@ OsIntegrationTestOverrideImpl::OsIntegra
+   CHECK(success);
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   auto callback = base::BindRepeating([](base::FilePath filename_in,
+                                          std::string xdg_command,
+                                          std::string file_contents) {
+@@ -900,7 +900,7 @@ OsIntegrationTestOverrideImpl::~OsIntegr
+   EXPECT_TRUE(!startup_.IsValid() || startup_.Delete());
+ #elif BUILDFLAG(IS_MAC)
+   EXPECT_TRUE(!chrome_apps_folder_.IsValid() || DeleteChromeAppsDir());
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   EXPECT_TRUE(!desktop_.IsValid() || desktop_.Delete());
+   EXPECT_TRUE(!startup_.IsValid() || startup_.Delete());
+   EXPECT_TRUE(!xdg_data_home_dir_.IsValid() || xdg_data_home_dir_.Delete());
diff --git a/chromium-wip/patches/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.h b/chromium-wip/patches/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.h
new file mode 100644
index 0000000000..8c2dd5fd2b
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.h
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/web_applications/test/os_integration_test_override_impl.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/web_applications/test/os_integration_test_override_impl.h
+@@ -40,7 +40,7 @@ class ShellLinkItem;
+ 
+ namespace web_app {
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ struct LinuxFileRegistration {
+   base::FilePath file_name;
+   std::string xdg_command;
+@@ -122,7 +122,7 @@ class OsIntegrationTestOverrideImpl : pu
+   bool DeleteApplicationMenuDirOnWin();
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   bool DeleteDesktopDirOnLinux();
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+@@ -250,7 +250,7 @@ class OsIntegrationTestOverrideImpl : pu
+   base::FilePath chrome_apps_folder() override;
+   void EnableOrDisablePathOnLogin(const base::FilePath& file_path,
+                                   bool enable_on_login) override;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   base::FilePath desktop();
+   base::FilePath startup();
+   base::FilePath applications();
+@@ -323,7 +323,7 @@ class OsIntegrationTestOverrideImpl : pu
+   base::ScopedTempDir chrome_apps_folder_;
+   std::map<base::FilePath, bool> startup_enabled_;
+ 
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   base::ScopedTempDir desktop_;
+   base::ScopedTempDir startup_;
+   base::ScopedTempDir xdg_data_home_dir_;
diff --git a/chromium-wip/patches/patch-chrome_browser_web__applications_web__app__helpers.cc b/chromium-wip/patches/patch-chrome_browser_web__applications_web__app__helpers.cc
new file mode 100644
index 0000000000..75f538e8b8
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_web__applications_web__app__helpers.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/web_applications/web_app_helpers.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/web_applications/web_app_helpers.cc
+@@ -145,7 +145,7 @@ bool IsValidWebAppUrl(const GURL& app_ur
+     return false;
+ 
+   bool allow_extension_apps = true;
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Stop allowing apps to be extension urls when the shortcuts are separated -
+   // they can be extension urls instead.
+   allow_extension_apps = false;
diff --git a/chromium-wip/patches/patch-chrome_browser_web__applications_web__app__install__info.h b/chromium-wip/patches/patch-chrome_browser_web__applications_web__app__install__info.h
new file mode 100644
index 0000000000..275646ffa3
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_web__applications_web__app__install__info.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/web_applications/web_app_install_info.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/web_applications/web_app_install_info.h
+@@ -38,7 +38,7 @@
+ #include "url/gurl.h"
+ 
+ static_assert(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
+-              BUILDFLAG(IS_CHROMEOS));
++              BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD));
+ 
+ namespace web_app {
+ 
diff --git a/chromium-wip/patches/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc b/chromium-wip/patches/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc
new file mode 100644
index 0000000000..e68ec60d20
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/webauthn/chrome_authenticator_request_delegate.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/webauthn/chrome_authenticator_request_delegate.cc
+@@ -551,7 +551,7 @@ void ChromeAuthenticatorRequestDelegate:
+     g_observer->ConfiguringCable(request_type);
+   }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // No caBLEv1 on Linux. It tends to crash bluez.
+   if (base::Contains(pairings_from_extension,
+                      device::CableDiscoveryData::Version::V1,
diff --git a/chromium-wip/patches/patch-chrome_browser_webauthn_enclave__manager.cc b/chromium-wip/patches/patch-chrome_browser_webauthn_enclave__manager.cc
new file mode 100644
index 0000000000..190e8e0244
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_webauthn_enclave__manager.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/webauthn/enclave_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/webauthn/enclave_manager.cc
+@@ -688,7 +688,7 @@ base::flat_set<GaiaId> GetGaiaIDs(
+ 
+ std::string UserVerifyingLabelToString(crypto::UserVerifyingKeyLabel label) {
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return label;
+ #else
+   return std::string("placeholder");
+@@ -698,7 +698,7 @@ std::string UserVerifyingLabelToString(c
+ std::optional<crypto::UserVerifyingKeyLabel> UserVerifyingKeyLabelFromString(
+     std::string saved_label) {
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return saved_label;
+ #else
+   return std::nullopt;
diff --git a/chromium-wip/patches/patch-chrome_browser_webauthn_gpm__user__verification__policy.cc b/chromium-wip/patches/patch-chrome_browser_webauthn_gpm__user__verification__policy.cc
new file mode 100644
index 0000000000..6ce8d4f1c8
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_webauthn_gpm__user__verification__policy.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/webauthn/gpm_user_verification_policy.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/webauthn/gpm_user_verification_policy.cc
+@@ -17,7 +17,7 @@ bool GpmWillDoUserVerification(device::U
+       return platform_has_biometrics;
+ #elif BUILDFLAG(IS_MAC)
+       return platform_has_biometrics;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       return false;
+ #else
+       // This default is for unit tests.
diff --git a/chromium-wip/patches/patch-chrome_browser_webauthn_password__credential__controller.cc b/chromium-wip/patches/patch-chrome_browser_webauthn_password__credential__controller.cc
new file mode 100644
index 0000000000..32f47e3d42
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_webauthn_password__credential__controller.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/webauthn/password_credential_controller.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/webauthn/password_credential_controller.cc
+@@ -46,7 +46,7 @@ password_manager::PasswordManagerClient*
+ }
+ 
+ std::u16string GetAuthenticationMessage(std::string_view rp_id) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return u"";
+ #else
+   return l10n_util::GetStringFUTF16(IDS_PASSWORD_MANAGER_FILLING_REAUTH,
diff --git a/chromium-wip/patches/patch-chrome_browser_webauthn_unexportable__key__utils.cc b/chromium-wip/patches/patch-chrome_browser_webauthn_unexportable__key__utils.cc
new file mode 100644
index 0000000000..aa2c5ead20
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_browser_webauthn_unexportable__key__utils.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/browser/webauthn/unexportable_key_utils.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/browser/webauthn/unexportable_key_utils.cc
+@@ -33,7 +33,7 @@ GetWebAuthnUnexportableKeyProvider() {
+   // If there is a scoped UnexportableKeyProvider configured, we always use
+   // that so that tests can still override the key provider.
+   const bool use_software_provider =
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       !crypto::internal::HasScopedUnexportableKeyProvider();
+ #else
+       false;
diff --git a/chromium-wip/patches/patch-chrome_common_channel__info.h b/chromium-wip/patches/patch-chrome_common_channel__info.h
new file mode 100644
index 0000000000..dc7e301b08
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_common_channel__info.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/common/channel_info.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/common/channel_info.h
+@@ -11,7 +11,7 @@
+ #include "build/branding_buildflags.h"
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ namespace base {
+ class Environment;
+ }
+@@ -99,7 +99,7 @@ void ClearChannelIdForTesting();
+ std::string GetChannelSuffixForDataDir();
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ std::string GetChannelSuffixForExtraFlagsEnvVarName();
+ 
+ // Returns the channel-specific filename of the desktop shortcut used to launch
diff --git a/chromium-wip/patches/patch-chrome_common_channel__info__posix.cc b/chromium-wip/patches/patch-chrome_common_channel__info__posix.cc
new file mode 100644
index 0000000000..35847331d5
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_common_channel__info__posix.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/common/channel_info_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/common/channel_info_posix.cc
+@@ -95,7 +95,7 @@ std::string GetChannelSuffixForDataDir()
+   }
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ std::string GetChannelSuffixForExtraFlagsEnvVarName() {
+ #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+   const auto channel_state = GetChannelImpl();
+@@ -121,7 +121,7 @@ std::string GetChannelSuffixForExtraFlag
+ }
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ std::string GetDesktopName(base::Environment* env) {
+ #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+   // Google Chrome packaged as a snap is a special case: the application name
diff --git a/chromium-wip/patches/patch-chrome_common_chrome__features.cc b/chromium-wip/patches/patch-chrome_common_chrome__features.cc
new file mode 100644
index 0000000000..3545ec3d27
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_common_chrome__features.cc
@@ -0,0 +1,62 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/common/chrome_features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/common/chrome_features.cc
+@@ -81,7 +81,7 @@ BASE_FEATURE(kUseAdHocSigningForWebAppSh
+ #endif  // BUILDFLAG(IS_MAC)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Enables or disables the Autofill survey triggered by opening a prompt to
+ // save address info.
+ BASE_FEATURE(kAutofillAddressSurvey,
+@@ -99,7 +99,7 @@ BASE_FEATURE(kAutofillPasswordSurvey,
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Enables the Restart background mode optimization. When all Chrome UI is
+ // closed and it goes in the background, allows to restart the browser to
+ // discard memory.
+@@ -241,7 +241,7 @@ BASE_FEATURE(kDesktopPWAsElidedExtension
+ BASE_FEATURE(kDesktopPWAsRunOnOsLogin,
+              "DesktopPWAsRunOnOsLogin",
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+              base::FEATURE_ENABLED_BY_DEFAULT
+ #else
+              base::FEATURE_DISABLED_BY_DEFAULT
+@@ -281,7 +281,7 @@ BASE_FEATURE(kEnableExclusiveAccessManag
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Controls whether Chrome Apps are supported. See https://crbug.com/1221251.
+ // If the feature is disabled, Chrome Apps continue to work. If enabled, Chrome
+ // Apps will not launch and will be marked in the UI as deprecated.
+@@ -1081,7 +1081,7 @@ BASE_FEATURE(kKAnonymityServiceStorage,
+              "KAnonymityServiceStorage",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+ 
+-#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)
++#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kLinuxLowMemoryMonitor,
+              "LinuxLowMemoryMonitor",
+              base::FEATURE_DISABLED_BY_DEFAULT);
+@@ -1094,7 +1094,7 @@ constexpr base::FeatureParam<int> kLinux
+     &kLinuxLowMemoryMonitor, "critical_level", 255};
+ #endif  // BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kListWebAppsSwitch,
+              "ListWebAppsSwitch",
+              base::FEATURE_DISABLED_BY_DEFAULT);
diff --git a/chromium-wip/patches/patch-chrome_common_chrome__features.h b/chromium-wip/patches/patch-chrome_common_chrome__features.h
new file mode 100644
index 0000000000..afe5333982
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_common_chrome__features.h
@@ -0,0 +1,51 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/common/chrome_features.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/common/chrome_features.h
+@@ -50,13 +50,13 @@ BASE_DECLARE_FEATURE(kUseAdHocSigningFor
+ #endif  // BUILDFLAG(IS_MAC)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillAddressSurvey);
+ COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillCardSurvey);
+ COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillPasswordSurvey);
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(CHROME_FEATURES)
+ BASE_DECLARE_FEATURE(kBackgroundModeAllowRestart);
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+@@ -146,7 +146,7 @@ BASE_DECLARE_FEATURE(kDesktopPWAsPrevent
+ COMPONENT_EXPORT(CHROME_FEATURES)
+ BASE_DECLARE_FEATURE(kDesktopPWAsTabStripSettings);
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kChromeAppsDeprecation);
+ COMPONENT_EXPORT(CHROME_FEATURES)
+ BASE_DECLARE_FEATURE(kShortcutsNotApps);
+@@ -634,7 +634,7 @@ BASE_DECLARE_FEATURE(kKAnonymityServiceO
+ COMPONENT_EXPORT(CHROME_FEATURES)
+ BASE_DECLARE_FEATURE(kKAnonymityServiceStorage);
+ 
+-#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)
++#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kLinuxLowMemoryMonitor);
+ COMPONENT_EXPORT(CHROME_FEATURES)
+ extern const base::FeatureParam<int> kLinuxLowMemoryMonitorModerateLevel;
+@@ -642,7 +642,7 @@ COMPONENT_EXPORT(CHROME_FEATURES)
+ extern const base::FeatureParam<int> kLinuxLowMemoryMonitorCriticalLevel;
+ #endif  // BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kListWebAppsSwitch);
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-chrome_common_chrome__paths.cc b/chromium-wip/patches/patch-chrome_common_chrome__paths.cc
new file mode 100644
index 0000000000..ad6291de9f
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_common_chrome__paths.cc
@@ -0,0 +1,88 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/common/chrome_paths.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/common/chrome_paths.cc
+@@ -32,7 +32,7 @@
+ #include "base/apple/foundation_util.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_OPENBSD)
++#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
+ #include "components/policy/core/common/policy_paths.h"
+ #endif
+ 
+@@ -48,14 +48,14 @@ namespace {
+ 
+ std::optional<bool> g_override_using_default_data_directory_for_testing;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // The path to the external extension <id>.json files.
+ // /usr/share seems like a good choice, see: http://www.pathname.com/fhs/
+ const base::FilePath::CharType kFilepathSinglePrefExtensions[] =
+ #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+-    FILE_PATH_LITERAL("/usr/share/google-chrome/extensions");
++    FILE_PATH_LITERAL("@PREFIX@/share/chromium/extensions");
+ #else
+-    FILE_PATH_LITERAL("/usr/share/chromium/extensions");
++    FILE_PATH_LITERAL("@PREFIX@/share/chromium/extensions");
+ #endif  // BUILDFLAG(GOOGLE_CHROME_BRANDING)
+ 
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+@@ -212,7 +212,7 @@ bool PathProvider(int key, base::FilePat
+       }
+       break;
+     case chrome::DIR_DEFAULT_DOWNLOADS_SAFE:
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       if (!GetUserDownloadsDirectorySafe(&cur)) {
+         return false;
+       }
+@@ -504,13 +504,13 @@ bool PathProvider(int key, base::FilePat
+       break;
+     }
+ #endif
+-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_OPENBSD)
++#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
+     case chrome::DIR_POLICY_FILES: {
+       cur = base::FilePath(policy::kPolicyPath);
+       break;
+     }
+ #endif
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \
+     (BUILDFLAG(IS_LINUX) && BUILDFLAG(CHROMIUM_BRANDING))
+     case chrome::DIR_USER_EXTERNAL_EXTENSIONS: {
+       if (!base::PathService::Get(chrome::DIR_USER_DATA, &cur)) {
+@@ -520,7 +520,7 @@ bool PathProvider(int key, base::FilePat
+       break;
+     }
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     case chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS: {
+       cur = base::FilePath(kFilepathSinglePrefExtensions);
+       break;
+@@ -559,7 +559,7 @@ bool PathProvider(int key, base::FilePat
+ 
+ #if BUILDFLAG(ENABLE_EXTENSIONS_CORE) &&                                   \
+     (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-     BUILDFLAG(IS_ANDROID))
++     BUILDFLAG(IS_ANDROID)) || BUILDFLAG(IS_BSD)
+     case chrome::DIR_NATIVE_MESSAGING:
+ #if BUILDFLAG(IS_MAC)
+ #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+@@ -573,6 +573,9 @@ bool PathProvider(int key, base::FilePat
+ #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+       cur = base::FilePath(
+           FILE_PATH_LITERAL("/etc/opt/chrome/native-messaging-hosts"));
++#elif BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_NETBSD)
++      cur = base::FilePath(FILE_PATH_LITERAL(
++          "@PREFIX@/etc/chromium/native-messaging-hosts"));
+ #else
+       cur = base::FilePath(
+           FILE_PATH_LITERAL("/etc/chromium/native-messaging-hosts"));
diff --git a/chromium-wip/patches/patch-chrome_common_chrome__paths.h b/chromium-wip/patches/patch-chrome_common_chrome__paths.h
new file mode 100644
index 0000000000..5dc2260839
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_common_chrome__paths.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/common/chrome_paths.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/common/chrome_paths.h
+@@ -56,7 +56,7 @@ enum {
+                      // to set policies for chrome. This directory
+                      // contains subdirectories.
+ #endif
+-#if BUILDFLAG(IS_CHROMEOS) || \
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) || \
+     (BUILDFLAG(IS_LINUX) && BUILDFLAG(CHROMIUM_BRANDING)) || BUILDFLAG(IS_MAC)
+   DIR_USER_EXTERNAL_EXTENSIONS,  // Directory for per-user external extensions
+                                  // on Chrome Mac and Chromium Linux.
+@@ -65,7 +65,7 @@ enum {
+                                  // create it.
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   DIR_STANDALONE_EXTERNAL_EXTENSIONS,  // Directory for 'per-extension'
+                                        // definition manifest files that
+                                        // describe extensions which are to be
+@@ -113,7 +113,7 @@ enum {
+ #endif
+ #if BUILDFLAG(ENABLE_EXTENSIONS_CORE) &&                                   \
+     (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-     BUILDFLAG(IS_ANDROID))
++     BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD))
+   DIR_NATIVE_MESSAGING,       // System directory where native messaging host
+                               // manifest files are stored.
+   DIR_USER_NATIVE_MESSAGING,  // Directory with Native Messaging Hosts
diff --git a/chromium-wip/patches/patch-chrome_common_chrome__paths__internal.h b/chromium-wip/patches/patch-chrome_common_chrome__paths__internal.h
new file mode 100644
index 0000000000..7e3902c821
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_common_chrome__paths__internal.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/common/chrome_paths_internal.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/common/chrome_paths_internal.h
+@@ -53,7 +53,7 @@ void GetUserCacheDirectory(const base::F
+ // Get the path to the user's documents directory.
+ bool GetUserDocumentsDirectory(base::FilePath* result);
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Gets the path to a safe default download directory for a user.
+ bool GetUserDownloadsDirectorySafe(base::FilePath* result);
+ #endif
diff --git a/chromium-wip/patches/patch-chrome_common_chrome__switches.cc b/chromium-wip/patches/patch-chrome_common_chrome__switches.cc
new file mode 100644
index 0000000000..2e2debca82
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_common_chrome__switches.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/common/chrome_switches.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/common/chrome_switches.cc
+@@ -895,7 +895,7 @@ const char kAllowNaClSocketAPI[] = "allo
+ #endif
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ const char kEnableNewAppMenuIcon[] = "enable-new-app-menu-icon";
+ 
+ // Causes the browser to launch directly in guest mode.
+@@ -924,7 +924,7 @@ const char kGlicDev[] = "glic-dev";
+ const char kGlicHostLogging[] = "glic-host-logging";
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ // Writes open and installed web apps for each profile to the specified file
+ // without launching a new browser window or tab. Pass a absolute file path to
+ // specify where to output the information. Can be used together with optional
diff --git a/chromium-wip/patches/patch-chrome_common_chrome__switches.h b/chromium-wip/patches/patch-chrome_common_chrome__switches.h
new file mode 100644
index 0000000000..ad88de4f74
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_common_chrome__switches.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/common/chrome_switches.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/common/chrome_switches.h
+@@ -276,7 +276,7 @@ extern const char kAllowNaClSocketAPI[];
+ #endif
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ extern const char kEnableNewAppMenuIcon[];
+ extern const char kGuest[];
+ extern const char kForceNtpMobilePromo[];
+@@ -294,7 +294,7 @@ extern const char kGlicDev[];
+ extern const char kGlicHostLogging[];
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ extern const char kListApps[];
+ extern const char kProfileBaseName[];
+ extern const char kProfileManagementAttributes[];
diff --git a/chromium-wip/patches/patch-chrome_common_crash__keys.cc b/chromium-wip/patches/patch-chrome_common_crash__keys.cc
new file mode 100644
index 0000000000..c4dbc8d5ce
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_common_crash__keys.cc
@@ -0,0 +1,34 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/common/crash_keys.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/common/crash_keys.cc
+@@ -51,7 +51,9 @@ class CrashKeyWithName {
+   ~CrashKeyWithName() = delete;
+ 
+   std::string_view Name() const { return name_; }
++#if BUILDFLAG(USE_CRASHPAD_ANNOTATION)
+   std::string_view Value() const { return crash_key_.value(); }
++#endif
+   void Clear() { crash_key_.Clear(); }
+   void Set(std::string_view value) { crash_key_.Set(value); }
+ 
+@@ -196,6 +198,7 @@ void AllocateCrashKeyInBrowserAndChildre
+   GetCommandLineStringAnnotations().emplace_back(std::string(key)).Set(value);
+ }
+ 
++#if BUILDFLAG(USE_CRASHPAD_ANNOTATION)
+ void AppendStringAnnotationsCommandLineSwitch(base::CommandLine* command_line) {
+   std::string string_annotations;
+   for (const auto& crash_key : GetCommandLineStringAnnotations()) {
+@@ -210,6 +213,7 @@ void AppendStringAnnotationsCommandLineS
+   }
+   command_line->AppendSwitchASCII(kStringAnnotationsSwitch, string_annotations);
+ }
++#endif
+ 
+ void SetCrashKeysFromCommandLine(const base::CommandLine& command_line) {
+   SetStringAnnotations(command_line);
diff --git a/chromium-wip/patches/patch-chrome_common_extensions_extension__constants.cc b/chromium-wip/patches/patch-chrome_common_extensions_extension__constants.cc
new file mode 100644
index 0000000000..f5faa7e4ea
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_common_extensions_extension__constants.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/common/extensions/extension_constants.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/common/extensions/extension_constants.cc
+@@ -38,7 +38,7 @@ const char* const kBuiltInFirstPartyExte
+     kGoogleSpeechSynthesisExtensionId,
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+     kReadingModeGDocsHelperExtensionId,
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+     kTTSEngineExtensionId,
+     kComponentUpdaterTTSEngineExtensionId,
+ #endif        // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
diff --git a/chromium-wip/patches/patch-chrome_common_extensions_extension__constants.h b/chromium-wip/patches/patch-chrome_common_extensions_extension__constants.h
new file mode 100644
index 0000000000..1fe04771ff
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_common_extensions_extension__constants.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/common/extensions/extension_constants.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/common/extensions/extension_constants.h
+@@ -313,7 +313,7 @@ inline constexpr char kReadingModeGDocsH
+ inline constexpr base::FilePath::CharType
+     kReadingModeGDocsHelperManifestFilename[] =
+         FILE_PATH_LITERAL("reading_mode_gdocs_helper_manifest.json");
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ // The extension id of the google tts engine extension to use on-device natural
+ // Google voices.
+ inline constexpr char kTTSEngineExtensionId[] =
diff --git a/chromium-wip/patches/patch-chrome_common_extensions_permissions_chrome__permission__message__rules.cc b/chromium-wip/patches/patch-chrome_common_extensions_permissions_chrome__permission__message__rules.cc
new file mode 100644
index 0000000000..55bee2a6df
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_common_extensions_permissions_chrome__permission__message__rules.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/common/extensions/permissions/chrome_permission_message_rules.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/common/extensions/permissions/chrome_permission_message_rules.cc
+@@ -280,7 +280,7 @@ class USBDevicesFormatter : public Chrom
+ int GetEnterpriseReportingPrivatePermissionMessageId() {
+ #if BUILDFLAG(IS_WIN)
+   return IDS_EXTENSION_PROMPT_WARNING_ENTERPRISE_REPORTING_PRIVATE_ENABLED_WIN;
+-#elif BUILDFLAG(IS_LINUX) or BUILDFLAG(IS_MAC)
++#elif BUILDFLAG(IS_LINUX) or BUILDFLAG(IS_MAC) or BUILDFLAG(IS_BSD)
+   return IDS_EXTENSION_PROMPT_WARNING_ENTERPRISE_REPORTING_PRIVATE_ENABLED_LINUX_AND_MACOS;
+ #else
+   return IDS_EXTENSION_PROMPT_WARNING_ENTERPRISE_REPORTING_PRIVATE;
diff --git a/chromium-wip/patches/patch-chrome_common_media_cdm__host__file__path.cc b/chromium-wip/patches/patch-chrome_common_media_cdm__host__file__path.cc
new file mode 100644
index 0000000000..3802b4f976
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_common_media_cdm__host__file__path.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/common/media/cdm_host_file_path.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/common/media/cdm_host_file_path.cc
+@@ -91,7 +91,7 @@ void AddCdmHostFilePaths(
+   cdm_host_file_paths->emplace_back(chrome_framework_path,
+                                     chrome_framework_sig_path);
+ 
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ 
+   base::FilePath chrome_exe_dir;
+   if (!base::PathService::Get(base::DIR_EXE, &chrome_exe_dir)) {
diff --git a/chromium-wip/patches/patch-chrome_common_media_cdm__registration.cc b/chromium-wip/patches/patch-chrome_common_media_cdm__registration.cc
new file mode 100644
index 0000000000..3fd20e5986
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_common_media_cdm__registration.cc
@@ -0,0 +1,62 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/common/media/cdm_registration.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/common/media/cdm_registration.cc
+@@ -34,7 +34,7 @@
+ #if BUILDFLAG(ENABLE_WIDEVINE)
+ #include "components/cdm/common/cdm_manifest.h"
+ #include "third_party/widevine/cdm/widevine_cdm_common.h"  // nogncheck
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "base/native_library.h"
+ #include "chrome/common/chrome_paths.h"
+ #include "chrome/common/media/component_widevine_cdm_hint_file_linux.h"
+@@ -59,7 +59,7 @@ using Robustness = content::CdmInfo::Rob
+ #if BUILDFLAG(ENABLE_WIDEVINE)
+ #if (BUILDFLAG(BUNDLE_WIDEVINE_CDM) ||            \
+      BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)) && \
+-    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
++    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))
+ // Create a CdmInfo for a Widevine CDM, using |version|, |cdm_library_path|, and
+ // |capability|.
+ std::unique_ptr<content::CdmInfo> CreateWidevineCdmInfo(
+@@ -101,7 +101,7 @@ std::unique_ptr<content::CdmInfo> Create
+         // BUILDFLAG(IS_CHROMEOS))
+ 
+ #if BUILDFLAG(BUNDLE_WIDEVINE_CDM) && \
+-    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
++    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))
+ // On Linux/ChromeOS we have to preload the CDM since it uses the zygote
+ // sandbox. On Windows and Mac, CDM registration is handled by Component
+ // Update (as the CDM can be loaded only when needed).
+@@ -125,7 +125,7 @@ std::unique_ptr<content::CdmInfo> GetBun
+         // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
+ 
+ #if (BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT) && \
+-     (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)))
++     (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)))
+ // This code checks to see if Component Updater picked a version of the Widevine
+ // CDM to be used last time it ran. (Component Updater may choose the bundled
+ // CDM if there is not a new version available for download.) If there is one
+@@ -167,7 +167,7 @@ void AddSoftwareSecureWidevine(std::vect
+       /*supports_sub_key_systems=*/false, kWidevineCdmDisplayName,
+       kWidevineCdmType, base::FilePath());
+ 
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // The Widevine CDM on Linux/ChromeOS needs to be registered (and loaded)
+   // before the zygote is locked down. The CDM can be found from the version
+   // bundled with Chrome (if BUNDLE_WIDEVINE_CDM = true) and/or the version
+@@ -434,7 +434,7 @@ void RegisterCdmInfo(std::vector<content
+ }
+ 
+ #if BUILDFLAG(ENABLE_WIDEVINE) && \
+-    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
++    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))
+ std::vector<content::CdmInfo> GetSoftwareSecureWidevine() {
+   std::vector<content::CdmInfo> cdms;
+   AddSoftwareSecureWidevine(&cdms);
diff --git a/chromium-wip/patches/patch-chrome_common_media_cdm__registration.h b/chromium-wip/patches/patch-chrome_common_media_cdm__registration.h
new file mode 100644
index 0000000000..5371477dcb
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_common_media_cdm__registration.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/common/media/cdm_registration.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/common/media/cdm_registration.h
+@@ -15,7 +15,7 @@
+ void RegisterCdmInfo(std::vector<content::CdmInfo>* cdms);
+ 
+ #if BUILDFLAG(ENABLE_WIDEVINE) && \
+-    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
++    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))
+ // Returns the software secure Widevine CDM, if one exists.
+ std::vector<content::CdmInfo> GetSoftwareSecureWidevine();
+ #endif
diff --git a/chromium-wip/patches/patch-chrome_common_media_component__widevine__cdm__hint__file__linux.h b/chromium-wip/patches/patch-chrome_common_media_component__widevine__cdm__hint__file__linux.h
new file mode 100644
index 0000000000..221bb64c1e
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_common_media_component__widevine__cdm__hint__file__linux.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/common/media/component_widevine_cdm_hint_file_linux.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/common/media/component_widevine_cdm_hint_file_linux.h
+@@ -14,7 +14,7 @@
+ #error "This file only applies when Widevine used."
+ #endif
+ 
+-#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
++#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))
+ #error "This file only applies to desktop Linux and ChromeOS."
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-chrome_common_pref__names.h b/chromium-wip/patches/patch-chrome_common_pref__names.h
new file mode 100644
index 0000000000..4268e9ad07
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_common_pref__names.h
@@ -0,0 +1,97 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/common/pref_names.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/common/pref_names.h
+@@ -1334,7 +1334,7 @@ inline constexpr char kGeminiSettings[] 
+ inline constexpr char kAllowedDomainsForApps[] =
+     "settings.allowed_domains_for_apps";
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Linux specific preference on whether we should match the system theme.
+ inline constexpr char kSystemTheme[] = "extensions.theme.system_theme";
+ #endif
+@@ -1504,7 +1504,7 @@ inline constexpr char kShowUpdatePromoti
+     "browser.show_update_promotion_info_bar";
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Boolean that is false if we should show window manager decorations.  If
+ // true, we draw a custom chrome frame (thicker title bar and blue border).
+ inline constexpr char kUseCustomChromeFrame[] = "browser.custom_chrome_frame";
+@@ -2141,7 +2141,7 @@ inline constexpr char kDownloadDefaultDi
+ inline constexpr char kDownloadDirUpgraded[] = "download.directory_upgrade";
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ inline constexpr char kOpenPdfDownloadInSystemReader[] =
+     "download.open_pdf_in_system_reader";
+ #endif
+@@ -2644,14 +2644,14 @@ inline constexpr char kMediaStorageIdSal
+ inline constexpr char kMediaCdmOriginData[] = "media.cdm.origin_data";
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // A boolean pref to determine whether or not the network service is running
+ // sandboxed.
+ inline constexpr char kNetworkServiceSandboxEnabled[] =
+     "net.network_service_sandbox";
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Records whether the user has seen an HTTP auth "negotiate" header.
+ inline constexpr char kReceivedHttpAuthNegotiateHeader[] =
+     "net.received_http_auth_negotiate_headers";
+@@ -2743,7 +2743,7 @@ inline constexpr char kIsolatedWebAppIns
+ inline constexpr char kIsolatedWebAppPendingInitializationCount[] =
+     "profile.isolated_web_app.install.pending_initialization_count";
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Boolean that specifies whether OK-AS-DELEGATE flag from KDC is respected
+ // along with kAuthNegotiateDelegateAllowlist.
+ inline constexpr char kAuthNegotiateDelegateByKdcPolicy[] =
+@@ -3266,7 +3266,7 @@ inline constexpr char kKioskApplicationL
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ // Defines administrator-set availability of Chrome for Testing.
+ inline constexpr char kChromeForTestingAllowed[] = "chrome_for_testing.allowed";
+ #endif
+@@ -3781,7 +3781,7 @@ inline constexpr char kScreenCaptureWith
+ inline constexpr char kSandboxExternalProtocolBlocked[] =
+     "profile.sandbox_external_protocol_blocked";
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Boolean that indicates if system notifications are allowed to be used in
+ // place of Chrome notifications.
+ inline constexpr char kAllowSystemNotifications[] =
+@@ -3979,7 +3979,7 @@ inline constexpr char kLensDesktopNTPSea
+     "policy.lens_desktop_ntp_search_enabled";
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ // A dict mapping the edition name with the major version it was shown.
+ inline constexpr char kWhatsNewEditionUsed[] = "browser.whats_new.edition_used";
+ // A list containing the features of each module in order of when they
+@@ -4076,7 +4076,7 @@ inline constexpr char kPrintingOAuth2Aut
+     "printing.oauth2_authorization_servers";
+ #endif
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // If this exists and is true, Chrome may run system DNS resolution out of the
+ // network process. If false, Chrome will run system DNS resolution in the
+ // network process. If non-existent, Chrome will decide where to run system DNS
diff --git a/chromium-wip/patches/patch-chrome_common_url__constants.h b/chromium-wip/patches/patch-chrome_common_url__constants.h
new file mode 100644
index 0000000000..4fc3f62233
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_common_url__constants.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/common/url_constants.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/common/url_constants.h
+@@ -997,7 +997,7 @@ inline constexpr char kOutdatedPluginLea
+ inline constexpr char kPhoneHubPermissionLearnMoreURL[] =
+     "https://support.google.com/chromebook?p=multidevice";;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // "Learn more" URL for the chrome apps deprecation dialog.
+ inline constexpr char kChromeAppsDeprecationLearnMoreURL[] =
+     "https://support.google.com/chrome?p=chrome_app_deprecation";;
diff --git a/chromium-wip/patches/patch-chrome_common_webui__url__constants.cc b/chromium-wip/patches/patch-chrome_common_webui__url__constants.cc
new file mode 100644
index 0000000000..440d8690af
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_common_webui__url__constants.cc
@@ -0,0 +1,34 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/common/webui_url_constants.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/common/webui_url_constants.cc
+@@ -194,21 +194,21 @@ base::span<const base::cstring_view> Chr
+       kChromeUIAssistantOptInHost,
+ #endif
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       kChromeUIConnectorsInternalsHost,
+ #endif
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID) || BUILDFLAG(IS_BSD)
+       kChromeUIDiscardsHost,
+ #endif
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       kChromeUIWebAppSettingsHost,
+ #endif
+ #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID)
+       kChromeUILinuxProxyConfigHost,
+ #endif
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+       kChromeUISandboxHost,
+ #endif
+ #if BUILDFLAG(IS_WIN)
diff --git a/chromium-wip/patches/patch-chrome_common_webui__url__constants.h b/chromium-wip/patches/patch-chrome_common_webui__url__constants.h
new file mode 100644
index 0000000000..d0c8de87b9
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_common_webui__url__constants.h
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/common/webui_url_constants.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/common/webui_url_constants.h
+@@ -541,18 +541,18 @@ inline constexpr char kChromeUIOsUrlAppU
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ inline constexpr char kChromeUIConnectorsInternalsHost[] =
+     "connectors-internals";
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID) || BUILDFLAG(IS_BSD)
+ inline constexpr char kChromeUIDiscardsHost[] = "discards";
+ inline constexpr char kChromeUIDiscardsURL[] = "chrome://discards/";
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ inline constexpr char kChromeUIWebAppSettingsHost[] = "app-settings";
+ inline constexpr char kChromeUIWebAppSettingsURL[] = "chrome://app-settings/";
+ inline constexpr char kChromeUIWhatsNewHost[] = "whats-new";
+@@ -564,11 +564,11 @@ inline constexpr char kChromeUILinuxProx
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ inline constexpr char kChromeUISandboxHost[] = "sandbox";
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ inline constexpr char kChromeUIBrowserSwitchHost[] = "browser-switch";
+ inline constexpr char kChromeUIBrowserSwitchURL[] = "chrome://browser-switch/";
+ inline constexpr char kChromeUIIntroDefaultBrowserSubPage[] = "default-browser";
+@@ -593,7 +593,7 @@ inline constexpr char kChromeUIHistorySy
+     "chrome://history-sync-optin/";
+ #endif
+ 
+-#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \
++#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \
+      defined(TOOLKIT_VIEWS)) ||                         \
+     defined(USE_AURA)
+ inline constexpr char kChromeUITabModalConfirmDialogHost[] =
diff --git a/chromium-wip/patches/patch-chrome_enterprise__companion_enterprise__companion__client.cc b/chromium-wip/patches/patch-chrome_enterprise__companion_enterprise__companion__client.cc
new file mode 100644
index 0000000000..b36cdecc90
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_enterprise__companion_enterprise__companion__client.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/enterprise_companion/enterprise_companion_client.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/enterprise_companion/enterprise_companion_client.cc
+@@ -35,7 +35,7 @@ namespace {
+ 
+ #if BUILDFLAG(IS_MAC)
+ constexpr char kServerName[] = MAC_BUNDLE_IDENTIFIER_STRING ".service";
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ constexpr char kServerName[] =
+     "/run/" COMPANY_SHORTNAME_STRING "/" PRODUCT_FULLNAME_STRING "/service.sk";
+ #elif BUILDFLAG(IS_WIN)
diff --git a/chromium-wip/patches/patch-chrome_enterprise__companion_event__logger.cc b/chromium-wip/patches/patch-chrome_enterprise__companion_event__logger.cc
new file mode 100644
index 0000000000..54bb4bbc13
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_enterprise__companion_event__logger.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/enterprise_companion/event_logger.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/enterprise_companion/event_logger.cc
+@@ -126,7 +126,7 @@ proto::EnterpriseCompanionMetadata GetMe
+   metadata.set_application_arch(proto::ARM64);
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   metadata.set_os_platform(proto::LINUX);
+ #elif BUILDFLAG(IS_MAC)
+   metadata.set_os_platform(proto::MAC);
diff --git a/chromium-wip/patches/patch-chrome_enterprise__companion_lock.cc b/chromium-wip/patches/patch-chrome_enterprise__companion_lock.cc
new file mode 100644
index 0000000000..2cb6bc1d47
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_enterprise__companion_lock.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/enterprise_companion/lock.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/enterprise_companion/lock.cc
+@@ -17,7 +17,7 @@
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ constexpr char kLockName[] = "/" PRODUCT_FULLNAME_STRING ".lock";
+ #elif BUILDFLAG(IS_MAC)
+ constexpr char kLockName[] = MAC_BUNDLE_IDENTIFIER_STRING ".lock";
+@@ -42,7 +42,7 @@ CSecurityDesc GetAdminDaclSecurityDescri
+ namespace enterprise_companion {
+ 
+ std::unique_ptr<ScopedLock> CreateScopedLock(base::TimeDelta timeout) {
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return named_system_lock::ScopedLock::Create(kLockName, timeout);
+ #elif BUILDFLAG(IS_WIN)
+   CSecurityAttributes sa =
diff --git a/chromium-wip/patches/patch-chrome_services_printing_print__backend__service__impl.cc b/chromium-wip/patches/patch-chrome_services_printing_print__backend__service__impl.cc
new file mode 100644
index 0000000000..8715384f7e
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_services_printing_print__backend__service__impl.cc
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/services/printing/print_backend_service_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/services/printing/print_backend_service_impl.cc
+@@ -48,7 +48,7 @@
+ #include "printing/backend/cups_connection_pool.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "base/no_destructor.h"
+ #include "ui/linux/linux_ui.h"
+ #include "ui/linux/linux_ui_delegate_stub.h"
+@@ -75,7 +75,7 @@ namespace printing {
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void InstantiateLinuxUiDelegate() {
+   // TODO(crbug.com/40561724)  Until a real UI can be used in a utility process,
+   // need to use the stub version.
+@@ -84,7 +84,7 @@ void InstantiateLinuxUiDelegate() {
+ #endif
+ 
+ scoped_refptr<base::SequencedTaskRunner> GetPrintingTaskRunner() {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Use task runner associated with equivalent of UI thread.  Needed for calls
+   // made through `PrintDialogLinuxInterface` to properly execute.
+   CHECK(base::SequencedTaskRunner::HasCurrentDefault());
+@@ -467,7 +467,7 @@ void PrintBackendServiceImpl::Init(
+   // `InitCommon()`.
+   InitializeProcessForPrinting();
+   print_backend_ = PrintBackend::CreateInstance(locale);
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Test framework already initializes the UI, so this should not go in
+   // `InitCommon()`.  Additionally, low-level Linux UI is not needed when tests
+   // are using `TestPrintingContext`.
+@@ -676,7 +676,7 @@ void PrintBackendServiceImpl::UpdatePrin
+   crash_keys_ = std::make_unique<crash_keys::ScopedPrinterInfo>(
+       *printer_name, print_backend_->GetPrinterDriverInfo(*printer_name));
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_CUPS)
+   // Try to fill in advanced settings based upon basic info options.
+   PrinterBasicInfo basic_info;
+   if (print_backend_->GetPrinterBasicInfo(*printer_name, &basic_info) ==
diff --git a/chromium-wip/patches/patch-chrome_services_speech_audio__source__fetcher__impl.cc b/chromium-wip/patches/patch-chrome_services_speech_audio__source__fetcher__impl.cc
new file mode 100644
index 0000000000..e5cb4d8166
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_services_speech_audio__source__fetcher__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/services/speech/audio_source_fetcher_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/services/speech/audio_source_fetcher_impl.cc
+@@ -132,7 +132,7 @@ void AudioSourceFetcherImpl::Start(
+ 
+   // TODO(crbug.com/40753481): Check implementation / sandbox policy on Mac and
+   // Windows.
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   is_started_ = true;
+   // Initialize the AudioCapturerSource with |this| as the CaptureCallback,
+   // get the parameters for the device ID, then start audio capture.
diff --git a/chromium-wip/patches/patch-chrome_test_base_scoped__channel__override__posix.cc b/chromium-wip/patches/patch-chrome_test_base_scoped__channel__override__posix.cc
new file mode 100644
index 0000000000..2ce388fe5e
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_test_base_scoped__channel__override__posix.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/test/base/scoped_channel_override_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/test/base/scoped_channel_override_posix.cc
+@@ -43,7 +43,7 @@ std::string GetVersionExtra(ScopedChanne
+       return "beta";
+     case ScopedChannelOverride::Channel::kDev:
+       return "unstable";
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     case ScopedChannelOverride::Channel::kCanary:
+       return "canary";
+ #endif  // BUILDFLAG(IS_LINUX)
diff --git a/chromium-wip/patches/patch-chrome_test_chromedriver_chrome__launcher.cc b/chromium-wip/patches/patch-chrome_test_chromedriver_chrome__launcher.cc
new file mode 100644
index 0000000000..691533c1b2
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_test_chromedriver_chrome__launcher.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/test/chromedriver/chrome_launcher.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/test/chromedriver/chrome_launcher.cc
+@@ -75,6 +75,7 @@
+ #include <fcntl.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
++#include <sys/wait.h>
+ #include <unistd.h>
+ #elif BUILDFLAG(IS_WIN)
+ #include <windows.h>
diff --git a/chromium-wip/patches/patch-chrome_test_chromedriver_chrome_chrome__finder.cc b/chromium-wip/patches/patch-chrome_test_chromedriver_chrome_chrome__finder.cc
new file mode 100644
index 0000000000..63bba55c57
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_test_chromedriver_chrome_chrome__finder.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/test/chromedriver/chrome/chrome_finder.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/test/chromedriver/chrome/chrome_finder.cc
+@@ -59,7 +59,7 @@ void GetApplicationDirs(std::vector<base
+         installation_locations[i].Append(L"Chromium\\Application"));
+   }
+ }
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ void GetApplicationDirs(std::vector<base::FilePath>* locations) {
+   // TODO: Respect users' PATH variables.
+   // Until then, we use an approximation of the most common defaults.
+@@ -126,7 +126,7 @@ std::vector<base::FilePath> GetChromePro
+             chrome::kGoogleChromeForTestingBrowserProcessExecutablePath),
+         base::FilePath(chrome::kGoogleChromeBrowserProcessExecutablePath),
+         base::FilePath(chrome::kChromiumBrowserProcessExecutablePath),
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     base::FilePath(chrome::kBrowserProcessExecutablePath),
+         base::FilePath("chrome"),  // Chrome for Testing or Google Chrome
+         base::FilePath("google-chrome"), base::FilePath("chromium"),
+@@ -142,7 +142,7 @@ std::vector<base::FilePath> GetHeadlessS
+   return {
+ #if BUILDFLAG(IS_WIN)
+     base::FilePath(FILE_PATH_LITERAL("chrome-headless-shell.exe")),
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     base::FilePath("chrome-headless-shell"),
+ #else
+     // it will compile but won't work on other OSes
diff --git a/chromium-wip/patches/patch-chrome_test_chromedriver_key__converter__unittest.cc b/chromium-wip/patches/patch-chrome_test_chromedriver_key__converter__unittest.cc
new file mode 100644
index 0000000000..bb372e2528
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_test_chromedriver_key__converter__unittest.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/test/chromedriver/key_converter_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/test/chromedriver/key_converter_unittest.cc
+@@ -248,7 +248,7 @@ TEST(KeyConverter, ToggleModifiers) {
+   CheckEventsReleaseModifiers(keys, key_events);
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Fails on bots: crbug.com/174962
+ #define MAYBE_AllEnglishKeyboardSymbols DISABLED_AllEnglishKeyboardSymbols
+ #else
+@@ -306,7 +306,7 @@ TEST(KeyConverter, AllEnglishKeyboardTex
+ TEST(KeyConverter, AllSpecialWebDriverKeysOnEnglishKeyboard) {
+   ui::ScopedKeyboardLayout keyboard_layout(ui::KEYBOARD_LAYOUT_ENGLISH_US);
+   const auto kTextForKeys = std::to_array<char>({
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       0,   0,   0,   0,   '\t', 0,   '\r', '\r', 0,   0,   0,   0,   0,
+ #else
+       0,   0,   0,   0,   0,   0,   '\r', '\r', 0,   0,   0,   0,   0,
diff --git a/chromium-wip/patches/patch-chrome_test_chromedriver_keycode__text__conversion__unittest.cc b/chromium-wip/patches/patch-chrome_test_chromedriver_keycode__text__conversion__unittest.cc
new file mode 100644
index 0000000000..c95dd0e13a
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_test_chromedriver_keycode__text__conversion__unittest.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/test/chromedriver/keycode_text_conversion_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/test/chromedriver/keycode_text_conversion_unittest.cc
+@@ -64,7 +64,7 @@ std::string ConvertKeyCodeToTextNoError(
+ 
+ }  // namespace
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Fails on bots: crbug.com/174962
+ #define MAYBE_KeyCodeToText DISABLED_KeyCodeToText
+ #else
+@@ -98,7 +98,7 @@ TEST(KeycodeTextConversionTest, MAYBE_Ke
+       ConvertKeyCodeToTextNoError(ui::VKEY_SHIFT, kShiftKeyModifierMask));
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Fails on bots: crbug.com/174962
+ #define MAYBE_CharToKeyCode DISABLED_CharToKeyCode
+ #else
diff --git a/chromium-wip/patches/patch-chrome_test_supervised__user_google__auth__state__waiter__mixin.cc b/chromium-wip/patches/patch-chrome_test_supervised__user_google__auth__state__waiter__mixin.cc
new file mode 100644
index 0000000000..6dc9896d32
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_test_supervised__user_google__auth__state__waiter__mixin.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/test/supervised_user/google_auth_state_waiter_mixin.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/test/supervised_user/google_auth_state_waiter_mixin.cc
+@@ -24,7 +24,7 @@ GoogleAuthStateWaiterMixin::GoogleAuthSt
+ GoogleAuthStateWaiterMixin::~GoogleAuthStateWaiterMixin() = default;
+ 
+ void GoogleAuthStateWaiterMixin::SetUpOnMainThread() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   ChildAccountService* child_account_service =
+       ChildAccountServiceFactory::GetForProfile(
+           test_base_->browser()->profile());
diff --git a/chromium-wip/patches/patch-chrome_updater_app_app__uninstall.cc b/chromium-wip/patches/patch-chrome_updater_app_app__uninstall.cc
new file mode 100644
index 0000000000..1ffd03e28a
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_updater_app_app__uninstall.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/updater/app/app_uninstall.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/updater/app/app_uninstall.cc
+@@ -181,7 +181,7 @@ void UninstallInThreadPool(UpdaterScope 
+             }
+             if (int result = UninstallOtherVersions(scope);
+                 result != kErrorOk) {
+-#if !BUILDFLAG(IS_LINUX)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)
+               // TODO(crbug.com/366249606): Ignores the errors when uninstalls
+               // the other versions, because currently older Linux updater on
+               // CIPD exits with error `kErrorFailedToDeleteFolder`.
diff --git a/chromium-wip/patches/patch-chrome_updater_configurator.cc b/chromium-wip/patches/patch-chrome_updater_configurator.cc
new file mode 100644
index 0000000000..861a2ba709
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_updater_configurator.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/updater/configurator.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/updater/configurator.cc
+@@ -105,7 +105,7 @@ Configurator::Configurator(scoped_refptr
+         return std::nullopt;
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
+       }()) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // On Linux creating the NetworkFetcherFactory requires performing blocking IO
+   // to load an external library. This should be done when the configurator is
+   // created.
diff --git a/chromium-wip/patches/patch-chrome_updater_lock.cc b/chromium-wip/patches/patch-chrome_updater_lock.cc
new file mode 100644
index 0000000000..d39b7e6653
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_updater_lock.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/updater/lock.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/updater/lock.cc
+@@ -26,7 +26,7 @@ namespace updater {
+ std::unique_ptr<ScopedLock> CreateScopedLock(const std::string& name,
+                                              UpdaterScope scope,
+                                              base::TimeDelta timeout) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return named_system_lock::ScopedLock::Create(
+       base::StrCat({"/" PRODUCT_FULLNAME_STRING, name,
+                     UpdaterScopeToString(scope), ".lock"}),
diff --git a/chromium-wip/patches/patch-chrome_updater_util_posix__util.cc b/chromium-wip/patches/patch-chrome_updater_util_posix__util.cc
new file mode 100644
index 0000000000..1f4af0c527
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_updater_util_posix__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/updater/util/posix_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/updater/util/posix_util.cc
+@@ -20,7 +20,7 @@
+ #include "chrome/updater/updater_branding.h"
+ #include "chrome/updater/util/util.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/updater/util/linux_util.h"
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-chrome_utility_services.cc b/chromium-wip/patches/patch-chrome_utility_services.cc
new file mode 100644
index 0000000000..8ef626a7c4
--- /dev/null
+++ b/chromium-wip/patches/patch-chrome_utility_services.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chrome/utility/services.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chrome/utility/services.cc
+@@ -48,7 +48,7 @@
+ #include "chrome/services/system_signals/mac/mac_system_signals_service.h"
+ #endif  // BUILDFLAG(IS_MAC)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/services/system_signals/linux/linux_system_signals_service.h"
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+@@ -205,7 +205,7 @@ auto RunMacNotificationService(
+ }
+ #endif  // BUILDFLAG(IS_MAC)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ auto RunSystemSignalsService(
+     mojo::PendingReceiver<device_signals::mojom::SystemSignalsService>
+         receiver) {
+@@ -479,7 +479,7 @@ void RegisterMainThreadServices(mojo::Se
+   services.Add(RunWindowsIconReader);
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   services.Add(RunSystemSignalsService);
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ 
diff --git a/chromium-wip/patches/patch-chromecast_browser_cast__browser__main__parts.cc b/chromium-wip/patches/patch-chromecast_browser_cast__browser__main__parts.cc
new file mode 100644
index 0000000000..acc1a4271b
--- /dev/null
+++ b/chromium-wip/patches/patch-chromecast_browser_cast__browser__main__parts.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chromecast/browser/cast_browser_main_parts.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chromecast/browser/cast_browser_main_parts.cc
+@@ -100,7 +100,7 @@
+ #include "ui/ozone/public/ozone_platform.h"
+ #endif  // BUILDFLAG(IS_OZONE)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include <fontconfig/fontconfig.h>
+ #include <signal.h>
+ #include <sys/prctl.h>
+@@ -282,7 +282,7 @@ class CastViewsDelegate : public views::
+ 
+ #endif  // defined(USE_AURA)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ 
+ base::FilePath GetApplicationFontsDir() {
+   std::unique_ptr<base::Environment> env(base::Environment::Create());
+@@ -327,7 +327,7 @@ const DefaultCommandLineSwitch kDefaultS
+     {switches::kDisableThreadedAnimation, ""},
+ #endif  // BUILDFLAG(IS_ANDROID)
+ #endif  // BUILDFLAG(IS_CAST_AUDIO_ONLY)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #if defined(ARCH_CPU_X86_FAMILY)
+     // This is needed for now to enable the x11 Ozone platform to work with
+     // current Linux/NVidia OpenGL drivers.
+@@ -504,7 +504,7 @@ void CastBrowserMainParts::ToolkitInitia
+     views_delegate_ = std::make_unique<CastViewsDelegate>();
+ #endif  // defined(USE_AURA)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   base::FilePath dir_font = GetApplicationFontsDir();
+   const FcChar8* dir_font_char8 =
+       reinterpret_cast<const FcChar8*>(dir_font.value().data());
diff --git a/chromium-wip/patches/patch-chromecast_browser_cast__content__browser__client.cc b/chromium-wip/patches/patch-chromecast_browser_cast__content__browser__client.cc
new file mode 100644
index 0000000000..d4c0c354db
--- /dev/null
+++ b/chromium-wip/patches/patch-chromecast_browser_cast__content__browser__client.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chromecast/browser/cast_content_browser_client.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chromecast/browser/cast_content_browser_client.cc
+@@ -433,7 +433,7 @@ void CastContentBrowserClient::AppendExt
+                                           switches::kAudioOutputChannels));
+     }
+   } else if (process_type == switches::kGpuProcess) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     // Necessary for accelerated 2d canvas.  By default on Linux, Chromium
+     // assumes GLES2 contexts can be lost to a power-save mode, which breaks GPU
+     // canvas apps.
diff --git a/chromium-wip/patches/patch-chromecast_cast__core_runtime_browser_runtime__application__service__impl.cc b/chromium-wip/patches/patch-chromecast_cast__core_runtime_browser_runtime__application__service__impl.cc
new file mode 100644
index 0000000000..50ec9e5666
--- /dev/null
+++ b/chromium-wip/patches/patch-chromecast_cast__core_runtime_browser_runtime__application__service__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chromecast/cast_core/runtime/browser/runtime_application_service_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chromecast/cast_core/runtime/browser/runtime_application_service_impl.cc
+@@ -352,7 +352,7 @@ CastWebView::Scoped RuntimeApplicationSe
+   params->force_720p_resolution =
+       GetFlagEntry(feature::kCastCoreForce720p, config_.extra_features(),
+                    /*default_value=*/false);
+-#if BUILDFLAG(ENABLE_CAST_RECEIVER) && BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(ENABLE_CAST_RECEIVER) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD))
+   // Starboard-based (linux) cast receivers may not render their UI at 720p, so
+   // we need to scale to the proper resolution. For example, a 4k TV may render
+   // the window at 1920x1080, so a scaling factor of 1.5 is necessary for a 720p
diff --git a/chromium-wip/patches/patch-chromecast_media_base_default__monotonic__clock.cc b/chromium-wip/patches/patch-chromecast_media_base_default__monotonic__clock.cc
new file mode 100644
index 0000000000..49ff190132
--- /dev/null
+++ b/chromium-wip/patches/patch-chromecast_media_base_default__monotonic__clock.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- chromecast/media/base/default_monotonic_clock.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ chromecast/media/base/default_monotonic_clock.cc
+@@ -11,7 +11,7 @@
+ #include "base/time/time.h"
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "chromecast/media/base/buildflags.h"
+ #endif  // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) ||
+         // BUILDFLAG(IS_CHROMEOS)
+@@ -28,7 +28,7 @@ std::unique_ptr<MonotonicClock> Monotoni
+   return std::make_unique<DefaultMonotonicClock>();
+ }
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ int64_t MonotonicClockNow() {
+   timespec now = {0, 0};
+ #if BUILDFLAG(MEDIA_CLOCK_MONOTONIC_RAW)
diff --git a/chromium-wip/patches/patch-components_BUILD.gn b/chromium-wip/patches/patch-components_BUILD.gn
new file mode 100644
index 0000000000..10201278c2
--- /dev/null
+++ b/chromium-wip/patches/patch-components_BUILD.gn
@@ -0,0 +1,34 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/BUILD.gn
+@@ -214,7 +214,6 @@ test("components_unittests") {
+     "//components/content_settings/core/browser:unit_tests",
+     "//components/content_settings/core/common:unit_tests",
+     "//components/country_codes:unit_tests",
+-    "//components/crash/core/common:unit_tests",
+     "//components/cross_device/logging:unit_tests",
+     "//components/crx_file:unit_tests",
+     "//components/data_sharing:unit_tests",
+@@ -623,7 +622,7 @@ test("components_unittests") {
+       deps += [ "//components/cast:unit_tests" ]
+     }
+ 
+-    if (!is_fuchsia) {  #!iOS and!Fuchsia
++    if (!is_fuchsia && !is_bsd) {  #!iOS and!Fuchsia
+       deps += [
+         "//components/crash/content/browser:unit_tests",
+         "//components/crash/core/app:unit_tests",
+@@ -784,7 +783,7 @@ test("components_unittests") {
+     deps += [ "//components/constrained_window:unit_tests" ]
+   }
+ 
+-  if (is_win || is_linux || is_chromeos || is_mac) {
++  if (is_win || (is_linux && !is_bsd) || is_chromeos || is_mac) {
+     deps += [ "//components/stability_report:unit_tests" ]
+   }
+ 
diff --git a/chromium-wip/patches/patch-components_autofill_core_browser_data__manager_payments_payments__data__manager.cc b/chromium-wip/patches/patch-components_autofill_core_browser_data__manager_payments_payments__data__manager.cc
new file mode 100644
index 0000000000..eb7855636c
--- /dev/null
+++ b/chromium-wip/patches/patch-components_autofill_core_browser_data__manager_payments_payments__data__manager.cc
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/autofill/core/browser/data_manager/payments/payments_data_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/autofill/core/browser/data_manager/payments/payments_data_manager.cc
+@@ -472,7 +472,7 @@ void PaymentsDataManager::OnWebDataServi
+ 
+ bool PaymentsDataManager::ShouldShowBnplSettings() const {
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Check `kAutofillEnableBuyNowPayLater` only if the user has seen a BNPL
+   // suggestion before, or there are already linked issuers present, to avoid
+   // unnecessary feature flag checks. The linked issuer check is due to the fact
+@@ -1001,7 +1001,7 @@ void PaymentsDataManager::SetPrefService
+           &PaymentsDataManager::OnAutofillPaymentsCardBenefitsPrefChange,
+           base::Unretained(this)));
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   pref_registrar_.Add(
+       prefs::kAutofillBnplEnabled,
+       base::BindRepeating(&PaymentsDataManager::OnBnplEnabledPrefChange,
+@@ -1075,7 +1075,7 @@ void PaymentsDataManager::SetAutofillHas
+ }
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ bool PaymentsDataManager::IsAutofillHasSeenBnplPrefEnabled() const {
+   return prefs::HasSeenBnpl(pref_service_);
+ }
+@@ -2078,7 +2078,7 @@ bool PaymentsDataManager::AreEwalletAcco
+ 
+ bool PaymentsDataManager::AreBnplIssuersSupported() const {
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return app_locale_ == "en-US" && GetCountryCodeForExperimentGroup() == "US" &&
+          base::FeatureList::IsEnabled(
+              features::kAutofillEnableBuyNowPayLaterSyncing);
+@@ -2111,7 +2111,7 @@ void PaymentsDataManager::ClearAllCredit
+ }
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ void PaymentsDataManager::OnBnplEnabledPrefChange() {
+   // On pref change to `false`, clearing BNPL issuers is implicitly handled by
+   // `GetBnplIssuers()`, since it returns an empty vector when
diff --git a/chromium-wip/patches/patch-components_autofill_core_browser_data__manager_payments_payments__data__manager.h b/chromium-wip/patches/patch-components_autofill_core_browser_data__manager_payments_payments__data__manager.h
new file mode 100644
index 0000000000..6442234d99
--- /dev/null
+++ b/chromium-wip/patches/patch-components_autofill_core_browser_data__manager_payments_payments__data__manager.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/autofill/core/browser/data_manager/payments/payments_data_manager.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/autofill/core/browser/data_manager/payments/payments_data_manager.h
+@@ -370,7 +370,7 @@ class PaymentsDataManager : public Autof
+   void SetAutofillHasSeenIban();
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Returns the value of the kAutofillHasSeenBnpl pref.
+   bool IsAutofillHasSeenBnplPrefEnabled() const;
+ 
+@@ -693,7 +693,7 @@ class PaymentsDataManager : public Autof
+   void ClearAllCreditCardBenefits();
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Monitors the `kAutofillBnplEnabled` preference for changes and controls the
+   // clearing/loading of payment instruments accordingly. Will also log the
+   // `Autofill.SettingsPage.BnplToggled` metric.
diff --git a/chromium-wip/patches/patch-components_autofill_core_browser_foundations_browser__autofill__manager.cc b/chromium-wip/patches/patch-components_autofill_core_browser_foundations_browser__autofill__manager.cc
new file mode 100644
index 0000000000..b2bb27f9cf
--- /dev/null
+++ b/chromium-wip/patches/patch-components_autofill_core_browser_foundations_browser__autofill__manager.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/autofill/core/browser/foundations/browser_autofill_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/autofill/core/browser/foundations/browser_autofill_manager.cc
+@@ -746,7 +746,7 @@ BrowserAutofillManager::GetCreditCardAcc
+ 
+ payments::BnplManager* BrowserAutofillManager::GetPaymentsBnplManager() {
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (!bnpl_manager_) {
+     bnpl_manager_ = std::make_unique<payments::BnplManager>(this);
+   }
diff --git a/chromium-wip/patches/patch-components_autofill_core_browser_integrators_optimization__guide_autofill__optimization__guide.cc b/chromium-wip/patches/patch-components_autofill_core_browser_integrators_optimization__guide_autofill__optimization__guide.cc
new file mode 100644
index 0000000000..06d0af4325
--- /dev/null
+++ b/chromium-wip/patches/patch-components_autofill_core_browser_integrators_optimization__guide_autofill__optimization__guide.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/autofill/core/browser/integrators/optimization_guide/autofill_optimization_guide.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/autofill/core/browser/integrators/optimization_guide/autofill_optimization_guide.cc
+@@ -231,7 +231,7 @@ void AutofillOptimizationGuide::OnDidPar
+   }
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   auto bnpl_issuer_allowlist_can_be_loaded =
+       [&payments_data_manager](BnplIssuer::IssuerId issuer_id) {
+         return base::Contains(payments_data_manager.GetBnplIssuers(), issuer_id,
diff --git a/chromium-wip/patches/patch-components_autofill_core_browser_payments_amount__extraction__manager.cc b/chromium-wip/patches/patch-components_autofill_core_browser_payments_amount__extraction__manager.cc
new file mode 100644
index 0000000000..9da5afaf2c
--- /dev/null
+++ b/chromium-wip/patches/patch-components_autofill_core_browser_payments_amount__extraction__manager.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/autofill/core/browser/payments/amount_extraction_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/autofill/core/browser/payments/amount_extraction_manager.cc
+@@ -177,7 +177,7 @@ void AmountExtractionManager::OnCheckout
+     bnpl_manager->OnAmountExtractionReturned(parsed_extracted_amount);
+   }
+   if constexpr (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
+-                BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)) {
++                BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)) {
+     if (base::FeatureList::IsEnabled(
+             ::autofill::features::kAutofillEnableAmountExtractionTesting)) {
+       VLOG(3) << "The result of amount extraction on domain "
+@@ -200,7 +200,7 @@ void AmountExtractionManager::OnTimeoutR
+       autofill_metrics::AmountExtractionResult::kTimeout);
+   // TODO(crbug.com/378517983): Add BNPL flow action logic here.
+   if constexpr (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
+-                BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)) {
++                BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)) {
+     if (base::FeatureList::IsEnabled(
+             ::autofill::features::kAutofillEnableAmountExtractionTesting)) {
+       VLOG(3) << "The amount extraction on domain "
+@@ -219,7 +219,7 @@ AmountExtractionManager::CheckEligibilit
+   // Check eligibility of BNPL feature.
+   // Currently, BNPL is only offered for desktop platforms.
+   if constexpr (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
+-                BUILDFLAG(IS_CHROMEOS)) {
++                BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) {
+     if (BnplManager* bnpl_manager = autofill_manager_->GetPaymentsBnplManager();
+         bnpl_manager && bnpl_manager->IsEligibleForBnpl()) {
+       eligible_features.insert(EligibleFeature::kBnpl);
diff --git a/chromium-wip/patches/patch-components_autofill_core_browser_payments_bnpl__manager.cc b/chromium-wip/patches/patch-components_autofill_core_browser_payments_bnpl__manager.cc
new file mode 100644
index 0000000000..e253a6f257
--- /dev/null
+++ b/chromium-wip/patches/patch-components_autofill_core_browser_payments_bnpl__manager.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/autofill/core/browser/payments/bnpl_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/autofill/core/browser/payments/bnpl_manager.cc
+@@ -467,7 +467,7 @@ void BnplManager::MaybeUpdateSuggestions
+       .OnBnplSuggestionShown();
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   payments_autofill_client().GetPaymentsDataManager().SetAutofillHasSeenBnpl();
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
+         // BUILDFLAG(IS_CHROMEOS)
diff --git a/chromium-wip/patches/patch-components_autofill_core_browser_webdata_payments_payments__sync__bridge__util.cc b/chromium-wip/patches/patch-components_autofill_core_browser_webdata_payments_payments__sync__bridge__util.cc
new file mode 100644
index 0000000000..ea1f53743f
--- /dev/null
+++ b/chromium-wip/patches/patch-components_autofill_core_browser_webdata_payments_payments__sync__bridge__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/autofill/core/browser/webdata/payments/payments_sync_bridge_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/autofill/core/browser/webdata/payments/payments_sync_bridge_util.cc
+@@ -1262,7 +1262,7 @@ bool AreMaskedBankAccountSupported() {
+ 
+ bool IsBnplIssuerSupported() {
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return base::FeatureList::IsEnabled(
+       features::kAutofillEnableBuyNowPayLaterSyncing);
+ #else
diff --git a/chromium-wip/patches/patch-components_autofill_core_common_autofill__payments__features.cc b/chromium-wip/patches/patch-components_autofill_core_common_autofill__payments__features.cc
new file mode 100644
index 0000000000..68d27b1382
--- /dev/null
+++ b/chromium-wip/patches/patch-components_autofill_core_common_autofill__payments__features.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/autofill/core/common/autofill_payments_features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/autofill/core/common/autofill_payments_features.cc
+@@ -365,7 +365,7 @@ BASE_FEATURE(kDisableAutofillStrikeSyste
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ 
+ bool ShouldShowImprovedUserConsentForCreditCardSave() {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // The new user consent UI is fully launched on MacOS, Windows and Linux.
+   return true;
+ #else
diff --git a/chromium-wip/patches/patch-components_autofill_core_common_autofill__prefs.cc b/chromium-wip/patches/patch-components_autofill_core_common_autofill__prefs.cc
new file mode 100644
index 0000000000..d43a23af4e
--- /dev/null
+++ b/chromium-wip/patches/patch-components_autofill_core_common_autofill__prefs.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/autofill/core/common/autofill_prefs.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/autofill/core/common/autofill_prefs.cc
+@@ -104,7 +104,7 @@ void RegisterProfilePrefs(user_prefs::Pr
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   registry->RegisterBooleanPref(
+       kAutofillBnplEnabled, true,
+       user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
+@@ -298,7 +298,7 @@ bool IsFacilitatedPaymentsPixAccountLink
+ }
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ void SetAutofillBnplEnabled(PrefService* prefs, bool value) {
+   prefs->SetBoolean(kAutofillBnplEnabled, value);
+ }
+@@ -307,7 +307,7 @@ void SetAutofillBnplEnabled(PrefService*
+ 
+ bool IsAutofillBnplEnabled(const PrefService* prefs) {
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return prefs->GetBoolean(kAutofillBnplEnabled);
+ #else
+   return false;
+@@ -316,7 +316,7 @@ bool IsAutofillBnplEnabled(const PrefSer
+ }
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // If called, always sets the pref to true, and once true, it will follow the
+ // user around forever.
+ void SetAutofillHasSeenBnpl(PrefService* prefs) {
diff --git a/chromium-wip/patches/patch-components_autofill_core_common_autofill__prefs.h b/chromium-wip/patches/patch-components_autofill_core_common_autofill__prefs.h
new file mode 100644
index 0000000000..e8f692f056
--- /dev/null
+++ b/chromium-wip/patches/patch-components_autofill_core_common_autofill__prefs.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/autofill/core/common/autofill_prefs.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/autofill/core/common/autofill_prefs.h
+@@ -32,7 +32,7 @@ inline constexpr std::string_view kAutof
+ inline constexpr char kAutofillAiOptInStatus[] =
+     "autofill.autofill_ai.opt_in_status";
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Boolean that is true if BNPL on Autofill is enabled.
+ inline constexpr char kAutofillBnplEnabled[] = "autofill.bnpl_enabled";
+ // Boolean that is true if the user has ever seen a BNPL suggestion.
+@@ -226,7 +226,7 @@ void SetFacilitatedPaymentsPixAccountLin
+ bool IsFacilitatedPaymentsPixAccountLinkingEnabled(const PrefService* prefs);
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ void SetAutofillBnplEnabled(PrefService* prefs, bool value);
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
+         // BUILDFLAG(IS_CHROMEOS)
+@@ -234,7 +234,7 @@ void SetAutofillBnplEnabled(PrefService*
+ bool IsAutofillBnplEnabled(const PrefService* prefs);
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ void SetAutofillHasSeenBnpl(PrefService* prefs);
+ 
+ bool HasSeenBnpl(const PrefService* prefs);
diff --git a/chromium-wip/patches/patch-components_commerce_core_commerce__feature__list.cc b/chromium-wip/patches/patch-components_commerce_core_commerce__feature__list.cc
new file mode 100644
index 0000000000..511ebd174e
--- /dev/null
+++ b/chromium-wip/patches/patch-components_commerce_core_commerce__feature__list.cc
@@ -0,0 +1,45 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/commerce/core/commerce_feature_list.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/commerce/core/commerce_feature_list.cc
+@@ -157,7 +157,8 @@ BASE_FEATURE(kPriceInsights,
+              "PriceInsights",
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_ANDROID) || \
++    BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kPriceInsightsRegionLaunched,
+              "PriceInsightsRegionLaunched",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+@@ -235,7 +236,7 @@ BASE_FEATURE(kShoppingAlternateServer,
+ const char kDiscountOnShoppyPageParam[] = "discount-on-shoppy-page";
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ const base::FeatureParam<bool> kDiscountOnShoppyPage{
+     &kEnableDiscountInfoApi, kDiscountOnShoppyPageParam, true};
+ #else
+@@ -244,7 +245,7 @@ const base::FeatureParam<bool> kDiscount
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kEnableDiscountInfoApiRegionLaunched,
+              "EnableDiscountInfoApiRegionLaunched",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+@@ -259,7 +260,7 @@ const char kMerchantWideBehaviorParam[] 
+ const char kNonMerchantWideBehaviorParam[] = "non-merchant-wide-behavior";
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kDiscountDialogAutoPopupBehaviorSetting,
+              "DiscountDialogAutoPopupBehaviorSetting",
+              base::FEATURE_ENABLED_BY_DEFAULT);
diff --git a/chromium-wip/patches/patch-components_constrained__window_constrained__window__views.cc b/chromium-wip/patches/patch-components_constrained__window_constrained__window__views.cc
new file mode 100644
index 0000000000..148b7cd21b
--- /dev/null
+++ b/chromium-wip/patches/patch-components_constrained__window_constrained__window__views.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/constrained_window/constrained_window_views.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/constrained_window/constrained_window_views.cc
+@@ -380,7 +380,7 @@ bool SupportsGlobalScreenCoordinates() {
+ }
+ 
+ bool PlatformClipsChildrenToViewport() {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return true;
+ #else
+   return false;
diff --git a/chromium-wip/patches/patch-components_content__settings_core_browser_website__settings__registry.cc b/chromium-wip/patches/patch-components_content__settings_core_browser_website__settings__registry.cc
new file mode 100644
index 0000000000..4b78b67a17
--- /dev/null
+++ b/chromium-wip/patches/patch-components_content__settings_core_browser_website__settings__registry.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/content_settings/core/browser/website_settings_registry.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/content_settings/core/browser/website_settings_registry.cc
+@@ -66,7 +66,7 @@ const WebsiteSettingsInfo* WebsiteSettin
+ #if BUILDFLAG(IS_WIN)
+   if (!(platform & PLATFORM_WINDOWS))
+     return nullptr;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (!(platform & PLATFORM_LINUX))
+     return nullptr;
+ #elif BUILDFLAG(IS_MAC)
diff --git a/chromium-wip/patches/patch-components_cookie__config_cookie__store__util.cc b/chromium-wip/patches/patch-components_cookie__config_cookie__store__util.cc
new file mode 100644
index 0000000000..3d4127c797
--- /dev/null
+++ b/chromium-wip/patches/patch-components_cookie__config_cookie__store__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/cookie_config/cookie_store_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/cookie_config/cookie_store_util.cc
+@@ -12,7 +12,7 @@
+ namespace cookie_config {
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ namespace {
+ 
+ // Use the operating system's mechanisms to encrypt cookies before writing
diff --git a/chromium-wip/patches/patch-components_crash_core_app_BUILD.gn b/chromium-wip/patches/patch-components_crash_core_app_BUILD.gn
new file mode 100644
index 0000000000..680ed2bfdd
--- /dev/null
+++ b/chromium-wip/patches/patch-components_crash_core_app_BUILD.gn
@@ -0,0 +1,49 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/crash/core/app/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/crash/core/app/BUILD.gn
+@@ -70,6 +70,10 @@ static_library("app") {
+     ]
+   }
+ 
++  if (is_bsd) {
++    sources -= [ "crashpad.cc" ]
++  }
++
+   defines = [ "CRASH_IMPLEMENTATION" ]
+ 
+   public_deps = [ ":lib" ]
+@@ -83,7 +87,7 @@ static_library("app") {
+     "//third_party/crashpad/crashpad/util",
+   ]
+ 
+-  if (is_linux || is_chromeos) {
++  if ((is_linux || is_chromeos) && !is_bsd) {
+     sources += [ "crashpad_linux.cc" ]
+     data_deps = [ ":chrome_crashpad_handler" ]
+   }
+@@ -105,7 +109,7 @@ static_library("app") {
+     libs = [ "log" ]
+   }
+ 
+-  if (is_android || is_linux || is_chromeos) {
++  if ((is_android || is_linux || is_chromeos) && !is_bsd) {
+     deps += [
+       "//base:base_static",
+       "//components/crash/core/common",
+@@ -238,11 +242,6 @@ if (is_mac || is_android || is_linux || 
+   executable("chrome_crashpad_handler") {
+     sources = [ "chrome_crashpad_handler.cc" ]
+ 
+-    deps = [
+-      ":crashpad_handler_main",
+-      "//third_party/crashpad/crashpad/handler",
+-    ]
+-
+     if (is_mac && (is_component_build || is_asan || is_ubsan_any)) {
+       ldflags = [
+         # The handler is in
diff --git a/chromium-wip/patches/patch-components_crash_core_app_chrome__crashpad__handler.cc b/chromium-wip/patches/patch-components_crash_core_app_chrome__crashpad__handler.cc
new file mode 100644
index 0000000000..4480522431
--- /dev/null
+++ b/chromium-wip/patches/patch-components_crash_core_app_chrome__crashpad__handler.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/crash/core/app/chrome_crashpad_handler.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/crash/core/app/chrome_crashpad_handler.cc
+@@ -6,5 +6,9 @@
+ extern "C" int CrashpadHandlerMain(int argc, char* argv[]);
+ 
+ int main(int argc, char* argv[]) {
++#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
++  return -1;
++#else
+   return CrashpadHandlerMain(argc, argv);
++#endif
+ }
diff --git a/chromium-wip/patches/patch-components_crash_core_app_crashpad__handler__main.cc b/chromium-wip/patches/patch-components_crash_core_app_crashpad__handler__main.cc
new file mode 100644
index 0000000000..f5afa2c4ed
--- /dev/null
+++ b/chromium-wip/patches/patch-components_crash_core_app_crashpad__handler__main.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/crash/core/app/crashpad_handler_main.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/crash/core/app/crashpad_handler_main.cc
+@@ -10,7 +10,7 @@
+ #include "third_party/crashpad/crashpad/handler/handler_main.h"
+ #include "third_party/crashpad/crashpad/handler/user_stream_data_source.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ #include "components/stability_report/user_stream_data_source_posix.h"
+ #endif
+ 
+@@ -31,7 +31,7 @@ __attribute__((visibility("default"), us
+     char* argv[]) {
+   crashpad::UserStreamDataSources user_stream_data_sources;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   user_stream_data_sources.push_back(
+       std::make_unique<stability_report::UserStreamDataSourcePosix>());
+ #endif
diff --git a/chromium-wip/patches/patch-components_crash_core_browser_crash__upload__list__crashpad.cc b/chromium-wip/patches/patch-components_crash_core_browser_crash__upload__list__crashpad.cc
new file mode 100644
index 0000000000..e8f9018ffd
--- /dev/null
+++ b/chromium-wip/patches/patch-components_crash_core_browser_crash__upload__list__crashpad.cc
@@ -0,0 +1,32 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/crash/core/browser/crash_upload_list_crashpad.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/crash/core/browser/crash_upload_list_crashpad.cc
+@@ -37,7 +37,9 @@ CrashUploadListCrashpad::~CrashUploadLis
+ std::vector<std::unique_ptr<UploadList::UploadInfo>>
+ CrashUploadListCrashpad::LoadUploadList() {
+   std::vector<crash_reporter::Report> reports;
++#if !BUILDFLAG(IS_BSD)
+   crash_reporter::GetReports(&reports);
++#endif
+ 
+   std::vector<std::unique_ptr<UploadInfo>> uploads;
+   for (const crash_reporter::Report& report : reports) {
+@@ -51,9 +53,13 @@ CrashUploadListCrashpad::LoadUploadList(
+ 
+ void CrashUploadListCrashpad::ClearUploadList(const base::Time& begin,
+                                               const base::Time& end) {
++#if !BUILDFLAG(IS_BSD)
+   crash_reporter::ClearReportsBetween(begin, end);
++#endif
+ }
+ 
+ void CrashUploadListCrashpad::RequestSingleUpload(const std::string& local_id) {
++#if !BUILDFLAG(IS_BSD)
+   crash_reporter::RequestSingleCrashUpload(local_id);
++#endif
+ }
diff --git a/chromium-wip/patches/patch-components_crash_core_common_BUILD.gn b/chromium-wip/patches/patch-components_crash_core_common_BUILD.gn
new file mode 100644
index 0000000000..cd70bc7a4e
--- /dev/null
+++ b/chromium-wip/patches/patch-components_crash_core_common_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/crash/core/common/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/crash/core/common/BUILD.gn
+@@ -9,7 +9,7 @@ import("//components/gwp_asan/buildflags
+ 
+ declare_args() {
+   # If set to true, this will stub out and disable the entire crash key system.
+-  use_crash_key_stubs = is_fuchsia
++  use_crash_key_stubs = is_fuchsia || is_bsd
+ }
+ 
+ group("common") {
diff --git a/chromium-wip/patches/patch-components_device__signals_core_browser_browser__utils.h b/chromium-wip/patches/patch-components_device__signals_core_browser_browser__utils.h
new file mode 100644
index 0000000000..7e3d6d28b9
--- /dev/null
+++ b/chromium-wip/patches/patch-components_device__signals_core_browser_browser__utils.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/device_signals/core/browser/browser_utils.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/device_signals/core/browser/browser_utils.h
+@@ -36,7 +36,7 @@ bool GetSiteIsolationEnabled();
+ // Returns the hostname of the current machine.
+ std::string GetHostName();
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Returns the hostname of the current machine.
+ std::vector<std::string> GetSystemDnsServers();
+ 
+@@ -44,7 +44,7 @@ std::vector<std::string> GetSystemDnsSer
+ SettingValue GetOSFirewall();
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Returns the path to the ufw configuration file.
+ const char** GetUfwConfigPath();
+ #endif  // BUILDFLAG(IS_LINUX)
diff --git a/chromium-wip/patches/patch-components_device__signals_core_browser_mock__signals__aggregator.h b/chromium-wip/patches/patch-components_device__signals_core_browser_mock__signals__aggregator.h
new file mode 100644
index 0000000000..ff604e0fc7
--- /dev/null
+++ b/chromium-wip/patches/patch-components_device__signals_core_browser_mock__signals__aggregator.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/device_signals/core/browser/mock_signals_aggregator.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/device_signals/core/browser/mock_signals_aggregator.h
+@@ -17,7 +17,7 @@ class MockSignalsAggregator : public Sig
+   MockSignalsAggregator();
+   ~MockSignalsAggregator() override;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   MOCK_METHOD(void,
+               GetSignalsForUser,
+               (const UserContext&,
diff --git a/chromium-wip/patches/patch-components_device__signals_core_browser_signals__aggregator.h b/chromium-wip/patches/patch-components_device__signals_core_browser_signals__aggregator.h
new file mode 100644
index 0000000000..742f5eb378
--- /dev/null
+++ b/chromium-wip/patches/patch-components_device__signals_core_browser_signals__aggregator.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/device_signals/core/browser/signals_aggregator.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/device_signals/core/browser/signals_aggregator.h
+@@ -22,7 +22,7 @@ class SignalsAggregator : public KeyedSe
+ 
+   ~SignalsAggregator() override = default;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Will asynchronously collect signals whose names are specified in the
+   // `request` object, and will also use a `user_context` to validate that the
+   // user has permissions to the device's signals. Invokes `callback` with the
diff --git a/chromium-wip/patches/patch-components_device__signals_core_browser_signals__aggregator__impl.cc b/chromium-wip/patches/patch-components_device__signals_core_browser_signals__aggregator__impl.cc
new file mode 100644
index 0000000000..d061c4ca73
--- /dev/null
+++ b/chromium-wip/patches/patch-components_device__signals_core_browser_signals__aggregator__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/device_signals/core/browser/signals_aggregator_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/device_signals/core/browser/signals_aggregator_impl.cc
+@@ -64,7 +64,7 @@ SignalsAggregatorImpl::SignalsAggregator
+ 
+ SignalsAggregatorImpl::~SignalsAggregatorImpl() = default;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void SignalsAggregatorImpl::GetSignalsForUser(
+     const UserContext& user_context,
+     const SignalsAggregationRequest& request,
diff --git a/chromium-wip/patches/patch-components_device__signals_core_browser_signals__aggregator__impl.h b/chromium-wip/patches/patch-components_device__signals_core_browser_signals__aggregator__impl.h
new file mode 100644
index 0000000000..d9856adf79
--- /dev/null
+++ b/chromium-wip/patches/patch-components_device__signals_core_browser_signals__aggregator__impl.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/device_signals/core/browser/signals_aggregator_impl.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/device_signals/core/browser/signals_aggregator_impl.h
+@@ -30,7 +30,7 @@ class SignalsAggregatorImpl : public Sig
+   ~SignalsAggregatorImpl() override;
+ 
+   // SignalsAggregator:
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   void GetSignalsForUser(const UserContext& user_context,
+                          const SignalsAggregationRequest& request,
+                          GetSignalsCallback callback) override;
diff --git a/chromium-wip/patches/patch-components_device__signals_core_browser_user__permission__service.h b/chromium-wip/patches/patch-components_device__signals_core_browser_user__permission__service.h
new file mode 100644
index 0000000000..ecba3cacef
--- /dev/null
+++ b/chromium-wip/patches/patch-components_device__signals_core_browser_user__permission__service.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/device_signals/core/browser/user_permission_service.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/device_signals/core/browser/user_permission_service.h
+@@ -57,7 +57,7 @@ class UserPermissionService : public Key
+   // missing.
+   virtual bool ShouldCollectConsent() const = 0;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Will verify whether context-aware signals can be collected
+   // on behalf of the user represented by `user_context`. Returns `kGranted` if
+   // collection is allowed.
diff --git a/chromium-wip/patches/patch-components_device__signals_core_browser_user__permission__service__impl.cc b/chromium-wip/patches/patch-components_device__signals_core_browser_user__permission__service__impl.cc
new file mode 100644
index 0000000000..af61b5e926
--- /dev/null
+++ b/chromium-wip/patches/patch-components_device__signals_core_browser_user__permission__service__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/device_signals/core/browser/user_permission_service_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/device_signals/core/browser/user_permission_service_impl.cc
+@@ -87,7 +87,7 @@ bool UserPermissionServiceImpl::ShouldCo
+          consent_required_by_dependent_policy;
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ UserPermission UserPermissionServiceImpl::CanUserCollectSignals(
+     const UserContext& user_context) const {
+   // Return "unknown user" if no user ID was given.
diff --git a/chromium-wip/patches/patch-components_device__signals_core_browser_user__permission__service__impl.h b/chromium-wip/patches/patch-components_device__signals_core_browser_user__permission__service__impl.h
new file mode 100644
index 0000000000..a978ae3f63
--- /dev/null
+++ b/chromium-wip/patches/patch-components_device__signals_core_browser_user__permission__service__impl.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/device_signals/core/browser/user_permission_service_impl.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/device_signals/core/browser/user_permission_service_impl.h
+@@ -38,7 +38,7 @@ class UserPermissionServiceImpl : public
+ 
+   // UserPermissionService:
+   bool ShouldCollectConsent() const override;
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   UserPermission CanUserCollectSignals(
+       const UserContext& user_context) const override;
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX
diff --git a/chromium-wip/patches/patch-components_device__signals_core_common_linux_platform__utils__linux.cc b/chromium-wip/patches/patch-components_device__signals_core_common_linux_platform__utils__linux.cc
new file mode 100644
index 0000000000..342b8dccc5
--- /dev/null
+++ b/chromium-wip/patches/patch-components_device__signals_core_common_linux_platform__utils__linux.cc
@@ -0,0 +1,83 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/device_signals/core/common/linux/platform_utils_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/device_signals/core/common/linux/platform_utils_linux.cc
+@@ -4,11 +4,22 @@
+ 
+ #include "components/device_signals/core/common/platform_utils.h"
+ 
++#include "build/build_config.h"
++
+ #if defined(USE_GIO)
+ #include <gio/gio.h>
+ #endif  // defined(USE_GIO)
+ #include <sys/stat.h>
++#if !BUILDFLAG(IS_BSD)
+ #include <sys/sysmacros.h>
++#endif
++
++#if BUILDFLAG(IS_BSD)
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <ifaddrs.h>
++#include <net/if_dl.h>
++#endif
+ 
+ #include <algorithm>
+ #include <optional>
+@@ -100,6 +111,7 @@ SettingValue GetScreenlockSecured() {
+ // Implements the logic from the native host installation script. First find the
+ // root device identifier, then locate its parent and get its type.
+ SettingValue GetDiskEncrypted() {
++#if !BUILDFLAG(IS_BSD)
+   struct stat info;
+   // First figure out the device identifier. Fail fast if this fails.
+   if (stat("/", &info) != 0) {
+@@ -122,11 +134,35 @@ SettingValue GetDiskEncrypted() {
+     }
+     return SettingValue::UNKNOWN;
+   }
++#endif
+   return SettingValue::DISABLED;
+ }
+ 
+ std::vector<std::string> GetMacAddresses() {
+   std::vector<std::string> result;
++#if BUILDFLAG(IS_BSD)
++  struct ifaddrs* ifa = nullptr;
++
++  if (getifaddrs(&ifa) != 0)
++    return result;
++
++  struct ifaddrs* interface = ifa;
++  for (; interface != nullptr; interface = interface->ifa_next) {
++    if (interface->ifa_addr == nullptr ||
++        interface->ifa_addr->sa_family != AF_LINK) {
++      continue;
++    }
++    struct sockaddr_dl* sdl =
++        reinterpret_cast<struct sockaddr_dl*>(interface->ifa_addr);
++    if (!sdl || sdl->sdl_alen != 6)
++      continue;
++    char* link_address = static_cast<char*>(LLADDR(sdl));
++    result.push_back(base::StringPrintf(
++        "%02x:%02x:%02x:%02x:%02x:%02x", link_address[0] & 0xff,
++        link_address[1] & 0xff, link_address[2] & 0xff, link_address[3] & 0xff,
++        link_address[4] & 0xff, link_address[5] & 0xff));
++  }
++#else
+   base::DirReaderPosix reader("/sys/class/net");
+   if (!reader.IsValid()) {
+     return result;
+@@ -151,6 +187,7 @@ std::vector<std::string> GetMacAddresses
+                               &address);
+     result.push_back(address);
+   }
++#endif
+   return result;
+ }
+ 
diff --git a/chromium-wip/patches/patch-components_device__signals_core_common_signals__features.cc b/chromium-wip/patches/patch-components_device__signals_core_common_signals__features.cc
new file mode 100644
index 0000000000..ca51d1658f
--- /dev/null
+++ b/chromium-wip/patches/patch-components_device__signals_core_common_signals__features.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/device_signals/core/common/signals_features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/device_signals/core/common/signals_features.cc
+@@ -43,7 +43,7 @@ bool IsBrowserSignalsReportingEnabled() 
+ }
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Enables the triggering of device signals consent dialog when conditions met
+ // This feature also requires UnmanagedDeviceSignalsConsentFlowEnabled policy to
+ // be enabled
diff --git a/chromium-wip/patches/patch-components_device__signals_core_common_signals__features.h b/chromium-wip/patches/patch-components_device__signals_core_common_signals__features.h
new file mode 100644
index 0000000000..cd1f5288d3
--- /dev/null
+++ b/chromium-wip/patches/patch-components_device__signals_core_common_signals__features.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/device_signals/core/common/signals_features.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/device_signals/core/common/signals_features.h
+@@ -29,7 +29,7 @@ bool IsProfileSignalsReportingEnabled();
+ bool IsBrowserSignalsReportingEnabled();
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ BASE_DECLARE_FEATURE(kDeviceSignalsConsentDialog);
+ 
+ // Returns true if device signals consent dialog has been enabled for
diff --git a/chromium-wip/patches/patch-components_device__signals_core_system__signals_platform__delegate.cc b/chromium-wip/patches/patch-components_device__signals_core_system__signals_platform__delegate.cc
new file mode 100644
index 0000000000..b2f236b0c8
--- /dev/null
+++ b/chromium-wip/patches/patch-components_device__signals_core_system__signals_platform__delegate.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/device_signals/core/system_signals/platform_delegate.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/device_signals/core/system_signals/platform_delegate.cc
+@@ -11,7 +11,7 @@ namespace device_signals {
+ 
+ bool CustomFilePathComparator::operator()(const base::FilePath& a,
+                                           const base::FilePath& b) const {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // On Linux, the file system is case sensitive.
+   return a < b;
+ #else
diff --git a/chromium-wip/patches/patch-components_device__signals_test_signals__contract.cc b/chromium-wip/patches/patch-components_device__signals_test_signals__contract.cc
new file mode 100644
index 0000000000..a16eef0762
--- /dev/null
+++ b/chromium-wip/patches/patch-components_device__signals_test_signals__contract.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/device_signals/test/signals_contract.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/device_signals/test/signals_contract.cc
+@@ -221,7 +221,7 @@ GetSignalsContract(bool is_av_signal_ena
+       base::BindRepeating(VerifyUnset, names::kCrowdStrike);
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   contract[names::kAllowScreenLock] =
+       base::BindRepeating(VerifyUnset, names::kAllowScreenLock);
+   contract[names::kImei] = base::BindRepeating(VerifyUnset, names::kImei);
diff --git a/chromium-wip/patches/patch-components_discardable__memory_service_discardable__shared__memory__manager.cc b/chromium-wip/patches/patch-components_discardable__memory_service_discardable__shared__memory__manager.cc
new file mode 100644
index 0000000000..6efb5cfa4d
--- /dev/null
+++ b/chromium-wip/patches/patch-components_discardable__memory_service_discardable__shared__memory__manager.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/discardable_memory/service/discardable_shared_memory_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/discardable_memory/service/discardable_shared_memory_manager.cc
+@@ -172,7 +172,7 @@ uint64_t GetDefaultMemoryLimit() {
+   // Limits the number of FDs used to 32, assuming a 4MB allocation size.
+   uint64_t max_default_memory_limit = 128 * kMegabyte;
+ #else
+-  uint64_t max_default_memory_limit = 512 * kMegabyte;
++  uint64_t max_default_memory_limit = 128 * kMegabyte;
+ #endif
+ 
+   // Use 1/8th of discardable memory on low-end devices.
diff --git a/chromium-wip/patches/patch-components_embedder__support_user__agent__utils.cc b/chromium-wip/patches/patch-components_embedder__support_user__agent__utils.cc
new file mode 100644
index 0000000000..755917bcdc
--- /dev/null
+++ b/chromium-wip/patches/patch-components_embedder__support_user__agent__utils.cc
@@ -0,0 +1,62 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/embedder_support/user_agent_utils.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/embedder_support/user_agent_utils.cc
+@@ -322,7 +322,7 @@ std::string GetUserAgentPlatform() {
+   return "";
+ #elif BUILDFLAG(IS_MAC)
+   return "Macintosh; ";
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return "X11; ";  // strange, but that's what Firefox uses
+ #elif BUILDFLAG(IS_ANDROID)
+   return "Linux; ";
+@@ -348,7 +348,7 @@ std::string GetUnifiedPlatform() {
+   return "Windows NT 10.0; Win64; x64";
+ #elif BUILDFLAG(IS_FUCHSIA)
+   return "Fuchsia";
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return "X11; Linux x86_64";
+ #elif BUILDFLAG(IS_IOS)
+   if (ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_TABLET) {
+@@ -605,6 +605,9 @@ std::string GetPlatformForUAMetadata() {
+ #else
+   return "Chromium OS";
+ #endif
++#elif BUILDFLAG(IS_BSD)
++  // The internet is weird...
++  return "Linux";
+ #else
+   return std::string(version_info::GetOSType());
+ #endif
+@@ -664,7 +667,7 @@ blink::UserAgentMetadata GetUserAgentMet
+       base::StringPrintf("%d.%d.%d", major, minor, bugfix);
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // TODO(crbug.com/40245146): Remove this Blink feature
+   if (base::FeatureList::IsEnabled(
+           blink::features::kReduceUserAgentDataLinuxPlatformVersion)) {
+@@ -827,6 +830,16 @@ std::string BuildOSCpuInfoFromOSVersionA
+                       "Android %s", os_version.c_str()
+ #elif BUILDFLAG(IS_FUCHSIA)
+                       "Fuchsia"
++#elif BUILDFLAG(IS_BSD)
++#if defined(__x86_64__)
++                      "Linux x86_64; %s %s",
++#elif defined(__aarch64__)
++                      "Linux aarch64; %s %s",
++#else 
++                      "Linux i686; %s %s",
++#endif
++                      unixinfo.sysname,  // e.g. Linux
++                      cpu_type.c_str()   // e.g. i686
+ #elif BUILDFLAG(IS_IOS)
+                       "CPU %s OS %s like Mac OS X", cpu_type.c_str(),
+                       os_version.c_str()
diff --git a/chromium-wip/patches/patch-components_embedder__support_user__agent__utils__unittest.cc b/chromium-wip/patches/patch-components_embedder__support_user__agent__utils__unittest.cc
new file mode 100644
index 0000000000..f5e701a6f3
--- /dev/null
+++ b/chromium-wip/patches/patch-components_embedder__support_user__agent__utils__unittest.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/embedder_support/user_agent_utils_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/embedder_support/user_agent_utils_unittest.cc
+@@ -153,7 +153,7 @@ void CheckUserAgentStringOrdering(bool m
+   ASSERT_EQ("CrOS", pieces[0]);
+   ASSERT_EQ("x86_64", pieces[1]);
+   ASSERT_EQ("14541.0.0", pieces[2]);
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Post-UA Reduction there is a single <unifiedPlatform> value for Linux:
+   // X11; Linux x86_64
+   ASSERT_EQ(2u, pieces.size());
+@@ -341,7 +341,7 @@ class UserAgentUtilsTest : public testin
+         "X11; CrOS x86_64 14541.0.0";
+ #elif BUILDFLAG(IS_FUCHSIA)
+         "Fuchsia";
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+         "X11; Linux x86_64";
+ #elif BUILDFLAG(IS_MAC)
+         "Macintosh; Intel Mac OS X 10_15_7";
+@@ -721,7 +721,7 @@ TEST_F(UserAgentUtilsTest, UserAgentMeta
+ #endif
+ #elif BUILDFLAG(IS_ANDROID)
+   EXPECT_EQ(metadata.platform, "Android");
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   EXPECT_EQ(metadata.platform, "Linux");
+ #elif BUILDFLAG(IS_FREEBSD)
+   EXPECT_EQ(metadata.platform, "FreeBSD");
diff --git a/chromium-wip/patches/patch-components_enterprise_connectors_core_realtime__reporting__client__base.cc b/chromium-wip/patches/patch-components_enterprise_connectors_core_realtime__reporting__client__base.cc
new file mode 100644
index 0000000000..c970fb4a73
--- /dev/null
+++ b/chromium-wip/patches/patch-components_enterprise_connectors_core_realtime__reporting__client__base.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/enterprise/connectors/core/realtime_reporting_client_base.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/enterprise/connectors/core/realtime_reporting_client_base.cc
+@@ -191,7 +191,7 @@ void RealtimeReportingClientBase::Report
+     *event.mutable_time() = ToProtoTimestamp(base::Time::Now());
+   }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(notyet)
+   MaybeCollectDeviceSignalsAndReportEvent(std::move(event), client, settings);
+ #else
+   // Regardless of collecting device signals or not, upload the security event
+@@ -240,7 +240,7 @@ void RealtimeReportingClientBase::Report
+   if (include_profile_user_name) {
+     event.Set(kKeyProfileUserName, GetProfileUserName());
+   }
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(notyet)
+   MaybeCollectDeviceSignalsAndReportEventDeprecated(std::move(event), client,
+                                                     name, settings, time);
+ #else
diff --git a/chromium-wip/patches/patch-components_enterprise_watermarking_watermark.cc b/chromium-wip/patches/patch-components_enterprise_watermarking_watermark.cc
new file mode 100644
index 0000000000..c7a37ed8a1
--- /dev/null
+++ b/chromium-wip/patches/patch-components_enterprise_watermarking_watermark.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/enterprise/watermarking/watermark.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/enterprise/watermarking/watermark.cc
+@@ -31,7 +31,7 @@ gfx::Font WatermarkFont() {
+       "Segoe UI",
+ #elif BUILDFLAG(IS_MAC)
+       "SF Pro Text",
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       "Ubuntu",
+ #elif BUILDFLAG(IS_CHROMEOS)
+       "Google Sans",
+@@ -47,7 +47,7 @@ const gfx::FontList& WatermarkFontList()
+ }
+ 
+ gfx::Font::Weight WatermarkFontWeight() {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return gfx::Font::Weight::SEMIBOLD;
+ #else
+   return gfx::Font::Weight::MEDIUM;
diff --git a/chromium-wip/patches/patch-components_error__page_common_localized__error.cc b/chromium-wip/patches/patch-components_error__page_common_localized__error.cc
new file mode 100644
index 0000000000..616d009c19
--- /dev/null
+++ b/chromium-wip/patches/patch-components_error__page_common_localized__error.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/error_page/common/localized_error.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/error_page/common/localized_error.cc
+@@ -901,7 +901,7 @@ void AddSuggestionsDetails(int error_cod
+   if (suggestions & SUGGEST_PROXY_CONFIG) {
+     // Custom body string.
+     std::u16string inner =
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+         l10n_util::GetStringFUTF16(
+             IDS_ERRORPAGES_SUGGESTION_PROXY_DISABLE_PLATFORM,
+             l10n_util::GetStringUTF16(IDS_SETTINGS_TITLE),
diff --git a/chromium-wip/patches/patch-components_eye__dropper_eye__dropper__view.cc b/chromium-wip/patches/patch-components_eye__dropper_eye__dropper__view.cc
new file mode 100644
index 0000000000..0dae4a806c
--- /dev/null
+++ b/chromium-wip/patches/patch-components_eye__dropper_eye__dropper__view.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/eye_dropper/eye_dropper_view.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/eye_dropper/eye_dropper_view.cc
+@@ -215,7 +215,7 @@ EyeDropperView::EyeDropperView(gfx::Nati
+   // EyeDropper/WidgetDelegate.
+   set_owned_by_client(OwnedByClientPassKey());
+   SetPreferredSize(GetSize());
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Use TYPE_MENU for Linux to ensure that the eye dropper view is displayed
+   // above the color picker.
+   views::Widget::InitParams params(
diff --git a/chromium-wip/patches/patch-components_feature__engagement_public_event__constants.cc b/chromium-wip/patches/patch-components_feature__engagement_public_event__constants.cc
new file mode 100644
index 0000000000..ba06616b92
--- /dev/null
+++ b/chromium-wip/patches/patch-components_feature__engagement_public_event__constants.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/feature_engagement/public/event_constants.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/feature_engagement/public/event_constants.cc
+@@ -11,7 +11,7 @@ namespace feature_engagement {
+ namespace events {
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ const char kNewTabOpened[] = "new_tab_opened";
+ const char kSixthTabOpened[] = "sixth_tab_opened";
+ const char kReadingListItemAdded[] = "reading_list_item_added";
diff --git a/chromium-wip/patches/patch-components_feature__engagement_public_event__constants.h b/chromium-wip/patches/patch-components_feature__engagement_public_event__constants.h
new file mode 100644
index 0000000000..1dab4da809
--- /dev/null
+++ b/chromium-wip/patches/patch-components_feature__engagement_public_event__constants.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/feature_engagement/public/event_constants.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/feature_engagement/public/event_constants.h
+@@ -14,7 +14,7 @@ namespace events {
+ 
+ // Desktop
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ // The user has explicitly opened a new tab via an entry point from inside of
+ // Chrome.
+ extern const char kNewTabOpened[];
diff --git a/chromium-wip/patches/patch-components_feature__engagement_public_feature__configurations.cc b/chromium-wip/patches/patch-components_feature__engagement_public_feature__configurations.cc
new file mode 100644
index 0000000000..7d978a2c6e
--- /dev/null
+++ b/chromium-wip/patches/patch-components_feature__engagement_public_feature__configurations.cc
@@ -0,0 +1,36 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/feature_engagement/public/feature_configurations.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/feature_engagement/public/feature_configurations.cc
+@@ -100,7 +100,7 @@ std::optional<FeatureConfig> CreateNewUs
+ 
+ std::optional<FeatureConfig> GetClientSideFeatureConfig(
+     const base::Feature* feature) {
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ 
+   // The IPH bubble for link capturing has a trigger set to ANY so that it
+   // always shows up. The per app specific guardrails are independently stored
+@@ -119,7 +119,7 @@ std::optional<FeatureConfig> GetClientSi
+ 
+ #endif  // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (kIPHPasswordsManagementBubbleAfterSaveFeature.name == feature->name) {
+     FeatureConfig config;
+     config.valid = true;
+@@ -1924,7 +1924,8 @@ std::optional<FeatureConfig> GetClientSi
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \
++    BUILDFLAG(IS_BSD)
+ 
+   if (kIPHAutofillCreditCardBenefitFeature.name == feature->name) {
+     // The credit card benefit IPH appears up to three times over 10 years and
diff --git a/chromium-wip/patches/patch-components_feature__engagement_public_feature__constants.cc b/chromium-wip/patches/patch-components_feature__engagement_public_feature__constants.cc
new file mode 100644
index 0000000000..1b36c40fa3
--- /dev/null
+++ b/chromium-wip/patches/patch-components_feature__engagement_public_feature__constants.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/feature_engagement/public/feature_constants.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/feature_engagement/public/feature_constants.cc
+@@ -28,7 +28,7 @@ bool IsOnDeviceStorageEnabled() {
+ }
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+ BASE_FEATURE(kEsbDownloadRowPromoFeature,
+              "EsbDownloadRowPromo",
+@@ -802,7 +802,7 @@ BASE_FEATURE(kDefaultBrowserTriggerCrite
+ 
+ #endif  // BUILDFLAG(IS_IOS)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \
+     BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
+ BASE_FEATURE(kIPHAutofillBnplAffirmOrZipSuggestionFeature,
+              "IPH_AutofillBnplAffirmOrZipSuggestion",
+@@ -958,7 +958,7 @@ BASE_FEATURE(kIPHScalableIphGamingFeatur
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // This can be enabled by default, as the DesktopPWAsLinkCapturing
+ // flag is needed for the IPH linked to this feature to work, and
+ // use-cases to show the IPH are guarded by that flag.
diff --git a/chromium-wip/patches/patch-components_feature__engagement_public_feature__constants.h b/chromium-wip/patches/patch-components_feature__engagement_public_feature__constants.h
new file mode 100644
index 0000000000..87eb5331ac
--- /dev/null
+++ b/chromium-wip/patches/patch-components_feature__engagement_public_feature__constants.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/feature_engagement/public/feature_constants.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/feature_engagement/public/feature_constants.h
+@@ -31,7 +31,7 @@ FEATURE_CONSTANTS_DECLARE_FEATURE(kIPHDe
+ FEATURE_CONSTANTS_DECLARE_FEATURE(kIPHDummyFeature);
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+ FEATURE_CONSTANTS_DECLARE_FEATURE(kEsbDownloadRowPromoFeature);
+ #endif
+@@ -361,7 +361,7 @@ FEATURE_CONSTANTS_DECLARE_FEATURE(kDefau
+ 
+ #endif  // BUILDFLAG(IS_IOS)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \
+     BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
+ FEATURE_CONSTANTS_DECLARE_FEATURE(kIPHAutofillBnplAffirmOrZipSuggestionFeature);
+ FEATURE_CONSTANTS_DECLARE_FEATURE(
+@@ -425,7 +425,7 @@ FEATURE_CONSTANTS_DECLARE_FEATURE(kIPHSc
+ FEATURE_CONSTANTS_DECLARE_FEATURE(kIPHScalableIphGamingFeature);
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ FEATURE_CONSTANTS_DECLARE_FEATURE(kIPHDesktopPWAsLinkCapturingLaunch);
+ FEATURE_CONSTANTS_DECLARE_FEATURE(kIPHDesktopPWAsLinkCapturingLaunchAppInTab);
+ FEATURE_CONSTANTS_DECLARE_FEATURE(kIPHSupervisedUserProfileSigninFeature);
diff --git a/chromium-wip/patches/patch-components_feature__engagement_public_feature__list.cc b/chromium-wip/patches/patch-components_feature__engagement_public_feature__list.cc
new file mode 100644
index 0000000000..1bd843e3eb
--- /dev/null
+++ b/chromium-wip/patches/patch-components_feature__engagement_public_feature__list.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/feature_engagement/public/feature_list.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/feature_engagement/public/feature_list.cc
+@@ -193,7 +193,7 @@ const base::Feature* const kAllFeatures[
+     &kIPHIOSPageActionMenu,
+ #endif  // BUILDFLAG(IS_IOS)
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+     &kEsbDownloadRowPromoFeature,
+ #endif
+@@ -266,7 +266,7 @@ const base::Feature* const kAllFeatures[
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) ||
+         // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \
+     BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
+     &kIPHAutofillAiOptInFeature,
+     &kIPHAutofillBnplAffirmOrZipSuggestionFeature,
+@@ -323,7 +323,7 @@ const base::Feature* const kAllFeatures[
+     &kIPHScalableIphGamingFeature,
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     &kIPHDesktopPWAsLinkCapturingLaunch,
+     &kIPHDesktopPWAsLinkCapturingLaunchAppInTab,
+     &kIPHSupervisedUserProfileSigninFeature,
diff --git a/chromium-wip/patches/patch-components_feature__engagement_public_feature__list.h b/chromium-wip/patches/patch-components_feature__engagement_public_feature__list.h
new file mode 100644
index 0000000000..035470cf75
--- /dev/null
+++ b/chromium-wip/patches/patch-components_feature__engagement_public_feature__list.h
@@ -0,0 +1,64 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/feature_engagement/public/feature_list.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/feature_engagement/public/feature_list.h
+@@ -342,7 +342,7 @@ DEFINE_VARIATION_PARAM(kIPHIOSPageAction
+ #endif  // BUILDFLAG(IS_IOS)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+ DEFINE_VARIATION_PARAM(kEsbDownloadRowPromoFeature, "EsbDownloadRowPromo");
+ #endif
+@@ -460,7 +460,8 @@ DEFINE_VARIATION_PARAM(kIPHTabGroupsShar
+         // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \
++    BUILDFLAG(IS_BSD)
+ DEFINE_VARIATION_PARAM(kIPHAutofillAiOptInFeature, "IPH_AutofillAiOptIn");
+ DEFINE_VARIATION_PARAM(kIPHAutofillBnplAffirmOrZipSuggestionFeature,
+                        "IPH_AutofillBnplAffirmOrZipSuggestion");
+@@ -560,7 +561,7 @@ DEFINE_VARIATION_PARAM(kIPHScalableIphHe
+ DEFINE_VARIATION_PARAM(kIPHScalableIphGamingFeature, "IPH_ScalableIphGaming");
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ DEFINE_VARIATION_PARAM(kIPHDesktopPWAsLinkCapturingLaunch,
+                        "IPH_DesktopPWAsLinkCapturingLaunch");
+ DEFINE_VARIATION_PARAM(kIPHDesktopPWAsLinkCapturingLaunchAppInTab,
+@@ -752,7 +753,7 @@ inline constexpr flags_ui::FeatureEntry:
+         VARIATION_ENTRY(kIPHiOSSafariImportFeature),
+         VARIATION_ENTRY(kIPHIOSPageActionMenu),
+ #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+         VARIATION_ENTRY(kIPHBatterySaverModeFeature),
+         VARIATION_ENTRY(kIPHCompanionSidePanelFeature),
+         VARIATION_ENTRY(kIPHCompanionSidePanelRegionSearchFeature),
+@@ -812,7 +813,8 @@ inline constexpr flags_ui::FeatureEntry:
+         // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \
++    BUILDFLAG(IS_BSD)
+         VARIATION_ENTRY(kIPHAutofillAiOptInFeature),
+         VARIATION_ENTRY(kIPHAutofillCreditCardBenefitFeature),
+         VARIATION_ENTRY(kIPHAutofillCardInfoRetrievalSuggestionFeature),
+@@ -866,7 +868,7 @@ inline constexpr flags_ui::FeatureEntry:
+         VARIATION_ENTRY(kIPHScalableIphGamingFeature),
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+         VARIATION_ENTRY(kIPHDesktopPWAsLinkCapturingLaunch),
+         VARIATION_ENTRY(kIPHDesktopPWAsLinkCapturingLaunchAppInTab),
+         VARIATION_ENTRY(kIPHSupervisedUserProfileSigninFeature),
diff --git a/chromium-wip/patches/patch-components_feed_core_proto_v2_wire_version.proto b/chromium-wip/patches/patch-components_feed_core_proto_v2_wire_version.proto
new file mode 100644
index 0000000000..6610a94073
--- /dev/null
+++ b/chromium-wip/patches/patch-components_feed_core_proto_v2_wire_version.proto
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/feed/core/proto/v2/wire/version.proto.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/feed/core/proto/v2/wire/version.proto
+@@ -25,8 +25,8 @@ message Version {
+     BETA = 3;
+     RELEASE = 4;
+   }
+-  optional int32 major = 1;
+-  optional int32 minor = 2;
++  optional int32 gmajor = 1;
++  optional int32 gminor = 2;
+   optional int32 build = 3;
+   optional int32 revision = 4;
+   optional Architecture architecture = 5;
diff --git a/chromium-wip/patches/patch-components_feed_core_v2_feed__network__impl__unittest.cc b/chromium-wip/patches/patch-components_feed_core_v2_feed__network__impl__unittest.cc
new file mode 100644
index 0000000000..5c015cbc7b
--- /dev/null
+++ b/chromium-wip/patches/patch-components_feed_core_v2_feed__network__impl__unittest.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/feed/core/v2/feed_network_impl_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/feed/core/v2/feed_network_impl_unittest.cc
+@@ -746,8 +746,8 @@ TEST_F(FeedNetworkTest, SendApiRequest_D
+ 
+   EXPECT_EQ(feedwire::ClientInfo::CHROME_ANDROID, client_info.app_type());
+   EXPECT_EQ(feedwire::Version::RELEASE, client_info.app_version().build_type());
+-  EXPECT_EQ(1, client_info.app_version().major());
+-  EXPECT_EQ(2, client_info.app_version().minor());
++  EXPECT_EQ(1, client_info.app_version().gmajor());
++  EXPECT_EQ(2, client_info.app_version().gminor());
+   EXPECT_EQ(3, client_info.app_version().build());
+   EXPECT_EQ(4, client_info.app_version().revision());
+   EXPECT_FALSE(client_info.chrome_client_info().start_surface());
diff --git a/chromium-wip/patches/patch-components_feed_core_v2_proto__util.cc b/chromium-wip/patches/patch-components_feed_core_v2_proto__util.cc
new file mode 100644
index 0000000000..732c9d9cb3
--- /dev/null
+++ b/chromium-wip/patches/patch-components_feed_core_v2_proto__util.cc
@@ -0,0 +1,30 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/feed/core/v2/proto_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/feed/core/v2/proto_util.cc
+@@ -92,8 +92,8 @@ feedwire::Version GetPlatformVersionMess
+ 
+   int32_t major, minor, revision;
+   base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &revision);
+-  result.set_major(major);
+-  result.set_minor(minor);
++  result.set_gmajor(major);
++  result.set_gminor(minor);
+   result.set_revision(revision);
+ #if BUILDFLAG(IS_ANDROID)
+   result.set_api_version(base::android::BuildInfo::GetInstance()->sdk_int());
+@@ -108,8 +108,8 @@ feedwire::Version GetAppVersionMessage(c
+   // Chrome's version is in the format: MAJOR,MINOR,BUILD,PATCH.
+   const std::vector<uint32_t>& numbers = chrome_info.version.components();
+   if (numbers.size() > 3) {
+-    result.set_major(static_cast<int32_t>(numbers[0]));
+-    result.set_minor(static_cast<int32_t>(numbers[1]));
++    result.set_gmajor(static_cast<int32_t>(numbers[0]));
++    result.set_gminor(static_cast<int32_t>(numbers[1]));
+     result.set_build(static_cast<int32_t>(numbers[2]));
+     result.set_revision(static_cast<int32_t>(numbers[3]));
+   }
diff --git a/chromium-wip/patches/patch-components_feed_core_v2_proto__util__unittest.cc b/chromium-wip/patches/patch-components_feed_core_v2_proto__util__unittest.cc
new file mode 100644
index 0000000000..63d2b9e05d
--- /dev/null
+++ b/chromium-wip/patches/patch-components_feed_core_v2_proto__util__unittest.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/feed/core/v2/proto_util_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/feed/core/v2/proto_util_unittest.cc
+@@ -42,8 +42,8 @@ TEST(ProtoUtilTest, CreateClientInfo) {
+   feedwire::ClientInfo result = CreateClientInfo(request_metadata);
+   EXPECT_EQ(feedwire::ClientInfo::CHROME_ANDROID, result.app_type());
+   EXPECT_EQ(feedwire::Version::RELEASE, result.app_version().build_type());
+-  EXPECT_EQ(1, result.app_version().major());
+-  EXPECT_EQ(2, result.app_version().minor());
++  EXPECT_EQ(1, result.app_version().gmajor());
++  EXPECT_EQ(2, result.app_version().gminor());
+   EXPECT_EQ(3, result.app_version().build());
+   EXPECT_EQ(4, result.app_version().revision());
+ 
diff --git a/chromium-wip/patches/patch-components_feed_core_v2_test_proto__printer.cc b/chromium-wip/patches/patch-components_feed_core_v2_test_proto__printer.cc
new file mode 100644
index 0000000000..16773bf1c0
--- /dev/null
+++ b/chromium-wip/patches/patch-components_feed_core_v2_test_proto__printer.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/feed/core/v2/test/proto_printer.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/feed/core/v2/test/proto_printer.cc
+@@ -158,8 +158,8 @@ class TextProtoPrinter {
+   }
+   TextProtoPrinter& operator<<(const feedwire::Version& v) {
+     BeginMessage();
+-    PRINT_FIELD(major);
+-    PRINT_FIELD(minor);
++    PRINT_FIELD(gmajor);
++    PRINT_FIELD(gminor);
+     PRINT_FIELD(build);
+     PRINT_FIELD(revision);
+     PRINT_FIELD(architecture);
diff --git a/chromium-wip/patches/patch-components_gcm__driver_gcm__desktop__utils.cc b/chromium-wip/patches/patch-components_gcm__driver_gcm__desktop__utils.cc
new file mode 100644
index 0000000000..0bb1e9b436
--- /dev/null
+++ b/chromium-wip/patches/patch-components_gcm__driver_gcm__desktop__utils.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/gcm_driver/gcm_desktop_utils.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/gcm_driver/gcm_desktop_utils.cc
+@@ -32,7 +32,7 @@ GCMClient::ChromePlatform GetPlatform() 
+   return GCMClient::PLATFORM_ANDROID;
+ #elif BUILDFLAG(IS_CHROMEOS)
+   return GCMClient::PLATFORM_CROS;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return GCMClient::PLATFORM_LINUX;
+ #else
+   // For all other platforms, return as LINUX.
diff --git a/chromium-wip/patches/patch-components_gwp__asan_BUILD.gn b/chromium-wip/patches/patch-components_gwp__asan_BUILD.gn
new file mode 100644
index 0000000000..a6799204f4
--- /dev/null
+++ b/chromium-wip/patches/patch-components_gwp__asan_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/gwp_asan/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/gwp_asan/BUILD.gn
+@@ -15,7 +15,7 @@ test("gwp_asan_unittests") {
+     "//testing/gtest",
+     "//third_party/boringssl",
+   ]
+-  if (is_win || is_mac || is_linux || is_chromeos || is_android || is_ios) {
++  if ((is_win || is_mac || is_linux || is_chromeos || is_android || is_ios) && !is_bsd) {
+     deps += [
+       "//components/gwp_asan/client:unit_tests",
+       "//components/gwp_asan/crash_handler:unit_tests",
diff --git a/chromium-wip/patches/patch-components_gwp__asan_buildflags_buildflags.gni b/chromium-wip/patches/patch-components_gwp__asan_buildflags_buildflags.gni
new file mode 100644
index 0000000000..7e5b2afc56
--- /dev/null
+++ b/chromium-wip/patches/patch-components_gwp__asan_buildflags_buildflags.gni
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/gwp_asan/buildflags/buildflags.gni.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/gwp_asan/buildflags/buildflags.gni
+@@ -10,10 +10,7 @@ import("//build/config/compiler/compiler
+ # Android component builds are disabled due to https://crbug.com/976399
+ # Android requires frame pointers for unwinding, unwind tables aren't shipped in
+ # official builds.
+-supported_platform =
+-    is_linux || is_chromeos || is_mac || is_ios ||
+-    (is_win && (current_cpu == "x64" || current_cpu == "arm64")) ||
+-    (is_android && !is_component_build && enable_frame_pointers)
++supported_platform = false
+ 
+ declare_args() {
+   # Is GWP-ASan malloc/PartitionAlloc hooking enabled for chrome/ on a given
diff --git a/chromium-wip/patches/patch-components_gwp__asan_client_guarded__page__allocator__posix.cc b/chromium-wip/patches/patch-components_gwp__asan_client_guarded__page__allocator__posix.cc
new file mode 100644
index 0000000000..ad694e01be
--- /dev/null
+++ b/chromium-wip/patches/patch-components_gwp__asan_client_guarded__page__allocator__posix.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/gwp_asan/client/guarded_page_allocator_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/gwp_asan/client/guarded_page_allocator_posix.cc
+@@ -35,8 +35,9 @@ void GuardedPageAllocator::MarkPageInacc
+   // mmap() a PROT_NONE page over the address to release it to the system, if
+   // we used mprotect() here the system would count pages in the quarantine
+   // against the RSS.
++  // MAP_ANONYMOUS requires the fd to be -1 on !linux
+   void* err = mmap(ptr, state_.page_size, PROT_NONE,
+-                   MAP_FIXED | MAP_ANONYMOUS | MAP_PRIVATE, 0, 0);
++                   MAP_FIXED | MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
+   PCHECK(err == ptr) << "mmap";
+ }
+ 
diff --git a/chromium-wip/patches/patch-components_gwp__asan_client_gwp__asan.cc b/chromium-wip/patches/patch-components_gwp__asan_client_gwp__asan.cc
new file mode 100644
index 0000000000..309e75b34e
--- /dev/null
+++ b/chromium-wip/patches/patch-components_gwp__asan_client_gwp__asan.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/gwp_asan/client/gwp_asan.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/gwp_asan/client/gwp_asan.cc
+@@ -81,7 +81,7 @@ namespace {
+ // ProcessSamplingBoost is the multiplier to increase the
+ // ProcessSamplingProbability in scenarios where we want to perform additional
+ // testing (e.g., on canary/dev builds).
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ constexpr int kDefaultMaxAllocations = 50;
+ constexpr int kDefaultMaxMetadata = 210;
+ constexpr int kDefaultTotalPages = kCpuIs64Bit ? 2048 : kDefaultMaxMetadata * 2;
diff --git a/chromium-wip/patches/patch-components_gwp__asan_client_gwp__asan__features.cc b/chromium-wip/patches/patch-components_gwp__asan_client_gwp__asan__features.cc
new file mode 100644
index 0000000000..402a118176
--- /dev/null
+++ b/chromium-wip/patches/patch-components_gwp__asan_client_gwp__asan__features.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/gwp_asan/client/gwp_asan_features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/gwp_asan/client/gwp_asan_features.cc
+@@ -9,7 +9,7 @@
+ namespace gwp_asan::internal {
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) ||                                          \
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) ||                     \
+     (BUILDFLAG(IS_ANDROID) && defined(ARCH_CPU_64_BITS))
+ constexpr base::FeatureState kDefaultEnabled = base::FEATURE_ENABLED_BY_DEFAULT;
+ #else
diff --git a/chromium-wip/patches/patch-components_gwp__asan_crash__handler_crash__analyzer.cc b/chromium-wip/patches/patch-components_gwp__asan_crash__handler_crash__analyzer.cc
new file mode 100644
index 0000000000..b607650d60
--- /dev/null
+++ b/chromium-wip/patches/patch-components_gwp__asan_crash__handler_crash__analyzer.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/gwp_asan/crash_handler/crash_analyzer.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/gwp_asan/crash_handler/crash_analyzer.cc
+@@ -35,7 +35,7 @@
+ #include "third_party/crashpad/crashpad/snapshot/process_snapshot.h"
+ #include "third_party/crashpad/crashpad/util/process/process_memory.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ #include <signal.h>
+ #elif BUILDFLAG(IS_APPLE)
+ #include <mach/exception_types.h>
+@@ -113,7 +113,7 @@ bool CrashAnalyzer::GetExceptionInfo(
+ 
+ crashpad::VMAddress CrashAnalyzer::GetAccessAddress(
+     const crashpad::ExceptionSnapshot& exception) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   if (exception.Exception() == SIGSEGV || exception.Exception() == SIGBUS)
+     return exception.ExceptionAddress();
+ #elif BUILDFLAG(IS_APPLE)
diff --git a/chromium-wip/patches/patch-components_live__caption_caption__util.cc b/chromium-wip/patches/patch-components_live__caption_caption__util.cc
new file mode 100644
index 0000000000..6415c8ed29
--- /dev/null
+++ b/chromium-wip/patches/patch-components_live__caption_caption__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/live_caption/caption_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/live_caption/caption_util.cc
+@@ -141,7 +141,7 @@ bool IsHeadlessCaptionFeatureSupported()
+ std::string GetCaptionSettingsUrl() {
+ #if BUILDFLAG(IS_CHROMEOS)
+   return "chrome://os-settings/audioAndCaptions";
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return "chrome://settings/captions";
+ #elif BUILDFLAG(IS_WIN)
+   return base::win::GetVersion() >= base::win::Version::WIN10
diff --git a/chromium-wip/patches/patch-components_live__caption_caption__util.h b/chromium-wip/patches/patch-components_live__caption_caption__util.h
new file mode 100644
index 0000000000..07aac6f61a
--- /dev/null
+++ b/chromium-wip/patches/patch-components_live__caption_caption__util.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/live_caption/caption_util.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/live_caption/caption_util.h
+@@ -15,7 +15,7 @@ class PrefService;
+ namespace captions {
+ 
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ extern const char kCaptionSettingsUrl[];
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ||
+         // BUILDFLAG(IS_MAC)
diff --git a/chromium-wip/patches/patch-components_media__router_common_media__source.cc b/chromium-wip/patches/patch-components_media__router_common_media__source.cc
new file mode 100644
index 0000000000..7c7330ae93
--- /dev/null
+++ b/chromium-wip/patches/patch-components_media__router_common_media__source.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/media_router/common/media_source.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/media_router/common/media_source.cc
+@@ -59,7 +59,7 @@ bool IsSystemAudioCaptureSupported() {
+   if (!media::IsSystemLoopbackCaptureSupported()) {
+     return false;
+   }
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return base::FeatureList::IsEnabled(media::kPulseaudioLoopbackForCast);
+ #else
+   return true;
diff --git a/chromium-wip/patches/patch-components_media__router_common_providers_cast_channel_cast__message__util.cc b/chromium-wip/patches/patch-components_media__router_common_providers_cast_channel_cast__message__util.cc
new file mode 100644
index 0000000000..69b5448529
--- /dev/null
+++ b/chromium-wip/patches/patch-components_media__router_common_providers_cast_channel_cast__message__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/media_router/common/providers/cast/channel/cast_message_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/media_router/common/providers/cast/channel/cast_message_util.cc
+@@ -168,7 +168,7 @@ int GetVirtualConnectPlatformValue() {
+   return 4;
+ #elif BUILDFLAG(IS_CHROMEOS)
+   return 5;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return 6;
+ #else
+   return 0;
diff --git a/chromium-wip/patches/patch-components_media__router_common_providers_cast_channel_enum__table.h b/chromium-wip/patches/patch-components_media__router_common_providers_cast_channel_enum__table.h
new file mode 100644
index 0000000000..1f6d473807
--- /dev/null
+++ b/chromium-wip/patches/patch-components_media__router_common_providers_cast_channel_enum__table.h
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/media_router/common/providers/cast/channel/enum_table.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/media_router/common/providers/cast/channel/enum_table.h
+@@ -368,7 +368,12 @@ class EnumTable {
+ 
+  private:
+ #ifdef ARCH_CPU_64_BITS
++#ifdef __cpp_lib_hardware_interference_size
+   alignas(std::hardware_destructive_interference_size)
++#else
++  static constexpr std::size_t hardware_destructive_interference_size = 64;
++  alignas(hardware_destructive_interference_size)
++#endif
+ #endif
+       std::initializer_list<Entry> data_;
+   bool is_sorted_;
diff --git a/chromium-wip/patches/patch-components_metrics_drive__metrics__provider.cc b/chromium-wip/patches/patch-components_metrics_drive__metrics__provider.cc
new file mode 100644
index 0000000000..cc8ca2ea6c
--- /dev/null
+++ b/chromium-wip/patches/patch-components_metrics_drive__metrics__provider.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/metrics/drive_metrics_provider.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/metrics/drive_metrics_provider.cc
+@@ -21,7 +21,7 @@
+ namespace metrics {
+ 
+ namespace {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void RecordTriStateMetric(const char* name, std::optional<bool> sample) {
+   base::UmaHistogramEnumeration(
+       name, !sample.has_value()
+@@ -106,7 +106,7 @@ void DriveMetricsProvider::FillDriveMetr
+     drive->set_has_seek_penalty(*response.has_seek_penalty);
+   }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   RecordTriStateMetric("UMA.DriveIsRemovableResult", response.is_removable);
+ #endif
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
diff --git a/chromium-wip/patches/patch-components_metrics_dwa_dwa__service.cc b/chromium-wip/patches/patch-components_metrics_dwa_dwa__service.cc
new file mode 100644
index 0000000000..ff3a71e1d8
--- /dev/null
+++ b/chromium-wip/patches/patch-components_metrics_dwa_dwa__service.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/metrics/dwa/dwa_service.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/metrics/dwa/dwa_service.cc
+@@ -162,7 +162,7 @@ void DwaService::RecordCoarseSystemInfor
+   coarse_system_info->set_platform(::dwa::CoarseSystemInfo::PLATFORM_WINDOWS);
+ #elif BUILDFLAG(IS_MAC)
+   coarse_system_info->set_platform(::dwa::CoarseSystemInfo::PLATFORM_MACOS);
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   coarse_system_info->set_platform(::dwa::CoarseSystemInfo::PLATFORM_LINUX);
+ #elif BUILDFLAG(IS_ANDROID)
+   // TODO(b/366276323): Populate set_platform using more granular
diff --git a/chromium-wip/patches/patch-components_metrics_metrics__log.cc b/chromium-wip/patches/patch-components_metrics_metrics__log.cc
new file mode 100644
index 0000000000..cb78c4d8fd
--- /dev/null
+++ b/chromium-wip/patches/patch-components_metrics_metrics__log.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/metrics/metrics_log.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/metrics/metrics_log.cc
+@@ -58,7 +58,7 @@
+ #include "base/win/current_module.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "base/environment.h"
+ #include "base/nix/xdg_util.h"
+ #endif
+@@ -154,7 +154,7 @@ void RecordCurrentTime(
+   }
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ metrics::SystemProfileProto::OS::XdgSessionType ToProtoSessionType(
+     base::nix::SessionType session_type) {
+   switch (session_type) {
+@@ -439,7 +439,7 @@ void MetricsLog::RecordCoreSystemProfile
+ // OperatingSystemVersion refers to the ChromeOS release version.
+ #if BUILDFLAG(IS_CHROMEOS)
+   os->set_kernel_version(base::SysInfo::KernelVersion());
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Linux operating system version is copied over into kernel version to be
+   // consistent.
+   os->set_kernel_version(base::SysInfo::OperatingSystemVersion());
+@@ -456,7 +456,7 @@ void MetricsLog::RecordCoreSystemProfile
+   os->set_build_number(base::SysInfo::GetIOSBuildNumber());
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<base::Environment> env = base::Environment::Create();
+   os->set_xdg_session_type(ToProtoSessionType(base::nix::GetSessionType(*env)));
+   os->set_xdg_current_desktop(
diff --git a/chromium-wip/patches/patch-components_metrics_motherboard.cc b/chromium-wip/patches/patch-components_metrics_motherboard.cc
new file mode 100644
index 0000000000..a1f50409c2
--- /dev/null
+++ b/chromium-wip/patches/patch-components_metrics_motherboard.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/metrics/motherboard.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/metrics/motherboard.cc
+@@ -1,6 +1,7 @@
+ // Copyright 2022 The Chromium Authors
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
++// CHECK
+ 
+ #include "components/metrics/motherboard.h"
+ 
diff --git a/chromium-wip/patches/patch-components_named__mojo__ipc__server_connection__info.h b/chromium-wip/patches/patch-components_named__mojo__ipc__server_connection__info.h
new file mode 100644
index 0000000000..51b71630a1
--- /dev/null
+++ b/chromium-wip/patches/patch-components_named__mojo__ipc__server_connection__info.h
@@ -0,0 +1,36 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/named_mojo_ipc_server/connection_info.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/named_mojo_ipc_server/connection_info.h
+@@ -12,8 +12,17 @@
+ #include "base/win/scoped_handle.h"
+ #elif BUILDFLAG(IS_MAC)
+ #include <bsm/libbsm.h>
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
++#if BUILDFLAG(IS_OPENBSD)
++#include <sys/ucred.h>
++#endif
+ #include <sys/socket.h>
++#if defined(__NetBSD__)
++#include <sys/un.h>
++#define ucred unpcbid
++#define SO_PEERCRED LOCAL_PEEREID
++#define pid unp_pid
++#endif
+ #endif
+ 
+ namespace named_mojo_ipc_server {
+@@ -29,7 +38,7 @@ struct ConnectionInfo {
+   base::ProcessId pid{};
+ #if BUILDFLAG(IS_MAC)
+   audit_token_t audit_token{};
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD)
+   ucred credentials{};
+ #endif
+ };
diff --git a/chromium-wip/patches/patch-components_named__mojo__ipc__server_named__mojo__ipc__server__client__util.cc b/chromium-wip/patches/patch-components_named__mojo__ipc__server_named__mojo__ipc__server__client__util.cc
new file mode 100644
index 0000000000..573d738dd3
--- /dev/null
+++ b/chromium-wip/patches/patch-components_named__mojo__ipc__server_named__mojo__ipc__server__client__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/named_mojo_ipc_server/named_mojo_ipc_server_client_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/named_mojo_ipc_server/named_mojo_ipc_server_client_util.cc
+@@ -23,7 +23,7 @@ namespace named_mojo_ipc_server {
+ // static
+ mojo::PlatformChannelEndpoint ConnectToServer(
+     const mojo::NamedPlatformChannel::ServerName& server_name) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   return mojo::NamedPlatformChannel::ConnectToServer(server_name);
+ #elif BUILDFLAG(IS_MAC)
+   mojo::PlatformChannelEndpoint endpoint =
diff --git a/chromium-wip/patches/patch-components_named__mojo__ipc__server_named__mojo__server__endpoint__connector__linux.cc b/chromium-wip/patches/patch-components_named__mojo__ipc__server_named__mojo__server__endpoint__connector__linux.cc
new file mode 100644
index 0000000000..349a042983
--- /dev/null
+++ b/chromium-wip/patches/patch-components_named__mojo__ipc__server_named__mojo__server__endpoint__connector__linux.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/named_mojo_ipc_server/named_mojo_server_endpoint_connector_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/named_mojo_ipc_server/named_mojo_server_endpoint_connector_linux.cc
+@@ -89,7 +89,9 @@ void NamedMojoServerEndpointConnectorLin
+     PLOG(ERROR) << "getsockopt failed.";
+     return;
+   }
++#if !BUILDFLAG(IS_OPENBSD)
+   info->pid = info->credentials.pid;
++#endif
+ 
+   mojo::PlatformChannelEndpoint endpoint(
+       mojo::PlatformHandle(std::move(connection_fd)));
diff --git a/chromium-wip/patches/patch-components_named__system__lock_BUILD.gn b/chromium-wip/patches/patch-components_named__system__lock_BUILD.gn
new file mode 100644
index 0000000000..22494ec2c8
--- /dev/null
+++ b/chromium-wip/patches/patch-components_named__system__lock_BUILD.gn
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/named_system_lock/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/named_system_lock/BUILD.gn
+@@ -5,7 +5,7 @@
+ static_library("named_system_lock") {
+   sources = [ "lock.h" ]
+   deps = [ "//base" ]
+-  if (is_linux) {
++  if (!is_bsd && is_linux) {
+     sources += [ "lock_linux.cc" ]
+   } else if (is_mac) {
+     sources += [ "lock_mac.mm" ]
+@@ -20,7 +20,7 @@ source_set("unit_tests") {
+   sources = []
+ 
+   # Disable NamedSystemLockTest on unsupported platforms.
+-  if (is_linux || is_win || is_mac) {
++  if (!is_bsd && (is_linux || is_win || is_mac)) {
+     sources += [ "lock_unittest.cc" ]
+   }
+ 
diff --git a/chromium-wip/patches/patch-components_named__system__lock_lock.h b/chromium-wip/patches/patch-components_named__system__lock_lock.h
new file mode 100644
index 0000000000..3e74140ae2
--- /dev/null
+++ b/chromium-wip/patches/patch-components_named__system__lock_lock.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/named_system_lock/lock.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/named_system_lock/lock.h
+@@ -38,7 +38,7 @@ class ScopedLock {
+   // may acquire that lock. The lock name has different meanings per platform:
+   // Linux: A shared memory object name starting with `/`. E.g. `/MyApp.lock`.
+   // Mac: A bootstrap service name (see `man bootstrap_check_in`).
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   static std::unique_ptr<ScopedLock> Create(const std::string& name,
+                                             base::TimeDelta timeout);
+ #elif BUILDFLAG(IS_WIN)
diff --git a/chromium-wip/patches/patch-components_named__system__lock_lock__unittest.cc b/chromium-wip/patches/patch-components_named__system__lock_lock__unittest.cc
new file mode 100644
index 0000000000..28f5081062
--- /dev/null
+++ b/chromium-wip/patches/patch-components_named__system__lock_lock__unittest.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/named_system_lock/lock_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/named_system_lock/lock_unittest.cc
+@@ -18,7 +18,7 @@
+ #include "build/build_config.h"
+ #include "testing/gtest/include/gtest/gtest.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include <fcntl.h>
+ #include <sys/mman.h>
+ 
+@@ -45,7 +45,7 @@ class NamedSystemLockTest : public ::tes
+   const std::string lock_name_ = base::UnguessableToken::Create().ToString();
+ 
+   std::unique_ptr<ScopedLock> CreateLock() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+     return ScopedLock::Create(lock_name_, base::Seconds(0));
+ #else
+     CSecurityAttributes sa;
+@@ -95,7 +95,7 @@ TEST_F(NamedSystemLockTest, TryLockInThr
+   EXPECT_TRUE(CreateLock());
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ TEST_F(NamedSystemLockTest, SharedMemoryWrongPermissions) {
+   // Create a shared memory region with overpermissive perms.
+   int shm_fd = shm_open(lock_name_.c_str(), O_RDWR | O_CREAT | O_EXCL,
diff --git a/chromium-wip/patches/patch-components_optimization__guide_core_optimization__guide__features.cc b/chromium-wip/patches/patch-components_optimization__guide_core_optimization__guide__features.cc
new file mode 100644
index 0000000000..7c9aa8d5d5
--- /dev/null
+++ b/chromium-wip/patches/patch-components_optimization__guide_core_optimization__guide__features.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/optimization_guide/core/optimization_guide_features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/optimization_guide/core/optimization_guide_features.cc
+@@ -133,7 +133,7 @@ BASE_FEATURE(kOptimizationGuideModelExec
+ // Whether to use the on device model service in optimization guide.
+ BASE_FEATURE(kOptimizationGuideOnDeviceModel,
+              "OptimizationGuideOnDeviceModel",
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+              base::FEATURE_ENABLED_BY_DEFAULT);
+ #else
+              base::FEATURE_DISABLED_BY_DEFAULT);
diff --git a/chromium-wip/patches/patch-components_optimization__guide_core_optimization__guide__util.cc b/chromium-wip/patches/patch-components_optimization__guide_core_optimization__guide__util.cc
new file mode 100644
index 0000000000..3a49bb7184
--- /dev/null
+++ b/chromium-wip/patches/patch-components_optimization__guide_core_optimization__guide__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/optimization_guide/core/optimization_guide_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/optimization_guide/core/optimization_guide_util.cc
+@@ -37,7 +37,7 @@ optimization_guide::proto::Platform GetP
+   return optimization_guide::proto::PLATFORM_CHROMEOS;
+ #elif BUILDFLAG(IS_ANDROID)
+   return optimization_guide::proto::PLATFORM_ANDROID;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return optimization_guide::proto::PLATFORM_LINUX;
+ #else
+   return optimization_guide::proto::PLATFORM_UNDEFINED;
diff --git a/chromium-wip/patches/patch-components_os__crypt_async_browser_secret__portal__key__provider.cc b/chromium-wip/patches/patch-components_os__crypt_async_browser_secret__portal__key__provider.cc
new file mode 100644
index 0000000000..83d2425f8e
--- /dev/null
+++ b/chromium-wip/patches/patch-components_os__crypt_async_browser_secret__portal__key__provider.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/os_crypt/async/browser/secret_portal_key_provider.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/os_crypt/async/browser/secret_portal_key_provider.cc
+@@ -5,7 +5,9 @@
+ #include "components/os_crypt/async/browser/secret_portal_key_provider.h"
+ 
+ #include <fcntl.h>
++#if BUILDFLAG(IS_LINUX)
+ #include <linux/limits.h>
++#endif
+ 
+ #include <array>
+ #include <utility>
diff --git a/chromium-wip/patches/patch-components_os__crypt_sync_libsecret__util__linux.cc b/chromium-wip/patches/patch-components_os__crypt_sync_libsecret__util__linux.cc
new file mode 100644
index 0000000000..d98ac90d58
--- /dev/null
+++ b/chromium-wip/patches/patch-components_os__crypt_sync_libsecret__util__linux.cc
@@ -0,0 +1,33 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/os_crypt/sync/libsecret_util_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/os_crypt/sync/libsecret_util_linux.cc
+@@ -185,16 +185,22 @@ bool LibsecretLoader::EnsureLibsecretLoa
+ 
+ // static
+ bool LibsecretLoader::LoadLibsecret() {
++#if BUILDFLAG(IS_BSD)
++  const char* kSecretLib = "libsecret-1.so";
++#else
++  const char* kSecretLib = "libsecret-1.so.0";
++#endif
++
+   if (libsecret_loaded_)
+     return true;
+ 
+-  static void* handle = dlopen("libsecret-1.so.0", RTLD_NOW | RTLD_GLOBAL);
++  static void* handle = dlopen(kSecretLib, RTLD_NOW | RTLD_GLOBAL);
+   if (!handle) {
+     // We wanted to use libsecret, but we couldn't load it. Warn, because
+     // either the user asked for this, or we autodetected it incorrectly. (Or
+     // the system has broken libraries, which is also good to warn about.)
+     // TODO(crbug.com/40467093): Channel this message to the user-facing log
+-    VLOG(1) << "Could not load libsecret-1.so.0: " << dlerror();
++    VLOG(1) << "Could not load " << kSecretLib << ": " << dlerror();
+     return false;
+   }
+ 
diff --git a/chromium-wip/patches/patch-components_os__crypt_sync_os__crypt.h b/chromium-wip/patches/patch-components_os__crypt_sync_os__crypt.h
new file mode 100644
index 0000000000..8db804c569
--- /dev/null
+++ b/chromium-wip/patches/patch-components_os__crypt_sync_os__crypt.h
@@ -0,0 +1,69 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/os_crypt/sync/os_crypt.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/os_crypt/sync/os_crypt.h
+@@ -23,7 +23,7 @@ class AppleKeychain;
+ }
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ class KeyStorageLinux;
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+@@ -39,7 +39,7 @@ struct Config;
+ // Temporary interface due to OSCrypt refactor. See OSCryptImpl for descriptions
+ // of what each function does.
+ namespace OSCrypt {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(OS_CRYPT)
+ void SetConfig(std::unique_ptr<os_crypt::Config> config);
+ #endif  // BUILDFLAG(IS_LINUX)
+@@ -84,7 +84,7 @@ COMPONENT_EXPORT(OS_CRYPT) void UseMockK
+ COMPONENT_EXPORT(OS_CRYPT) void SetLegacyEncryptionForTesting(bool legacy);
+ COMPONENT_EXPORT(OS_CRYPT) void ResetStateForTesting();
+ #endif  // BUILDFLAG(IS_WIN)
+-#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS))
++#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(OS_CRYPT)
+ void UseMockKeyStorageForTesting(
+     base::OnceCallback<std::unique_ptr<KeyStorageLinux>()>
+@@ -118,7 +118,7 @@ class COMPONENT_EXPORT(OS_CRYPT) OSCrypt
+   // Returns singleton instance of OSCryptImpl.
+   static OSCryptImpl* GetInstance();
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Set the configuration of OSCryptImpl.
+   // This method, or SetRawEncryptionKey(), must be called before using
+   // EncryptString() and DecryptString().
+@@ -214,7 +214,7 @@ class COMPONENT_EXPORT(OS_CRYPT) OSCrypt
+   void ResetStateForTesting();
+ #endif
+ 
+-#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS))
++#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_BSD)
+   // For unit testing purposes, inject methods to be used.
+   // |storage_provider_factory| provides the desired |KeyStorage|
+   // implementation. If the provider returns |nullptr|, a hardcoded password
+@@ -241,13 +241,13 @@ class COMPONENT_EXPORT(OS_CRYPT) OSCrypt
+   bool DeriveKey();
+ #endif  // BUILDFLAG(IS_APPLE)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
+   // This lock is used to make the GetEncryptionKey and
+   // GetRawEncryptionKey methods thread-safe.
+   static base::Lock& GetLock();
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   static constexpr size_t kDerivedKeyBytes = 16;
+ 
+   crypto::SubtlePassKey MakeCryptoPassKey();
diff --git a/chromium-wip/patches/patch-components_paint__preview_browser_paint__preview__client.cc b/chromium-wip/patches/patch-components_paint__preview_browser_paint__preview__client.cc
new file mode 100644
index 0000000000..f063c19039
--- /dev/null
+++ b/chromium-wip/patches/patch-components_paint__preview_browser_paint__preview__client.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/paint_preview/browser/paint_preview_client.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/paint_preview/browser/paint_preview_client.cc
+@@ -326,8 +326,8 @@ void PaintPreviewClient::CapturePaintPre
+   metadata->set_version(kPaintPreviewVersion);
+   auto* chromeVersion = metadata->mutable_chrome_version();
+   const auto& current_chrome_version = version_info::GetVersion();
+-  chromeVersion->set_major(current_chrome_version.components()[0]);
+-  chromeVersion->set_minor(current_chrome_version.components()[1]);
++  chromeVersion->set_gmajor(current_chrome_version.components()[0]);
++  chromeVersion->set_gminor(current_chrome_version.components()[1]);
+   chromeVersion->set_build(current_chrome_version.components()[2]);
+   chromeVersion->set_patch(current_chrome_version.components()[3]);
+   document_data.callback = std::move(callback);
diff --git a/chromium-wip/patches/patch-components_paint__preview_browser_paint__preview__client__unittest.cc b/chromium-wip/patches/patch-components_paint__preview_browser_paint__preview__client__unittest.cc
new file mode 100644
index 0000000000..5e536f9e59
--- /dev/null
+++ b/chromium-wip/patches/patch-components_paint__preview_browser_paint__preview__client__unittest.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/paint_preview/browser/paint_preview_client_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/paint_preview/browser/paint_preview_client_unittest.cc
+@@ -174,8 +174,8 @@ TEST_P(PaintPreviewClientRenderViewHostT
+   metadata->set_version(kPaintPreviewVersion);
+   auto* chromeVersion = metadata->mutable_chrome_version();
+   const auto& current_chrome_version = version_info::GetVersion();
+-  chromeVersion->set_major(current_chrome_version.components()[0]);
+-  chromeVersion->set_minor(current_chrome_version.components()[1]);
++  chromeVersion->set_gmajor(current_chrome_version.components()[0]);
++  chromeVersion->set_gminor(current_chrome_version.components()[1]);
+   chromeVersion->set_build(current_chrome_version.components()[2]);
+   chromeVersion->set_patch(current_chrome_version.components()[3]);
+   PaintPreviewFrameProto* main_frame = expected_proto.mutable_root_frame();
diff --git a/chromium-wip/patches/patch-components_paint__preview_common_proto_paint__preview.proto b/chromium-wip/patches/patch-components_paint__preview_common_proto_paint__preview.proto
new file mode 100644
index 0000000000..c4c494060d
--- /dev/null
+++ b/chromium-wip/patches/patch-components_paint__preview_common_proto_paint__preview.proto
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/paint_preview/common/proto/paint_preview.proto.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/paint_preview/common/proto/paint_preview.proto
+@@ -82,8 +82,8 @@ message PaintPreviewFrameProto {
+ // Stores Chrome version.
+ // NEXT_TAG = 5
+ message ChromeVersionProto {
+-  optional uint64 major = 1;
+-  optional uint64 minor = 2;
++  optional uint64 gmajor = 1;
++  optional uint64 gminor = 2;
+   optional uint64 build = 3;
+   optional uint64 patch = 4;
+ }
diff --git a/chromium-wip/patches/patch-components_paint__preview_player_player__compositor__delegate.cc b/chromium-wip/patches/patch-components_paint__preview_player_player__compositor__delegate.cc
new file mode 100644
index 0000000000..54dad9926b
--- /dev/null
+++ b/chromium-wip/patches/patch-components_paint__preview_player_player__compositor__delegate.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/paint_preview/player/player_compositor_delegate.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/paint_preview/player/player_compositor_delegate.cc
+@@ -433,8 +433,8 @@ void PlayerCompositorDelegate::ValidateP
+   auto chrome_version = capture_result_->proto.metadata().chrome_version();
+   const auto& current_chrome_version = version_info::GetVersion();
+   if (capture_result_->proto.metadata().has_chrome_version() &&
+-      chrome_version.major() == current_chrome_version.components()[0] &&
+-      chrome_version.minor() == current_chrome_version.components()[1] &&
++      chrome_version.gmajor() == current_chrome_version.components()[0] &&
++      chrome_version.gminor() == current_chrome_version.components()[1] &&
+       chrome_version.build() == current_chrome_version.components()[2] &&
+       chrome_version.patch() == current_chrome_version.components()[3]) {
+     paint_preview_service_->GetFileMixin()->GetAXTreeUpdate(
diff --git a/chromium-wip/patches/patch-components_password__manager_core_browser_features_password__features.cc b/chromium-wip/patches/patch-components_password__manager_core_browser_features_password__features.cc
new file mode 100644
index 0000000000..9040c726cf
--- /dev/null
+++ b/chromium-wip/patches/patch-components_password__manager_core_browser_features_password__features.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/password_manager/core/browser/features/password_features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/password_manager/core/browser/features/password_features.cc
+@@ -47,7 +47,7 @@ BASE_FEATURE(kClearUndecryptablePassword
+ BASE_FEATURE(kClearUndecryptablePasswordsOnSync,
+              "ClearUndecryptablePasswordsInSync",
+ #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+              base::FEATURE_ENABLED_BY_DEFAULT
+ #else
+              base::FEATURE_DISABLED_BY_DEFAULT
+@@ -124,7 +124,7 @@ BASE_FEATURE(kReuseDetectionBasedOnPassw
+              "ReuseDetectionBasedOnPasswordHashes",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kRestartToGainAccessToKeychain,
+              "RestartToGainAccessToKeychain",
+ #if BUILDFLAG(IS_MAC)
diff --git a/chromium-wip/patches/patch-components_password__manager_core_browser_features_password__features.h b/chromium-wip/patches/patch-components_password__manager_core_browser_features_password__features.h
new file mode 100644
index 0000000000..21f09e9880
--- /dev/null
+++ b/chromium-wip/patches/patch-components_password__manager_core_browser_features_password__features.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/password_manager/core/browser/features/password_features.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/password_manager/core/browser/features/password_features.h
+@@ -118,7 +118,7 @@ BASE_DECLARE_FEATURE(kPasswordManagerLog
+ // Detects password reuse based on hashed password values.
+ BASE_DECLARE_FEATURE(kReuseDetectionBasedOnPasswordHashes);
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Enables "Needs access to keychain, restart chrome" bubble and banner.
+ BASE_DECLARE_FEATURE(kRestartToGainAccessToKeychain);
+ #endif  // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
diff --git a/chromium-wip/patches/patch-components_password__manager_core_browser_password__autofill__manager.cc b/chromium-wip/patches/patch-components_password__manager_core_browser_password__autofill__manager.cc
new file mode 100644
index 0000000000..3722c3d726
--- /dev/null
+++ b/chromium-wip/patches/patch-components_password__manager_core_browser_password__autofill__manager.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/password_manager/core/browser/password_autofill_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/password_manager/core/browser/password_autofill_manager.cc
+@@ -288,7 +288,7 @@ void PasswordAutofillManager::DidAcceptS
+       }
+       if (password_credential->is_grouped_affiliation) {
+ #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+         cross_domain_confirmation_controller_ =
+             password_client_->ShowCrossDomainConfirmationPopup(
+                 last_popup_open_args_.element_bounds,
+@@ -525,7 +525,7 @@ void PasswordAutofillManager::DidNavigat
+   manual_fallback_metrics_recorder_ =
+       std::make_unique<PasswordManualFallbackMetricsRecorder>();
+ #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   cross_domain_confirmation_controller_.reset();
+ #endif
+   wait_for_passkeys_timer_.Stop();
diff --git a/chromium-wip/patches/patch-components_password__manager_core_browser_password__autofill__manager.h b/chromium-wip/patches/patch-components_password__manager_core_browser_password__autofill__manager.h
new file mode 100644
index 0000000000..fd1a4ad919
--- /dev/null
+++ b/chromium-wip/patches/patch-components_password__manager_core_browser_password__autofill__manager.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/password_manager/core/browser/password_autofill_manager.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/password_manager/core/browser/password_autofill_manager.h
+@@ -267,7 +267,7 @@ class PasswordAutofillManager : public a
+ 
+   // Stores the controller of warning popup UI on cross domain filling.
+ #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<PasswordCrossDomainConfirmationPopupController>
+       cross_domain_confirmation_controller_;
+ #endif
diff --git a/chromium-wip/patches/patch-components_password__manager_core_browser_password__form__filling.cc b/chromium-wip/patches/patch-components_password__manager_core_browser_password__form__filling.cc
new file mode 100644
index 0000000000..b7b0542f0c
--- /dev/null
+++ b/chromium-wip/patches/patch-components_password__manager_core_browser_password__form__filling.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/password_manager/core/browser/password_form_filling.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/password_manager/core/browser/password_form_filling.cc
+@@ -165,7 +165,7 @@ LikelyFormFilling SendFillInformationToR
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     if (!should_show_popup_without_passwords) {
+       client->MaybeShowSavePasswordPrimingPromo(observed_form.url);
+     }
diff --git a/chromium-wip/patches/patch-components_password__manager_core_browser_password__form__manager.cc b/chromium-wip/patches/patch-components_password__manager_core_browser_password__form__manager.cc
new file mode 100644
index 0000000000..d5ced8219b
--- /dev/null
+++ b/chromium-wip/patches/patch-components_password__manager_core_browser_password__form__manager.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/password_manager/core/browser/password_form_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/password_manager/core/browser/password_form_manager.cc
+@@ -66,7 +66,7 @@
+ #include "components/webauthn/android/webauthn_cred_man_delegate.h"
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "components/os_crypt/sync/os_crypt.h"
+ #endif
+ 
+@@ -242,7 +242,7 @@ bool ShouldUploadCrowdsourcingVotes(cons
+   return false;
+ }
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ bool ShouldShowKeychainErrorBubble(
+     std::optional<PasswordStoreBackendError> backend_error) {
+   if (!backend_error.has_value()) {
+@@ -916,7 +916,7 @@ void PasswordFormManager::OnFetchComplet
+         error.value().type);
+   }
+ 
+-#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (ShouldShowKeychainErrorBubble(
+           form_fetcher_->GetProfileStoreBackendError())) {
+     client_->NotifyKeychainError();
diff --git a/chromium-wip/patches/patch-components_password__manager_core_browser_password__manager.cc b/chromium-wip/patches/patch-components_password__manager_core_browser_password__manager.cc
new file mode 100644
index 0000000000..c8c1b5b1e3
--- /dev/null
+++ b/chromium-wip/patches/patch-components_password__manager_core_browser_password__manager.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/password_manager/core/browser/password_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/password_manager/core/browser/password_manager.cc
+@@ -507,7 +507,7 @@ void PasswordManager::RegisterProfilePre
+       prefs::kAutofillableCredentialsAccountStoreLoginDatabase, false);
+ #endif  // BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS)
+   registry->RegisterBooleanPref(prefs::kPasswordSharingEnabled, true);
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   registry->RegisterIntegerPref(prefs::kRelaunchChromeBubbleDismissedCounter,
+                                 0);
+ #endif
+@@ -520,7 +520,7 @@ void PasswordManager::RegisterProfilePre
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_IOS)
++    BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD)
+   registry->RegisterBooleanPref(prefs::kDeletingUndecryptablePasswordsEnabled,
+                                 true);
+ #endif
diff --git a/chromium-wip/patches/patch-components_password__manager_core_browser_password__manager__client.h b/chromium-wip/patches/patch-components_password__manager_core_browser_password__manager__client.h
new file mode 100644
index 0000000000..789be55279
--- /dev/null
+++ b/chromium-wip/patches/patch-components_password__manager_core_browser_password__manager__client.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/password_manager/core/browser/password_manager_client.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/password_manager/core/browser/password_manager_client.h
+@@ -30,7 +30,7 @@
+ #include "net/cert/cert_status_flags.h"
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "base/i18n/rtl.h"
+ #include "components/password_manager/core/browser/password_cross_domain_confirmation_popup_controller.h"
+ #include "ui/gfx/geometry/rect_f.h"
+@@ -544,7 +544,7 @@ class PasswordManagerClient {
+   virtual void TriggerSignIn(signin_metrics::AccessPoint access_point) const;
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Shows the bubble with the details of the `form`.
+   virtual void OpenPasswordDetailsBubble(
+       const password_manager::PasswordForm& form) = 0;
diff --git a/chromium-wip/patches/patch-components_password__manager_core_browser_password__manager__switches.cc b/chromium-wip/patches/patch-components_password__manager_core_browser_password__manager__switches.cc
new file mode 100644
index 0000000000..8d44a65483
--- /dev/null
+++ b/chromium-wip/patches/patch-components_password__manager_core_browser_password__manager__switches.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/password_manager/core/browser/password_manager_switches.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/password_manager/core/browser/password_manager_switches.cc
+@@ -6,7 +6,7 @@
+ 
+ namespace password_manager {
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Specifies which encryption storage backend to use. Possible values are
+ // kwallet, kwallet5, kwallet6, gnome-libsecret, basic.
+ // Any other value will lead to Chrome detecting the best backend automatically.
diff --git a/chromium-wip/patches/patch-components_password__manager_core_browser_password__manager__switches.h b/chromium-wip/patches/patch-components_password__manager_core_browser_password__manager__switches.h
new file mode 100644
index 0000000000..269b9ca3d1
--- /dev/null
+++ b/chromium-wip/patches/patch-components_password__manager_core_browser_password__manager__switches.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/password_manager/core/browser/password_manager_switches.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/password_manager/core/browser/password_manager_switches.h
+@@ -9,7 +9,7 @@
+ 
+ namespace password_manager {
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ extern const char kPasswordStore[];
+ extern const char kEnableEncryptionSelection[];
+ #endif  // BUILDFLAG(IS_LINUX)
diff --git a/chromium-wip/patches/patch-components_password__manager_core_browser_password__manual__fallback__flow.cc b/chromium-wip/patches/patch-components_password__manager_core_browser_password__manual__fallback__flow.cc
new file mode 100644
index 0000000000..ca91bd60c0
--- /dev/null
+++ b/chromium-wip/patches/patch-components_password__manager_core_browser_password__manual__fallback__flow.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/password_manager/core/browser/password_manual_fallback_flow.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/password_manager/core/browser/password_manual_fallback_flow.cc
+@@ -46,7 +46,7 @@ std::u16string GetUsernameFromLabel(cons
+ }
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Returns the password form corresponding to the `payload` data. In most
+ // cases there is only one such form stored, but having more than one or no
+ // forms is also possible. If there is more than one form, showing any of them
+@@ -297,7 +297,7 @@ void PasswordManualFallbackFlow::DidAcce
+     }
+     case autofill::SuggestionType::kViewPasswordDetails: {
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       std::optional<password_manager::PasswordForm> credentials =
+           GetCorrespondingPasswordForm(
+               suggestion.GetPayload<Suggestion::PasswordSuggestionDetails>(),
+@@ -427,7 +427,7 @@ void PasswordManualFallbackFlow::EnsureC
+     const Suggestion::PasswordSuggestionDetails& payload,
+     base::OnceClosure on_allowed) {
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (payload.is_cross_domain) {
+     cross_domain_confirmation_popup_controller_ =
+         password_client_->ShowCrossDomainConfirmationPopup(
diff --git a/chromium-wip/patches/patch-components_password__manager_core_browser_password__manual__fallback__flow.h b/chromium-wip/patches/patch-components_password__manager_core_browser_password__manual__fallback__flow.h
new file mode 100644
index 0000000000..c48388f412
--- /dev/null
+++ b/chromium-wip/patches/patch-components_password__manager_core_browser_password__manual__fallback__flow.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/password_manager/core/browser/password_manual_fallback_flow.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/password_manager/core/browser/password_manual_fallback_flow.h
+@@ -19,7 +19,7 @@
+ #include "components/password_manager/core/browser/ui/saved_passwords_presenter.h"
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "components/password_manager/core/browser/password_cross_domain_confirmation_popup_controller.h"
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ||
+         // BUILDFLAG(IS_CHROMEOS)
+@@ -180,7 +180,7 @@ class PasswordManualFallbackFlow : publi
+   std::unique_ptr<device_reauth::DeviceAuthenticator> authenticator_;
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<PasswordCrossDomainConfirmationPopupController>
+       cross_domain_confirmation_popup_controller_;
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ||
diff --git a/chromium-wip/patches/patch-components_password__manager_core_browser_password__store__factory__util.cc b/chromium-wip/patches/patch-components_password__manager_core_browser_password__store__factory__util.cc
new file mode 100644
index 0000000000..c60449e020
--- /dev/null
+++ b/chromium-wip/patches/patch-components_password__manager_core_browser_password__store__factory__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/password_manager/core/browser/password_store_factory_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/password_manager/core/browser/password_store_factory_util.cc
+@@ -29,7 +29,7 @@ namespace {
+ LoginDatabase::DeletingUndecryptablePasswordsEnabled GetPolicyFromPrefs(
+     PrefService* prefs) {
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_IOS)
++    BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD)
+   return LoginDatabase::DeletingUndecryptablePasswordsEnabled(
+       prefs->GetBoolean(prefs::kDeletingUndecryptablePasswordsEnabled));
+ #else
diff --git a/chromium-wip/patches/patch-components_password__manager_core_browser_password__store_login__database.cc b/chromium-wip/patches/patch-components_password__manager_core_browser_password__store_login__database.cc
new file mode 100644
index 0000000000..0a0f6b21e7
--- /dev/null
+++ b/chromium-wip/patches/patch-components_password__manager_core_browser_password__store_login__database.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/password_manager/core/browser/password_store/login_database.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/password_manager/core/browser/password_store/login_database.cc
+@@ -1036,7 +1036,7 @@ bool ShouldDeleteUndecryptablePasswords(
+     bool is_user_data_dir_policy_set,
+     bool is_enabled_by_policy,
+     IsAccountStore is_account_store) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<base::Environment> environment(base::Environment::Create());
+   // On Linux user data directory ca be specified using an env variable. If it
+   // exists, passwords shouldn't be deleted.
+@@ -1054,7 +1054,7 @@ bool ShouldDeleteUndecryptablePasswords(
+     return false;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (command_line->HasSwitch(password_manager::kPasswordStore)) {
+     RecordShouldDeleteUndecryptablePasswordsMetric(
+         ShouldDeleteUndecryptablePasswordsResult::
diff --git a/chromium-wip/patches/patch-components_password__manager_core_browser_password__store_login__database__async__helper.cc b/chromium-wip/patches/patch-components_password__manager_core_browser_password__store_login__database__async__helper.cc
new file mode 100644
index 0000000000..979aa40c34
--- /dev/null
+++ b/chromium-wip/patches/patch-components_password__manager_core_browser_password__store_login__database__async__helper.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/password_manager/core/browser/password_store/login_database_async_helper.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/password_manager/core/browser/password_store/login_database_async_helper.cc
+@@ -154,7 +154,7 @@ LoginsResultOrError LoginDatabaseAsyncHe
+     std::vector<PasswordForm> matched_forms;
+     if (!login_db_ ||
+         !login_db_->GetLogins(form, include_psl, &matched_forms)) {
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       return PasswordStoreBackendError(
+           OSCrypt::IsEncryptionAvailable()
+               ? PasswordStoreBackendErrorType::kUncategorized
diff --git a/chromium-wip/patches/patch-components_password__manager_core_browser_password__store_login__database__unittest.cc b/chromium-wip/patches/patch-components_password__manager_core_browser_password__store_login__database__unittest.cc
new file mode 100644
index 0000000000..cf261f7bc2
--- /dev/null
+++ b/chromium-wip/patches/patch-components_password__manager_core_browser_password__store_login__database__unittest.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/password_manager/core/browser/password_store/login_database_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/password_manager/core/browser/password_store/login_database_unittest.cc
+@@ -2305,7 +2305,7 @@ INSTANTIATE_TEST_SUITE_P(MigrationToVCur
+                                           testing::Bool()));
+ 
+ #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ class LoginDatabaseUndecryptableLoginsTest : public testing::Test {
+  protected:
+   LoginDatabaseUndecryptableLoginsTest() = default;
diff --git a/chromium-wip/patches/patch-components_password__manager_core_browser_stub__password__manager__client.cc b/chromium-wip/patches/patch-components_password__manager_core_browser_stub__password__manager__client.cc
new file mode 100644
index 0000000000..5a15453997
--- /dev/null
+++ b/chromium-wip/patches/patch-components_password__manager_core_browser_stub__password__manager__client.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/password_manager/core/browser/stub_password_manager_client.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/password_manager/core/browser/stub_password_manager_client.cc
+@@ -206,7 +206,7 @@ version_info::Channel StubPasswordManage
+ }
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ void StubPasswordManagerClient::OpenPasswordDetailsBubble(
+     const password_manager::PasswordForm& form) {}
+ void StubPasswordManagerClient::MaybeShowSavePasswordPrimingPromo(
diff --git a/chromium-wip/patches/patch-components_password__manager_core_browser_stub__password__manager__client.h b/chromium-wip/patches/patch-components_password__manager_core_browser_stub__password__manager__client.h
new file mode 100644
index 0000000000..1597272ba7
--- /dev/null
+++ b/chromium-wip/patches/patch-components_password__manager_core_browser_stub__password__manager__client.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/password_manager/core/browser/stub_password_manager_client.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/password_manager/core/browser/stub_password_manager_client.h
+@@ -77,7 +77,7 @@ class StubPasswordManagerClient : public
+   MockPasswordFeatureManager* GetPasswordFeatureManager();
+   version_info::Channel GetChannel() const override;
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   void OpenPasswordDetailsBubble(
+       const password_manager::PasswordForm& form) override;
+   void MaybeShowSavePasswordPrimingPromo(const GURL& current_url) override;
diff --git a/chromium-wip/patches/patch-components_password__manager_core_common_password__manager__pref__names.h b/chromium-wip/patches/patch-components_password__manager_core_common_password__manager__pref__names.h
new file mode 100644
index 0000000000..412b77edca
--- /dev/null
+++ b/chromium-wip/patches/patch-components_password__manager_core_common_password__manager__pref__names.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/password_manager/core/common/password_manager_pref_names.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/password_manager/core/common/password_manager_pref_names.h
+@@ -59,7 +59,7 @@ inline constexpr char kCredentialProvide
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_IOS)
++    BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD)
+ // Boolean pref controlled by the DeletingUndecryptablePasswordsEnabled policy.
+ // If set to false it blocks deleting undecryptable passwords, otherwise the
+ // deletion can happen.
+@@ -346,7 +346,7 @@ inline constexpr char kAutofillableCrede
+ inline constexpr char kPasswordSharingEnabled[] =
+     "password_manager.password_sharing_enabled";
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Integer pref indicating how many times relaunch Chrome bubble was dismissed.
+ inline constexpr char kRelaunchChromeBubbleDismissedCounter[] =
+     "password_manager.relaunch_chrome_bubble_dismissed_counter";
diff --git a/chromium-wip/patches/patch-components_performance__manager_decorators_process__metrics__decorator.cc b/chromium-wip/patches/patch-components_performance__manager_decorators_process__metrics__decorator.cc
new file mode 100644
index 0000000000..a419e4242c
--- /dev/null
+++ b/chromium-wip/patches/patch-components_performance__manager_decorators_process__metrics__decorator.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/performance_manager/decorators/process_metrics_decorator.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/performance_manager/decorators/process_metrics_decorator.cc
+@@ -264,7 +264,7 @@ void ProcessMetricsDecorator::DidGetMemo
+     // RSS and PMF to each node proportionally to its V8 heap size.
+     uint64_t process_rss = process_dump_iter.os_dump().resident_set_kb;
+     process_node->set_resident_set_kb(process_rss);
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+     process_node->set_private_swap_kb(
+         process_dump_iter.os_dump().private_footprint_swap_kb);
+ #endif
diff --git a/chromium-wip/patches/patch-components_performance__manager_public_features.h b/chromium-wip/patches/patch-components_performance__manager_public_features.h
new file mode 100644
index 0000000000..23e038c623
--- /dev/null
+++ b/chromium-wip/patches/patch-components_performance__manager_public_features.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/performance_manager/public/features.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/performance_manager/public/features.h
+@@ -19,7 +19,7 @@ namespace performance_manager::features 
+ 
+ #if !BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #define URGENT_DISCARDING_FROM_PERFORMANCE_MANAGER() false
+ #else
+ #define URGENT_DISCARDING_FROM_PERFORMANCE_MANAGER() true
diff --git a/chromium-wip/patches/patch-components_permissions_prediction__service_prediction__common.cc b/chromium-wip/patches/patch-components_permissions_prediction__service_prediction__common.cc
new file mode 100644
index 0000000000..ee359bbbd5
--- /dev/null
+++ b/chromium-wip/patches/patch-components_permissions_prediction__service_prediction__common.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/permissions/prediction_service/prediction_common.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/permissions/prediction_service/prediction_common.cc
+@@ -36,7 +36,7 @@ int BucketizeValue(int count) {
+ 
+ ClientFeatures_Platform GetCurrentPlatformProto() {
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   return permissions::ClientFeatures_Platform_PLATFORM_DESKTOP;
+ #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
+   return permissions::ClientFeatures_Platform_PLATFORM_MOBILE;
+@@ -47,7 +47,7 @@ ClientFeatures_Platform GetCurrentPlatfo
+ 
+ ClientFeatures_PlatformEnum GetCurrentPlatformEnumProto() {
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   return permissions::ClientFeatures_PlatformEnum_PLATFORM_DESKTOP_V2;
+ #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
+   return permissions::ClientFeatures_PlatformEnum_PLATFORM_MOBILE_V2;
diff --git a/chromium-wip/patches/patch-components_policy_core_browser_policy__pref__mapping__test.cc b/chromium-wip/patches/patch-components_policy_core_browser_policy__pref__mapping__test.cc
new file mode 100644
index 0000000000..ac2615f40e
--- /dev/null
+++ b/chromium-wip/patches/patch-components_policy_core_browser_policy__pref__mapping__test.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/policy/core/browser/policy_pref_mapping_test.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/policy/core/browser/policy_pref_mapping_test.cc
+@@ -432,7 +432,7 @@ class PolicyTestCase {
+     const std::string os("chromeos");
+ #elif BUILDFLAG(IS_IOS)
+     const std::string os("ios");
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     const std::string os("linux");
+ #elif BUILDFLAG(IS_MAC)
+     const std::string os("mac");
diff --git a/chromium-wip/patches/patch-components_policy_core_browser_url__blocklist__manager.cc b/chromium-wip/patches/patch-components_policy_core_browser_url__blocklist__manager.cc
new file mode 100644
index 0000000000..2a0afd8fe9
--- /dev/null
+++ b/chromium-wip/patches/patch-components_policy_core_browser_url__blocklist__manager.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/policy/core/browser/url_blocklist_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/policy/core/browser/url_blocklist_manager.cc
+@@ -377,7 +377,7 @@ void URLBlocklistManager::RegisterProfil
+       policy_prefs::kSafeSitesFilterBehavior,
+       static_cast<int>(SafeSitesFilterBehavior::kSafeSitesFilterDisabled));
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   registry->RegisterListPref(policy_prefs::kPasswordManagerBlocklist);
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ||
+         // BUILDFLAG(IS_MAC)
diff --git a/chromium-wip/patches/patch-components_policy_core_common_cloud_cloud__policy__client.cc b/chromium-wip/patches/patch-components_policy_core_common_cloud_cloud__policy__client.cc
new file mode 100644
index 0000000000..5fe195e10e
--- /dev/null
+++ b/chromium-wip/patches/patch-components_policy_core_common_cloud_cloud__policy__client.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/policy/core/common/cloud/cloud_policy_client.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/policy/core/common/cloud/cloud_policy_client.cc
+@@ -756,7 +756,7 @@ void CloudPolicyClient::FetchPolicy(Poli
+         fetch_request->set_invalidation_payload(invalidation_payload_);
+       }
+     }
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // Only set browser device identifier for CBCM Chrome cloud policy on
+     // desktop.
+     if (type_to_fetch.first ==
diff --git a/chromium-wip/patches/patch-components_policy_core_common_cloud_cloud__policy__refresh__scheduler.cc b/chromium-wip/patches/patch-components_policy_core_common_cloud_cloud__policy__refresh__scheduler.cc
new file mode 100644
index 0000000000..fca234860c
--- /dev/null
+++ b/chromium-wip/patches/patch-components_policy_core_common_cloud_cloud__policy__refresh__scheduler.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/policy/core/common/cloud/cloud_policy_refresh_scheduler.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/policy/core/common/cloud/cloud_policy_refresh_scheduler.cc
+@@ -25,7 +25,7 @@ namespace policy {
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kRetryWithKeyReset,
+              "RetryWithKeyReset",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+@@ -220,7 +220,7 @@ void CloudPolicyRefreshScheduler::OnStor
+   // continue using the stale information. Thus, no specific response to a store
+   // error is required. NB: Changes to is_managed fire OnStoreLoaded().
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Client is registered means we have successfully get policy key once. However,
+   // a following policy fetch request is failed because we can't verified
+   // signature. Delete the policy key so that we can get it again with next
diff --git a/chromium-wip/patches/patch-components_policy_core_common_cloud_cloud__policy__util.cc b/chromium-wip/patches/patch-components_policy_core_common_cloud_cloud__policy__util.cc
new file mode 100644
index 0000000000..d8809ef29f
--- /dev/null
+++ b/chromium-wip/patches/patch-components_policy_core_common_cloud_cloud__policy__util.cc
@@ -0,0 +1,61 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/policy/core/common/cloud/cloud_policy_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/policy/core/common/cloud/cloud_policy_util.cc
+@@ -21,7 +21,7 @@
+ #include "base/win/wincred_shim.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ #include <pwd.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+@@ -36,10 +36,15 @@
+ #import <SystemConfiguration/SCDynamicStoreCopySpecific.h>
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include <limits.h>  // For HOST_NAME_MAX
+ #endif
+ 
++#if BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_NETBSD)
++#include <sys/param.h>
++#define HOST_NAME_MAX MAXHOSTNAMELEN
++#endif
++
+ #include <algorithm>
+ #include <utility>
+ 
+@@ -84,7 +89,7 @@ namespace policy {
+ namespace em = enterprise_management;
+ 
+ std::string GetMachineName() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   char hostname[HOST_NAME_MAX];
+   if (gethostname(hostname, HOST_NAME_MAX) == 0)  // Success.
+     return hostname;
+@@ -140,7 +145,7 @@ std::string GetMachineName() {
+ 
+ std::string GetOSVersion() {
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \
+-    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   return base::SysInfo::OperatingSystemVersion();
+ #elif BUILDFLAG(IS_WIN)
+   base::win::OSInfo::VersionNumber version_number =
+@@ -162,7 +167,7 @@ std::string GetOSArchitecture() {
+ }
+ 
+ std::string GetOSUsername() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
+   struct passwd* creds = getpwuid(getuid());
+   if (!creds || !creds->pw_name)
+     return std::string();
diff --git a/chromium-wip/patches/patch-components_policy_core_common_policy__loader__common.cc b/chromium-wip/patches/patch-components_policy_core_common_policy__loader__common.cc
new file mode 100644
index 0000000000..62a1f7690a
--- /dev/null
+++ b/chromium-wip/patches/patch-components_policy_core_common_policy__loader__common.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/policy/core/common/policy_loader_common.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/policy/core/common/policy_loader_common.cc
+@@ -46,7 +46,7 @@ const char* kSensitivePolicies[] = {
+     key::kDefaultSearchProviderEnabled,
+     key::kSafeBrowsingEnabled,
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     key::kAutoOpenFileTypes,
+     key::kEnterpriseSearchAggregatorSettings,
+     key::kHomepageIsNewTabPage,
+@@ -57,7 +57,7 @@ const char* kSensitivePolicies[] = {
+     key::kSafeBrowsingAllowlistDomains,
+     key::kSiteSearchSettings,
+ #endif
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     key::kCommandLineFlagSecurityWarningsEnabled,
+     key::kEnterpriseCustomLabelForBrowser,
+     key::kEnterpriseLogoUrlForBrowser,
diff --git a/chromium-wip/patches/patch-components_policy_core_common_policy__paths.cc b/chromium-wip/patches/patch-components_policy_core_common_policy__paths.cc
new file mode 100644
index 0000000000..b2418c09bc
--- /dev/null
+++ b/chromium-wip/patches/patch-components_policy_core_common_policy__paths.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/policy/core/common/policy_paths.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/policy/core/common/policy_paths.cc
+@@ -17,6 +17,10 @@ namespace policy {
+ const char kPolicyPath[] = "/etc/opt/chrome/policies";
+ #elif BUILDFLAG(GOOGLE_CHROME_FOR_TESTING_BRANDING)
+ const char kPolicyPath[] = "/etc/opt/chrome_for_testing/policies";
++#elif BUILDFLAG(IS_FREEBSD)
++const char kPolicyPath[] = "/usr/local/etc/chromium/policies";
++#elif BUILDFLAG(IS_NETBSD)
++const char kPolicyPath[] = "@PKG_SYSCONFBASE@/chromium/policies";
+ #else
+ const char kPolicyPath[] = "/etc/chromium/policies";
+ #endif  // BUILDFLAG(GOOGLE_CHROME_BRANDING)
diff --git a/chromium-wip/patches/patch-components_policy_core_common_policy__pref__names.cc b/chromium-wip/patches/patch-components_policy_core_common_policy__pref__names.cc
new file mode 100644
index 0000000000..c7f972625c
--- /dev/null
+++ b/chromium-wip/patches/patch-components_policy_core_common_policy__pref__names.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/policy/core/common/policy_pref_names.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/policy/core/common/policy_pref_names.cc
+@@ -186,7 +186,7 @@ const char kFloatingWorkspaceEnabled[] =
+ // A boolean value indicating whether the built-in AI APIs are enabled.
+ const char kBuiltInAIAPIsEnabled[] = "policy.built_in_ai_apis_enabled";
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ // List of urls for which password manager is disabled/blocked.
+ const char kPasswordManagerBlocklist[] = "policy.password_manager_blocklist";
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ||
diff --git a/chromium-wip/patches/patch-components_policy_core_common_policy__pref__names.h b/chromium-wip/patches/patch-components_policy_core_common_policy__pref__names.h
new file mode 100644
index 0000000000..7ad0880e77
--- /dev/null
+++ b/chromium-wip/patches/patch-components_policy_core_common_policy__pref__names.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/policy/core/common/policy_pref_names.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/policy/core/common/policy_pref_names.h
+@@ -90,7 +90,7 @@ extern const char kFloatingWorkspaceEnab
+ #endif
+ extern const char kBuiltInAIAPIsEnabled[];
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ extern const char kPasswordManagerBlocklist[];
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ||
+         // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
diff --git a/chromium-wip/patches/patch-components_policy_tools_generate__policy__source.py b/chromium-wip/patches/patch-components_policy_tools_generate__policy__source.py
new file mode 100644
index 0000000000..6ddd2c88ca
--- /dev/null
+++ b/chromium-wip/patches/patch-components_policy_tools_generate__policy__source.py
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/policy/tools/generate_policy_source.py.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/policy/tools/generate_policy_source.py
+@@ -38,9 +38,9 @@ PLATFORM_STRINGS = {
+     'ios': ['ios'],
+     'fuchsia': ['fuchsia'],
+     'chrome.win': ['win'],
+-    'chrome.linux': ['linux'],
++    'chrome.linux': ['linux', 'openbsd', 'freebsd', 'netbsd'],
+     'chrome.mac': ['mac'],
+-    'chrome.*': ['win', 'mac', 'linux'],
++    'chrome.*': ['win', 'mac', 'linux', 'openbsd', 'freebsd', 'netbsd'],
+     'chrome.win7': ['win'],
+ }
+ 
diff --git a/chromium-wip/patches/patch-components_power__metrics_BUILD.gn b/chromium-wip/patches/patch-components_power__metrics_BUILD.gn
new file mode 100644
index 0000000000..7ed7b1e4d5
--- /dev/null
+++ b/chromium-wip/patches/patch-components_power__metrics_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/power_metrics/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/power_metrics/BUILD.gn
+@@ -41,7 +41,7 @@ static_library("power_metrics") {
+     ldflags = [ "/DELAYLOAD:setupapi.dll" ]
+   }
+ 
+-  if (is_linux || is_chromeos) {
++  if ((is_linux && !is_bsd) || is_chromeos) {
+     sources += [
+       "energy_metrics_provider_linux.cc",
+       "energy_metrics_provider_linux.h",
diff --git a/chromium-wip/patches/patch-components_power__metrics_energy__metrics__provider.cc b/chromium-wip/patches/patch-components_power__metrics_energy__metrics__provider.cc
new file mode 100644
index 0000000000..b111ef370b
--- /dev/null
+++ b/chromium-wip/patches/patch-components_power__metrics_energy__metrics__provider.cc
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/power_metrics/energy_metrics_provider.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/power_metrics/energy_metrics_provider.cc
+@@ -9,6 +9,8 @@
+ #include "components/power_metrics/energy_metrics_provider_win.h"
+ #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ #include "components/power_metrics/energy_metrics_provider_linux.h"
++#elif BUILDFLAG(IS_BSD)
++#include "base/notimplemented.h"
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+ namespace power_metrics {
+@@ -22,6 +24,9 @@ std::unique_ptr<EnergyMetricsProvider> E
+   return EnergyMetricsProviderWin::Create();
+ #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+   return EnergyMetricsProviderLinux::Create();
++#elif BUILDFLAG(IS_BSD)
++  NOTIMPLEMENTED();
++  return nullptr;
+ #else
+   return nullptr;
+ #endif  // BUILDFLAG(IS_WIN)
diff --git a/chromium-wip/patches/patch-components_regional__capabilities_regional__capabilities__service.cc b/chromium-wip/patches/patch-components_regional__capabilities_regional__capabilities__service.cc
new file mode 100644
index 0000000000..1cdb763ae1
--- /dev/null
+++ b/chromium-wip/patches/patch-components_regional__capabilities_regional__capabilities__service.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/regional_capabilities/regional_capabilities_service.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/regional_capabilities/regional_capabilities_service.cc
+@@ -234,7 +234,7 @@ std::optional<CountryId> RegionalCapabil
+     return persisted_country_id;
+   }
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (base::FeatureList::IsEnabled(switches::kClearPrefForUnknownCountry)) {
+     profile_prefs_->ClearPref(prefs::kCountryIDAtInstall);
+     base::UmaHistogramEnumeration(kUnknownCountryIdStored,
diff --git a/chromium-wip/patches/patch-components_regional__capabilities_regional__capabilities__switches.cc b/chromium-wip/patches/patch-components_regional__capabilities_regional__capabilities__switches.cc
new file mode 100644
index 0000000000..97d9184631
--- /dev/null
+++ b/chromium-wip/patches/patch-components_regional__capabilities_regional__capabilities__switches.cc
@@ -0,0 +1,24 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/regional_capabilities/regional_capabilities_switches.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/regional_capabilities/regional_capabilities_switches.cc
+@@ -10,13 +10,13 @@
+ 
+ namespace switches {
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kClearPrefForUnknownCountry,
+              "ClearCountryPrefForStoredUnknownCountry",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+ #endif
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kUseFinchPermanentCountryForFetchCountryId,
+              "UseFinchPermanentCountyForFetchCountryId",
+              base::FEATURE_DISABLED_BY_DEFAULT);
diff --git a/chromium-wip/patches/patch-components_regional__capabilities_regional__capabilities__switches.h b/chromium-wip/patches/patch-components_regional__capabilities_regional__capabilities__switches.h
new file mode 100644
index 0000000000..d68edb966b
--- /dev/null
+++ b/chromium-wip/patches/patch-components_regional__capabilities_regional__capabilities__switches.h
@@ -0,0 +1,25 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/regional_capabilities/regional_capabilities_switches.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/regional_capabilities/regional_capabilities_switches.h
+@@ -26,14 +26,14 @@ inline constexpr char kSearchEngineChoic
+ inline constexpr char kDefaultListCountryOverride[] = "DEFAULT_EEA";
+ inline constexpr char kEeaListCountryOverride[] = "EEA_ALL";
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // When an invalid `country_codes::CountryId` is stored in prefs and this
+ // feature is enabled the pref will be cleared allowing a valid country to be
+ // set again.
+ BASE_DECLARE_FEATURE(kClearPrefForUnknownCountry);
+ #endif
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Use finch permanent country instead of finch latest country for fetching
+ // country ID.
+ BASE_DECLARE_FEATURE(kUseFinchPermanentCountryForFetchCountryId);
diff --git a/chromium-wip/patches/patch-components_safe__browsing_content_common_file__type__policies__unittest.cc b/chromium-wip/patches/patch-components_safe__browsing_content_common_file__type__policies__unittest.cc
new file mode 100644
index 0000000000..01577f7588
--- /dev/null
+++ b/chromium-wip/patches/patch-components_safe__browsing_content_common_file__type__policies__unittest.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/safe_browsing/content/common/file_type_policies_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/safe_browsing/content/common/file_type_policies_unittest.cc
+@@ -146,7 +146,7 @@ TEST_F(FileTypePoliciesTest, UnpackResou
+   EXPECT_EQ(142, file_type.uma_value());
+   EXPECT_FALSE(file_type.is_archive());
+   EXPECT_EQ(DownloadFileType::FULL_PING, file_type.ping_setting());
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   EXPECT_EQ(DownloadFileType::ALLOW_ON_USER_GESTURE,
+             file_type.platform_settings(0).danger_level());
+   EXPECT_EQ(DownloadFileType::DISALLOW_AUTO_OPEN,
diff --git a/chromium-wip/patches/patch-components_safe__browsing_content_resources_gen__file__type__proto.py b/chromium-wip/patches/patch-components_safe__browsing_content_resources_gen__file__type__proto.py
new file mode 100644
index 0000000000..9685c8bf07
--- /dev/null
+++ b/chromium-wip/patches/patch-components_safe__browsing_content_resources_gen__file__type__proto.py
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/safe_browsing/content/resources/gen_file_type_proto.py.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/safe_browsing/content/resources/gen_file_type_proto.py
+@@ -37,6 +37,8 @@ def PlatformTypes():
+         "chromeos":
+         download_file_types_pb2.DownloadFileType.PLATFORM_TYPE_CHROME_OS,
+         "linux": download_file_types_pb2.DownloadFileType.PLATFORM_TYPE_LINUX,
++        "openbsd": download_file_types_pb2.DownloadFileType.PLATFORM_TYPE_LINUX,
++        "freebsd": download_file_types_pb2.DownloadFileType.PLATFORM_TYPE_LINUX,
+         "mac": download_file_types_pb2.DownloadFileType.PLATFORM_TYPE_MAC,
+         "win": download_file_types_pb2.DownloadFileType.PLATFORM_TYPE_WINDOWS,
+         # LINT.ThenChange(BUILD.gn:PlatformTypes)
+@@ -179,7 +181,7 @@ class DownloadFileTypeProtoGenerator(Bin
+             '-t',
+             '--type',
+             help='The platform type. One of android, chromeos, ' +
+-            'linux, mac, win')
++            'linux, mac, win, openbsd, freebsd')
+ 
+     def AddExtraCommandLineArgsForVirtualEnvRun(self, opts, command):
+         if opts.type is not None:
diff --git a/chromium-wip/patches/patch-components_safe__browsing_core_browser_db_v4__protocol__manager__util.cc b/chromium-wip/patches/patch-components_safe__browsing_core_browser_db_v4__protocol__manager__util.cc
new file mode 100644
index 0000000000..3bf691beda
--- /dev/null
+++ b/chromium-wip/patches/patch-components_safe__browsing_core_browser_db_v4__protocol__manager__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/safe_browsing/core/browser/db/v4_protocol_manager_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/safe_browsing/core/browser/db/v4_protocol_manager_util.cc
+@@ -119,7 +119,7 @@ std::ostream& operator<<(std::ostream& o
+ PlatformType GetCurrentPlatformType() {
+ #if BUILDFLAG(IS_WIN)
+   return WINDOWS_PLATFORM;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return LINUX_PLATFORM;
+ #elif BUILDFLAG(IS_IOS)
+   return IOS_PLATFORM;
diff --git a/chromium-wip/patches/patch-components_safe__browsing_core_browser_realtime_url__lookup__service__base.cc b/chromium-wip/patches/patch-components_safe__browsing_core_browser_realtime_url__lookup__service__base.cc
new file mode 100644
index 0000000000..d8513dd11c
--- /dev/null
+++ b/chromium-wip/patches/patch-components_safe__browsing_core_browser_realtime_url__lookup__service__base.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc
+@@ -112,7 +112,7 @@ RTLookupRequest::OSType GetRTLookupReque
+   return RTLookupRequest::OS_TYPE_CHROME_OS;
+ #elif BUILDFLAG(IS_IOS)
+   return RTLookupRequest::OS_TYPE_IOS;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return RTLookupRequest::OS_TYPE_LINUX;
+ #elif BUILDFLAG(IS_MAC)
+   return RTLookupRequest::OS_TYPE_MAC;
diff --git a/chromium-wip/patches/patch-components_search__engines_template__url__service.cc b/chromium-wip/patches/patch-components_search__engines_template__url__service.cc
new file mode 100644
index 0000000000..c3589a639a
--- /dev/null
+++ b/chromium-wip/patches/patch-components_search__engines_template__url__service.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/search_engines/template_url_service.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/search_engines/template_url_service.cc
+@@ -3600,7 +3600,7 @@ bool TemplateURLService::MatchesDefaultS
+ std::unique_ptr<EnterpriseSearchManager>
+ TemplateURLService::GetEnterpriseSearchManager(PrefService* prefs) {
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return std::make_unique<EnterpriseSearchManager>(
+       prefs, base::BindRepeating(&TemplateURLService::EnterpriseSearchChanged,
+                                  base::Unretained(this)));
diff --git a/chromium-wip/patches/patch-components_security__interstitials_content_utils.cc b/chromium-wip/patches/patch-components_security__interstitials_content_utils.cc
new file mode 100644
index 0000000000..be751a9bbb
--- /dev/null
+++ b/chromium-wip/patches/patch-components_security__interstitials_content_utils.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/security_interstitials/content/utils.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/security_interstitials/content/utils.cc
+@@ -37,7 +37,7 @@ void LaunchDateAndTimeSettings() {
+ #if BUILDFLAG(IS_ANDROID)
+   JNIEnv* env = base::android::AttachCurrentThread();
+   Java_DateAndTimeSettingsHelper_openDateAndTimeSettings(env);
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   struct ClockCommand {
+     const char* const pathname;
+     const char* const argument;
diff --git a/chromium-wip/patches/patch-components_segmentation__platform_embedder_default__model_cross__device__user__segment.cc b/chromium-wip/patches/patch-components_segmentation__platform_embedder_default__model_cross__device__user__segment.cc
new file mode 100644
index 0000000000..cf6121bb79
--- /dev/null
+++ b/chromium-wip/patches/patch-components_segmentation__platform_embedder_default__model_cross__device__user__segment.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/segmentation_platform/embedder/default_model/cross_device_user_segment.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/segmentation_platform/embedder/default_model/cross_device_user_segment.cc
+@@ -147,7 +147,7 @@ void CrossDeviceUserSegment::ExecuteMode
+ // Check for current device type and subtract it from the device count
+ // calculation.
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   desktop_count -= 1;
+ #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS)
+   if (ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_TABLET) {
diff --git a/chromium-wip/patches/patch-components_services_on__device__translation_sandbox__hook.cc b/chromium-wip/patches/patch-components_services_on__device__translation_sandbox__hook.cc
new file mode 100644
index 0000000000..d3d70cb128
--- /dev/null
+++ b/chromium-wip/patches/patch-components_services_on__device__translation_sandbox__hook.cc
@@ -0,0 +1,49 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/services/on_device_translation/sandbox_hook.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/services/on_device_translation/sandbox_hook.cc
+@@ -7,12 +7,15 @@
+ #include "components/services/on_device_translation/translate_kit_client.h"
+ #include "sandbox/linux/syscall_broker/broker_command.h"
+ 
++#if !BUILDFLAG(IS_BSD)
+ using sandbox::syscall_broker::BrokerFilePermission;
+ using sandbox::syscall_broker::MakeBrokerCommandSet;
++#endif
+ 
+ namespace on_device_translation {
+ namespace {
+ 
++#if !BUILDFLAG(IS_BSD)
+ // Gets the file permissions required by the TranslateKit
+ std::vector<BrokerFilePermission> GetOnDeviceTranslationFilePermissions() {
+   std::vector<BrokerFilePermission> permissions{
+@@ -21,6 +24,7 @@ std::vector<BrokerFilePermission> GetOnD
+   };
+   return permissions;
+ }
++#endif
+ 
+ }  // namespace
+ 
+@@ -29,6 +33,7 @@ bool OnDeviceTranslationSandboxHook(
+   // Call `TranslateKitClient::Get()` to load libtranslatekit.so
+   TranslateKitClient::Get();
+ 
++#if !BUILDFLAG(IS_BSD)
+   auto* instance = sandbox::policy::SandboxLinux::GetInstance();
+   instance->StartBrokerProcess(MakeBrokerCommandSet({
+                                    sandbox::syscall_broker::COMMAND_OPEN,
+@@ -36,7 +41,7 @@ bool OnDeviceTranslationSandboxHook(
+                                GetOnDeviceTranslationFilePermissions(),
+                                options);
+   instance->EngageNamespaceSandboxIfPossible();
+-
++#endif
+   return true;
+ }
+ 
diff --git a/chromium-wip/patches/patch-components_services_on__device__translation_sandbox__hook.h b/chromium-wip/patches/patch-components_services_on__device__translation_sandbox__hook.h
new file mode 100644
index 0000000000..7a96488053
--- /dev/null
+++ b/chromium-wip/patches/patch-components_services_on__device__translation_sandbox__hook.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/services/on_device_translation/sandbox_hook.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/services/on_device_translation/sandbox_hook.h
+@@ -5,7 +5,13 @@
+ #ifndef COMPONENTS_SERVICES_ON_DEVICE_TRANSLATION_SANDBOX_HOOK_H_
+ #define COMPONENTS_SERVICES_ON_DEVICE_TRANSLATION_SANDBOX_HOOK_H_
+ 
++#include "build/build_config.h"
++
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#else
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#endif
+ 
+ namespace on_device_translation {
+ 
diff --git a/chromium-wip/patches/patch-components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.cc b/chromium-wip/patches/patch-components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.cc
new file mode 100644
index 0000000000..8355b45e79
--- /dev/null
+++ b/chromium-wip/patches/patch-components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/services/paint_preview_compositor/paint_preview_compositor_collection_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/services/paint_preview_compositor/paint_preview_compositor_collection_impl.cc
+@@ -22,7 +22,7 @@
+ 
+ #if BUILDFLAG(IS_WIN)
+ #include "content/public/child/dwrite_font_proxy_init_win.h"
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "components/services/font/public/cpp/font_loader.h"
+ #endif
+ 
+@@ -79,7 +79,7 @@ PaintPreviewCompositorCollectionImpl::Pa
+     // Initialize font access for Skia.
+ #if BUILDFLAG(IS_WIN)
+   content::InitializeDWriteFontProxy();
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   mojo::PendingRemote<font_service::mojom::FontService> font_service;
+   content::UtilityThread::Get()->BindHostReceiver(
+       font_service.InitWithNewPipeAndPassReceiver());
+@@ -102,7 +102,7 @@ PaintPreviewCompositorCollectionImpl::Pa
+                              base::BindOnce([] { skia::DefaultFontMgr(); }));
+ 
+   // Sanity check that fonts are working.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // No WebSandbox is provided on Linux so the local fonts aren't accessible.
+   // This is fine since since the subsetted fonts are provided in the SkPicture.
+   // However, we still need to check that the SkFontMgr starts as it is used by
diff --git a/chromium-wip/patches/patch-components_signin_public_base_signin__switches.cc b/chromium-wip/patches/patch-components_signin_public_base_signin__switches.cc
new file mode 100644
index 0000000000..65b144793f
--- /dev/null
+++ b/chromium-wip/patches/patch-components_signin_public_base_signin__switches.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/signin/public/base/signin_switches.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/signin/public/base/signin_switches.cc
+@@ -60,7 +60,7 @@ BASE_FEATURE(kMakeAccountsAvailableInIde
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Enables the History Sync Opt-in on Desktop.
+ BASE_FEATURE(kEnableHistorySyncOptin,
+              "EnableHistorySyncOptin",
+@@ -250,7 +250,7 @@ BASE_FEATURE(kDeferWebSigninTrackerCreat
+              "DeferWebSigninTrackerCreation",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kSignInPromoMaterialNextUI,
+              "SignInPromoMaterialNextUI",
+              base::FEATURE_DISABLED_BY_DEFAULT);
diff --git a/chromium-wip/patches/patch-components_signin_public_base_signin__switches.h b/chromium-wip/patches/patch-components_signin_public_base_signin__switches.h
new file mode 100644
index 0000000000..d76ed637d9
--- /dev/null
+++ b/chromium-wip/patches/patch-components_signin_public_base_signin__switches.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/signin/public/base/signin_switches.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/signin/public/base/signin_switches.h
+@@ -55,7 +55,7 @@ COMPONENT_EXPORT(SIGNIN_SWITCHES)
+ BASE_DECLARE_FEATURE(kMakeAccountsAvailableInIdentityManager);
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(SIGNIN_SWITCHES)
+ BASE_DECLARE_FEATURE(kEnableHistorySyncOptin);
+ COMPONENT_EXPORT(SIGNIN_SWITCHES)
+@@ -189,7 +189,7 @@ bool IsExtensionsExplicitBrowserSigninEn
+ COMPONENT_EXPORT(SIGNIN_SWITCHES)
+ BASE_DECLARE_FEATURE(kDeferWebSigninTrackerCreation);
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Uses the Material Next theme for the signin promo.
+ COMPONENT_EXPORT(SIGNIN_SWITCHES)
+ BASE_DECLARE_FEATURE(kSignInPromoMaterialNextUI);
diff --git a/chromium-wip/patches/patch-components_soda_soda__util.cc b/chromium-wip/patches/patch-components_soda_soda__util.cc
new file mode 100644
index 0000000000..311bdc24b6
--- /dev/null
+++ b/chromium-wip/patches/patch-components_soda_soda__util.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/soda/soda_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/soda/soda_util.cc
+@@ -23,7 +23,7 @@
+ #include "base/win/windows_version.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_X86_FAMILY)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_X86_FAMILY)
+ #include "base/cpu.h"
+ #endif
+ 
+@@ -39,7 +39,7 @@ bool IsSupportedChromeOS() {
+ }
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ bool IsSupportedLinux() {
+ #if defined(ARCH_CPU_X86_FAMILY)
+   // Check if the CPU has the required instruction set to run the Speech
+@@ -70,7 +70,7 @@ bool IsSupportedWin() {
+ bool IsOnDeviceSpeechRecognitionSupported() {
+ #if BUILDFLAG(IS_CHROMEOS)
+   return IsSupportedChromeOS();
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return IsSupportedLinux();
+ #elif BUILDFLAG(IS_WIN)
+   return IsSupportedWin();
diff --git a/chromium-wip/patches/patch-components_startup__metric__utils_common_startup__metric__utils.cc b/chromium-wip/patches/patch-components_startup__metric__utils_common_startup__metric__utils.cc
new file mode 100644
index 0000000000..3214277bf4
--- /dev/null
+++ b/chromium-wip/patches/patch-components_startup__metric__utils_common_startup__metric__utils.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/startup_metric_utils/common/startup_metric_utils.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/startup_metric_utils/common/startup_metric_utils.cc
+@@ -94,7 +94,7 @@ base::TimeTicks CommonStartupMetricRecor
+   // Enabling this logic on OS X causes a significant performance regression.
+   // TODO(crbug.com/40464036): Remove IS_APPLE ifdef once utility processes
+   // set their desired main thread priority.
+-#if !BUILDFLAG(IS_APPLE)
++#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)
+   static bool statics_initialized = false;
+   if (!statics_initialized) {
+     statics_initialized = true;
diff --git a/chromium-wip/patches/patch-components_storage__monitor_BUILD.gn b/chromium-wip/patches/patch-components_storage__monitor_BUILD.gn
new file mode 100644
index 0000000000..98382f4196
--- /dev/null
+++ b/chromium-wip/patches/patch-components_storage__monitor_BUILD.gn
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/storage_monitor/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/storage_monitor/BUILD.gn
+@@ -73,7 +73,7 @@ component("storage_monitor") {
+       deps += [ "//services/device/public/mojom" ]
+     }
+   } else if (is_linux) {
+-    if (use_udev) {
++    if (use_udev && !is_bsd) {
+       sources += [
+         "mtab_watcher_linux.cc",
+         "mtab_watcher_linux.h",
+@@ -182,7 +182,7 @@ source_set("unit_tests") {
+         "storage_monitor_chromeos_unittest.cc",
+       ]
+     }
+-  } else if (is_linux) {
++  } else if (is_linux && !is_bsd) {
+     if (use_udev) {
+       sources += [ "storage_monitor_linux_unittest.cc" ]
+     }
diff --git a/chromium-wip/patches/patch-components_storage__monitor_removable__device__constants.cc b/chromium-wip/patches/patch-components_storage__monitor_removable__device__constants.cc
new file mode 100644
index 0000000000..70c2a8a29b
--- /dev/null
+++ b/chromium-wip/patches/patch-components_storage__monitor_removable__device__constants.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/storage_monitor/removable_device_constants.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/storage_monitor/removable_device_constants.cc
+@@ -10,7 +10,7 @@ namespace storage_monitor {
+ const char kFSUniqueIdPrefix[] = "UUID:";
+ const char kVendorModelSerialPrefix[] = "VendorModelSerial:";
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ const char kVendorModelVolumeStoragePrefix[] = "VendorModelVolumeStorage:";
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-components_storage__monitor_removable__device__constants.h b/chromium-wip/patches/patch-components_storage__monitor_removable__device__constants.h
new file mode 100644
index 0000000000..7262b3aa3a
--- /dev/null
+++ b/chromium-wip/patches/patch-components_storage__monitor_removable__device__constants.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/storage_monitor/removable_device_constants.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/storage_monitor/removable_device_constants.h
+@@ -15,7 +15,7 @@ namespace storage_monitor {
+ extern COMPONENT_EXPORT(STORAGE_MONITOR) const char kFSUniqueIdPrefix[];
+ extern COMPONENT_EXPORT(STORAGE_MONITOR) const char kVendorModelSerialPrefix[];
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ extern COMPONENT_EXPORT(STORAGE_MONITOR) const
+     char kVendorModelVolumeStoragePrefix[];
+ #endif
diff --git a/chromium-wip/patches/patch-components_supervised__user_core_browser_kids__chrome__management__url__checker__client.cc b/chromium-wip/patches/patch-components_supervised__user_core_browser_kids__chrome__management__url__checker__client.cc
new file mode 100644
index 0000000000..680ea56633
--- /dev/null
+++ b/chromium-wip/patches/patch-components_supervised__user_core_browser_kids__chrome__management__url__checker__client.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/supervised_user/core/browser/kids_chrome_management_url_checker_client.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/supervised_user/core/browser/kids_chrome_management_url_checker_client.cc
+@@ -66,7 +66,7 @@ void OnResponse(
+ }
+ 
+ FetcherConfig GetFetcherConfig(bool is_subject_to_parental_controls) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   // Supervised users on these platforms might get into a state where their
+   // credentials are not available, so best-effort access mode is a graceful
+   // fallback here.
diff --git a/chromium-wip/patches/patch-components_supervised__user_core_browser_list__family__members__service.h b/chromium-wip/patches/patch-components_supervised__user_core_browser_list__family__members__service.h
new file mode 100644
index 0000000000..3405fce29e
--- /dev/null
+++ b/chromium-wip/patches/patch-components_supervised__user_core_browser_list__family__members__service.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/supervised_user/core/browser/list_family_members_service.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/supervised_user/core/browser/list_family_members_service.h
+@@ -33,7 +33,7 @@ namespace supervised_user {
+ // If true, this fetcher is active for all users with CanFetchFamilyMemberInfo
+ // capability. Otherwise, it is only used by supervised users.
+ constexpr bool FetchListFamilyMembersWithCapability() {
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   return true;
+ #else
+   return false;
diff --git a/chromium-wip/patches/patch-components_supervised__user_core_browser_supervised__user__metrics__service.cc b/chromium-wip/patches/patch-components_supervised__user_core_browser_supervised__user__metrics__service.cc
new file mode 100644
index 0000000000..94590641c2
--- /dev/null
+++ b/chromium-wip/patches/patch-components_supervised__user_core_browser_supervised__user__metrics__service.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/supervised_user/core/browser/supervised_user_metrics_service.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/supervised_user/core/browser/supervised_user_metrics_service.cc
+@@ -83,7 +83,7 @@ SupervisedUserMetricsService::Supervised
+           std::move(metrics_service_accessor_delegate)) {
+   DCHECK(pref_service_);
+   supervised_user_service_observation_.Observe(&supervised_user_service);
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   CHECK(extensions_metrics_delegate_)
+       << "Extensions metrics delegate must exist on Win/Linux/Mac";
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
diff --git a/chromium-wip/patches/patch-components_supervised__user_core_browser_supervised__user__preferences.cc b/chromium-wip/patches/patch-components_supervised__user_core_browser_supervised__user__preferences.cc
new file mode 100644
index 0000000000..f617c6a14c
--- /dev/null
+++ b/chromium-wip/patches/patch-components_supervised__user_core_browser_supervised__user__preferences.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/supervised_user/core/browser/supervised_user_preferences.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/supervised_user/core/browser/supervised_user_preferences.cc
+@@ -153,7 +153,7 @@ void RegisterProfilePrefs(PrefRegistrySi
+   registry->RegisterBooleanPref(prefs::kChildAccountStatusKnown, false);
+   registry->RegisterStringPref(prefs::kFamilyLinkUserMemberRole, std::string());
+ #if BUILDFLAG(ENABLE_EXTENSIONS) && \
+-    (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX))
++    (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD))
+   registry->RegisterIntegerPref(
+       prefs::kLocallyParentApprovedExtensionsMigrationState,
+       static_cast<int>(
diff --git a/chromium-wip/patches/patch-components_supervised__user_core_common_features.cc b/chromium-wip/patches/patch-components_supervised__user_core_common_features.cc
new file mode 100644
index 0000000000..15872c9db7
--- /dev/null
+++ b/chromium-wip/patches/patch-components_supervised__user_core_common_features.cc
@@ -0,0 +1,51 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/supervised_user/core/common/features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/supervised_user/core/common/features.cc
+@@ -37,7 +37,7 @@ BASE_FEATURE(kAllowSubframeLocalWebAppro
+ #endif
+ 
+ #if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_BSD)
+ const int kLocalWebApprovalBottomSheetLoadTimeoutDefaultValueMs = 5000;
+ 
+ const base::FeatureParam<int> kLocalWebApprovalBottomSheetLoadTimeoutMs{
+@@ -46,7 +46,7 @@ const base::FeatureParam<int> kLocalWebA
+ #endif  // BUILDFLAG(IS_IOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
+         // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kEnableLocalWebApprovalErrorDialog,
+              "EnableLocalWebApprovalErrorDialog",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+@@ -89,7 +89,7 @@ bool IsLocalWebApprovalsEnabledForSubfra
+   return base::FeatureList::IsEnabled(kAllowSubframeLocalWebApprovals);
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kCustomProfileStringsForSupervisedUsers,
+              "CustomProfileStringsForSupervisedUsers",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+@@ -101,13 +101,13 @@ BASE_FEATURE(kShowKiteForSupervisedUsers
+ 
+ BASE_FEATURE(kForceSafeSearchForUnauthenticatedSupervisedUsers,
+              "ForceSafeSearchForUnauthenticatedSupervisedUsers",
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+              base::FEATURE_ENABLED_BY_DEFAULT);
+ #else
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kEnableSupervisedUserVersionSignOutDialog,
+              "EnableSupervisedUserVersionSignOutDialog",
+              base::FEATURE_ENABLED_BY_DEFAULT);
diff --git a/chromium-wip/patches/patch-components_supervised__user_core_common_features.h b/chromium-wip/patches/patch-components_supervised__user_core_common_features.h
new file mode 100644
index 0000000000..3372fbd979
--- /dev/null
+++ b/chromium-wip/patches/patch-components_supervised__user_core_common_features.h
@@ -0,0 +1,41 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/supervised_user/core/common/features.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/supervised_user/core/common/features.h
+@@ -20,12 +20,12 @@ BASE_DECLARE_FEATURE(kLocalWebApprovals)
+ BASE_DECLARE_FEATURE(kAllowSubframeLocalWebApprovals);
+ 
+ #if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ extern const base::FeatureParam<int> kLocalWebApprovalBottomSheetLoadTimeoutMs;
+ #endif  // BUILDFLAG(IS_IOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
+         // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ // Whether we show an error screen in case of failure of a local web approval.
+ BASE_DECLARE_FEATURE(kEnableLocalWebApprovalErrorDialog);
+ #endif  // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
+@@ -37,7 +37,7 @@ BASE_DECLARE_FEATURE(kLocalWebApprovalsW
+ // Whether supervised users see an updated URL filter interstitial.
+ BASE_DECLARE_FEATURE(kSupervisedUserBlockInterstitialV3);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ // Enable different web sign in interception behaviour for supervised users:
+ //
+ // 1. Supervised user signs in to existing signed out Profile: show modal
+@@ -55,7 +55,7 @@ BASE_DECLARE_FEATURE(kShowKiteForSupervi
+ // unauthenticated (e.g. signed out of the content area) account.
+ BASE_DECLARE_FEATURE(kForceSafeSearchForUnauthenticatedSupervisedUsers);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ // Uses supervised user strings on the signout dialog.
+ BASE_DECLARE_FEATURE(kEnableSupervisedUserVersionSignOutDialog);
+ #endif
diff --git a/chromium-wip/patches/patch-components_supervised__user_core_common_pref__names.h b/chromium-wip/patches/patch-components_supervised__user_core_common_pref__names.h
new file mode 100644
index 0000000000..020a323002
--- /dev/null
+++ b/chromium-wip/patches/patch-components_supervised__user_core_common_pref__names.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/supervised_user/core/common/pref_names.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/supervised_user/core/common/pref_names.h
+@@ -129,7 +129,7 @@ inline constexpr char kDefaultSupervised
+     "profile.managed.default_filtering_behavior";
+ 
+ #if BUILDFLAG(ENABLE_EXTENSIONS_CORE)
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // An integer pref that stores the current state of the local extension
+ // parent approval migration when the feature
+ // `kEnableSupervisedUserSkipParentApprovalToInstallExtensions` becomes enabled.
diff --git a/chromium-wip/patches/patch-components_sync__device__info_local__device__info__util.cc b/chromium-wip/patches/patch-components_sync__device__info_local__device__info__util.cc
new file mode 100644
index 0000000000..818ce03c3a
--- /dev/null
+++ b/chromium-wip/patches/patch-components_sync__device__info_local__device__info__util.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/sync_device_info/local_device_info_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/sync_device_info/local_device_info_util.cc
+@@ -84,7 +84,7 @@ void OnMachineStatisticsLoaded(LocalDevi
+ sync_pb::SyncEnums::DeviceType GetLocalDeviceType() {
+ #if BUILDFLAG(IS_CHROMEOS)
+   return sync_pb::SyncEnums_DeviceType_TYPE_CROS;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return sync_pb::SyncEnums_DeviceType_TYPE_LINUX;
+ #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS)
+   switch (ui::GetDeviceFormFactor()) {
+@@ -107,7 +107,7 @@ sync_pb::SyncEnums::DeviceType GetLocalD
+ DeviceInfo::OsType GetLocalDeviceOSType() {
+ #if BUILDFLAG(IS_CHROMEOS)
+   return DeviceInfo::OsType::kChromeOsAsh;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return DeviceInfo::OsType::kLinux;
+ #elif BUILDFLAG(IS_ANDROID)
+   return DeviceInfo::OsType::kAndroid;
+@@ -126,7 +126,7 @@ DeviceInfo::OsType GetLocalDeviceOSType(
+ 
+ DeviceInfo::FormFactor GetLocalDeviceFormFactor() {
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   return DeviceInfo::FormFactor::kDesktop;
+ #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS)
+   return ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_TABLET
diff --git a/chromium-wip/patches/patch-components_sync__device__info_local__device__info__util__linux.cc b/chromium-wip/patches/patch-components_sync__device__info_local__device__info__util__linux.cc
new file mode 100644
index 0000000000..540a0d65f2
--- /dev/null
+++ b/chromium-wip/patches/patch-components_sync__device__info_local__device__info__util__linux.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/sync_device_info/local_device_info_util_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/sync_device_info/local_device_info_util_linux.cc
+@@ -9,6 +9,11 @@
+ 
+ #include "base/linux_util.h"
+ 
++#if defined(__FreeBSD__) || defined(__NetBSD__)
++#include <sys/param.h>
++#define HOST_NAME_MAX MAXHOSTNAMELEN
++#endif
++
+ namespace syncer {
+ 
+ std::string GetPersonalizableDeviceNameInternal() {
diff --git a/chromium-wip/patches/patch-components_sync__preferences_common__syncable__prefs__database.cc b/chromium-wip/patches/patch-components_sync__preferences_common__syncable__prefs__database.cc
new file mode 100644
index 0000000000..17a4118915
--- /dev/null
+++ b/chromium-wip/patches/patch-components_sync__preferences_common__syncable__prefs__database.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/sync_preferences/common_syncable_prefs_database.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/sync_preferences/common_syncable_prefs_database.cc
+@@ -343,7 +343,7 @@ constexpr auto kCommonSyncablePrefsAllow
+           syncer::PREFERENCES, PrefSensitivity::kNone, MergeBehavior::kNone}},
+ #endif  // BUILDFLAG(IS_ANDROID)
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+         {autofill::prefs::kAutofillBnplEnabled,
+          {syncable_prefs_ids::kAutofillBnplEnabled, syncer::PREFERENCES,
+           PrefSensitivity::kNone, MergeBehavior::kNone}},
diff --git a/chromium-wip/patches/patch-components_sync_base_sync__util.cc b/chromium-wip/patches/patch-components_sync_base_sync__util.cc
new file mode 100644
index 0000000000..0a3180f702
--- /dev/null
+++ b/chromium-wip/patches/patch-components_sync_base_sync__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/sync/base/sync_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/sync/base/sync_util.cc
+@@ -44,6 +44,8 @@ std::string GetSystemString() {
+   system = "FREEBSD ";
+ #elif BUILDFLAG(IS_OPENBSD)
+   system = "OPENBSD ";
++#elif BUILDFLAG(IS_NETBSD)
++  system = "NETBSD ";
+ #elif BUILDFLAG(IS_MAC)
+   system = "MAC ";
+ #endif
diff --git a/chromium-wip/patches/patch-components_system__cpu_cpu__probe.cc b/chromium-wip/patches/patch-components_system__cpu_cpu__probe.cc
new file mode 100644
index 0000000000..404b5b5796
--- /dev/null
+++ b/chromium-wip/patches/patch-components_system__cpu_cpu__probe.cc
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/system_cpu/cpu_probe.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/system_cpu/cpu_probe.cc
+@@ -20,6 +20,10 @@
+ #include "components/system_cpu/cpu_probe_mac.h"
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
++#if BUILDFLAG(IS_BSD)
++#include "base/notimplemented.h"
++#endif
++
+ namespace system_cpu {
+ 
+ // static
+@@ -30,6 +34,9 @@ std::unique_ptr<CpuProbe> CpuProbe::Crea
+   return CpuProbeWin::Create();
+ #elif BUILDFLAG(IS_MAC)
+   return CpuProbeMac::Create();
++#elif BUILDFLAG(IS_BSD)
++  NOTIMPLEMENTED();
++  return nullptr;
+ #else
+   return nullptr;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
diff --git a/chromium-wip/patches/patch-components_translate_core_common_translate__util.cc b/chromium-wip/patches/patch-components_translate_core_common_translate__util.cc
new file mode 100644
index 0000000000..94df56b188
--- /dev/null
+++ b/chromium-wip/patches/patch-components_translate_core_common_translate__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/translate/core/common/translate_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/translate/core/common/translate_util.cc
+@@ -21,7 +21,7 @@ const char kSecurityOrigin[] = "https://
+ BASE_FEATURE(kTFLiteLanguageDetectionEnabled,
+              "TFLiteLanguageDetectionEnabled",
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD)
+              base::FEATURE_ENABLED_BY_DEFAULT
+ #else
+              base::FEATURE_DISABLED_BY_DEFAULT
diff --git a/chromium-wip/patches/patch-components_trusted__vault_trusted__vault__connection__impl.cc b/chromium-wip/patches/patch-components_trusted__vault_trusted__vault__connection__impl.cc
new file mode 100644
index 0000000000..883b47dd47
--- /dev/null
+++ b/chromium-wip/patches/patch-components_trusted__vault_trusted__vault__connection__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/trusted_vault/trusted_vault_connection_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/trusted_vault/trusted_vault_connection_impl.cc
+@@ -105,7 +105,7 @@ GetLocalPhysicalDeviceType() {
+   // currently used or even built on all platforms.
+ #if BUILDFLAG(IS_CHROMEOS)
+   return trusted_vault_pb::PhysicalDeviceMetadata::DEVICE_TYPE_CHROMEOS;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return trusted_vault_pb::PhysicalDeviceMetadata::DEVICE_TYPE_LINUX;
+ #elif BUILDFLAG(IS_ANDROID)
+   return trusted_vault_pb::PhysicalDeviceMetadata::DEVICE_TYPE_ANDROID;
diff --git a/chromium-wip/patches/patch-components_update__client_update__query__params.cc b/chromium-wip/patches/patch-components_update__client_update__query__params.cc
new file mode 100644
index 0000000000..c5073fb2e6
--- /dev/null
+++ b/chromium-wip/patches/patch-components_update__client_update__query__params.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/update_client/update_query_params.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/update_client/update_query_params.cc
+@@ -39,6 +39,10 @@ const char kOs[] =
+     "fuchsia";
+ #elif BUILDFLAG(IS_OPENBSD)
+     "openbsd";
++#elif defined(OS_FREEBSD)
++    "freebsd";
++#elif defined(OS_NETBSD)
++    "netbsd";
+ #else
+ #error "unknown os"
+ #endif
diff --git a/chromium-wip/patches/patch-components_url__formatter_spoof__checks_idn__spoof__checker.cc b/chromium-wip/patches/patch-components_url__formatter_spoof__checks_idn__spoof__checker.cc
new file mode 100644
index 0000000000..0eeac4bff9
--- /dev/null
+++ b/chromium-wip/patches/patch-components_url__formatter_spoof__checks_idn__spoof__checker.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/url_formatter/spoof_checks/idn_spoof_checker.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/url_formatter/spoof_checks/idn_spoof_checker.cc
+@@ -298,7 +298,7 @@ IDNSpoofChecker::IDNSpoofChecker() {
+   // The ideal fix would be to change the omnibox font used for Thai. In
+   // that case, the Linux-only list should be revisited and potentially
+   // removed.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+        "[ทนบพรหเแ๐ดลปฟม]",
+ #else
+        "[บพเแ๐]",
diff --git a/chromium-wip/patches/patch-components_user__education_views_help__bubble__view.cc b/chromium-wip/patches/patch-components_user__education_views_help__bubble__view.cc
new file mode 100644
index 0000000000..3dd2481bb4
--- /dev/null
+++ b/chromium-wip/patches/patch-components_user__education_views_help__bubble__view.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/user_education/views/help_bubble_view.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/user_education/views/help_bubble_view.cc
+@@ -269,7 +269,7 @@ DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(He
+ // TODO(https://crbug.com/382611284): Temporarily handle the case when the
+ // primary window is minimized by closing the help bubble. Remove this code when
+ // the issue is solved at the Views framework level.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ class HelpBubbleView::PrimaryWidgetObserver : public views::WidgetObserver {
+  public:
+   explicit PrimaryWidgetObserver(HelpBubbleView& help_bubble)
+@@ -733,7 +733,7 @@ HelpBubbleView::HelpBubbleView(
+     event_relay_->Init(this);
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   primary_widget_observer_ = std::make_unique<PrimaryWidgetObserver>(*this);
+ #endif
+ 
+@@ -845,7 +845,7 @@ gfx::Rect HelpBubbleView::GetAnchorRect(
+ void HelpBubbleView::OnBeforeBubbleWidgetInit(views::Widget::InitParams* params,
+                                               views::Widget* widget) const {
+   BubbleDialogDelegateView::OnBeforeBubbleWidgetInit(params, widget);
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_BSD)
+   // Help bubbles anchored to menus may be clipped to their anchors' bounds,
+   // resulting in visual errors, unless they use accelerated rendering. See
+   // crbug.com/1445770 for details. This also applies to bubbles anchored to
diff --git a/chromium-wip/patches/patch-components_user__education_views_help__bubble__view.h b/chromium-wip/patches/patch-components_user__education_views_help__bubble__view.h
new file mode 100644
index 0000000000..43ffe8ba46
--- /dev/null
+++ b/chromium-wip/patches/patch-components_user__education_views_help__bubble__view.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/user_education/views/help_bubble_view.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/user_education/views/help_bubble_view.h
+@@ -160,7 +160,7 @@ class HelpBubbleView : public views::Bub
+ // work around this problem by closing the bubble if the widget is minimized.
+ // When the underlying issue is fixed at the framework level, this can be
+ // removed.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   class PrimaryWidgetObserver;
+   std::unique_ptr<PrimaryWidgetObserver> primary_widget_observer_;
+ #endif
diff --git a/chromium-wip/patches/patch-components_variations_service_variations__service.cc b/chromium-wip/patches/patch-components_variations_service_variations__service.cc
new file mode 100644
index 0000000000..3965f3e6db
--- /dev/null
+++ b/chromium-wip/patches/patch-components_variations_service_variations__service.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/variations/service/variations_service.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/variations/service/variations_service.cc
+@@ -99,7 +99,7 @@ std::string GetPlatformString() {
+   return "android";
+ #elif BUILDFLAG(IS_FUCHSIA)
+   return "fuchsia";
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_SOLARIS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_SOLARIS) || BUILDFLAG(IS_BSD)
+   // Default BSD and SOLARIS to Linux to not break those builds, although these
+   // platforms are not officially supported by Chrome.
+   return "linux";
diff --git a/chromium-wip/patches/patch-components_visited__url__ranking_public_url__visit__util.cc b/chromium-wip/patches/patch-components_visited__url__ranking_public_url__visit__util.cc
new file mode 100644
index 0000000000..c2b3a47c12
--- /dev/null
+++ b/chromium-wip/patches/patch-components_visited__url__ranking_public_url__visit__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/visited_url_ranking/public/url_visit_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/visited_url_ranking/public/url_visit_util.cc
+@@ -68,7 +68,7 @@ PlatformType GetPlatformInput() {
+   return PlatformType::kWindows;
+ #elif BUILDFLAG(IS_MAC)
+   return PlatformType::kMac;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return PlatformType::kLinux;
+ #elif BUILDFLAG(IS_IOS)
+   return PlatformType::kIos;
diff --git a/chromium-wip/patches/patch-components_viz_host_gpu__host__impl.cc b/chromium-wip/patches/patch-components_viz_host_gpu__host__impl.cc
new file mode 100644
index 0000000000..349239ef72
--- /dev/null
+++ b/chromium-wip/patches/patch-components_viz_host_gpu__host__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/viz/host/gpu_host_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/viz/host/gpu_host_impl.cc
+@@ -135,7 +135,7 @@ GpuHostImpl::GpuHostImpl(Delegate* deleg
+       mojom::GpuServiceCreationParams::New();
+ #if BUILDFLAG(IS_OZONE)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Linux has an issue when running in single-process mode wherein
+   // GetPlatformRuntimeProperties() browser-side calls can have a data race with
+   // in-process GPU service initialization. The call to
diff --git a/chromium-wip/patches/patch-components_viz_host_host__display__client.cc b/chromium-wip/patches/patch-components_viz_host_host__display__client.cc
new file mode 100644
index 0000000000..3235215924
--- /dev/null
+++ b/chromium-wip/patches/patch-components_viz_host_host__display__client.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/viz/host/host_display_client.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/viz/host/host_display_client.cc
+@@ -66,9 +66,9 @@ void HostDisplayClient::AddChildWindowTo
+ }
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+ void HostDisplayClient::DidCompleteSwapWithNewSize(const gfx::Size& size) {
+-  NOTIMPLEMENTED();
++  NOTREACHED();
+ }
+ #endif  // BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
+ 
diff --git a/chromium-wip/patches/patch-components_viz_host_host__display__client.h b/chromium-wip/patches/patch-components_viz_host_host__display__client.h
new file mode 100644
index 0000000000..00ebce6ac1
--- /dev/null
+++ b/chromium-wip/patches/patch-components_viz_host_host__display__client.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/viz/host/host_display_client.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/viz/host/host_display_client.h
+@@ -52,7 +52,7 @@ class VIZ_HOST_EXPORT HostDisplayClient 
+   void AddChildWindowToBrowser(gpu::SurfaceHandle child_window) override;
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+   void DidCompleteSwapWithNewSize(const gfx::Size& size) override;
+ #endif  // BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
+ 
diff --git a/chromium-wip/patches/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc b/chromium-wip/patches/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc
new file mode 100644
index 0000000000..d46eb005a5
--- /dev/null
+++ b/chromium-wip/patches/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/viz/service/display_embedder/skia_output_surface_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/viz/service/display_embedder/skia_output_surface_impl.cc
+@@ -1503,7 +1503,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::G
+                                             ->GetVulkanPhysicalDevice(),
+                                         VK_IMAGE_TILING_OPTIMAL, vk_format,
+                                         si_format, yuv_color_space, ycbcr_info);
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     // Textures that were allocated _on linux_ with ycbcr info came from
+     // VaapiVideoDecoder, which exports using DRM format modifiers.
+     return GrBackendFormats::MakeVk(gr_ycbcr_info,
diff --git a/chromium-wip/patches/patch-components_viz_service_display__embedder_software__output__surface.cc b/chromium-wip/patches/patch-components_viz_service_display__embedder_software__output__surface.cc
new file mode 100644
index 0000000000..616a74aa98
--- /dev/null
+++ b/chromium-wip/patches/patch-components_viz_service_display__embedder_software__output__surface.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/viz/service/display_embedder/software_output_surface.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/viz/service/display_embedder/software_output_surface.cc
+@@ -115,7 +115,7 @@ void SoftwareOutputSurface::SwapBuffersC
+   base::TimeTicks now = base::TimeTicks::Now();
+   base::TimeDelta interval_to_next_refresh =
+       now.SnappedToNextTick(refresh_timebase_, refresh_interval_) - now;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (needs_swap_size_notifications_)
+     client_->DidSwapWithSize(pixel_size);
+ #endif
+@@ -142,7 +142,7 @@ gfx::OverlayTransform SoftwareOutputSurf
+   return gfx::OVERLAY_TRANSFORM_NONE;
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void SoftwareOutputSurface::SetNeedsSwapSizeNotifications(
+     bool needs_swap_size_notifications) {
+   needs_swap_size_notifications_ = needs_swap_size_notifications;
diff --git a/chromium-wip/patches/patch-components_viz_service_display__embedder_software__output__surface.h b/chromium-wip/patches/patch-components_viz_service_display__embedder_software__output__surface.h
new file mode 100644
index 0000000000..f839aae738
--- /dev/null
+++ b/chromium-wip/patches/patch-components_viz_service_display__embedder_software__output__surface.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/viz/service/display_embedder/software_output_surface.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/viz/service/display_embedder/software_output_surface.h
+@@ -40,7 +40,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputS
+       UpdateVSyncParametersCallback callback) override;
+   void SetDisplayTransformHint(gfx::OverlayTransform transform) override {}
+   gfx::OverlayTransform GetDisplayTransform() override;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   void SetNeedsSwapSizeNotifications(
+       bool needs_swap_size_notifications) override;
+ #endif
+@@ -58,7 +58,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputS
+   base::TimeTicks refresh_timebase_;
+   base::TimeDelta refresh_interval_ = BeginFrameArgs::DefaultInterval();
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   bool needs_swap_size_notifications_ = false;
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-components_viz_service_display_skia__renderer.cc b/chromium-wip/patches/patch-components_viz_service_display_skia__renderer.cc
new file mode 100644
index 0000000000..27a13f02bd
--- /dev/null
+++ b/chromium-wip/patches/patch-components_viz_service_display_skia__renderer.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/viz/service/display/skia_renderer.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/viz/service/display/skia_renderer.cc
+@@ -1380,7 +1380,7 @@ void SkiaRenderer::ClearFramebuffer() {
+   if (current_frame()->current_render_pass->has_transparent_background) {
+     ClearCanvas(SkColors::kTransparent);
+   } else {
+-#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX)
++#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)
+     // On DEBUG builds, opaque render passes are cleared to blue
+     // to easily see regions that were not drawn on the screen.
+     // ClearCavas() call causes slight pixel difference, so linux-ref and
diff --git a/chromium-wip/patches/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc b/chromium-wip/patches/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc
new file mode 100644
index 0000000000..d9d99894c4
--- /dev/null
+++ b/chromium-wip/patches/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
+@@ -142,7 +142,7 @@ RootCompositorFrameSinkImpl::Create(
+   output_surface->SetNeedsSwapSizeNotifications(
+       params->send_swap_size_notifications);
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+   // For X11, we need notify client about swap completion after resizing, so the
+   // client can use it for synchronize with X11 WM.
+   output_surface->SetNeedsSwapSizeNotifications(true);
+@@ -911,7 +911,7 @@ void RootCompositorFrameSinkImpl::Displa
+   if (display_client_ && enable_swap_completion_callback_) {
+     display_client_->DidCompleteSwapWithSize(pixel_size);
+   }
+-#elif BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+   if (display_client_ && pixel_size != last_swap_pixel_size_) {
+     last_swap_pixel_size_ = pixel_size;
+     display_client_->DidCompleteSwapWithNewSize(last_swap_pixel_size_);
diff --git a/chromium-wip/patches/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h b/chromium-wip/patches/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h
new file mode 100644
index 0000000000..b634a90577
--- /dev/null
+++ b/chromium-wip/patches/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h
+@@ -229,7 +229,7 @@ class VIZ_SERVICE_EXPORT RootCompositorF
+   base::TimeDelta display_frame_interval_ = BeginFrameArgs::DefaultInterval();
+   base::TimeDelta preferred_frame_interval_;
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+   gfx::Size last_swap_pixel_size_;
+ #endif  // BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
+ 
diff --git a/chromium-wip/patches/patch-components_viz_service_gl_gpu__service__impl.cc b/chromium-wip/patches/patch-components_viz_service_gl_gpu__service__impl.cc
new file mode 100644
index 0000000000..f7e5e52fe6
--- /dev/null
+++ b/chromium-wip/patches/patch-components_viz_service_gl_gpu__service__impl.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/viz/service/gl/gpu_service_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/viz/service/gl/gpu_service_impl.cc
+@@ -514,7 +514,7 @@ void GpuServiceImpl::InitializeWithHostI
+ 
+   mojo::Remote<mojom::GpuHost> gpu_host(std::move(pending_gpu_host));
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   gpu_extra_info_.is_gmb_nv12_supported = IsGMBNV12Supported();
+ #endif
+ 
+@@ -1372,7 +1372,7 @@ bool GpuServiceImpl::OnBeginFrameDerived
+   return true;
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ bool GpuServiceImpl::IsGMBNV12Supported() {
+   CHECK(main_runner_->BelongsToCurrentThread());
+   auto buffer_format = gfx::BufferFormat::YUV_420_BIPLANAR;
diff --git a/chromium-wip/patches/patch-components_viz_service_gl_gpu__service__impl.h b/chromium-wip/patches/patch-components_viz_service_gl_gpu__service__impl.h
new file mode 100644
index 0000000000..dc9bc904c4
--- /dev/null
+++ b/chromium-wip/patches/patch-components_viz_service_gl_gpu__service__impl.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/viz/service/gl/gpu_service_impl.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/viz/service/gl/gpu_service_impl.h
+@@ -487,7 +487,7 @@ class VIZ_SERVICE_EXPORT GpuServiceImpl
+ 
+   void OnBeginFrameOnIO(const BeginFrameArgs& args);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   bool IsGMBNV12Supported();
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-components_viz_test_fake__display__client.cc b/chromium-wip/patches/patch-components_viz_test_fake__display__client.cc
new file mode 100644
index 0000000000..d3243a38da
--- /dev/null
+++ b/chromium-wip/patches/patch-components_viz_test_fake__display__client.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/viz/test/fake_display_client.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/viz/test/fake_display_client.cc
+@@ -27,7 +27,7 @@ void FakeDisplayClient::AddChildWindowTo
+     gpu::SurfaceHandle child_window) {}
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+ void FakeDisplayClient::DidCompleteSwapWithNewSize(const gfx::Size& size) {}
+ #endif  // BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
+ 
diff --git a/chromium-wip/patches/patch-components_viz_test_fake__display__client.h b/chromium-wip/patches/patch-components_viz_test_fake__display__client.h
new file mode 100644
index 0000000000..a459b97dc2
--- /dev/null
+++ b/chromium-wip/patches/patch-components_viz_test_fake__display__client.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/viz/test/fake_display_client.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/viz/test/fake_display_client.h
+@@ -36,7 +36,7 @@ class FakeDisplayClient : public mojom::
+   void AddChildWindowToBrowser(gpu::SurfaceHandle child_window) override;
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+   void DidCompleteSwapWithNewSize(const gfx::Size& size) override;
+ #endif  // BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
+ 
diff --git a/chromium-wip/patches/patch-components_viz_test_mock__display__client.h b/chromium-wip/patches/patch-components_viz_test_mock__display__client.h
new file mode 100644
index 0000000000..d129d37d58
--- /dev/null
+++ b/chromium-wip/patches/patch-components_viz_test_mock__display__client.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/viz/test/mock_display_client.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/viz/test/mock_display_client.h
+@@ -45,7 +45,7 @@ class MockDisplayClient : public mojom::
+ #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS)
+   MOCK_METHOD1(SetPreferredRefreshRate, void(float refresh_rate));
+ #endif  // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS)
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+   MOCK_METHOD1(DidCompleteSwapWithNewSize, void(const gfx::Size&));
+ #endif  // BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
+ 
diff --git a/chromium-wip/patches/patch-components_webui_flags_flags__state.cc b/chromium-wip/patches/patch-components_webui_flags_flags__state.cc
new file mode 100644
index 0000000000..bc5cb90fc1
--- /dev/null
+++ b/chromium-wip/patches/patch-components_webui_flags_flags__state.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- components/webui/flags/flags_state.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ components/webui/flags/flags_state.cc
+@@ -782,7 +782,7 @@ unsigned short FlagsState::GetCurrentPla
+   return kOsWin;
+ #elif BUILDFLAG(IS_CHROMEOS)
+   return kOsCrOS;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return kOsLinux;
+ #elif BUILDFLAG(IS_ANDROID)
+   return kOsAndroid;
diff --git a/chromium-wip/patches/patch-content_app_BUILD.gn b/chromium-wip/patches/patch-content_app_BUILD.gn
new file mode 100644
index 0000000000..3588198545
--- /dev/null
+++ b/chromium-wip/patches/patch-content_app_BUILD.gn
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/app/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/app/BUILD.gn
+@@ -89,9 +89,9 @@ source_set("content_main_runner_app") {
+            "//third_party/tflite:buildflags",
+            "//tools/v8_context_snapshot:buildflags",
+          ]
+-  if (build_tflite_with_xnnpack) {
+-    deps += [ "//third_party/cpuinfo" ]
+-  }
++#  if (build_tflite_with_xnnpack) {
++#    deps += [ "//third_party/cpuinfo" ]
++#  }
+ }
+ 
+ source_set("app") {
diff --git a/chromium-wip/patches/patch-content_app_content__main.cc b/chromium-wip/patches/patch-content_app_content__main.cc
new file mode 100644
index 0000000000..ef9fdb7ee8
--- /dev/null
+++ b/chromium-wip/patches/patch-content_app_content__main.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/app/content_main.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/app/content_main.cc
+@@ -226,7 +226,7 @@ NO_STACK_PROTECTOR int RunContentProcess
+     base::EnableTerminationOnOutOfMemory();
+     logging::RegisterAbslAbortHook();
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     // The various desktop environments set this environment variable that
+     // allows the dbus client library to connect directly to the bus. When this
+     // variable is not set (test environments like xvfb-run), the dbus client
+@@ -320,7 +320,7 @@ NO_STACK_PROTECTOR int RunContentProcess
+ #endif
+ #endif
+ 
+-#if (BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)) && !defined(COMPONENT_BUILD)
++#if (BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)) && !defined(COMPONENT_BUILD) && defined(notyet)
+     base::subtle::EnableFDOwnershipEnforcement(true);
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-content_app_content__main__runner__impl.cc b/chromium-wip/patches/patch-content_app_content__main__runner__impl.cc
new file mode 100644
index 0000000000..cb69a155a7
--- /dev/null
+++ b/chromium-wip/patches/patch-content_app_content__main__runner__impl.cc
@@ -0,0 +1,137 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/app/content_main_runner_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/app/content_main_runner_impl.cc
+@@ -149,18 +149,20 @@
+ #include "content/browser/posix_file_descriptor_info_impl.h"
+ #include "content/public/common/content_descriptors.h"
+ 
+-#if !BUILDFLAG(IS_MAC)
++#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD)
+ #include "content/public/common/zygote/zygote_fork_delegate_linux.h"
+ #endif
+ 
+ #endif  // BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "base/files/file_path_watcher_inotify.h"
+ #include "base/native_library.h"
+ #include "base/rand_util.h"
+ #include "content/public/common/zygote/sandbox_support_linux.h"
++#if !BUILDFLAG(IS_BSD)
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#endif
+ #include "third_party/boringssl/src/include/openssl/crypto.h"
+ #include "third_party/webrtc_overrides/init_webrtc.h"  // nogncheck
+ 
+@@ -189,6 +191,10 @@
+ #include "media/base/media_switches.h"
+ #endif
+ 
++#if BUILDFLAG(IS_BSD)
++#include "base/system/sys_info.h"
++#endif
++
+ #if BUILDFLAG(IS_ANDROID)
+ #include "base/system/sys_info.h"
+ #include "content/browser/android/battery_metrics.h"
+@@ -390,7 +396,7 @@ void InitializeZygoteSandboxForBrowserPr
+ }
+ #endif  // BUILDFLAG(USE_ZYGOTE)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ 
+ #if BUILDFLAG(ENABLE_PPAPI)
+ // Loads the (native) libraries but does not initialize them (i.e., does not
+@@ -428,7 +434,10 @@ void PreloadLibraryCdms() {
+ 
+ void PreSandboxInit() {
+   // Ensure the /dev/urandom is opened.
++  // we use arc4random
++#if !BUILDFLAG(IS_BSD)
+   base::GetUrandomFD();
++#endif
+ 
+   // May use sysinfo(), sched_getaffinity(), and open various /sys/ and /proc/
+   // files.
+@@ -440,9 +449,16 @@ void PreSandboxInit() {
+   // https://boringssl.googlesource.com/boringssl/+/HEAD/SANDBOXING.md
+   CRYPTO_pre_sandbox_init();
+ 
++#if BUILDFLAG(IS_BSD)
++  // "cache" the amount of physical memory before pledge(2)
++  base::SysInfo::AmountOfPhysicalMemoryMB();
++#endif
++
++#if !BUILDFLAG(IS_BSD)
+   // Pre-read /proc/sys/fs/inotify/max_user_watches so it doesn't have to be
+   // allowed by the sandbox.
+   base::GetMaxNumberOfInotifyWatches();
++#endif
+ 
+ #if BUILDFLAG(ENABLE_PPAPI)
+   // Ensure access to the Pepper plugins before the sandbox is turned on.
+@@ -765,7 +781,7 @@ NO_STACK_PROTECTOR int RunOtherNamedProc
+     base::HangWatcher::CreateHangWatcherInstance();
+     unregister_thread_closure = base::HangWatcher::RegisterThread(
+         base::HangWatcher::ThreadType::kMainThread);
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     // On Linux/ChromeOS, the HangWatcher can't start until after the sandbox is
+     // initialized, because the sandbox can't be started with multiple threads.
+     // TODO(mpdenton): start the HangWatcher after the sandbox is initialized.
+@@ -883,11 +899,10 @@ int ContentMainRunnerImpl::Initialize(Co
+                  base::GlobalDescriptors::kBaseDescriptor);
+ #endif  // !BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+   g_fds->Set(kCrashDumpSignal,
+              kCrashDumpSignal + base::GlobalDescriptors::kBaseDescriptor);
+-#endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ||
+-        // BUILDFLAG(IS_OPENBSD)
++#endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+ #endif  // !BUILDFLAG(IS_WIN)
+ 
+@@ -1088,10 +1103,22 @@ int ContentMainRunnerImpl::Initialize(Co
+       process_type == switches::kZygoteProcess) {
+     PreSandboxInit();
+   }
++#elif BUILDFLAG(IS_BSD)
++  PreSandboxInit();
+ #elif BUILDFLAG(IS_IOS) && !BUILDFLAG(IS_IOS_TVOS)
+   ChildProcessEnterSandbox();
+ #endif
+ 
++#if BUILDFLAG(IS_BSD)
++  if (process_type.empty()) {
++    sandbox::policy::SandboxLinux::Options sandbox_options;
++    sandbox::policy::SandboxLinux::GetInstance()->InitializeSandbox(
++        sandbox::policy::SandboxTypeFromCommandLine(
++            *base::CommandLine::ForCurrentProcess()),
++        sandbox::policy::SandboxLinux::PreSandboxHook(), sandbox_options);
++  }
++#endif
++
+   delegate_->SandboxInitialized(process_type);
+ 
+ #if BUILDFLAG(USE_ZYGOTE)
+@@ -1192,6 +1219,11 @@ NO_STACK_PROTECTOR int ContentMainRunner
+ 
+   RegisterMainThreadFactories();
+ 
++#if BUILDFLAG(IS_BSD)
++  if (!process_type.empty())
++    PreSandboxInit();
++#endif 
++
+   if (process_type.empty())
+     return RunBrowser(std::move(main_params), start_minimal_browser);
+ 
diff --git a/chromium-wip/patches/patch-content_browser_BUILD.gn b/chromium-wip/patches/patch-content_browser_BUILD.gn
new file mode 100644
index 0000000000..ff52ab7ef5
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_BUILD.gn
@@ -0,0 +1,39 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/BUILD.gn
+@@ -2581,6 +2581,14 @@ source_set("browser") {
+     ]
+   }
+ 
++  if (is_bsd) {
++    sources += [
++      "file_system_access/file_path_watcher/file_path_watcher_bsd.cc",
++      "file_system_access/file_path_watcher/file_path_watcher_kqueue.cc",
++      "file_system_access/file_path_watcher/file_path_watcher_kqueue.h",
++    ]
++  }
++
+   if (is_linux || is_chromeos) {
+     sources -=
+         [ "file_system_access/file_path_watcher/file_path_watcher_stub.cc" ]
+@@ -2631,6 +2639,15 @@ source_set("browser") {
+     deps += [ "//media/mojo/mojom" ]
+   }
+ 
++  if (is_bsd) {
++    sources -= [
++      "file_system_access/file_path_watcher/file_path_watcher_inotify.cc",
++      "file_system_access/file_path_watcher/file_path_watcher_inotify.h",
++      "sandbox_ipc_linux.cc",
++      "sandbox_ipc_linux.h",
++    ]
++  }
++
+   if (is_chromeos) {
+     sources += [
+       "handwriting/handwriting_recognition_service_impl_cros.cc",
diff --git a/chromium-wip/patches/patch-content_browser_accessibility_browser__accessibility__state__impl.cc b/chromium-wip/patches/patch-content_browser_accessibility_browser__accessibility__state__impl.cc
new file mode 100644
index 0000000000..b778fb020f
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_accessibility_browser__accessibility__state__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/accessibility/browser_accessibility_state_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/accessibility/browser_accessibility_state_impl.cc
+@@ -295,7 +295,7 @@ BrowserAccessibilityStateImpl* BrowserAc
+ 
+ // On Android, Mac, Windows and Linux there are platform-specific subclasses.
+ #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_MAC) && \
+-    !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)
++    !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD)
+ // static
+ std::unique_ptr<BrowserAccessibilityStateImpl>
+ BrowserAccessibilityStateImpl::Create() {
diff --git a/chromium-wip/patches/patch-content_browser_accessibility_browser__accessibility__state__impl__auralinux.cc b/chromium-wip/patches/patch-content_browser_accessibility_browser__accessibility__state__impl__auralinux.cc
new file mode 100644
index 0000000000..4dbb9a715c
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_accessibility_browser__accessibility__state__impl__auralinux.cc
@@ -0,0 +1,52 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/accessibility/browser_accessibility_state_impl_auralinux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/accessibility/browser_accessibility_state_impl_auralinux.cc
+@@ -12,6 +12,8 @@
+ #include <sstream>
+ #include <string>
+ 
++#include "base/notimplemented.h"
++
+ #include "base/debug/crash_logging.h"
+ #include "base/metrics/histogram_macros.h"
+ #include "base/task/thread_pool.h"
+@@ -34,7 +36,15 @@ bool CheckCmdlineForOrca(const std::stri
+   std::string cmdline;
+   std::stringstream ss(cmdline_all);
+   while (std::getline(ss, cmdline, '\0')) {
++#if BUILDFLAG(IS_BSD)
++#if BUILDFLAG(IS_NETBSD)
++    re2::RE2 orca_regex(R"((^|/)(usr/)?(pkg/)?bin/orca(\s|$))");
++#else
++    re2::RE2 orca_regex(R"((^|/)(usr/)?(local/)?bin/orca(\s|$))");
++#endif
++#else
+     re2::RE2 orca_regex(R"((^|/)(usr/)?bin/orca(\s|$))");
++#endif
+     if (re2::RE2::PartialMatch(cmdline, orca_regex)) {
+       return true;  // Orca was found
+     }
+@@ -44,6 +54,10 @@ bool CheckCmdlineForOrca(const std::stri
+ 
+ // Returns true if Orca is active.
+ bool DiscoverOrca() {
++#if BUILDFLAG(IS_BSD)
++  NOTIMPLEMENTED();
++  return false;
++#else
+   // NOTE: this method is run from another thread to reduce jank, since
+   // there's no guarantee these system calls will return quickly.
+   std::unique_ptr<DIR, decltype(&CloseDir)> proc_dir(opendir("/proc"),
+@@ -81,6 +95,7 @@ bool DiscoverOrca() {
+   }
+ 
+   return is_orca_active;
++#endif
+ }
+ 
+ }  // namespace
diff --git a/chromium-wip/patches/patch-content_browser_audio_audio__service.cc b/chromium-wip/patches/patch-content_browser_audio_audio__service.cc
new file mode 100644
index 0000000000..3791d4b410
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_audio_audio__service.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/audio/audio_service.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/audio/audio_service.cc
+@@ -33,7 +33,7 @@
+ #if BUILDFLAG(ENABLE_PASSTHROUGH_AUDIO_CODECS)
+ #include "ui/display/util/edid_parser.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/display/display_util.h"
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+@@ -201,7 +201,7 @@ audio::mojom::AudioService& GetAudioServ
+         ->PostTaskAndReplyWithResult(
+             FROM_HERE, base::BindOnce(&ScanEdidBitstreams),
+             base::BindOnce(&LaunchAudioService, std::move(receiver)));
+-#elif BUILDFLAG(ENABLE_PASSTHROUGH_AUDIO_CODECS) && BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(ENABLE_PASSTHROUGH_AUDIO_CODECS) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD))
+     LaunchAudioService(
+         std::move(receiver),
+         ConvertEdidBitstreams(display::DisplayUtil::GetAudioFormats()));
diff --git a/chromium-wip/patches/patch-content_browser_browser__child__process__host__impl.cc b/chromium-wip/patches/patch-content_browser_browser__child__process__host__impl.cc
new file mode 100644
index 0000000000..2f5d0aac50
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_browser__child__process__host__impl.cc
@@ -0,0 +1,25 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/browser_child_process_host_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/browser_child_process_host_impl.cc
+@@ -326,6 +326,7 @@ void BrowserChildProcessHostImpl::Launch
+       switches::kLogBestEffortTasks,
+       switches::kPerfettoDisableInterning,
+       switches::kTraceToConsole,
++      switches::kDisableUnveil,
+   };
+   cmd_line->CopySwitchesFrom(browser_command_line, kForwardSwitches);
+ 
+@@ -696,7 +697,7 @@ void BrowserChildProcessHostImpl::OnProc
+           ->child_process());
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   child_thread_type_switcher_.SetPid(process.Pid());
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
diff --git a/chromium-wip/patches/patch-content_browser_browser__child__process__host__impl.h b/chromium-wip/patches/patch-content_browser_browser__child__process__host__impl.h
new file mode 100644
index 0000000000..750b6dff82
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_browser__child__process__host__impl.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/browser_child_process_host_impl.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/browser_child_process_host_impl.h
+@@ -36,7 +36,7 @@
+ #include "base/win/object_watcher.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "content/browser/child_thread_type_switcher_linux.h"
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+@@ -287,7 +287,7 @@ class BrowserChildProcessHostImpl
+   std::unique_ptr<tracing::SystemTracingService> system_tracing_service_;
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   ChildThreadTypeSwitcher child_thread_type_switcher_;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
diff --git a/chromium-wip/patches/patch-content_browser_browser__child__process__host__impl__receiver__bindings.cc b/chromium-wip/patches/patch-content_browser_browser__child__process__host__impl__receiver__bindings.cc
new file mode 100644
index 0000000000..1c7df37832
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_browser__child__process__host__impl__receiver__bindings.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/browser_child_process_host_impl_receiver_bindings.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/browser_child_process_host_impl_receiver_bindings.cc
+@@ -64,7 +64,7 @@ void BrowserChildProcessHostImpl::BindHo
+     }
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (auto r = receiver.As<mojom::ThreadTypeSwitcher>()) {
+     child_thread_type_switcher_.Bind(std::move(r));
+     return;
diff --git a/chromium-wip/patches/patch-content_browser_browser__main__loop.cc b/chromium-wip/patches/patch-content_browser_browser__main__loop.cc
new file mode 100644
index 0000000000..b2ac5ad4ff
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_browser__main__loop.cc
@@ -0,0 +1,43 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/browser_main_loop.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/browser_main_loop.cc
+@@ -250,6 +250,12 @@
+ #include "mojo/public/cpp/bindings/lib/test_random_mojo_delays.h"
+ #endif
+ 
++#if BUILDFLAG(IS_BSD)
++#include "content/browser/sandbox_host_linux.h"
++#include "content/public/common/zygote/sandbox_support_linux.h"
++#include "sandbox/policy/sandbox.h"
++#endif
++
+ // One of the linux specific headers defines this as a macro.
+ #ifdef DestroyAll
+ #undef DestroyAll
+@@ -550,6 +556,12 @@ int BrowserMainLoop::EarlyInitialization
+   // by now since a thread to start the ServiceManager has been created
+   // before the browser main loop starts.
+   DCHECK(SandboxHostLinux::GetInstance()->IsInitialized());
++#elif BUILDFLAG(IS_BSD)
++  base::FileHandleMappingVector additional_remapped_fds;
++  base::LaunchOptions options;
++  SandboxHostLinux::GetInstance()->Init();
++  const int sfd = SandboxHostLinux::GetInstance()->GetChildSocket();
++  options.fds_to_remap.push_back(std::make_pair(sfd, GetSandboxFD()));
+ #endif
+ 
+   // GLib's spawning of new processes is buggy, so it's important that at this
+@@ -582,7 +594,7 @@ int BrowserMainLoop::EarlyInitialization
+       base::ThreadType::kDisplayCritical);
+ 
+ #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   // We use quite a few file descriptors for our IPC as well as disk the disk
+   // cache, and the default limit on Apple is low (256), so bump it up.
+ 
diff --git a/chromium-wip/patches/patch-content_browser_child__process__launcher__helper__linux.cc b/chromium-wip/patches/patch-content_browser_child__process__launcher__helper__linux.cc
new file mode 100644
index 0000000000..7febe7539a
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_child__process__launcher__helper__linux.cc
@@ -0,0 +1,131 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/child_process_launcher_helper_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/child_process_launcher_helper_linux.cc
+@@ -22,7 +22,9 @@
+ #include "content/public/common/result_codes.h"
+ #include "content/public/common/sandboxed_process_launcher_delegate.h"
+ #include "content/public/common/zygote/sandbox_support_linux.h"
++#if !BUILDFLAG(IS_BSD)
+ #include "content/public/common/zygote/zygote_handle.h"
++#endif
+ #include "sandbox/policy/linux/sandbox_linux.h"
+ 
+ namespace content {
+@@ -47,14 +49,20 @@ ChildProcessLauncherHelper::GetFilesToMa
+ }
+ 
+ bool ChildProcessLauncherHelper::IsUsingLaunchOptions() {
++#if !BUILDFLAG(IS_BSD)
+   return !GetZygoteForLaunch();
++#else
++  return true;
++#endif
+ }
+ 
+ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
+     PosixFileDescriptorInfo& files_to_register,
+     base::LaunchOptions* options) {
+   if (options) {
++#if !BUILDFLAG(IS_BSD)
+     DCHECK(!GetZygoteForLaunch());
++#endif
+     // Convert FD mapping to FileHandleMappingVector
+     options->fds_to_remap = files_to_register.GetMappingWithIDAdjustment(
+         base::GlobalDescriptors::kBaseDescriptor);
+@@ -66,7 +74,9 @@ bool ChildProcessLauncherHelper::BeforeL
+ 
+     options->environment = delegate_->GetEnvironment();
+   } else {
++#if !BUILDFLAG(IS_BSD)
+     DCHECK(GetZygoteForLaunch());
++#endif
+     // Environment variables could be supported in the future, but are not
+     // currently supported when launching with the zygote.
+     DCHECK(delegate_->GetEnvironment().empty());
+@@ -83,6 +93,7 @@ ChildProcessLauncherHelper::LaunchProces
+     int* launch_result) {
+   *is_synchronous_launch = true;
+   Process process;
++#if !BUILDFLAG(IS_BSD)
+   ZygoteCommunication* zygote_handle = GetZygoteForLaunch();
+   if (zygote_handle) {
+     // TODO(crbug.com/40448989): If chrome supported multiple zygotes they could
+@@ -93,7 +104,6 @@ ChildProcessLauncherHelper::LaunchProces
+         GetProcessType());
+     *launch_result = LAUNCH_RESULT_SUCCESS;
+ 
+-#if !BUILDFLAG(IS_OPENBSD)
+     if (handle) {
+       // It could be a renderer process or an utility process.
+       int oom_score = content::kMiscOomScore;
+@@ -102,15 +112,17 @@ ChildProcessLauncherHelper::LaunchProces
+         oom_score = content::kLowestRendererOomScore;
+       ZygoteHostImpl::GetInstance()->AdjustRendererOOMScore(handle, oom_score);
+     }
+-#endif
+ 
+     process.process = base::Process(handle);
+     process.zygote = zygote_handle;
+   } else {
++#endif
+     process.process = base::LaunchProcess(*command_line(), *options);
+     *launch_result = process.process.IsValid() ? LAUNCH_RESULT_SUCCESS
+                                                : LAUNCH_RESULT_FAILURE;
++#if !BUILDFLAG(IS_BSD)
+   }
++#endif
+ 
+ #if BUILDFLAG(IS_CHROMEOS)
+   process_id_ = process.process.Pid();
+@@ -134,10 +146,14 @@ ChildProcessTerminationInfo ChildProcess
+     const ChildProcessLauncherHelper::Process& process,
+     bool known_dead) {
+   ChildProcessTerminationInfo info;
++#if !BUILDFLAG(IS_BSD)
+   if (process.zygote) {
+     info.status = process.zygote->GetTerminationStatus(
+         process.process.Handle(), known_dead, &info.exit_code);
+   } else if (known_dead) {
++#else
++  if (known_dead) {
++#endif
+     info.status = base::GetKnownDeadTerminationStatus(process.process.Handle(),
+                                                       &info.exit_code);
+   } else {
+@@ -163,13 +179,17 @@ void ChildProcessLauncherHelper::ForceNo
+   DCHECK(CurrentlyOnProcessLauncherTaskRunner());
+   process.process.Terminate(RESULT_CODE_NORMAL_EXIT, false);
+   // On POSIX, we must additionally reap the child.
++#if !BUILDFLAG(IS_BSD)
+   if (process.zygote) {
+     // If the renderer was created via a zygote, we have to proxy the reaping
+     // through the zygote process.
+     process.zygote->EnsureProcessTerminated(process.process.Handle());
+   } else {
++#endif
+     base::EnsureProcessTerminated(std::move(process.process));
++#if !BUILDFLAG(IS_BSD)
+   }
++#endif
+ }
+ 
+ void ChildProcessLauncherHelper::SetProcessPriorityOnLauncherThread(
+@@ -181,11 +201,13 @@ void ChildProcessLauncherHelper::SetProc
+   }
+ }
+ 
++#if !BUILDFLAG(IS_BSD)
+ ZygoteCommunication* ChildProcessLauncherHelper::GetZygoteForLaunch() {
+   return base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoZygote)
+              ? nullptr
+              : delegate_->GetZygote();
+ }
++#endif
+ 
+ base::File OpenFileToShare(const base::FilePath& path,
+                            base::MemoryMappedFile::Region* region) {
diff --git a/chromium-wip/patches/patch-content_browser_child__thread__type__switcher__linux.cc b/chromium-wip/patches/patch-content_browser_child__thread__type__switcher__linux.cc
new file mode 100644
index 0000000000..5a4cc726af
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_child__thread__type__switcher__linux.cc
@@ -0,0 +1,43 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/child_thread_type_switcher_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/child_thread_type_switcher_linux.cc
+@@ -6,6 +6,7 @@
+ 
+ #include "base/linux_util.h"
+ #include "base/logging.h"
++#include "base/notimplemented.h"
+ #include "base/process/process_handle.h"
+ #include "base/task/single_thread_task_runner.h"
+ #include "base/threading/platform_thread.h"
+@@ -20,6 +21,9 @@ void SetThreadTypeOnLauncherThread(base:
+                                    base::ThreadType thread_type) {
+   DCHECK(CurrentlyOnProcessLauncherTaskRunner());
+ 
++#if BUILDFLAG(IS_BSD)
++  NOTIMPLEMENTED();
++#else
+   bool ns_pid_supported = false;
+   pid_t peer_tid =
+       base::FindThreadID(peer_pid, ns_tid.raw(), &ns_pid_supported);
+@@ -42,6 +46,7 @@ void SetThreadTypeOnLauncherThread(base:
+   base::PlatformThread::SetThreadType(peer_pid,
+                                       base::PlatformThreadId(peer_tid),
+                                       thread_type, base::IsViaIPC(true));
++#endif
+ }
+ 
+ }  // namespace
+@@ -70,7 +75,7 @@ void ChildThreadTypeSwitcher::SetPid(bas
+   }
+ }
+ 
+-void ChildThreadTypeSwitcher::SetThreadType(int32_t ns_tid,
++void ChildThreadTypeSwitcher::SetThreadType(uint64_t ns_tid,
+                                             base::ThreadType thread_type) {
+   // This function is only used on platforms with 32-bit thread ids.
+   static_assert(sizeof(ns_tid) == sizeof(base::PlatformThreadId));
diff --git a/chromium-wip/patches/patch-content_browser_child__thread__type__switcher__linux.h b/chromium-wip/patches/patch-content_browser_child__thread__type__switcher__linux.h
new file mode 100644
index 0000000000..74fcf1d3bc
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_child__thread__type__switcher__linux.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/child_thread_type_switcher_linux.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/child_thread_type_switcher_linux.h
+@@ -36,7 +36,7 @@ class ChildThreadTypeSwitcher : public m
+   void SetPid(base::ProcessId child_pid);
+ 
+   // mojom::ThreadTypeSwitcher:
+-  void SetThreadType(int32_t ns_tid, base::ThreadType thread_type) override;
++  void SetThreadType(uint64_t ns_tid, base::ThreadType thread_type) override;
+ 
+  private:
+   base::ProcessId child_pid_ = base::kNullProcessHandle;
diff --git a/chromium-wip/patches/patch-content_browser_compositor_viz__process__transport__factory.cc b/chromium-wip/patches/patch-content_browser_compositor_viz__process__transport__factory.cc
new file mode 100644
index 0000000000..2ba4cc12a2
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_compositor_viz__process__transport__factory.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/compositor/viz_process_transport_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/compositor/viz_process_transport_factory.cc
+@@ -104,7 +104,7 @@ class HostDisplayClient : public viz::Ho
+   HostDisplayClient& operator=(const HostDisplayClient&) = delete;
+ 
+   // viz::HostDisplayClient:
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+   void DidCompleteSwapWithNewSize(const gfx::Size& size) override {
+     compositor_->OnCompleteSwapWithNewSize(size);
+   }
diff --git a/chromium-wip/patches/patch-content_browser_devtools_devtools__frontend__host__impl.cc b/chromium-wip/patches/patch-content_browser_devtools_devtools__frontend__host__impl.cc
new file mode 100644
index 0000000000..2fe7572e4c
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_devtools_devtools__frontend__host__impl.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/devtools/devtools_frontend_host_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/devtools/devtools_frontend_host_impl.cc
+@@ -25,7 +25,7 @@
+ #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
+ #include "ui/base/webui/resource_path.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "components/crash/content/browser/error_reporting/javascript_error_report.h"  // nogncheck
+ #include "components/crash/content/browser/error_reporting/js_error_report_processor.h"  // nogncheck
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+@@ -37,7 +37,7 @@ const char kCompatibilityScriptSourceURL
+     "\n//# "
+     "sourceURL=devtools://devtools/bundled/devtools_compatibility.js";
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Remove the pieces of the URL we don't want to send back with the error
+ // reports. In particular, do not send query or fragments as those can have
+ // privacy-sensitive information in them.
+@@ -107,7 +107,7 @@ DevToolsFrontendHostImpl::DevToolsFronte
+     const HandleMessageCallback& handle_message_callback)
+     : web_contents_(WebContents::FromRenderFrameHost(frame_host)),
+       handle_message_callback_(handle_message_callback) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   Observe(web_contents_);
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+   mojo::AssociatedRemote<blink::mojom::DevToolsFrontend> frontend;
+@@ -132,7 +132,7 @@ void DevToolsFrontendHostImpl::DispatchE
+   handle_message_callback_.Run(std::move(message));
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ void DevToolsFrontendHostImpl::OnDidAddMessageToConsole(
+     RenderFrameHost* source_frame,
+     blink::mojom::ConsoleMessageLevel log_level,
diff --git a/chromium-wip/patches/patch-content_browser_devtools_devtools__frontend__host__impl.h b/chromium-wip/patches/patch-content_browser_devtools_devtools__frontend__host__impl.h
new file mode 100644
index 0000000000..8c40aab1d5
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_devtools_devtools__frontend__host__impl.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/devtools/devtools_frontend_host_impl.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/devtools/devtools_frontend_host_impl.h
+@@ -34,7 +34,7 @@ class DevToolsFrontendHostImpl : public 
+ 
+   void BadMessageReceived() override;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   void OnDidAddMessageToConsole(
+       RenderFrameHost* source_frame,
+       blink::mojom::ConsoleMessageLevel log_level,
diff --git a/chromium-wip/patches/patch-content_browser_devtools_protocol_system__info__handler.cc b/chromium-wip/patches/patch-content_browser_devtools_protocol_system__info__handler.cc
new file mode 100644
index 0000000000..f5df547078
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_devtools_protocol_system__info__handler.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/devtools/protocol/system_info_handler.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/devtools/protocol/system_info_handler.cc
+@@ -52,7 +52,7 @@ std::unique_ptr<SystemInfo::Size> GfxSiz
+ // 1046598, and 1153667.
+ // Windows builds need more time -- see Issue 873112 and 1004472.
+ // Mac builds need more time - see Issue angleproject:6182.
+-#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !defined(NDEBUG)) || \
++#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && !defined(NDEBUG)) || \
+     BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_OZONE)
+ static constexpr int kGPUInfoWatchdogTimeoutMultiplierOS = 3;
+ #else
diff --git a/chromium-wip/patches/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher.h b/chromium-wip/patches/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher.h
new file mode 100644
index 0000000000..faea8fb1d5
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/file_system_access/file_path_watcher/file_path_watcher.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/file_system_access/file_path_watcher/file_path_watcher.h
+@@ -126,7 +126,7 @@ class CONTENT_EXPORT FilePathWatcher {
+     Type type = Type::kNonRecursive;
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+     // The callback will return the full path to a changed file instead of
+     // the watched path supplied as |path| when Watch is called.
+     // So the full path can be different from the watched path when a folder is
diff --git a/chromium-wip/patches/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher__bsd.cc b/chromium-wip/patches/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher__bsd.cc
new file mode 100644
index 0000000000..f916ef14ee
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher__bsd.cc
@@ -0,0 +1,69 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/file_system_access/file_path_watcher/file_path_watcher_bsd.cc.orig	2025-08-12 17:48:59.465810994 +0000
++++ content/browser/file_system_access/file_path_watcher/file_path_watcher_bsd.cc
+@@ -0,0 +1,60 @@
++// Copyright 2024 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#include "content/browser/file_system_access/file_path_watcher/file_path_watcher.h"
++
++#include <memory>
++
++#include "base/memory/ptr_util.h"
++#include "build/build_config.h"
++#include "content/browser/file_system_access/file_path_watcher/file_path_watcher_kqueue.h"
++
++namespace content {
++
++namespace {
++
++class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate {
++ public:
++  FilePathWatcherImpl() = default;
++  FilePathWatcherImpl(const FilePathWatcherImpl&) = delete;
++  FilePathWatcherImpl& operator=(const FilePathWatcherImpl&) = delete;
++  ~FilePathWatcherImpl() override = default;
++
++  bool Watch(const base::FilePath& path,
++             Type type,
++             const FilePathWatcher::Callback& callback) override {
++    DCHECK(!impl_.get());
++    if (type == Type::kRecursive) {
++      if (!FilePathWatcher::RecursiveWatchAvailable()) {
++        return false;
++      }
++    } else {
++      impl_ = std::make_unique<FilePathWatcherKQueue>();
++    }
++    DCHECK(impl_.get());
++    return impl_->Watch(path, type, callback);
++  }
++
++  void Cancel() override {
++    if (impl_.get()) {
++      impl_->Cancel();
++    }
++    set_cancelled();
++  }
++
++ private:
++  std::unique_ptr<PlatformDelegate> impl_;
++};
++
++}  // namespace
++
++FilePathWatcher::FilePathWatcher()
++    : FilePathWatcher(std::make_unique<FilePathWatcherImpl>()) {}
++
++// static
++size_t FilePathWatcher::GetQuotaLimitImpl() {
++  return std::numeric_limits<size_t>::max();
++}
++
++}  // namespace content
diff --git a/chromium-wip/patches/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher__kqueue.h b/chromium-wip/patches/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher__kqueue.h
new file mode 100644
index 0000000000..c9fa6fbb12
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher__kqueue.h
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/file_system_access/file_path_watcher/file_path_watcher_kqueue.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/file_system_access/file_path_watcher/file_path_watcher_kqueue.h
+@@ -5,6 +5,7 @@
+ #ifndef CONTENT_BROWSER_FILE_SYSTEM_ACCESS_FILE_PATH_WATCHER_FILE_PATH_WATCHER_KQUEUE_H_
+ #define CONTENT_BROWSER_FILE_SYSTEM_ACCESS_FILE_PATH_WATCHER_FILE_PATH_WATCHER_KQUEUE_H_
+ 
++#include <sys/time.h>
+ #include <sys/event.h>
+ 
+ #include <memory>
diff --git a/chromium-wip/patches/patch-content_browser_file__system__access_file__system__access__local__path__watcher.cc b/chromium-wip/patches/patch-content_browser_file__system__access_file__system__access__local__path__watcher.cc
new file mode 100644
index 0000000000..6aa4a29a57
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_file__system__access_file__system__access__local__path__watcher.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/file_system_access/file_system_access_local_path_watcher.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/file_system_access/file_system_access_local_path_watcher.cc
+@@ -67,7 +67,7 @@ void FileSystemAccessLocalPathWatcher::I
+       .type = scope().IsRecursive() ? FilePathWatcher::Type::kRecursive
+                                     : FilePathWatcher::Type::kNonRecursive,
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+       // Note: `report_modified_path` is also present on Android
+       // and Fuchsia. Update this switch if support for watching
+       // the local file system is added on those platforms.
diff --git a/chromium-wip/patches/patch-content_browser_font__access_font__enumeration__data__source.cc b/chromium-wip/patches/patch-content_browser_font__access_font__enumeration__data__source.cc
new file mode 100644
index 0000000000..c2c9c520a9
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_font__access_font__enumeration__data__source.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/font_access/font_enumeration_data_source.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/font_access/font_enumeration_data_source.cc
+@@ -16,7 +16,7 @@
+ #include "content/browser/font_access/font_enumeration_data_source_win.h"
+ #elif BUILDFLAG(IS_APPLE)
+ #include "content/browser/font_access/font_enumeration_data_source_mac.h"
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "content/browser/font_access/font_enumeration_data_source_linux.h"
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+@@ -61,7 +61,7 @@ std::unique_ptr<FontEnumerationDataSourc
+   return std::make_unique<FontEnumerationDataSourceWin>();
+ #elif BUILDFLAG(IS_APPLE)
+   return std::make_unique<FontEnumerationDataSourceMac>();
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return std::make_unique<FontEnumerationDataSourceLinux>();
+ #else
+   return std::make_unique<FontEnumerationDataSourceNull>();
+@@ -76,7 +76,7 @@ bool FontEnumerationDataSource::IsOsSupp
+   return true;
+ #elif BUILDFLAG(IS_APPLE)
+   return true;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return true;
+ #else
+   return false;
diff --git a/chromium-wip/patches/patch-content_browser_gpu_compositor__util.cc b/chromium-wip/patches/patch-content_browser_gpu_compositor__util.cc
new file mode 100644
index 0000000000..6eb889d722
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_gpu_compositor__util.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/gpu/compositor_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/gpu/compositor_util.cc
+@@ -143,7 +143,7 @@ std::vector<GpuFeatureData> GetGpuFeatur
+       "video_decode",
+       SafeGetFeatureStatus(
+           gpu_feature_info, gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE,
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+           !base::FeatureList::IsEnabled(media::kAcceleratedVideoDecodeLinux) ||
+ #endif  // BUILDFLAG(IS_LINUX)
+               command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode)),
+@@ -155,7 +155,7 @@ std::vector<GpuFeatureData> GetGpuFeatur
+       "video_encode",
+       SafeGetFeatureStatus(
+           gpu_feature_info, gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE,
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+           !base::FeatureList::IsEnabled(media::kAcceleratedVideoEncodeLinux)),
+ #else
+           command_line.HasSwitch(switches::kDisableAcceleratedVideoEncode)),
diff --git a/chromium-wip/patches/patch-content_browser_gpu_gpu__data__manager__impl.cc b/chromium-wip/patches/patch-content_browser_gpu_gpu__data__manager__impl.cc
new file mode 100644
index 0000000000..1ab80d676c
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_gpu_gpu__data__manager__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/gpu/gpu_data_manager_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/gpu/gpu_data_manager_impl.cc
+@@ -412,7 +412,7 @@ void GpuDataManagerImpl::OnDisplayMetric
+   private_->OnDisplayMetricsChanged(display, changed_metrics);
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ bool GpuDataManagerImpl::IsGpuMemoryBufferNV12Supported() {
+   base::AutoLock auto_lock(lock_);
+   return private_->IsGpuMemoryBufferNV12Supported();
diff --git a/chromium-wip/patches/patch-content_browser_gpu_gpu__data__manager__impl.h b/chromium-wip/patches/patch-content_browser_gpu_gpu__data__manager__impl.h
new file mode 100644
index 0000000000..5c809d063c
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_gpu_gpu__data__manager__impl.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/gpu/gpu_data_manager_impl.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/gpu/gpu_data_manager_impl.h
+@@ -225,7 +225,7 @@ class CONTENT_EXPORT GpuDataManagerImpl 
+   void OnDisplayMetricsChanged(const display::Display& display,
+                                uint32_t changed_metrics) override;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   bool IsGpuMemoryBufferNV12Supported();
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
diff --git a/chromium-wip/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.cc b/chromium-wip/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.cc
new file mode 100644
index 0000000000..4a2c675a69
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/gpu/gpu_data_manager_impl_private.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/gpu/gpu_data_manager_impl_private.cc
+@@ -1703,7 +1703,7 @@ void GpuDataManagerImplPrivate::RecordCo
+   UMA_HISTOGRAM_ENUMERATION("GPU.CompositingMode", compositing_mode);
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ bool GpuDataManagerImplPrivate::IsGpuMemoryBufferNV12Supported() {
+   return gpu_extra_info_.is_gmb_nv12_supported;
+ }
diff --git a/chromium-wip/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.h b/chromium-wip/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.h
new file mode 100644
index 0000000000..f2e3a61bb7
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/gpu/gpu_data_manager_impl_private.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/gpu/gpu_data_manager_impl_private.h
+@@ -149,7 +149,7 @@ class CONTENT_EXPORT GpuDataManagerImplP
+   void OnDisplayMetricsChanged(const display::Display& display,
+                                uint32_t changed_metrics);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   bool IsGpuMemoryBufferNV12Supported();
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+@@ -312,7 +312,7 @@ class CONTENT_EXPORT GpuDataManagerImplP
+   bool application_is_visible_ = true;
+ 
+   bool disable_gpu_compositing_ = false;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   bool is_gpu_memory_buffer_NV12_supported_ = false;
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
diff --git a/chromium-wip/patches/patch-content_browser_gpu_gpu__process__host.cc b/chromium-wip/patches/patch-content_browser_gpu_gpu__process__host.cc
new file mode 100644
index 0000000000..424aa23da4
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_gpu_gpu__process__host.cc
@@ -0,0 +1,25 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/gpu/gpu_process_host.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/gpu/gpu_process_host.cc
+@@ -274,6 +274,7 @@ static const char* const kSwitchNames[] 
+     switches::kDisableSkiaGraphite,
+     switches::kDisableSkiaGraphitePrecompilation,
+     switches::kDisableLowEndDeviceMode,
++    switches::kDisableUnveil,
+     switches::kProfilingAtStart,
+     switches::kProfilingFile,
+     switches::kProfilingFlush,
+@@ -302,7 +303,7 @@ static const char* const kSwitchNames[] 
+     switches::kEnableNativeGpuMemoryBuffers,
+     switches::kRenderNodeOverride,
+ #endif
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     switches::kX11Display,
+     switches::kNoXshm,
+ #endif
diff --git a/chromium-wip/patches/patch-content_browser_media_frameless__media__interface__proxy.h b/chromium-wip/patches/patch-content_browser_media_frameless__media__interface__proxy.h
new file mode 100644
index 0000000000..85415985d4
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_media_frameless__media__interface__proxy.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/media/frameless_media_interface_proxy.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/media/frameless_media_interface_proxy.h
+@@ -19,7 +19,7 @@
+ #include "mojo/public/cpp/bindings/receiver_set.h"
+ #include "mojo/public/cpp/bindings/remote.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "media/mojo/mojom/video_decoder.mojom.h"
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+@@ -98,7 +98,7 @@ class FramelessMediaInterfaceProxy final
+   // Connections to the renderer.
+   mojo::ReceiverSet<media::mojom::InterfaceFactory> receivers_;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Connection to the InterfaceFactory that lives in a utility process.
+   // This is only used for out-of-process video decoding and only when the
+   // FramelessMediaInterfaceProxy is created without a RenderProcessHost
diff --git a/chromium-wip/patches/patch-content_browser_media_media__keys__listener__manager__impl.cc b/chromium-wip/patches/patch-content_browser_media_media__keys__listener__manager__impl.cc
new file mode 100644
index 0000000000..9c56c1820f
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_media_media__keys__listener__manager__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/media/media_keys_listener_manager_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/media/media_keys_listener_manager_impl.cc
+@@ -332,7 +332,7 @@ void MediaKeysListenerManagerImpl::Start
+     return;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   // Create SystemMediaControls with the SingletonHwnd.
+   browser_system_media_controls_ =
+       system_media_controls::SystemMediaControls::Create(
diff --git a/chromium-wip/patches/patch-content_browser_network__service__instance__impl.cc b/chromium-wip/patches/patch-content_browser_network__service__instance__impl.cc
new file mode 100644
index 0000000000..742a6c1498
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_network__service__instance__impl.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/network_service_instance_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/network_service_instance_impl.cc
+@@ -85,7 +85,7 @@
+ #include "content/browser/network/network_service_process_tracker_win.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "content/browser/system_dns_resolution/system_dns_resolver.h"
+ #include "services/network/public/mojom/system_dns_resolution.mojom-forward.h"
+ #endif
+@@ -335,7 +335,7 @@ void CreateInProcessNetworkService(
+                                 std::move(receiver)));
+ }
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Runs a self-owned SystemDnsResolverMojoImpl. This is meant to run on a
+ // high-priority thread pool.
+ void RunSystemDnsResolverOnThreadPool(
+@@ -402,7 +402,7 @@ network::mojom::NetworkServiceParamsPtr 
+   }
+ #endif  // BUILDFLAG(IS_POSIX)
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (GetContentClient()
+           ->browser()
+           ->ShouldRunOutOfProcessSystemDnsResolution() &&
diff --git a/chromium-wip/patches/patch-content_browser_ppapi__plugin__process__host__receiver__bindings.cc b/chromium-wip/patches/patch-content_browser_ppapi__plugin__process__host__receiver__bindings.cc
new file mode 100644
index 0000000000..d2e100903b
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_ppapi__plugin__process__host__receiver__bindings.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/ppapi_plugin_process_host_receiver_bindings.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/ppapi_plugin_process_host_receiver_bindings.cc
+@@ -8,7 +8,7 @@
+ 
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "components/services/font/public/mojom/font_service.mojom.h"  // nogncheck
+ #include "content/browser/font_service.h"  // nogncheck
+ #endif
+@@ -17,7 +17,7 @@ namespace content {
+ 
+ void PpapiPluginProcessHost::BindHostReceiver(
+     mojo::GenericPendingReceiver receiver) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (auto font_receiver = receiver.As<font_service::mojom::FontService>())
+     ConnectToFontService(std::move(font_receiver));
+ #endif
diff --git a/chromium-wip/patches/patch-content_browser_renderer__host_delegated__frame__host.cc b/chromium-wip/patches/patch-content_browser_renderer__host_delegated__frame__host.cc
new file mode 100644
index 0000000000..e0d5df49e3
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_renderer__host_delegated__frame__host.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/renderer_host/delegated_frame_host.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/renderer_host/delegated_frame_host.cc
+@@ -334,7 +334,7 @@ void DelegatedFrameHost::EmbedSurface(
+ 
+   if (!primary_surface_id ||
+       primary_surface_id->local_surface_id() != local_surface_id_) {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // On Windows and Linux, we would like to produce new content as soon as
+     // possible or the OS will create an additional black gutter. Until we can
+     // block resize on surface synchronization on these platforms, we will not
diff --git a/chromium-wip/patches/patch-content_browser_renderer__host_media_service__video__capture__device__launcher.cc b/chromium-wip/patches/patch-content_browser_renderer__host_media_service__video__capture__device__launcher.cc
new file mode 100644
index 0000000000..bcb2468509
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_renderer__host_media_service__video__capture__device__launcher.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/renderer_host/media/service_video_capture_device_launcher.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/renderer_host/media/service_video_capture_device_launcher.cc
+@@ -29,7 +29,7 @@
+ #include "media/base/media_switches.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "content/browser/gpu/gpu_data_manager_impl.h"
+ #endif
+ 
+@@ -188,7 +188,7 @@ void ServiceVideoCaptureDeviceLauncher::
+   }
+ #else
+   if (switches::IsVideoCaptureUseGpuMemoryBufferEnabled()) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // On Linux, additionally check whether the NV12 GPU memory buffer is
+     // supported.
+     if (GpuDataManagerImpl::GetInstance()->IsGpuMemoryBufferNV12Supported())
diff --git a/chromium-wip/patches/patch-content_browser_renderer__host_pepper_pepper__file__io__host.cc b/chromium-wip/patches/patch-content_browser_renderer__host_pepper_pepper__file__io__host.cc
new file mode 100644
index 0000000000..c242893773
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_renderer__host_pepper_pepper__file__io__host.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/renderer_host/pepper/pepper_file_io_host.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/renderer_host/pepper/pepper_file_io_host.cc
+@@ -462,7 +462,7 @@ void PepperFileIOHost::OnLocalFileOpened
+     ppapi::host::ReplyMessageContext reply_context,
+     const base::FilePath& path,
+     base::File::Error error_code) {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Quarantining a file before its contents are available is only supported on
+   // Windows and Linux.
+   if (!FileOpenForWrite(open_flags_) || error_code != base::File::FILE_OK) {
+@@ -496,7 +496,7 @@ void PepperFileIOHost::OnLocalFileOpened
+ #endif
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ void PepperFileIOHost::OnLocalFileQuarantined(
+     ppapi::host::ReplyMessageContext reply_context,
+     const base::FilePath& path,
diff --git a/chromium-wip/patches/patch-content_browser_renderer__host_render__process__host__impl.cc b/chromium-wip/patches/patch-content_browser_renderer__host_render__process__host__impl.cc
new file mode 100644
index 0000000000..393a2b0625
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_renderer__host_render__process__host__impl.cc
@@ -0,0 +1,61 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/renderer_host/render_process_host_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/renderer_host/render_process_host_impl.cc
+@@ -223,7 +223,7 @@
+ #include "third_party/blink/public/mojom/android_font_lookup/android_font_lookup.mojom.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include <sys/resource.h>
+ 
+ #include "components/services/font/public/mojom/font_service.mojom.h"  // nogncheck
+@@ -1127,7 +1127,7 @@ static constexpr size_t kUnknownPlatform
+ // to indicate failure and std::numeric_limits<size_t>::max() to indicate
+ // unlimited.
+ size_t GetPlatformProcessLimit() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   struct rlimit limit;
+   if (getrlimit(RLIMIT_NPROC, &limit) != 0)
+     return kUnknownPlatformProcessLimit;
+@@ -1334,7 +1334,7 @@ RenderProcessHostImpl::IOThreadHostImpl:
+ 
+ void RenderProcessHostImpl::IOThreadHostImpl::SetPid(
+     base::ProcessId child_pid) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   child_thread_type_switcher_.SetPid(child_pid);
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ }
+@@ -3436,7 +3436,7 @@ void RenderProcessHostImpl::AppendRender
+             base::TimeTicks::UnixEpoch().since_origin().InMicroseconds()));
+   }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Append `kDisableVideoCaptureUseGpuMemoryBuffer` flag if there is no support
+   // for NV12 GPU memory buffer.
+   if (switches::IsVideoCaptureUseGpuMemoryBufferEnabled() &&
+@@ -3491,6 +3491,7 @@ void RenderProcessHostImpl::PropagateBro
+       switches::kDisableSkiaRuntimeOpts,
+       switches::kDisableSpeechAPI,
+       switches::kDisableThreadedCompositing,
++      switches::kDisableUnveil,
+       switches::kDisableV8IdleTasks,
+       switches::kDisableVideoCaptureUseGpuMemoryBuffer,
+       switches::kDisableWebGLImageChromium,
+@@ -5339,7 +5340,7 @@ uint64_t RenderProcessHostImpl::GetPriva
+   // - Win: https://crbug.com/707022 .
+   uint64_t total_size = 0;
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   total_size = dump->platform_private_footprint->rss_anon_bytes +
+                dump->platform_private_footprint->vm_swap_bytes;
+ #elif BUILDFLAG(IS_APPLE)
diff --git a/chromium-wip/patches/patch-content_browser_renderer__host_render__process__host__impl.h b/chromium-wip/patches/patch-content_browser_renderer__host_render__process__host__impl.h
new file mode 100644
index 0000000000..fe67c3625f
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_renderer__host_render__process__host__impl.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/renderer_host/render_process_host_impl.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/renderer_host/render_process_host_impl.h
+@@ -101,7 +101,7 @@
+ #include "media/fuchsia_media_codec_provider_impl.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "content/browser/child_thread_type_switcher_linux.h"
+ #include "media/mojo/mojom/video_encode_accelerator.mojom.h"
+ #endif
+@@ -996,7 +996,7 @@ class CONTENT_EXPORT RenderProcessHostIm
+     mojo::Remote<media::mojom::VideoEncodeAcceleratorProviderFactory>
+         video_encode_accelerator_factory_remote_;
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     ChildThreadTypeSwitcher child_thread_type_switcher_;
+ #endif
+   };
+@@ -1239,7 +1239,7 @@ class CONTENT_EXPORT RenderProcessHostIm
+   // if the request isn't handled on the IO thread.
+   void OnBindHostReceiver(mojo::GenericPendingReceiver receiver);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Provides /proc/{renderer pid}/status and statm files for the renderer,
+   // because the files are required to calculate the renderer's private
+   // footprint on Chromium Linux. Regarding MacOS X and Windows, we have
diff --git a/chromium-wip/patches/patch-content_browser_renderer__host_render__process__host__impl__receiver__bindings.cc b/chromium-wip/patches/patch-content_browser_renderer__host_render__process__host__impl__receiver__bindings.cc
new file mode 100644
index 0000000000..d032613853
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_renderer__host_render__process__host__impl__receiver__bindings.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/renderer_host/render_process_host_impl_receiver_bindings.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/renderer_host/render_process_host_impl_receiver_bindings.cc
+@@ -51,7 +51,7 @@
+ #include "third_party/blink/public/mojom/android_font_lookup/android_font_lookup.mojom.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "components/services/font/public/mojom/font_service.mojom.h"  // nogncheck
+ #include "content/browser/font_service.h"  // nogncheck
+ #endif
+@@ -336,7 +336,7 @@ void RenderProcessHostImpl::IOThreadHost
+   }
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (auto font_receiver = receiver.As<font_service::mojom::FontService>()) {
+     ConnectToFontService(std::move(font_receiver));
+     return;
+@@ -364,7 +364,7 @@ void RenderProcessHostImpl::IOThreadHost
+   }
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (auto r = receiver.As<mojom::ThreadTypeSwitcher>()) {
+     child_thread_type_switcher_.Bind(std::move(r));
+     return;
diff --git a/chromium-wip/patches/patch-content_browser_renderer__host_render__view__host__impl.cc b/chromium-wip/patches/patch-content_browser_renderer__host_render__view__host__impl.cc
new file mode 100644
index 0000000000..cbb2e80a6c
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_renderer__host_render__view__host__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/renderer_host/render_view_host_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/renderer_host/render_view_host_impl.cc
+@@ -271,7 +271,7 @@ void RenderViewHostImpl::GetPlatformSpec
+       display::win::GetScreenWin()->GetSystemMetricsInDIP(SM_CYVSCROLL);
+   prefs->arrow_bitmap_width_horizontal_scroll_bar_in_dips =
+       display::win::GetScreenWin()->GetSystemMetricsInDIP(SM_CXHSCROLL);
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+   if (command_line->HasSwitch(switches::kSystemFontFamily)) {
+     prefs->system_font_family_name =
diff --git a/chromium-wip/patches/patch-content_browser_renderer__host_render__widget__host__view__aura.cc b/chromium-wip/patches/patch-content_browser_renderer__host_render__widget__host__view__aura.cc
new file mode 100644
index 0000000000..b822eb473b
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_renderer__host_render__widget__host__view__aura.cc
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/renderer_host/render_widget_host_view_aura.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/renderer_host/render_widget_host_view_aura.cc
+@@ -122,7 +122,7 @@
+ #include "ui/gfx/gdi_util.h"
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/accessibility/platform/browser_accessibility_auralinux.h"
+ #include "ui/base/ime/linux/text_edit_command_auralinux.h"
+ #include "ui/base/ime/text_input_flags.h"
+@@ -479,7 +479,7 @@ gfx::NativeViewAccessible RenderWidgetHo
+     return ToBrowserAccessibilityWin(manager->GetBrowserAccessibilityRoot())
+         ->GetCOM();
+ 
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   ui::BrowserAccessibilityManager* manager =
+       host()->GetOrCreateRootBrowserAccessibilityManager();
+   if (manager && manager->GetBrowserAccessibilityRoot())
+@@ -1883,7 +1883,7 @@ bool RenderWidgetHostViewAura::ShouldDoL
+   return host() && host()->delegate() && host()->delegate()->ShouldDoLearning();
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ bool RenderWidgetHostViewAura::SetCompositionFromExistingText(
+     const gfx::Range& range,
+     const std::vector<ui::ImeTextSpan>& ui_ime_text_spans) {
+@@ -2859,7 +2859,7 @@ bool RenderWidgetHostViewAura::NeedsInpu
+ }
+ 
+ bool RenderWidgetHostViewAura::NeedsMouseCapture() {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return NeedsInputGrab();
+ #else
+   return false;
+@@ -3043,7 +3043,7 @@ void RenderWidgetHostViewAura::ForwardKe
+   if (!target_host)
+     return;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   auto* linux_ui = ui::LinuxUi::instance();
+   if (!event.skip_if_unhandled && linux_ui && event.os_event) {
+     const auto command = linux_ui->GetTextEditCommandForEvent(
diff --git a/chromium-wip/patches/patch-content_browser_renderer__host_render__widget__host__view__aura.h b/chromium-wip/patches/patch-content_browser_renderer__host_render__widget__host__view__aura.h
new file mode 100644
index 0000000000..43d8f95b35
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_renderer__host_render__widget__host__view__aura.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/renderer_host/render_widget_host_view_aura.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/renderer_host/render_widget_host_view_aura.h
+@@ -276,7 +276,7 @@ class CONTENT_EXPORT RenderWidgetHostVie
+   ukm::SourceId GetClientSourceForMetrics() const override;
+   bool ShouldDoLearning() override;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   bool SetCompositionFromExistingText(
+       const gfx::Range& range,
+       const std::vector<ui::ImeTextSpan>& ui_ime_text_spans) override;
diff --git a/chromium-wip/patches/patch-content_browser_renderer__host_render__widget__host__view__event__handler.cc b/chromium-wip/patches/patch-content_browser_renderer__host_render__widget__host__view__event__handler.cc
new file mode 100644
index 0000000000..5b62abad40
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_renderer__host_render__widget__host__view__event__handler.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/renderer_host/render_widget_host_view_event_handler.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/renderer_host/render_widget_host_view_event_handler.cc
+@@ -603,7 +603,7 @@ bool RenderWidgetHostViewEventHandler::C
+   if (event->type() == ui::EventType::kMouseExited) {
+     if (mouse_locked || selection_popup)
+       return false;
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     // Don't forward the mouse leave message which is received when the context
+     // menu is displayed by the page. This confuses the page and causes state
+     // changes.
diff --git a/chromium-wip/patches/patch-content_browser_sandbox__host__linux.cc b/chromium-wip/patches/patch-content_browser_sandbox__host__linux.cc
new file mode 100644
index 0000000000..5e1d7546d9
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_sandbox__host__linux.cc
@@ -0,0 +1,24 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/sandbox_host_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/sandbox_host_linux.cc
+@@ -45,6 +45,7 @@ void SandboxHostLinux::Init() {
+   // Instead, it replies on a temporary socket provided by the caller.
+   PCHECK(0 == shutdown(browser_socket, SHUT_WR)) << "shutdown";
+ 
++#if !BUILDFLAG(IS_BSD) 
+   int pipefds[2];
+   CHECK(0 == pipe(pipefds));
+   const int child_lifeline_fd = pipefds[0];
+@@ -55,6 +56,7 @@ void SandboxHostLinux::Init() {
+   ipc_thread_ = std::make_unique<base::DelegateSimpleThread>(
+       ipc_handler_.get(), "sandbox_ipc_thread");
+   ipc_thread_->Start();
++#endif
+ }
+ 
+ }  // namespace content
diff --git a/chromium-wip/patches/patch-content_browser_scheduler_responsiveness_jank__monitor__impl.cc b/chromium-wip/patches/patch-content_browser_scheduler_responsiveness_jank__monitor__impl.cc
new file mode 100644
index 0000000000..1809a6f382
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_scheduler_responsiveness_jank__monitor__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/scheduler/responsiveness/jank_monitor_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/scheduler/responsiveness/jank_monitor_impl.cc
+@@ -337,7 +337,7 @@ void JankMonitorImpl::ThreadExecutionSta
+     // in context menus, among others). Simply ignore the mismatches for now.
+     // See https://crbug.com/929813 for the details of why the mismatch
+     // happens.
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE)
+     task_execution_metadata_.clear();
+ #endif
+     return;
diff --git a/chromium-wip/patches/patch-content_browser_scheduler_responsiveness_native__event__observer.cc b/chromium-wip/patches/patch-content_browser_scheduler_responsiveness_native__event__observer.cc
new file mode 100644
index 0000000000..c6bc276d14
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_scheduler_responsiveness_native__event__observer.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/scheduler/responsiveness/native_event_observer.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/scheduler/responsiveness/native_event_observer.cc
+@@ -15,7 +15,7 @@
+ 
+ #include "ui/events/platform/platform_event_source.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "ui/aura/env.h"
+ #include "ui/events/event.h"
+ #endif
+@@ -39,7 +39,7 @@ NativeEventObserver::~NativeEventObserve
+   DeregisterObserver();
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ void NativeEventObserver::RegisterObserver() {
+   aura::Env::GetInstance()->AddWindowEventDispatcherObserver(this);
+ }
diff --git a/chromium-wip/patches/patch-content_browser_scheduler_responsiveness_native__event__observer.h b/chromium-wip/patches/patch-content_browser_scheduler_responsiveness_native__event__observer.h
new file mode 100644
index 0000000000..056667e6f3
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_scheduler_responsiveness_native__event__observer.h
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/scheduler/responsiveness/native_event_observer.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/scheduler/responsiveness/native_event_observer.h
+@@ -16,7 +16,7 @@
+ #include "content/public/browser/native_event_processor_observer_mac.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "ui/aura/window_event_dispatcher_observer.h"
+ #endif
+ 
+@@ -41,7 +41,7 @@ namespace responsiveness {
+ class CONTENT_EXPORT NativeEventObserver
+ #if BUILDFLAG(IS_MAC)
+     : public NativeEventProcessorObserver
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     : public aura::WindowEventDispatcherObserver
+ #elif BUILDFLAG(IS_WIN)
+     : public base::MessagePumpForUI::Observer
+@@ -58,7 +58,7 @@ class CONTENT_EXPORT NativeEventObserver
+   NativeEventObserver(WillRunEventCallback will_run_event_callback,
+                       DidRunEventCallback did_run_event_callback);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ 
+   NativeEventObserver(const NativeEventObserver&) = delete;
+   NativeEventObserver& operator=(const NativeEventObserver&) = delete;
+@@ -74,7 +74,7 @@ class CONTENT_EXPORT NativeEventObserver
+   // Exposed for tests.
+   void WillRunNativeEvent(const void* opaque_identifier) override;
+   void DidRunNativeEvent(const void* opaque_identifier) override;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // aura::WindowEventDispatcherObserver overrides:
+   void OnWindowEventDispatcherStartedProcessing(
+       aura::WindowEventDispatcher* dispatcher,
+@@ -91,7 +91,7 @@ class CONTENT_EXPORT NativeEventObserver
+   void RegisterObserver();
+   void DeregisterObserver();
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   struct EventInfo {
+     raw_ptr<const void> unique_id;
+   };
diff --git a/chromium-wip/patches/patch-content_browser_service__host_utility__process__host.cc b/chromium-wip/patches/patch-content_browser_service__host_utility__process__host.cc
new file mode 100644
index 0000000000..b49295aa4b
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_service__host_utility__process__host.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/service_host/utility_process_host.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/service_host/utility_process_host.cc
+@@ -68,7 +68,7 @@
+ #include "content/browser/v8_snapshot_files.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "base/files/file_util.h"
+ #include "base/files/scoped_file.h"
+ #include "base/pickle.h"
+@@ -96,7 +96,7 @@ namespace content {
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ base::ScopedFD PassNetworkContextParentDirs(
+     std::vector<base::FilePath> network_context_parent_dirs) {
+   base::Pickle pickle;
+@@ -491,7 +491,7 @@ bool UtilityProcessHost::StartProcess() 
+       GetV8SnapshotFilesToPreload(*cmd_line));
+ #endif  // BUILDFLAG(IS_POSIX)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // The network service should have access to the parent directories
+   // necessary for its usage.
+   if (options_.sandbox_type_ == sandbox::mojom::Sandbox::kNetwork) {
+@@ -509,7 +509,7 @@ bool UtilityProcessHost::StartProcess() 
+       video_capture::mojom::VideoCaptureService::Name_) {
+     bool pass_gpu_buffer_flag =
+         switches::IsVideoCaptureUseGpuMemoryBufferEnabled();
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // Check if NV12 GPU memory buffer supported at the same time.
+     pass_gpu_buffer_flag =
+         pass_gpu_buffer_flag &&
diff --git a/chromium-wip/patches/patch-content_browser_service__host_utility__process__host__receiver__bindings.cc b/chromium-wip/patches/patch-content_browser_service__host_utility__process__host__receiver__bindings.cc
new file mode 100644
index 0000000000..e2fab9ad1b
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_service__host_utility__process__host__receiver__bindings.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/service_host/utility_process_host_receiver_bindings.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/service_host/utility_process_host_receiver_bindings.cc
+@@ -10,7 +10,7 @@
+ #include "content/public/common/content_client.h"
+ #include "media/media_buildflags.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "components/services/font/public/mojom/font_service.mojom.h"  // nogncheck
+ #include "content/browser/font_service.h"  // nogncheck
+ #endif
+@@ -24,7 +24,7 @@ namespace content {
+ 
+ void UtilityProcessHost::BindHostReceiver(
+     mojo::GenericPendingReceiver receiver) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (auto font_receiver = receiver.As<font_service::mojom::FontService>()) {
+     ConnectToFontService(std::move(font_receiver));
+     return;
diff --git a/chromium-wip/patches/patch-content_browser_service__host_utility__sandbox__delegate.cc b/chromium-wip/patches/patch-content_browser_service__host_utility__sandbox__delegate.cc
new file mode 100644
index 0000000000..ea7e8da972
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_service__host_utility__sandbox__delegate.cc
@@ -0,0 +1,40 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/service_host/utility_sandbox_delegate.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/service_host/utility_sandbox_delegate.cc
+@@ -91,14 +91,14 @@ UtilitySandboxedProcessLauncherDelegate:
+ #endif  // BUILDFLAG(ENABLE_CROS_LIBASSISTANT)
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+       sandbox_type_ == sandbox::mojom::Sandbox::kScreenAI ||
+       sandbox_type_ == sandbox::mojom::Sandbox::kPrintBackend ||
+ #endif
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       sandbox_type_ == sandbox::mojom::Sandbox::kVideoEffects ||
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+       sandbox_type_ == sandbox::mojom::Sandbox::kOnDeviceTranslation ||
+ #endif
+       sandbox_type_ == sandbox::mojom::Sandbox::kAudio ||
+@@ -159,11 +159,11 @@ ZygoteCommunication* UtilitySandboxedPro
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+       sandbox_type_ == sandbox::mojom::Sandbox::kAudio ||
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+       sandbox_type_ == sandbox::mojom::Sandbox::kPrintBackend ||
+       sandbox_type_ == sandbox::mojom::Sandbox::kScreenAI ||
+ #endif
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       sandbox_type_ == sandbox::mojom::Sandbox::kVideoEffects ||
+       sandbox_type_ == sandbox::mojom::Sandbox::kOnDeviceTranslation ||
+ #endif  // BUILDFLAG(IS_LINUX)
diff --git a/chromium-wip/patches/patch-content_browser_v8__snapshot__files.cc b/chromium-wip/patches/patch-content_browser_v8__snapshot__files.cc
new file mode 100644
index 0000000000..db488f8d21
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_v8__snapshot__files.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/v8_snapshot_files.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/v8_snapshot_files.cc
+@@ -35,7 +35,7 @@ void registerContextSnapshotAndroid(
+ std::map<std::string, std::variant<base::FilePath, base::ScopedFD>>
+ GetV8SnapshotFilesToPreload(base::CommandLine& process_command_line) {
+   std::map<std::string, std::variant<base::FilePath, base::ScopedFD>> files;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(USE_V8_CONTEXT_SNAPSHOT)
+   files[kV8ContextSnapshotDataDescriptor] = base::FilePath(
+       FILE_PATH_LITERAL(BUILDFLAG(V8_CONTEXT_SNAPSHOT_FILENAME)));
diff --git a/chromium-wip/patches/patch-content_browser_web__contents_slow__web__preference__cache.cc b/chromium-wip/patches/patch-content_browser_web__contents_slow__web__preference__cache.cc
new file mode 100644
index 0000000000..e080582af7
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_web__contents_slow__web__preference__cache.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/web_contents/slow_web_preference_cache.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/web_contents/slow_web_preference_cache.cc
+@@ -17,7 +17,7 @@
+ 
+ #if BUILDFLAG(IS_WIN)
+ #include "ui/events/devices/input_device_observer_win.h"
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "ui/events/devices/device_data_manager.h"
+ #elif BUILDFLAG(IS_ANDROID)
+ #include "ui/base/device_form_factor.h"
+@@ -57,7 +57,7 @@ SlowWebPreferenceCache::SlowWebPreferenc
+ 
+ #if BUILDFLAG(IS_WIN)
+   ui::InputDeviceObserverWin::GetInstance()->AddObserver(this);
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   ui::DeviceDataManager::GetInstance()->AddObserver(this);
+ #elif BUILDFLAG(IS_ANDROID)
+   ui::InputDeviceObserverAndroid::GetInstance()->AddObserver(this);
+@@ -69,7 +69,7 @@ SlowWebPreferenceCache::SlowWebPreferenc
+ SlowWebPreferenceCache::~SlowWebPreferenceCache() {
+ #if BUILDFLAG(IS_WIN)
+   ui::InputDeviceObserverWin::GetInstance()->RemoveObserver(this);
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   ui::DeviceDataManager::GetInstance()->RemoveObserver(this);
+ #elif BUILDFLAG(IS_ANDROID)
+   ui::InputDeviceObserverAndroid::GetInstance()->RemoveObserver(this);
diff --git a/chromium-wip/patches/patch-content_browser_web__contents_web__contents__view__aura.cc b/chromium-wip/patches/patch-content_browser_web__contents_web__contents__view__aura.cc
new file mode 100644
index 0000000000..3b2b628fcc
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_web__contents_web__contents__view__aura.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/web_contents/web_contents_view_aura.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/web_contents/web_contents_view_aura.cc
+@@ -174,7 +174,7 @@ class WebDragSourceAura : public content
+   raw_ptr<aura::Window> window_;
+ };
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ // Fill out the OSExchangeData with a file contents, synthesizing a name if
+ // necessary.
+ void PrepareDragForFileContents(const DropData& drop_data,
+@@ -259,7 +259,7 @@ void PrepareDragData(const DropData& dro
+   if (!drop_data.download_metadata.empty())
+     PrepareDragForDownload(drop_data, provider, web_contents);
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   // We set the file contents before the URL because the URL also sets file
+   // contents (to a .URL shortcut).  We want to prefer file content data over
+   // a shortcut so we add it first.
+@@ -1325,7 +1325,7 @@ void WebContentsViewAura::OnMouseEvent(u
+     // Linux window managers like to handle raise-on-click themselves.  If we
+     // raise-on-click manually, this may override user settings that prevent
+     // focus-stealing.
+-#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD)
+     // It is possible for the web-contents to be destroyed while it is being
+     // activated. Use a weak-ptr to track whether that happened or not.
+     // More in https://crbug.com/1040725
diff --git a/chromium-wip/patches/patch-content_browser_web__contents_web__contents__view__aura__unittest.cc b/chromium-wip/patches/patch-content_browser_web__contents_web__contents__view__aura__unittest.cc
new file mode 100644
index 0000000000..3aef258f02
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_web__contents_web__contents__view__aura__unittest.cc
@@ -0,0 +1,80 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/web_contents/web_contents_view_aura_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/web_contents/web_contents_view_aura_unittest.cc
+@@ -40,7 +40,7 @@
+ #include "ui/base/dragdrop/os_exchange_data_provider_win.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+ #include "ui/base/x/selection_utils.h"
+ #include "ui/base/x/x11_os_exchange_data_provider.h"
+ #include "ui/gfx/x/atom_cache.h"
+@@ -96,7 +96,7 @@ class TestDragDropClient : public aura::
+     drag_drop_data_ = std::move(data);
+     return DragOperation::kCopy;
+   }
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   void UpdateDragImage(const gfx::ImageSkia& image,
+                        const gfx::Vector2d& offset) override {}
+ #endif
+@@ -231,7 +231,7 @@ TEST_F(WebContentsViewAuraTest, WebConte
+                              ui::EF_LEFT_MOUSE_BUTTON, 0);
+   ui::EventHandler* event_handler = GetView();
+   event_handler->OnMouseEvent(&mouse_event);
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // The web-content is not activated during mouse-press on Linux.
+   // See comment in WebContentsViewAura::OnMouseEvent() for more details.
+   EXPECT_NE(web_contents(), nullptr);
+@@ -297,7 +297,7 @@ TEST_F(WebContentsViewAuraTest, MAYBE_Dr
+   view->OnDragEntered(event);
+   ASSERT_NE(nullptr, view->current_drag_data_);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // By design, Linux implementations return an empty string if file data
+   // is also present.
+   EXPECT_TRUE(!view->current_drag_data_->text ||
+@@ -337,7 +337,7 @@ TEST_F(WebContentsViewAuraTest, MAYBE_Dr
+ 
+   CheckDropData(view);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // By design, Linux implementations returns an empty string if file data
+   // is also present.
+   EXPECT_TRUE(!drop_complete_data_->drop_data.text ||
+@@ -395,7 +395,7 @@ TEST_F(WebContentsViewAuraTest, MAYBE_Dr
+   view->OnDragEntered(event);
+   ASSERT_NE(nullptr, view->current_drag_data_);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // By design, Linux implementations return an empty string if file data
+   // is also present.
+   EXPECT_TRUE(!view->current_drag_data_->text ||
+@@ -427,7 +427,7 @@ TEST_F(WebContentsViewAuraTest, MAYBE_Dr
+ 
+   CheckDropData(view);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // By design, Linux implementations returns an empty string if file data is
+   // also present.
+   EXPECT_TRUE(!drop_complete_data_->drop_data.text ||
+@@ -458,7 +458,7 @@ TEST_F(WebContentsViewAuraTest, MAYBE_Dr
+ 
+   auto data = std::make_unique<ui::OSExchangeData>();
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+   // FileContents drag-drop in X relies on XDragDropClient::InitDrag() setting
+   // window property 'XdndDirectSave0' to filename. Since XDragDropClient is not
+   // created in this unittest, we will set this property manually to allow
diff --git a/chromium-wip/patches/patch-content_browser_webui_web__ui__main__frame__observer.cc b/chromium-wip/patches/patch-content_browser_webui_web__ui__main__frame__observer.cc
new file mode 100644
index 0000000000..b240972485
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_webui_web__ui__main__frame__observer.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/webui/web_ui_main_frame_observer.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/webui/web_ui_main_frame_observer.cc
+@@ -47,7 +47,7 @@ std::string RedactURL(const GURL& url) {
+ bool IsWebUIJavaScriptErrorReportingSupported() {
+ #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
+   return false;
+-#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return true;
+ #else
+   return base::FeatureList::IsEnabled(features::kWebUIJSErrorReportingExtended);
diff --git a/chromium-wip/patches/patch-content_browser_zygote__host_zygote__host__impl__linux.cc b/chromium-wip/patches/patch-content_browser_zygote__host_zygote__host__impl__linux.cc
new file mode 100644
index 0000000000..395ad0b054
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_zygote__host_zygote__host__impl__linux.cc
@@ -0,0 +1,87 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/zygote_host/zygote_host_impl_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/zygote_host/zygote_host_impl_linux.cc
+@@ -23,8 +23,10 @@
+ #include "build/build_config.h"
+ #include "content/common/zygote/zygote_commands_linux.h"
+ #include "content/common/zygote/zygote_communication_linux.h"
++#if !BUILDFLAG(IS_BSD)
+ #include "content/common/zygote/zygote_handle_impl_linux.h"
+ #include "content/public/common/zygote/zygote_handle.h"
++#endif
+ #include "sandbox/linux/services/credentials.h"
+ #include "sandbox/linux/services/namespace_sandbox.h"
+ #include "sandbox/linux/suid/client/setuid_sandbox_host.h"
+@@ -42,6 +44,7 @@ namespace content {
+ 
+ namespace {
+ 
++#if !BUILDFLAG(IS_BSD)
+ // Receive a fixed message on fd and return the sender's PID.
+ // Returns true if the message received matches the expected message.
+ bool ReceiveFixedMessage(int fd,
+@@ -64,6 +67,7 @@ bool ReceiveFixedMessage(int fd,
+     return false;
+   return true;
+ }
++#endif
+ 
+ }  // namespace
+ 
+@@ -73,9 +77,13 @@ ZygoteHost* ZygoteHost::GetInstance() {
+ }
+ 
+ ZygoteHostImpl::ZygoteHostImpl()
++#if !BUILDFLAG(IS_BSD)
+     : use_namespace_sandbox_(false),
+       use_suid_sandbox_(false),
+       use_suid_sandbox_for_adj_oom_score_(false),
++#else
++    :
++#endif
+       sandbox_binary_(),
+       zygote_pids_lock_(),
+       zygote_pids_() {}
+@@ -88,6 +96,7 @@ ZygoteHostImpl* ZygoteHostImpl::GetInsta
+ }
+ 
+ void ZygoteHostImpl::Init(const base::CommandLine& command_line) {
++#if !BUILDFLAG(IS_BSD)
+   if (command_line.HasSwitch(sandbox::policy::switches::kNoSandbox)) {
+     return;
+   }
+@@ -142,6 +151,7 @@ void ZygoteHostImpl::Init(const base::Co
+            "you can try using --"
+         << sandbox::policy::switches::kNoSandbox << ".";
+   }
++#endif
+ }
+ 
+ void ZygoteHostImpl::AddZygotePid(pid_t pid) {
+@@ -166,6 +176,7 @@ pid_t ZygoteHostImpl::LaunchZygote(
+     base::CommandLine* cmd_line,
+     base::ScopedFD* control_fd,
+     base::FileHandleMappingVector additional_remapped_fds) {
++#if !BUILDFLAG(IS_BSD)
+   int fds[2];
+   CHECK_EQ(0, socketpair(AF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC, 0, fds));
+   CHECK(base::UnixDomainSocket::EnableReceiveProcessId(fds[0]));
+@@ -234,9 +245,12 @@ pid_t ZygoteHostImpl::LaunchZygote(
+ 
+   AddZygotePid(pid);
+   return pid;
++#else
++  return 0;
++#endif
+ }
+ 
+-#if !BUILDFLAG(IS_OPENBSD)
++#if !BUILDFLAG(IS_BSD)
+ void ZygoteHostImpl::AdjustRendererOOMScore(base::ProcessHandle pid,
+                                             int score) {
+   // 1) You can't change the oom_score_adj of a non-dumpable process
diff --git a/chromium-wip/patches/patch-content_browser_zygote__host_zygote__host__impl__linux.h b/chromium-wip/patches/patch-content_browser_zygote__host_zygote__host__impl__linux.h
new file mode 100644
index 0000000000..5d07792d83
--- /dev/null
+++ b/chromium-wip/patches/patch-content_browser_zygote__host_zygote__host__impl__linux.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/browser/zygote_host/zygote_host_impl_linux.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/browser/zygote_host/zygote_host_impl_linux.h
+@@ -46,12 +46,14 @@ class CONTENT_EXPORT ZygoteHostImpl : pu
+                      base::ScopedFD* control_fd,
+                      base::FileHandleMappingVector additional_remapped_fds);
+ 
++#if !BUILDFLAG(IS_BSD)
+   void AdjustRendererOOMScore(base::ProcessHandle process_handle,
+                               int score) override;
+ #if BUILDFLAG(IS_CHROMEOS)
+   void ReinitializeLogging(uint32_t logging_dest,
+                            base::PlatformFile log_file_fd) override;
+ #endif  // BUILDFLAG(IS_CHROMEOS)
++#endif
+ 
+   bool HasZygote() { return !zygote_pids_.empty(); }
+ 
+@@ -66,9 +68,11 @@ class CONTENT_EXPORT ZygoteHostImpl : pu
+ 
+   int renderer_sandbox_status_;
+ 
++#if !BUILDFLAG(IS_BSD)
+   bool use_namespace_sandbox_;
+   bool use_suid_sandbox_;
+   bool use_suid_sandbox_for_adj_oom_score_;
++#endif
+   std::string sandbox_binary_;
+ 
+   // This lock protects the |zygote_pids_| set.
diff --git a/chromium-wip/patches/patch-content_child_BUILD.gn b/chromium-wip/patches/patch-content_child_BUILD.gn
new file mode 100644
index 0000000000..74c8e957e6
--- /dev/null
+++ b/chromium-wip/patches/patch-content_child_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/child/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/child/BUILD.gn
+@@ -135,6 +135,13 @@ target(link_target_type, "child") {
+     ]
+   }
+ 
++  if (is_bsd) {
++    sources -= [
++      "sandboxed_process_thread_type_handler.cc",
++      "sandboxed_process_thread_type_handler.h",
++    ]
++  }
++
+   if (is_win) {
+     sources += [
+       "child_process_sandbox_support_impl_win.cc",
diff --git a/chromium-wip/patches/patch-content_child_child__process.cc b/chromium-wip/patches/patch-content_child_child__process.cc
new file mode 100644
index 0000000000..533aca775b
--- /dev/null
+++ b/chromium-wip/patches/patch-content_child_child__process.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/child/child_process.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/child/child_process.cc
+@@ -31,7 +31,7 @@
+ #include "content/common/android/cpu_time_metrics.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "content/child/sandboxed_process_thread_type_handler.h"
+ #endif
+ 
+@@ -177,7 +177,7 @@ void ChildProcess::set_main_thread(Child
+   main_thread_.reset(thread);
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ void ChildProcess::SetIOThreadType(base::ThreadType thread_type) {
+   if (!io_thread_) {
+     return;
diff --git a/chromium-wip/patches/patch-content_child_child__process.h b/chromium-wip/patches/patch-content_child_child__process.h
new file mode 100644
index 0000000000..514b79205b
--- /dev/null
+++ b/chromium-wip/patches/patch-content_child_child__process.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/child/child_process.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/child/child_process.h
+@@ -79,7 +79,7 @@ class CONTENT_EXPORT ChildProcess {
+     return io_thread_runner_.get();
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Changes the thread type of the child process IO thread.
+   void SetIOThreadType(base::ThreadType thread_type);
+ #endif
diff --git a/chromium-wip/patches/patch-content_common_BUILD.gn b/chromium-wip/patches/patch-content_common_BUILD.gn
new file mode 100644
index 0000000000..7e9c30d7b7
--- /dev/null
+++ b/chromium-wip/patches/patch-content_common_BUILD.gn
@@ -0,0 +1,42 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/common/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/common/BUILD.gn
+@@ -381,19 +381,28 @@ source_set("common") {
+   }
+ 
+   if (is_linux || is_chromeos) {
+-    sources += [
+-      "gpu_pre_sandbox_hook_linux.cc",
+-      "gpu_pre_sandbox_hook_linux.h",
+-    ]
++    if (is_bsd) {
++      sources += [
++        "gpu_pre_sandbox_hook_bsd.cc",
++        "gpu_pre_sandbox_hook_bsd.h",
++      ]
++    } else {
++      sources += [
++        "gpu_pre_sandbox_hook_linux.cc",
++        "gpu_pre_sandbox_hook_linux.h",
++      ]
++    }
+     public_deps += [ "//sandbox/policy" ]
+     deps += [
+       ":sandbox_support_linux",
+       "//media/gpu:buildflags",
+       "//sandbox/linux:sandbox_services",
+-      "//sandbox/linux:seccomp_bpf",
+       "//sandbox/policy:chromecast_sandbox_allowlist_buildflags",
+       "//third_party/fontconfig",
+     ]
++    if (use_seccomp_bpf) {
++      deps += [ "//sandbox/linux:seccomp_bpf" ]
++    }
+     if (use_v4l2_codec) {
+       deps += [ "//media/gpu/v4l2" ]
+     }
diff --git a/chromium-wip/patches/patch-content_common_features.cc b/chromium-wip/patches/patch-content_common_features.cc
new file mode 100644
index 0000000000..532e014f78
--- /dev/null
+++ b/chromium-wip/patches/patch-content_common_features.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/common/features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/common/features.cc
+@@ -169,7 +169,7 @@ BASE_FEATURE(kEmbeddingRequiresOptIn,
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ 
+ // Enables error reporting for JS errors inside DevTools frontend host
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kEnableDevToolsJsErrorReporting,
+              "EnableDevToolsJsErrorReporting",
+              base::FEATURE_DISABLED_BY_DEFAULT);
diff --git a/chromium-wip/patches/patch-content_common_features.h b/chromium-wip/patches/patch-content_common_features.h
new file mode 100644
index 0000000000..225663b31e
--- /dev/null
+++ b/chromium-wip/patches/patch-content_common_features.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/common/features.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/common/features.h
+@@ -60,7 +60,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kCom
+ CONTENT_EXPORT BASE_DECLARE_FEATURE(kCommittedOriginTracking);
+ CONTENT_EXPORT BASE_DECLARE_FEATURE(kCriticalClientHint);
+ CONTENT_EXPORT BASE_DECLARE_FEATURE(kDocumentPolicyNegotiation);
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ CONTENT_EXPORT BASE_DECLARE_FEATURE(kEnableDevToolsJsErrorReporting);
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ CONTENT_EXPORT BASE_DECLARE_FEATURE(kEmbeddingRequiresOptIn);
diff --git a/chromium-wip/patches/patch-content_common_font__list__unittest.cc b/chromium-wip/patches/patch-content_common_font__list__unittest.cc
new file mode 100644
index 0000000000..23cf46c58b
--- /dev/null
+++ b/chromium-wip/patches/patch-content_common_font__list__unittest.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/common/font_list_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/common/font_list_unittest.cc
+@@ -48,7 +48,7 @@ TEST(FontList, GetFontList) {
+         EXPECT_TRUE(HasFontWithName(fonts, "MS Gothic", "MS Gothic"));
+         EXPECT_TRUE(HasFontWithName(fonts, "Segoe UI", "Segoe UI"));
+         EXPECT_TRUE(HasFontWithName(fonts, "Verdana", "Verdana"));
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+         EXPECT_TRUE(HasFontWithName(fonts, "Arimo", "Arimo"));
+ #else
+         EXPECT_TRUE(HasFontWithName(fonts, "Arial", "Arial"));
diff --git a/chromium-wip/patches/patch-content_common_gpu__pre__sandbox__hook__bsd.cc b/chromium-wip/patches/patch-content_common_gpu__pre__sandbox__hook__bsd.cc
new file mode 100644
index 0000000000..51c3efc2ba
--- /dev/null
+++ b/chromium-wip/patches/patch-content_common_gpu__pre__sandbox__hook__bsd.cc
@@ -0,0 +1,77 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/common/gpu_pre_sandbox_hook_bsd.cc.orig	2025-08-12 17:48:59.473057760 +0000
++++ content/common/gpu_pre_sandbox_hook_bsd.cc
+@@ -0,0 +1,68 @@
++// Copyright 2023 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#include "content/common/gpu_pre_sandbox_hook_bsd.h"
++
++#include <dlfcn.h>
++#include <errno.h>
++#include <sys/stat.h>
++
++#include <memory>
++#include <sstream>
++#include <utility>
++#include <vector>
++
++#include "base/base_paths.h"
++#include "base/files/file_enumerator.h"
++#include "base/files/file_path.h"
++#include "base/files/scoped_file.h"
++#include "base/functional/bind.h"
++#include "base/logging.h"
++#include "base/path_service.h"
++#include "base/strings/stringprintf.h"
++#include "build/build_config.h"
++#include "build/buildflag.h"
++#include "build/chromeos_buildflags.h"
++#include "content/public/common/content_switches.h"
++#include "media/gpu/buildflags.h"
++
++namespace content {
++namespace {
++
++constexpr int dlopen_flag = RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE;
++
++void LoadVulkanLibraries() {
++  // Try to preload Vulkan libraries. Failure is not an error as not all may be
++  // present.
++  const char* kLibraries[] = {
++      "libvulkan.so",
++      "libvulkan_intel.so",
++      "libvulkan_intel_hasvk.so",
++      "libvulkan_radeon.so",
++  };
++  for (const auto* library : kLibraries) {
++    dlopen(library, dlopen_flag);
++  }
++}
++
++bool LoadLibrariesForGpu(
++    const sandbox::policy::SandboxSeccompBPF::Options& options) {
++  LoadVulkanLibraries();
++
++  return true;
++}
++
++}  // namespace
++
++bool GpuPreSandboxHook(sandbox::policy::SandboxLinux::Options options) {
++  if (!LoadLibrariesForGpu(options))
++    return false;
++
++  // TODO(tsepez): enable namspace sandbox here once crashes are understood.
++
++  errno = 0;
++  return true;
++}
++
++}  // namespace content
diff --git a/chromium-wip/patches/patch-content_common_gpu__pre__sandbox__hook__bsd.h b/chromium-wip/patches/patch-content_common_gpu__pre__sandbox__hook__bsd.h
new file mode 100644
index 0000000000..3b06c5715a
--- /dev/null
+++ b/chromium-wip/patches/patch-content_common_gpu__pre__sandbox__hook__bsd.h
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/common/gpu_pre_sandbox_hook_bsd.h.orig	2025-08-12 17:48:59.473189645 +0000
++++ content/common/gpu_pre_sandbox_hook_bsd.h
+@@ -0,0 +1,20 @@
++// Copyright 2017 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#ifndef CONTENT_COMMON_GPU_PRE_SANDBOX_HOOK_BSD_H_
++#define CONTENT_COMMON_GPU_PRE_SANDBOX_HOOK_BSD_H_
++
++#include "base/component_export.h"
++#include "sandbox/policy/sandbox.h"
++
++namespace content {
++
++// A pre-sandbox hook to use on Linux-based systems in sandboxed processes that
++// require general GPU usage.
++COMPONENT_EXPORT(GPU_PRE_SANDBOX_HOOK)
++bool GpuPreSandboxHook(sandbox::policy::SandboxLinux::Options options);
++
++}  // namespace content
++
++#endif  // CONTENT_COMMON_GPU_PRE_SANDBOX_HOOK_BSD_H_
diff --git a/chromium-wip/patches/patch-content_common_gpu__pre__sandbox__hook__linux.h b/chromium-wip/patches/patch-content_common_gpu__pre__sandbox__hook__linux.h
new file mode 100644
index 0000000000..c7a8181bc8
--- /dev/null
+++ b/chromium-wip/patches/patch-content_common_gpu__pre__sandbox__hook__linux.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/common/gpu_pre_sandbox_hook_linux.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/common/gpu_pre_sandbox_hook_linux.h
+@@ -5,8 +5,13 @@
+ #ifndef CONTENT_COMMON_GPU_PRE_SANDBOX_HOOK_LINUX_H_
+ #define CONTENT_COMMON_GPU_PRE_SANDBOX_HOOK_LINUX_H_
+ 
++#include "build/build_config.h"
+ #include "base/component_export.h"
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#else
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#endif
+ 
+ namespace content {
+ 
diff --git a/chromium-wip/patches/patch-content_common_thread__type__switcher.mojom b/chromium-wip/patches/patch-content_common_thread__type__switcher.mojom
new file mode 100644
index 0000000000..6fdb13cd1f
--- /dev/null
+++ b/chromium-wip/patches/patch-content_common_thread__type__switcher.mojom
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/common/thread_type_switcher.mojom.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/common/thread_type_switcher.mojom
+@@ -10,6 +10,6 @@ import "mojo/public/mojom/base/thread_ty
+ // occur in a child process due to its sandbox, e.g. on Linux and ChromeOS.
+ interface ThreadTypeSwitcher {
+   // Asks the browser to change the type of thread.
+-  SetThreadType(int32 platform_thread_id,
++  SetThreadType(uint64 platform_thread_id,
+                 mojo_base.mojom.ThreadType thread_type);
+ };
diff --git a/chromium-wip/patches/patch-content_gpu_gpu__child__thread.cc b/chromium-wip/patches/patch-content_gpu_gpu__child__thread.cc
new file mode 100644
index 0000000000..dff934d315
--- /dev/null
+++ b/chromium-wip/patches/patch-content_gpu_gpu__child__thread.cc
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/gpu/gpu_child_thread.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/gpu/gpu_child_thread.cc
+@@ -57,7 +57,7 @@
+ #include "third_party/skia/include/ports/SkFontConfigInterface.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "content/child/sandboxed_process_thread_type_handler.h"
+ #endif
+ 
+@@ -147,7 +147,8 @@ void GpuChildThread::Init(const base::Ti
+ 
+   viz_main_.gpu_service()->set_start_time(process_start_time);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++// XXX BSD
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD)
+   SandboxedProcessThreadTypeHandler::NotifyMainChildThreadCreated();
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-content_gpu_gpu__main.cc b/chromium-wip/patches/patch-content_gpu_gpu__main.cc
new file mode 100644
index 0000000000..30485d37c5
--- /dev/null
+++ b/chromium-wip/patches/patch-content_gpu_gpu__main.cc
@@ -0,0 +1,79 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/gpu/gpu_main.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/gpu/gpu_main.cc
+@@ -103,10 +103,14 @@
+ #include "sandbox/win/src/sandbox.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "content/child/sandboxed_process_thread_type_handler.h"
+ #include "content/common/gpu_pre_sandbox_hook_linux.h"
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#else
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#endif
+ #include "sandbox/policy/sandbox_type.h"
+ #endif
+ 
+@@ -124,7 +128,7 @@ namespace content {
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ bool StartSandboxLinux(gpu::GpuWatchdogThread*,
+                        const gpu::GPUInfo*,
+                        const gpu::GpuPreferences&);
+@@ -186,7 +190,7 @@ class ContentSandboxHelper : public gpu:
+                                 const gpu::GPUInfo* gpu_info,
+                                 const gpu::GpuPreferences& gpu_prefs) override {
+     TRACE_EVENT("gpu,startup", "gpu_main::EnsureSandboxInitialized");
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     return StartSandboxLinux(watchdog_thread, gpu_info, gpu_prefs);
+ #elif BUILDFLAG(IS_WIN)
+     return StartSandboxWindows(sandbox_info_);
+@@ -302,7 +306,7 @@ int GpuMain(MainFunctionParams parameter
+           std::make_unique<base::SingleThreadTaskExecutor>(
+               gpu_preferences.message_pump_type);
+     }
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #error "Unsupported Linux platform."
+ #elif BUILDFLAG(IS_MAC)
+     // Cross-process CoreAnimation requires a CFRunLoop to function at all, and
+@@ -327,7 +331,8 @@ int GpuMain(MainFunctionParams parameter
+   base::PlatformThread::SetName("CrGpuMain");
+   mojo::InterfaceEndpointClient::SetThreadNameSuffixForMetrics("GpuMain");
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++// XXX BSD
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD)
+   // Thread type delegate of the process should be registered before
+   // thread type change below for the main thread and for thread pool in
+   // ChildProcess constructor.
+@@ -459,7 +464,7 @@ int GpuMain(MainFunctionParams parameter
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdog_thread,
+                        const gpu::GPUInfo* gpu_info,
+                        const gpu::GpuPreferences& gpu_prefs) {
+@@ -507,7 +512,7 @@ bool StartSandboxLinux(gpu::GpuWatchdogT
+   sandbox_options.accelerated_video_encode_enabled =
+       !gpu_prefs.disable_accelerated_video_encode;
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Video decoding of many video streams can use thousands of FDs as well as
+   // Exo clients.
+   // See https://crbug.com/1417237
diff --git a/chromium-wip/patches/patch-content_ppapi__plugin_ppapi__blink__platform__impl.cc b/chromium-wip/patches/patch-content_ppapi__plugin_ppapi__blink__platform__impl.cc
new file mode 100644
index 0000000000..0dda11b775
--- /dev/null
+++ b/chromium-wip/patches/patch-content_ppapi__plugin_ppapi__blink__platform__impl.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/ppapi_plugin/ppapi_blink_platform_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/ppapi_plugin/ppapi_blink_platform_impl.cc
+@@ -21,7 +21,7 @@
+ 
+ #if BUILDFLAG(IS_MAC)
+ #include "content/child/child_process_sandbox_support_impl_mac.h"
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "content/child/child_process_sandbox_support_impl_linux.h"
+ #include "mojo/public/cpp/bindings/pending_remote.h"
+ #endif
+@@ -36,7 +36,7 @@ typedef struct CGFont* CGFontRef;
+ namespace content {
+ 
+ PpapiBlinkPlatformImpl::PpapiBlinkPlatformImpl() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   mojo::PendingRemote<font_service::mojom::FontService> font_service;
+   ChildThread::Get()->BindHostReceiver(
+       font_service.InitWithNewPipeAndPassReceiver());
+@@ -55,7 +55,7 @@ PpapiBlinkPlatformImpl::~PpapiBlinkPlatf
+ void PpapiBlinkPlatformImpl::Shutdown() {}
+ 
+ blink::WebSandboxSupport* PpapiBlinkPlatformImpl::GetSandboxSupport() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   return sandbox_support_.get();
+ #else
+   return nullptr;
diff --git a/chromium-wip/patches/patch-content_ppapi__plugin_ppapi__blink__platform__impl.h b/chromium-wip/patches/patch-content_ppapi__plugin_ppapi__blink__platform__impl.h
new file mode 100644
index 0000000000..4757c0d50f
--- /dev/null
+++ b/chromium-wip/patches/patch-content_ppapi__plugin_ppapi__blink__platform__impl.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/ppapi_plugin/ppapi_blink_platform_impl.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/ppapi_plugin/ppapi_blink_platform_impl.h
+@@ -36,7 +36,7 @@ class PpapiBlinkPlatformImpl : public Bl
+   blink::WebString DefaultLocale() override;
+ 
+  private:
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<blink::WebSandboxSupport> sandbox_support_;
+ #endif
+ };
diff --git a/chromium-wip/patches/patch-content_ppapi__plugin_ppapi__plugin__main.cc b/chromium-wip/patches/patch-content_ppapi__plugin_ppapi__plugin__main.cc
new file mode 100644
index 0000000000..7b181d53c9
--- /dev/null
+++ b/chromium-wip/patches/patch-content_ppapi__plugin_ppapi__plugin__main.cc
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/ppapi_plugin/ppapi_plugin_main.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/ppapi_plugin/ppapi_plugin_main.cc
+@@ -52,6 +52,11 @@
+ #include "gin/v8_initializer.h"
+ #endif
+ 
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#include "sandbox/policy/sandbox_type.h"
++#endif
++
+ #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID)
+ #include <stdlib.h>
+ #endif
+@@ -139,7 +144,7 @@ int PpapiPluginMain(MainFunctionParams p
+   gin::V8Initializer::LoadV8Snapshot();
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD)
+   sandbox::policy::SandboxLinux::GetInstance()->InitializeSandbox(
+       sandbox::policy::SandboxTypeFromCommandLine(command_line),
+       sandbox::policy::SandboxLinux::PreSandboxHook(),
diff --git a/chromium-wip/patches/patch-content_public_browser_content__browser__client.cc b/chromium-wip/patches/patch-content_public_browser_content__browser__client.cc
new file mode 100644
index 0000000000..cb7b004059
--- /dev/null
+++ b/chromium-wip/patches/patch-content_public_browser_content__browser__client.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/public/browser/content_browser_client.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/public/browser/content_browser_client.cc
+@@ -1429,7 +1429,7 @@ bool ContentBrowserClient::ShouldRunOutO
+ // that can be adequately sandboxed.
+ // Currently Android's network service will not run out of process or sandboxed,
+ // so OutOfProcessSystemDnsResolution is not currently enabled on Android.
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return true;
+ #else
+   return false;
diff --git a/chromium-wip/patches/patch-content_public_browser_zygote__host_zygote__host__linux.h b/chromium-wip/patches/patch-content_public_browser_zygote__host_zygote__host__linux.h
new file mode 100644
index 0000000000..1256c3d471
--- /dev/null
+++ b/chromium-wip/patches/patch-content_public_browser_zygote__host_zygote__host__linux.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/public/browser/zygote_host/zygote_host_linux.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/public/browser/zygote_host/zygote_host_linux.h
+@@ -34,11 +34,13 @@ class ZygoteHost {
+   // after the first render has been forked.
+   virtual int GetRendererSandboxStatus() = 0;
+ 
++#if !BUILDFLAG(IS_BSD)
+   // Adjust the OOM score of the given renderer's PID.  The allowed
+   // range for the score is [0, 1000], where higher values are more
+   // likely to be killed by the OOM killer.
+   virtual void AdjustRendererOOMScore(base::ProcessHandle process_handle,
+                                       int score) = 0;
++#endif
+ 
+ #if BUILDFLAG(IS_CHROMEOS)
+   // Reinitialize logging for the Zygote processes. Needed on ChromeOS, which
diff --git a/chromium-wip/patches/patch-content_public_common_content__features.cc b/chromium-wip/patches/patch-content_public_common_content__features.cc
new file mode 100644
index 0000000000..382166282f
--- /dev/null
+++ b/chromium-wip/patches/patch-content_public_common_content__features.cc
@@ -0,0 +1,41 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/public/common/content_features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/public/common/content_features.cc
+@@ -91,7 +91,7 @@ BASE_FEATURE(kAudioServiceLaunchOnStartu
+ // Runs the audio service in a separate process.
+ BASE_FEATURE(kAudioServiceOutOfProcess,
+              "AudioServiceOutOfProcess",
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+              base::FEATURE_ENABLED_BY_DEFAULT
+ #else
+              base::FEATURE_DISABLED_BY_DEFAULT
+@@ -1319,9 +1319,9 @@ BASE_FEATURE(kWebAssemblyTiering,
+ BASE_FEATURE(kWebAssemblyTrapHandler,
+              "WebAssemblyTrapHandler",
+ #if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) ||  \
+-      BUILDFLAG(IS_MAC)) &&                                                  \
++      BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)) &&                             \
+      defined(ARCH_CPU_X86_64)) ||                                            \
+-    ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)) && \
++    ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)) && \
+      defined(ARCH_CPU_ARM64))
+              base::FEATURE_ENABLED_BY_DEFAULT
+ #else
+@@ -1381,7 +1381,11 @@ BASE_FEATURE(kWebUIJSErrorReportingExten
+ 
+ // Controls whether the WebUSB API is enabled:
+ // https://wicg.github.io/webusb
++#if BUILDFLAG(IS_BSD)
++BASE_FEATURE(kWebUsb, "WebUSB", base::FEATURE_DISABLED_BY_DEFAULT);
++#else
+ BASE_FEATURE(kWebUsb, "WebUSB", base::FEATURE_ENABLED_BY_DEFAULT);
++#endif
+ 
+ // Apply `PrefetchPriority::kHighest` for Webview Prefetch API.
+ BASE_FEATURE(kWebViewPrefetchHighestPrefetchPriority,
diff --git a/chromium-wip/patches/patch-content_public_common_content__switches.cc b/chromium-wip/patches/patch-content_public_common_content__switches.cc
new file mode 100644
index 0000000000..2f442f4be0
--- /dev/null
+++ b/chromium-wip/patches/patch-content_public_common_content__switches.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/public/common/content_switches.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/public/common/content_switches.cc
+@@ -345,6 +345,8 @@ const char kEnableIsolatedWebAppsInRende
+ // builds.
+ const char kEnableLogging[]                 = "enable-logging";
+ 
++const char kDisableUnveil[]                 = "disable-unveil";
++
+ // Enables the type, downlinkMax attributes of the NetInfo API. Also, enables
+ // triggering of change attribute of the NetInfo API when there is a change in
+ // the connection type.
+@@ -958,7 +960,7 @@ const char kPreventResizingContentsForTe
+     "prevent-resizing-contents-for-testing";
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Allows sending text-to-speech requests to speech-dispatcher, a common
+ // Linux speech service. Because it's buggy, the user must explicitly
+ // enable it so that visiting a random webpage can't cause instability.
diff --git a/chromium-wip/patches/patch-content_public_common_content__switches.h b/chromium-wip/patches/patch-content_public_common_content__switches.h
new file mode 100644
index 0000000000..29279439ee
--- /dev/null
+++ b/chromium-wip/patches/patch-content_public_common_content__switches.h
@@ -0,0 +1,25 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/public/common/content_switches.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/public/common/content_switches.h
+@@ -108,6 +108,7 @@ CONTENT_EXPORT extern const char kEnable
+ CONTENT_EXPORT extern const char kEnableIsolatedWebAppsInRenderer[];
+ CONTENT_EXPORT extern const char kEnableLCDText[];
+ CONTENT_EXPORT extern const char kEnableLogging[];
++CONTENT_EXPORT extern const char kDisableUnveil[];
+ CONTENT_EXPORT extern const char kEnableNetworkInformationDownlinkMax[];
+ CONTENT_EXPORT extern const char kEnableCanvas2DLayers[];
+ CONTENT_EXPORT extern const char kEnablePluginPlaceholderTesting[];
+@@ -261,7 +262,7 @@ CONTENT_EXPORT extern const char kRender
+ CONTENT_EXPORT extern const char kPreventResizingContentsForTesting[];
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ CONTENT_EXPORT extern const char kEnableSpeechDispatcher[];
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-content_public_common_zygote_features.gni b/chromium-wip/patches/patch-content_public_common_zygote_features.gni
new file mode 100644
index 0000000000..966594b94a
--- /dev/null
+++ b/chromium-wip/patches/patch-content_public_common_zygote_features.gni
@@ -0,0 +1,14 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/public/common/zygote/features.gni.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/public/common/zygote/features.gni
+@@ -2,4 +2,4 @@
+ # Use of this source code is governed by a BSD-style license that can be
+ # found in the LICENSE file.
+ 
+-use_zygote = is_posix && !is_android && !is_apple
++use_zygote = is_posix && !is_android && !is_mac && !is_bsd
diff --git a/chromium-wip/patches/patch-content_renderer_render__thread__impl.cc b/chromium-wip/patches/patch-content_renderer_render__thread__impl.cc
new file mode 100644
index 0000000000..e62cf39b1e
--- /dev/null
+++ b/chromium-wip/patches/patch-content_renderer_render__thread__impl.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/renderer/render_thread_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/renderer/render_thread_impl.cc
+@@ -204,6 +204,8 @@
+ 
+ #if BUILDFLAG(IS_APPLE)
+ #include <malloc/malloc.h>
++#elif BUILDFLAG(IS_BSD)
++#include <stdlib.h>
+ #else
+ #include <malloc.h>
+ #endif
+@@ -1061,7 +1063,7 @@ media::GpuVideoAcceleratorFactories* Ren
+                              kGpuStreamIdMedia, kGpuStreamPriorityMedia);
+ 
+   const bool enable_video_decode_accelerator =
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       base::FeatureList::IsEnabled(media::kAcceleratedVideoDecodeLinux) &&
+ #endif  // BUILDFLAG(IS_LINUX)
+       !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode) &&
+@@ -1070,7 +1072,7 @@ media::GpuVideoAcceleratorFactories* Ren
+        gpu::kGpuFeatureStatusEnabled);
+ 
+   const bool enable_video_encode_accelerator =
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       base::FeatureList::IsEnabled(media::kAcceleratedVideoEncodeLinux) &&
+ #else
+       !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoEncode) &&
+@@ -1845,7 +1847,7 @@ RenderThreadImpl::CreateMediaMojoCodecFa
+     bool enable_video_encode_accelerator) {
+   mojo::PendingRemote<media::mojom::VideoEncodeAcceleratorProvider>
+       vea_provider;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (base::FeatureList::IsEnabled(media::kUseOutOfProcessVideoEncoding)) {
+     BindHostReceiver(vea_provider.InitWithNewPipeAndPassReceiver());
+   } else {
diff --git a/chromium-wip/patches/patch-content_renderer_renderer__blink__platform__impl.cc b/chromium-wip/patches/patch-content_renderer_renderer__blink__platform__impl.cc
new file mode 100644
index 0000000000..c900f21476
--- /dev/null
+++ b/chromium-wip/patches/patch-content_renderer_renderer__blink__platform__impl.cc
@@ -0,0 +1,51 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/renderer/renderer_blink_platform_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/renderer/renderer_blink_platform_impl.cc
+@@ -124,7 +124,7 @@
+ 
+ #if BUILDFLAG(IS_MAC)
+ #include "content/child/child_process_sandbox_support_impl_mac.h"
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "content/child/child_process_sandbox_support_impl_linux.h"
+ #include "content/child/sandboxed_process_thread_type_handler.h"
+ #endif
+@@ -192,13 +192,13 @@ RendererBlinkPlatformImpl::RendererBlink
+       is_locked_to_site_(false),
+       main_thread_scheduler_(main_thread_scheduler),
+       next_frame_sink_id_(uint32_t{std::numeric_limits<int32_t>::max()} + 1) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   sk_sp<font_service::FontLoader> font_loader;
+ #endif
+ 
+   // RenderThread may not exist in some tests.
+   if (RenderThreadImpl::current()) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     mojo::PendingRemote<font_service::mojom::FontService> font_service;
+     RenderThreadImpl::current()->BindHostReceiver(
+         font_service.InitWithNewPipeAndPassReceiver());
+@@ -223,7 +223,7 @@ RendererBlinkPlatformImpl::RendererBlink
+   }
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   if (sandboxEnabled()) {
+ #if BUILDFLAG(IS_MAC)
+     sandbox_support_ = std::make_unique<WebSandboxSupportMac>();
+@@ -296,7 +296,7 @@ RendererBlinkPlatformImpl::GetWebUIBundl
+ 
+ blink::WebSandboxSupport* RendererBlinkPlatformImpl::GetSandboxSupport() {
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   return sandbox_support_.get();
+ #else
+   // These platforms do not require sandbox support.
diff --git a/chromium-wip/patches/patch-content_renderer_renderer__blink__platform__impl.h b/chromium-wip/patches/patch-content_renderer_renderer__blink__platform__impl.h
new file mode 100644
index 0000000000..31f69c795c
--- /dev/null
+++ b/chromium-wip/patches/patch-content_renderer_renderer__blink__platform__impl.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/renderer/renderer_blink_platform_impl.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/renderer/renderer_blink_platform_impl.h
+@@ -270,7 +270,7 @@ class CONTENT_EXPORT RendererBlinkPlatfo
+                                    const gpu::GPUInfo& gpu_info) const;
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<blink::WebSandboxSupport> sandbox_support_;
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-content_renderer_renderer__main__platform__delegate__linux.cc b/chromium-wip/patches/patch-content_renderer_renderer__main__platform__delegate__linux.cc
new file mode 100644
index 0000000000..b16644f3ae
--- /dev/null
+++ b/chromium-wip/patches/patch-content_renderer_renderer__main__platform__delegate__linux.cc
@@ -0,0 +1,24 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/renderer/renderer_main_platform_delegate_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/renderer/renderer_main_platform_delegate_linux.cc
+@@ -44,6 +44,7 @@ bool RendererMainPlatformDelegate::Enabl
+   // any renderer has been started.
+   // Here, we test that the status of SeccompBpf in the renderer is consistent
+   // with what SandboxLinux::GetStatus() said we would do.
++#if !BUILDFLAG(IS_BSD)
+   auto* linux_sandbox = sandbox::policy::SandboxLinux::GetInstance();
+   if (linux_sandbox->GetStatus() & sandbox::policy::SandboxLinux::kSeccompBPF) {
+     CHECK(linux_sandbox->seccomp_bpf_started());
+@@ -65,6 +66,7 @@ bool RendererMainPlatformDelegate::Enabl
+     CHECK_EQ(errno, EPERM);
+   }
+ #endif  // __x86_64__
++#endif
+ 
+   return true;
+ }
diff --git a/chromium-wip/patches/patch-content_shell_BUILD.gn b/chromium-wip/patches/patch-content_shell_BUILD.gn
new file mode 100644
index 0000000000..7b27c4668a
--- /dev/null
+++ b/chromium-wip/patches/patch-content_shell_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/shell/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/shell/BUILD.gn
+@@ -1111,7 +1111,7 @@ group("content_shell_crash_test") {
+   if (is_win) {
+     data_deps += [ "//build/win:copy_cdb_to_output" ]
+   }
+-  if (is_posix) {
++  if (is_posix && !is_bsd) {
+     data_deps += [
+       "//third_party/breakpad:dump_syms",
+       "//third_party/breakpad:minidump_stackwalk",
diff --git a/chromium-wip/patches/patch-content_shell_app_shell__main__delegate.cc b/chromium-wip/patches/patch-content_shell_app_shell__main__delegate.cc
new file mode 100644
index 0000000000..86b9fd5a36
--- /dev/null
+++ b/chromium-wip/patches/patch-content_shell_app_shell__main__delegate.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/shell/app/shell_main_delegate.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/shell/app/shell_main_delegate.cc
+@@ -287,7 +287,7 @@ void ShellMainDelegate::PreSandboxStartu
+     // Reporting for sub-processes will be initialized in ZygoteForked.
+     if (process_type != switches::kZygoteProcess) {
+       crash_reporter::InitializeCrashpad(process_type.empty(), process_type);
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       crash_reporter::SetFirstChanceExceptionHandler(
+           v8::TryHandleWebAssemblyTrapPosix);
+ #endif
diff --git a/chromium-wip/patches/patch-content_shell_browser_shell__browser__main__parts.cc b/chromium-wip/patches/patch-content_shell_browser_shell__browser__main__parts.cc
new file mode 100644
index 0000000000..cb86286610
--- /dev/null
+++ b/chromium-wip/patches/patch-content_shell_browser_shell__browser__main__parts.cc
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/shell/browser/shell_browser_main_parts.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/shell/browser/shell_browser_main_parts.cc
+@@ -50,7 +50,7 @@
+ #include "net/base/network_change_notifier.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) && defined(USE_AURA)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(USE_AURA)
+ #include "ui/base/ime/init/input_method_initializer.h"
+ #endif
+ 
+@@ -61,7 +61,7 @@
+ #include "device/bluetooth/floss/floss_features.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "device/bluetooth/dbus/dbus_bluez_manager_wrapper_linux.h"
+ #include "ui/linux/linux_ui.h"          // nogncheck
+ #include "ui/linux/linux_ui_factory.h"  // nogncheck
+@@ -128,7 +128,7 @@ void ShellBrowserMainParts::PostCreateMa
+ }
+ 
+ int ShellBrowserMainParts::PreEarlyInitialization() {
+-#if BUILDFLAG(IS_LINUX) && defined(USE_AURA)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(USE_AURA)
+   ui::InitializeInputMethodForTesting();
+ #elif BUILDFLAG(IS_ANDROID)
+   net::NetworkChangeNotifier::SetFactory(
+@@ -156,7 +156,7 @@ void ShellBrowserMainParts::ToolkitIniti
+   if (switches::IsRunWebTestsSwitchPresent())
+     return;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   ui::LinuxUi::SetInstance(ui::GetDefaultLinuxUi());
+ #endif
+ }
+@@ -203,7 +203,7 @@ void ShellBrowserMainParts::PostMainMess
+   ShellDevToolsManagerDelegate::StopHttpHandler();
+   browser_context_.reset();
+   off_the_record_browser_context_.reset();
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   ui::LinuxUi::SetInstance(nullptr);
+ #endif
+   performance_manager_lifetime_.reset();
diff --git a/chromium-wip/patches/patch-content_shell_browser_shell__platform__delegate__views.cc b/chromium-wip/patches/patch-content_shell_browser_shell__platform__delegate__views.cc
new file mode 100644
index 0000000000..53ce509c22
--- /dev/null
+++ b/chromium-wip/patches/patch-content_shell_browser_shell__platform__delegate__views.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/shell/browser/shell_platform_delegate_views.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/shell/browser/shell_platform_delegate_views.cc
+@@ -373,7 +373,7 @@ void ShellPlatformDelegate::CreatePlatfo
+       views::Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET);
+   params.bounds = gfx::Rect(initial_size);
+   params.delegate = delegate.release();
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   params.wm_class_class = "chromium-content_shell";
+   params.wm_class_name = params.wm_class_class;
+ #endif  // BUILDFLAG(IS_LINUX)
diff --git a/chromium-wip/patches/patch-content_shell_renderer_shell__content__renderer__client.cc b/chromium-wip/patches/patch-content_shell_renderer_shell__content__renderer__client.cc
new file mode 100644
index 0000000000..d310b79954
--- /dev/null
+++ b/chromium-wip/patches/patch-content_shell_renderer_shell__content__renderer__client.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/shell/renderer/shell_content_renderer_client.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/shell/renderer/shell_content_renderer_client.cc
+@@ -55,7 +55,7 @@
+ #include "media/base/media_switches.h"
+ #endif
+ 
+-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \
+     (defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM64))
+ #define ENABLE_WEB_ASSEMBLY_TRAP_HANDLER_LINUX
+ #include "base/debug/stack_trace.h"
diff --git a/chromium-wip/patches/patch-content_shell_utility_shell__content__utility__client.cc b/chromium-wip/patches/patch-content_shell_utility_shell__content__utility__client.cc
new file mode 100644
index 0000000000..bb26071838
--- /dev/null
+++ b/chromium-wip/patches/patch-content_shell_utility_shell__content__utility__client.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/shell/utility/shell_content_utility_client.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/shell/utility/shell_content_utility_client.cc
+@@ -43,7 +43,7 @@
+ #include "sandbox/policy/sandbox.h"
+ #include "services/test/echo/echo_service.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "content/test/sandbox_status_service.h"
+ #endif
+ 
+@@ -192,7 +192,7 @@ void ShellContentUtilityClient::ExposeIn
+   binders->Add<mojom::PowerMonitorTest>(
+       base::BindRepeating(&PowerMonitorTestImpl::MakeSelfOwnedReceiver),
+       base::SingleThreadTaskRunner::GetCurrentDefault());
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (register_sandbox_status_helper_) {
+     binders->Add<content::mojom::SandboxStatusService>(
+         base::BindRepeating(
diff --git a/chromium-wip/patches/patch-content_test_BUILD.gn b/chromium-wip/patches/patch-content_test_BUILD.gn
new file mode 100644
index 0000000000..8a36cc38c5
--- /dev/null
+++ b/chromium-wip/patches/patch-content_test_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/test/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/test/BUILD.gn
+@@ -1800,7 +1800,7 @@ test("content_browsertests") {
+     "--disable-crashpad-for-testing",
+   ]
+ 
+-  if (is_linux) {
++  if ((is_linux) && !is_bsd) {
+     sources += [ "../browser/network/address_map_linux_browsertest.cc" ]
+   }
+ 
diff --git a/chromium-wip/patches/patch-content_utility_services.cc b/chromium-wip/patches/patch-content_utility_services.cc
new file mode 100644
index 0000000000..5275404683
--- /dev/null
+++ b/chromium-wip/patches/patch-content_utility_services.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/utility/services.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/utility/services.cc
+@@ -73,7 +73,7 @@
+ extern sandbox::TargetServices* g_utility_target_services;
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "sandbox/linux/services/libc_interceptor.h"
+ #include "sandbox/policy/mojom/sandbox.mojom.h"
+ #include "sandbox/policy/sandbox_type.h"
+@@ -233,7 +233,7 @@ auto RunAudio(mojo::PendingReceiver<audi
+       << "task_policy_set TASK_QOS_POLICY";
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   auto* command_line = base::CommandLine::ForCurrentProcess();
+   if (sandbox::policy::SandboxTypeFromCommandLine(*command_line) ==
+       sandbox::mojom::Sandbox::kNoSandbox) {
diff --git a/chromium-wip/patches/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.cc b/chromium-wip/patches/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.cc
new file mode 100644
index 0000000000..cd5da80a78
--- /dev/null
+++ b/chromium-wip/patches/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.cc
@@ -0,0 +1,43 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/utility/speech/speech_recognition_sandbox_hook_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/utility/speech/speech_recognition_sandbox_hook_linux.cc
+@@ -12,11 +12,14 @@
+ #include "sandbox/linux/syscall_broker/broker_command.h"
+ #include "sandbox/linux/syscall_broker/broker_file_permission.h"
+ 
++#if !BUILDFLAG(IS_BSD)
+ using sandbox::syscall_broker::BrokerFilePermission;
+ using sandbox::syscall_broker::MakeBrokerCommandSet;
++#endif
+ 
+ namespace speech {
+ 
++#if !BUILDFLAG(IS_BSD)
+ namespace {
+ 
+ // Gets the file permissions required by the Speech On-Device API (SODA).
+@@ -50,9 +53,11 @@ std::vector<BrokerFilePermission> GetSod
+ }
+ 
+ }  // namespace
++#endif
+ 
+ bool SpeechRecognitionPreSandboxHook(
+     sandbox::policy::SandboxLinux::Options options) {
++#if !BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(ENABLE_SODA_INTEGRATION_TESTS)
+   base::FilePath test_binary_path = GetSodaTestBinaryPath();
+   DVLOG(0) << "SODA test binary path: " << test_binary_path.value().c_str();
+@@ -75,6 +80,7 @@ bool SpeechRecognitionPreSandboxHook(
+                                }),
+                                GetSodaFilePermissions(), options);
+   instance->EngageNamespaceSandboxIfPossible();
++#endif
+ 
+   return true;
+ }
diff --git a/chromium-wip/patches/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.h b/chromium-wip/patches/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.h
new file mode 100644
index 0000000000..ee773ae164
--- /dev/null
+++ b/chromium-wip/patches/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/utility/speech/speech_recognition_sandbox_hook_linux.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/utility/speech/speech_recognition_sandbox_hook_linux.h
+@@ -5,7 +5,13 @@
+ #ifndef CONTENT_UTILITY_SPEECH_SPEECH_RECOGNITION_SANDBOX_HOOK_LINUX_H_
+ #define CONTENT_UTILITY_SPEECH_SPEECH_RECOGNITION_SANDBOX_HOOK_LINUX_H_
+ 
++#include "build/build_config.h"
++
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#else
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#endif
+ 
+ namespace speech {
+ 
diff --git a/chromium-wip/patches/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.cc b/chromium-wip/patches/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.cc
new file mode 100644
index 0000000000..322a2bdf5c
--- /dev/null
+++ b/chromium-wip/patches/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/utility/utility_blink_platform_with_sandbox_support_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/utility/utility_blink_platform_with_sandbox_support_impl.cc
+@@ -9,7 +9,7 @@
+ 
+ #if BUILDFLAG(IS_MAC)
+ #include "content/child/child_process_sandbox_support_impl_mac.h"
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "content/child/child_process_sandbox_support_impl_linux.h"
+ #elif BUILDFLAG(IS_WIN)
+ #include "content/child/child_process_sandbox_support_impl_win.h"
+@@ -19,7 +19,7 @@ namespace content {
+ 
+ UtilityBlinkPlatformWithSandboxSupportImpl::
+     UtilityBlinkPlatformWithSandboxSupportImpl() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   mojo::PendingRemote<font_service::mojom::FontService> font_service;
+   UtilityThread::Get()->BindHostReceiver(
+       font_service.InitWithNewPipeAndPassReceiver());
+@@ -40,7 +40,7 @@ UtilityBlinkPlatformWithSandboxSupportIm
+ blink::WebSandboxSupport*
+ UtilityBlinkPlatformWithSandboxSupportImpl::GetSandboxSupport() {
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   return sandbox_support_.get();
+ #else
+   return nullptr;
diff --git a/chromium-wip/patches/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.h b/chromium-wip/patches/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.h
new file mode 100644
index 0000000000..8c2d4bc13f
--- /dev/null
+++ b/chromium-wip/patches/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/utility/utility_blink_platform_with_sandbox_support_impl.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/utility/utility_blink_platform_with_sandbox_support_impl.h
+@@ -34,7 +34,7 @@ class UtilityBlinkPlatformWithSandboxSup
+ 
+  private:
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<blink::WebSandboxSupport> sandbox_support_;
+ #endif
+ };
diff --git a/chromium-wip/patches/patch-content_utility_utility__main.cc b/chromium-wip/patches/patch-content_utility_utility__main.cc
new file mode 100644
index 0000000000..8a44af27d9
--- /dev/null
+++ b/chromium-wip/patches/patch-content_utility_utility__main.cc
@@ -0,0 +1,118 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/utility/utility_main.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/utility/utility_main.cc
+@@ -38,15 +38,19 @@
+ #include "services/tracing/public/cpp/trace_startup.h"
+ #include "services/video_effects/public/cpp/buildflags.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "base/file_descriptor_store.h"
+ #include "base/files/file_util.h"
+ #include "base/pickle.h"
+ #include "content/child/sandboxed_process_thread_type_handler.h"
++#if !BUILDFLAG(IS_BSD)
+ #include "content/common/gpu_pre_sandbox_hook_linux.h"
++#endif
+ #include "content/public/common/content_descriptor_keys.h"
+ #include "content/utility/speech/speech_recognition_sandbox_hook_linux.h"
++#if !BUILDFLAG(IS_BSD)
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#endif
+ #include "services/audio/audio_sandbox_hook_linux.h"
+ #include "services/network/network_sandbox_hook_linux.h"
+ #include "services/screen_ai/buildflags/buildflags.h"
+@@ -77,7 +81,12 @@
+ 
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(ENABLE_VIDEO_EFFECTS) && BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#include "content/common/gpu_pre_sandbox_hook_bsd.h"
++#endif
++
++#if BUILDFLAG(ENABLE_VIDEO_EFFECTS) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD))
+ #include "services/video_effects/video_effects_sandbox_hook_linux.h"  // nogncheck
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+@@ -112,7 +121,7 @@
+ sandbox::TargetServices* g_utility_target_services = nullptr;
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(ENABLE_ON_DEVICE_TRANSLATION) && BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(ENABLE_ON_DEVICE_TRANSLATION) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD))
+ #include "components/services/on_device_translation/sandbox_hook.h"
+ #endif  // BUILDFLAG(ENABLE_ON_DEVICE_TRANSLATION) && BUILDFLAG(IS_LINUX)
+ 
+@@ -120,7 +129,7 @@ namespace content {
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ std::vector<std::string> GetNetworkContextsParentDirectories() {
+   base::MemoryMappedFile::Region region;
+   base::ScopedFD read_pipe_fd = base::FileDescriptorStore::GetInstance().TakeFD(
+@@ -268,7 +277,8 @@ int UtilityMain(MainFunctionParams param
+   }
+ #endif  // BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) && BUILDFLAG(USE_VAAPI)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++// XXX BSD
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD)
+   // Thread type delegate of the process should be registered before first
+   // thread type change in ChildProcess constructor. It also needs to be
+   // registered before the process has multiple threads, which may race with
+@@ -276,7 +286,7 @@ int UtilityMain(MainFunctionParams param
+   SandboxedProcessThreadTypeHandler::Create();
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Initializes the sandbox before any threads are created.
+   // TODO(jorgelo): move this after GTK initialization when we enable a strict
+   // Seccomp-BPF policy.
+@@ -308,7 +318,7 @@ int UtilityMain(MainFunctionParams param
+       pre_sandbox_hook =
+           base::BindOnce(&speech::SpeechRecognitionPreSandboxHook);
+       break;
+-#if BUILDFLAG(ENABLE_ON_DEVICE_TRANSLATION) && BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(ENABLE_ON_DEVICE_TRANSLATION) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD))
+     case sandbox::mojom::Sandbox::kOnDeviceTranslation:
+       pre_sandbox_hook = base::BindOnce(
+           &on_device_translation::OnDeviceTranslationSandboxHook);
+@@ -324,7 +334,7 @@ int UtilityMain(MainFunctionParams param
+ #else
+       NOTREACHED();
+ #endif
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     case sandbox::mojom::Sandbox::kVideoEffects:
+ #if BUILDFLAG(ENABLE_VIDEO_EFFECTS)
+       pre_sandbox_hook =
+@@ -359,6 +369,7 @@ int UtilityMain(MainFunctionParams param
+     default:
+       break;
+   }
++#if !BUILDFLAG(IS_BSD)
+   if (!sandbox::policy::IsUnsandboxedSandboxType(sandbox_type) &&
+       (parameters.zygote_child || !pre_sandbox_hook.is_null())) {
+     sandbox_options.use_amd_specific_policies =
+@@ -366,6 +377,11 @@ int UtilityMain(MainFunctionParams param
+     sandbox::policy::Sandbox::Initialize(
+         sandbox_type, std::move(pre_sandbox_hook), sandbox_options);
+   }
++#else
++  sandbox::policy::Sandbox::Initialize(
++      sandbox_type, std::move(pre_sandbox_hook),
++      sandbox::policy::SandboxLinux::Options());
++#endif
+ 
+   // Start the HangWatcher now that the sandbox is engaged, if it hasn't
+   // already been started.
diff --git a/chromium-wip/patches/patch-content_utility_utility__thread__impl.cc b/chromium-wip/patches/patch-content_utility_utility__thread__impl.cc
new file mode 100644
index 0000000000..0c2fe25346
--- /dev/null
+++ b/chromium-wip/patches/patch-content_utility_utility__thread__impl.cc
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/utility/utility_thread_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/utility/utility_thread_impl.cc
+@@ -31,7 +31,7 @@
+ #include "mojo/public/cpp/bindings/pending_receiver.h"
+ #include "mojo/public/cpp/bindings/service_factory.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "content/child/sandboxed_process_thread_type_handler.h"
+ #endif
+ 
+@@ -251,7 +251,8 @@ void UtilityThreadImpl::Init() {
+ 
+   GetContentClient()->utility()->UtilityThreadStarted();
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++// XXX BSD
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD)
+   SandboxedProcessThreadTypeHandler::NotifyMainChildThreadCreated();
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-content_zygote_BUILD.gn b/chromium-wip/patches/patch-content_zygote_BUILD.gn
new file mode 100644
index 0000000000..bef11d6aa1
--- /dev/null
+++ b/chromium-wip/patches/patch-content_zygote_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/zygote/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/zygote/BUILD.gn
+@@ -5,7 +5,7 @@
+ import("//build/config/nacl/config.gni")
+ import("//content/public/common/zygote/features.gni")
+ 
+-if (is_linux || is_chromeos) {
++if ((is_linux || is_chromeos) && !is_bsd) {
+   source_set("zygote") {
+     sources = [
+       "zygote_linux.cc",
diff --git a/chromium-wip/patches/patch-content_zygote_zygote__linux.cc b/chromium-wip/patches/patch-content_zygote_zygote__linux.cc
new file mode 100644
index 0000000000..b504961136
--- /dev/null
+++ b/chromium-wip/patches/patch-content_zygote_zygote__linux.cc
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/zygote/zygote_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/zygote/zygote_linux.cc
+@@ -1,6 +1,7 @@
+ // Copyright 2012 The Chromium Authors
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
++#if 0
+ 
+ #include "content/zygote/zygote_linux.h"
+ 
+@@ -705,3 +706,4 @@ void Zygote::HandleReinitializeLoggingRe
+ }
+ 
+ }  // namespace content
++#endif
diff --git a/chromium-wip/patches/patch-content_zygote_zygote__main__linux.cc b/chromium-wip/patches/patch-content_zygote_zygote__main__linux.cc
new file mode 100644
index 0000000000..ea0c0e48b8
--- /dev/null
+++ b/chromium-wip/patches/patch-content_zygote_zygote__main__linux.cc
@@ -0,0 +1,64 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- content/zygote/zygote_main_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ content/zygote/zygote_main_linux.cc
+@@ -11,7 +11,9 @@
+ #include <stddef.h>
+ #include <stdint.h>
+ #include <string.h>
++#if !BUILDFLAG(IS_BSD)
+ #include <sys/prctl.h>
++#endif
+ #include <sys/socket.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+@@ -41,7 +43,9 @@
+ #include "sandbox/linux/services/thread_helpers.h"
+ #include "sandbox/linux/suid/client/setuid_sandbox_client.h"
+ #include "sandbox/policy/linux/sandbox_debug_handling_linux.h"
++#if !BUILDFLAG(IS_BSD)
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#endif
+ #include "sandbox/policy/sandbox.h"
+ #include "sandbox/policy/switches.h"
+ #include "third_party/icu/source/i18n/unicode/timezone.h"
+@@ -50,11 +54,13 @@ namespace content {
+ 
+ namespace {
+ 
++#if !BUILDFLAG(IS_BSD)
+ void CloseFds(const std::vector<int>& fds) {
+   for (const auto& it : fds) {
+     PCHECK(0 == IGNORE_EINTR(close(it)));
+   }
+ }
++#endif
+ 
+ base::OnceClosure ClosureFromTwoClosures(base::OnceClosure one,
+                                          base::OnceClosure two) {
+@@ -157,9 +163,11 @@ static void EnterLayerOneSandbox(sandbox
+     CHECK(!using_layer1_sandbox);
+   }
+ }
++#endif
+ 
+ bool ZygoteMain(
+     std::vector<std::unique_ptr<ZygoteForkDelegate>> fork_delegates) {
++#if !BUILDFLAG(IS_BSD)
+   sandbox::SetAmZygoteOrRenderer(true, GetSandboxFD());
+ 
+   auto* linux_sandbox = sandbox::policy::SandboxLinux::GetInstance();
+@@ -224,6 +232,9 @@ bool ZygoteMain(
+ 
+   // This function call can return multiple times, once per fork().
+   return zygote.ProcessRequests();
++#else
++  return false;
++#endif
+ }
+ 
+ }  // namespace content
diff --git a/chromium-wip/patches/patch-device_bluetooth_bluetooth__adapter.cc b/chromium-wip/patches/patch-device_bluetooth_bluetooth__adapter.cc
new file mode 100644
index 0000000000..e3e22c1912
--- /dev/null
+++ b/chromium-wip/patches/patch-device_bluetooth_bluetooth__adapter.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- device/bluetooth/bluetooth_adapter.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ device/bluetooth/bluetooth_adapter.cc
+@@ -33,7 +33,7 @@ namespace device {
+ BluetoothAdapter::ServiceOptions::ServiceOptions() = default;
+ BluetoothAdapter::ServiceOptions::~ServiceOptions() = default;
+ 
+-#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) && \
++#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) && \
+     !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX)
+ // static
+ scoped_refptr<BluetoothAdapter> BluetoothAdapter::CreateAdapter() {
diff --git a/chromium-wip/patches/patch-device_bluetooth_cast__bluetooth.gni b/chromium-wip/patches/patch-device_bluetooth_cast__bluetooth.gni
new file mode 100644
index 0000000000..16061f6ebc
--- /dev/null
+++ b/chromium-wip/patches/patch-device_bluetooth_cast__bluetooth.gni
@@ -0,0 +1,15 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- device/bluetooth/cast_bluetooth.gni.orig	2025-07-29 22:51:44.000000000 +0000
++++ device/bluetooth/cast_bluetooth.gni
+@@ -6,5 +6,5 @@ import("//build/config/features.gni")
+ 
+ declare_args() {
+   force_cast_bluetooth = false
+-  use_bluez = (is_linux && !is_castos && use_dbus) || is_chromeos
++  use_bluez = use_dbus && !is_bsd
+ }
diff --git a/chromium-wip/patches/patch-device_gamepad_BUILD.gn b/chromium-wip/patches/patch-device_gamepad_BUILD.gn
new file mode 100644
index 0000000000..90544a6717
--- /dev/null
+++ b/chromium-wip/patches/patch-device_gamepad_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- device/gamepad/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ device/gamepad/BUILD.gn
+@@ -98,7 +98,7 @@ component("gamepad") {
+       "hid_writer_linux.cc",
+       "hid_writer_linux.h",
+     ]
+-    if (use_udev) {
++    if (use_udev && !is_bsd) {
+       sources += [
+         "gamepad_device_linux.cc",
+         "gamepad_device_linux.h",
diff --git a/chromium-wip/patches/patch-device_gamepad_gamepad__provider.cc b/chromium-wip/patches/patch-device_gamepad_gamepad__provider.cc
new file mode 100644
index 0000000000..d6e314cd4b
--- /dev/null
+++ b/chromium-wip/patches/patch-device_gamepad_gamepad__provider.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- device/gamepad/gamepad_provider.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ device/gamepad/gamepad_provider.cc
+@@ -155,7 +155,7 @@ void GamepadProvider::Initialize(std::un
+ 
+   if (!polling_thread_)
+     polling_thread_ = std::make_unique<base::Thread>("Gamepad polling thread");
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // On Linux, the data fetcher needs to watch file descriptors, so the message
+   // loop needs to be a libevent loop.
+   const base::MessagePumpType kMessageLoopType = base::MessagePumpType::IO;
diff --git a/chromium-wip/patches/patch-device_gamepad_hid__writer__linux.cc b/chromium-wip/patches/patch-device_gamepad_hid__writer__linux.cc
new file mode 100644
index 0000000000..44f67df767
--- /dev/null
+++ b/chromium-wip/patches/patch-device_gamepad_hid__writer__linux.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- device/gamepad/hid_writer_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ device/gamepad/hid_writer_linux.cc
+@@ -2,6 +2,8 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
++#include <unistd.h>
++
+ #include "device/gamepad/hid_writer_linux.h"
+ 
+ #include <unistd.h>
diff --git a/chromium-wip/patches/patch-extensions_browser_api_api__browser__context__keyed__service__factories.cc b/chromium-wip/patches/patch-extensions_browser_api_api__browser__context__keyed__service__factories.cc
new file mode 100644
index 0000000000..4cc385d543
--- /dev/null
+++ b/chromium-wip/patches/patch-extensions_browser_api_api__browser__context__keyed__service__factories.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- extensions/browser/api/api_browser_context_keyed_service_factories.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ extensions/browser/api/api_browser_context_keyed_service_factories.cc
+@@ -121,7 +121,7 @@ void EnsureApiBrowserContextKeyedService
+   MediaPerceptionAPIManager::GetFactoryInstance();
+ #endif
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   NetworkingPrivateEventRouterFactory::GetInstance();
+ #endif
+   PrinterProviderAPIFactory::GetInstance();
diff --git a/chromium-wip/patches/patch-extensions_browser_api_management_management__api.cc b/chromium-wip/patches/patch-extensions_browser_api_management_management__api.cc
new file mode 100644
index 0000000000..db22fe8171
--- /dev/null
+++ b/chromium-wip/patches/patch-extensions_browser_api_management_management__api.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- extensions/browser/api/management/management_api.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ extensions/browser/api/management/management_api.cc
+@@ -284,7 +284,7 @@ void AddExtensionInfo(const Extension* s
+ 
+ bool PlatformSupportsApprovalFlowForExtensions() {
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   return true;
+ #else
+   return false;
diff --git a/chromium-wip/patches/patch-extensions_browser_api_messaging_message__service.cc b/chromium-wip/patches/patch-extensions_browser_api_messaging_message__service.cc
new file mode 100644
index 0000000000..2c5bba4986
--- /dev/null
+++ b/chromium-wip/patches/patch-extensions_browser_api_messaging_message__service.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- extensions/browser/api/messaging/message_service.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ extensions/browser/api/messaging/message_service.cc
+@@ -81,7 +81,7 @@ namespace {
+ const char kReceivingEndDoesntExistError[] =
+     "Could not establish connection. Receiving end does not exist.";
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ const char kMissingPermissionError[] =
+     "Access to native messaging requires nativeMessaging permission.";
+ const char kProhibitedByPoliciesError[] =
+@@ -674,7 +674,7 @@ void MessageService::OpenChannelToNative
+     return;
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   bool has_permission = extension->permissions_data()->HasAPIPermission(
+       mojom::APIPermissionID::kNativeMessaging);
+   if (!has_permission) {
diff --git a/chromium-wip/patches/patch-extensions_browser_api_networking__private_networking__private__delegate__factory.cc b/chromium-wip/patches/patch-extensions_browser_api_networking__private_networking__private__delegate__factory.cc
new file mode 100644
index 0000000000..0f67f238c5
--- /dev/null
+++ b/chromium-wip/patches/patch-extensions_browser_api_networking__private_networking__private__delegate__factory.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- extensions/browser/api/networking_private/networking_private_delegate_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ extensions/browser/api/networking_private/networking_private_delegate_factory.cc
+@@ -12,7 +12,7 @@
+ 
+ #if BUILDFLAG(IS_CHROMEOS)
+ #include "extensions/browser/api/networking_private/networking_private_chromeos.h"
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "extensions/browser/api/networking_private/networking_private_linux.h"
+ #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
+ #include "components/wifi/wifi_service.h"
+@@ -63,7 +63,7 @@ NetworkingPrivateDelegateFactory::BuildS
+   std::unique_ptr<NetworkingPrivateDelegate> delegate;
+ #if BUILDFLAG(IS_CHROMEOS)
+   delegate = std::make_unique<NetworkingPrivateChromeOS>(browser_context);
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   delegate = std::make_unique<NetworkingPrivateLinux>();
+ #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
+   std::unique_ptr<wifi::WiFiService> wifi_service(wifi::WiFiService::Create());
+@@ -74,7 +74,7 @@ NetworkingPrivateDelegateFactory::BuildS
+ #endif
+ 
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   if (ui_factory_) {
+     delegate->set_ui_delegate(ui_factory_->CreateDelegate());
+   }
diff --git a/chromium-wip/patches/patch-extensions_common_api___permission__features.json b/chromium-wip/patches/patch-extensions_common_api___permission__features.json
new file mode 100644
index 0000000000..ff18d180e3
--- /dev/null
+++ b/chromium-wip/patches/patch-extensions_common_api___permission__features.json
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- extensions/common/api/_permission_features.json.orig	2025-07-29 22:51:44.000000000 +0000
++++ extensions/common/api/_permission_features.json
+@@ -134,7 +134,7 @@
+     {
+       "channel": "stable",
+       "extension_types": ["platform_app"],
+-      "platforms": ["chromeos", "win", "mac", "linux"],
++      "platforms": ["chromeos", "win", "mac", "linux", "openbsd", "freebsd", "netbsd"],
+       "allowlist": [
+         "1C93BD3CF875F4A73C0B2A163BB8FBDA8B8B3D80",  // http://crbug.com/387169
+         "A3BC37E2148AC4E99BE4B16AF9D42DD1E592BBBE",  // http://crbug.com/387169
+@@ -420,7 +420,7 @@
+   }, {
+     "channel": "stable",
+     "extension_types": ["extension", "legacy_packaged_app", "platform_app"],
+-    "platforms": ["chromeos", "mac", "win", "linux", "fuchsia"],
++    "platforms": ["chromeos", "mac", "win", "linux", "fuchsia", "openbsd", "freebsd", "netbsd"],
+     "allowlist": [
+       "0DE0F05680A4A056BCEC864ED8DDA84296F82B40",  // http://crbug.com/434651
+       "1C93BD3CF875F4A73C0B2A163BB8FBDA8B8B3D80",  // http://crbug.com/293683
+@@ -464,7 +464,7 @@
+   "networkingPrivate": {
+     "channel": "stable",
+     "extension_types": ["extension", "legacy_packaged_app", "platform_app"],
+-    "platforms": ["chromeos", "mac", "win", "linux", "fuchsia"],
++    "platforms": ["chromeos", "mac", "win", "linux", "fuchsia", "openbsd", "freebsd", "netbsd"],
+     "allowlist": [
+       // DO NOT ADD ANY MORE ENTRIES HERE.
+       // networkingPrivate is being migrated to networking.onc.
diff --git a/chromium-wip/patches/patch-extensions_common_api_runtime.json b/chromium-wip/patches/patch-extensions_common_api_runtime.json
new file mode 100644
index 0000000000..e07d1cb86d
--- /dev/null
+++ b/chromium-wip/patches/patch-extensions_common_api_runtime.json
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- extensions/common/api/runtime.json.orig	2025-07-29 22:51:44.000000000 +0000
++++ extensions/common/api/runtime.json
+@@ -86,6 +86,8 @@
+             {"name": "cros", "description": "Specifies the Chrome operating system."},
+             {"name": "linux", "description": "Specifies the Linux operating system."},
+             {"name": "openbsd", "description": "Specifies the OpenBSD operating system."},
++            {"name": "freebsd", "description": "Specifies the FreeBSD operating system."},
++            {"name": "netbsd", "description": "Specifies the NetBSD operating system."},
+             {"name": "fuchsia", "description": "Specifies the Fuchsia operating system."}
+         ]
+       },
diff --git a/chromium-wip/patches/patch-extensions_common_command.cc b/chromium-wip/patches/patch-extensions_common_command.cc
new file mode 100644
index 0000000000..603b66a5da
--- /dev/null
+++ b/chromium-wip/patches/patch-extensions_common_command.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- extensions/common/command.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ extensions/common/command.cc
+@@ -117,7 +117,7 @@ std::string Command::CommandPlatform() {
+   return ui::kKeybindingPlatformMac;
+ #elif BUILDFLAG(IS_CHROMEOS)
+   return ui::kKeybindingPlatformChromeOs;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return ui::kKeybindingPlatformLinux;
+ #elif BUILDFLAG(IS_FUCHSIA)
+   // TODO(crbug.com/40220501): Change this once we decide what string should be
diff --git a/chromium-wip/patches/patch-extensions_common_features_feature.cc b/chromium-wip/patches/patch-extensions_common_features_feature.cc
new file mode 100644
index 0000000000..4aa4eaf305
--- /dev/null
+++ b/chromium-wip/patches/patch-extensions_common_features_feature.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- extensions/common/features/feature.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ extensions/common/features/feature.cc
+@@ -32,6 +32,8 @@ Feature::Platform Feature::GetCurrentPla
+   return FUCHSIA_PLATFORM;
+ #elif BUILDFLAG(ENABLE_DESKTOP_ANDROID_EXTENSIONS)
+   return DESKTOP_ANDROID_PLATFORM;
++#elif BUILDFLAG(IS_BSD)
++  return LINUX_PLATFORM;
+ #else
+   return UNSPECIFIED_PLATFORM;
+ #endif
diff --git a/chromium-wip/patches/patch-extensions_renderer_bindings_api__binding__util.cc b/chromium-wip/patches/patch-extensions_renderer_bindings_api__binding__util.cc
new file mode 100644
index 0000000000..e1ca52a17a
--- /dev/null
+++ b/chromium-wip/patches/patch-extensions_renderer_bindings_api__binding__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- extensions/renderer/bindings/api_binding_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ extensions/renderer/bindings/api_binding_util.cc
+@@ -129,7 +129,7 @@ void InvalidateContext(v8::Local<v8::Con
+ std::string GetPlatformString() {
+ #if BUILDFLAG(IS_CHROMEOS)
+   return "chromeos";
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return "linux";
+ #elif BUILDFLAG(IS_MAC)
+   return "mac";
diff --git a/chromium-wip/patches/patch-extensions_renderer_bindings_argument__spec.cc b/chromium-wip/patches/patch-extensions_renderer_bindings_argument__spec.cc
new file mode 100644
index 0000000000..5ea6a62ace
--- /dev/null
+++ b/chromium-wip/patches/patch-extensions_renderer_bindings_argument__spec.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- extensions/renderer/bindings/argument_spec.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ extensions/renderer/bindings/argument_spec.cc
+@@ -18,6 +18,8 @@
+ #include "gin/data_object_builder.h"
+ #include "gin/dictionary.h"
+ 
++#include <cmath>
++
+ namespace extensions {
+ 
+ namespace {
diff --git a/chromium-wip/patches/patch-extensions_shell_app_shell__main__delegate.cc b/chromium-wip/patches/patch-extensions_shell_app_shell__main__delegate.cc
new file mode 100644
index 0000000000..7847b401ae
--- /dev/null
+++ b/chromium-wip/patches/patch-extensions_shell_app_shell__main__delegate.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- extensions/shell/app/shell_main_delegate.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ extensions/shell/app/shell_main_delegate.cc
+@@ -31,7 +31,7 @@
+ #if BUILDFLAG(IS_WIN)
+ #include "base/base_paths_win.h"
+ #include "base/process/process_info.h"
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "base/nix/xdg_util.h"
+ #elif BUILDFLAG(IS_MAC)
+ #include "base/base_paths_mac.h"
+@@ -51,7 +51,7 @@ base::FilePath GetDataPath() {
+   }
+ 
+   base::FilePath data_dir;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<base::Environment> env(base::Environment::Create());
+   data_dir = base::nix::GetXDGDirectory(
+       env.get(), base::nix::kXdgConfigHomeEnvVar, base::nix::kDotConfigDir);
diff --git a/chromium-wip/patches/patch-extensions_shell_browser_api_runtime_shell__runtime__api__delegate.cc b/chromium-wip/patches/patch-extensions_shell_browser_api_runtime_shell__runtime__api__delegate.cc
new file mode 100644
index 0000000000..11ca8b5493
--- /dev/null
+++ b/chromium-wip/patches/patch-extensions_shell_browser_api_runtime_shell__runtime__api__delegate.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- extensions/shell/browser/api/runtime/shell_runtime_api_delegate.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ extensions/shell/browser/api/runtime/shell_runtime_api_delegate.cc
+@@ -45,7 +45,7 @@ void ShellRuntimeAPIDelegate::OpenURL(co
+ bool ShellRuntimeAPIDelegate::GetPlatformInfo(PlatformInfo* info) {
+ #if BUILDFLAG(IS_CHROMEOS)
+   info->os = api::runtime::PlatformOs::kCros;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   info->os = api::runtime::PlatformOs::kLinux;
+ #endif
+   return true;
diff --git a/chromium-wip/patches/patch-extensions_shell_browser_shell__browser__main__parts.cc b/chromium-wip/patches/patch-extensions_shell_browser_shell__browser__main__parts.cc
new file mode 100644
index 0000000000..b2a801ebf1
--- /dev/null
+++ b/chromium-wip/patches/patch-extensions_shell_browser_shell__browser__main__parts.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- extensions/shell/browser/shell_browser_main_parts.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ extensions/shell/browser/shell_browser_main_parts.cc
+@@ -126,7 +126,7 @@ void ShellBrowserMainParts::PostCreateMa
+       switches::kAppShellAllowRoaming)) {
+     network_controller_->SetCellularAllowRoaming(true);
+   }
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // app_shell doesn't need GTK, so the fake input method context can work.
+   // See crbug.com/381852 and revision fb69f142.
+   // TODO(michaelpg): Verify this works for target environments.
diff --git a/chromium-wip/patches/patch-extensions_shell_browser_shell__extensions__api__client.cc b/chromium-wip/patches/patch-extensions_shell_browser_shell__extensions__api__client.cc
new file mode 100644
index 0000000000..7cc3eda2ec
--- /dev/null
+++ b/chromium-wip/patches/patch-extensions_shell_browser_shell__extensions__api__client.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- extensions/shell/browser/shell_extensions_api_client.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ extensions/shell/browser/shell_extensions_api_client.cc
+@@ -18,7 +18,7 @@
+ #include "extensions/shell/browser/shell_extension_web_contents_observer.h"
+ #include "extensions/shell/browser/shell_virtual_keyboard_delegate.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "extensions/shell/browser/api/file_system/shell_file_system_delegate.h"
+ #endif
+ 
+@@ -76,7 +76,7 @@ ShellExtensionsAPIClient::CreateDisplayI
+   return std::make_unique<ShellDisplayInfoProvider>();
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ FileSystemDelegate* ShellExtensionsAPIClient::GetFileSystemDelegate() {
+   if (!file_system_delegate_)
+     file_system_delegate_ = std::make_unique<ShellFileSystemDelegate>();
diff --git a/chromium-wip/patches/patch-extensions_shell_browser_shell__extensions__api__client.h b/chromium-wip/patches/patch-extensions_shell_browser_shell__extensions__api__client.h
new file mode 100644
index 0000000000..a10142fbf8
--- /dev/null
+++ b/chromium-wip/patches/patch-extensions_shell_browser_shell__extensions__api__client.h
@@ -0,0 +1,25 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- extensions/shell/browser/shell_extensions_api_client.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ extensions/shell/browser/shell_extensions_api_client.h
+@@ -42,14 +42,14 @@ class ShellExtensionsAPIClient : public 
+       content::BrowserContext* browser_context) const override;
+   std::unique_ptr<DisplayInfoProvider> CreateDisplayInfoProvider()
+       const override;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   FileSystemDelegate* GetFileSystemDelegate() override;
+ #endif
+   MessagingDelegate* GetMessagingDelegate() override;
+   FeedbackPrivateDelegate* GetFeedbackPrivateDelegate() override;
+ 
+  private:
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<FileSystemDelegate> file_system_delegate_;
+ #endif
+   std::unique_ptr<MessagingDelegate> messaging_delegate_;
diff --git a/chromium-wip/patches/patch-google__apis_gcm_engine_heartbeat__manager.cc b/chromium-wip/patches/patch-google__apis_gcm_engine_heartbeat__manager.cc
new file mode 100644
index 0000000000..fefce5c28f
--- /dev/null
+++ b/chromium-wip/patches/patch-google__apis_gcm_engine_heartbeat__manager.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- google_apis/gcm/engine/heartbeat_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ google_apis/gcm/engine/heartbeat_manager.cc
+@@ -31,7 +31,7 @@ const int kMinClientHeartbeatIntervalMs 
+ // Minimum time spent sleeping before we force a new heartbeat.
+ const int kMinSuspendTimeMs = 1000 * 10; // 10 seconds.
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // The period at which to check if the heartbeat time has passed. Used to
+ // protect against platforms where the timer is delayed by the system being
+ // suspended.  Only needed on linux because the other OSes provide a standard
+@@ -190,7 +190,7 @@ void HeartbeatManager::RestartTimer() {
+       base::BindRepeating(&HeartbeatManager::OnHeartbeatTriggered,
+                           weak_ptr_factory_.GetWeakPtr()));
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Windows, Mac, Android, iOS, and Chrome OS all provide a way to be notified
+   // when the system is suspending or resuming.  The only one that does not is
+   // Linux so we need to poll to check for missed heartbeats.
+@@ -213,7 +213,7 @@ void HeartbeatManager::CheckForMissedHea
+     return;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Otherwise check again later.
+   io_task_runner_->PostDelayedTask(
+       FROM_HERE,
diff --git a/chromium-wip/patches/patch-gpu_command__buffer_client_fake__gpu__memory__buffer.cc b/chromium-wip/patches/patch-gpu_command__buffer_client_fake__gpu__memory__buffer.cc
new file mode 100644
index 0000000000..ced9c30a4e
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_command__buffer_client_fake__gpu__memory__buffer.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/command_buffer/client/fake_gpu_memory_buffer.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/command_buffer/client/fake_gpu_memory_buffer.cc
+@@ -14,7 +14,7 @@
+ #include "media/base/format_utils.h"
+ #include "media/base/video_frame.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include <fcntl.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+@@ -29,7 +29,7 @@ namespace gpu {
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ base::ScopedFD GetDummyFD() {
+   base::ScopedFD fd(open("/dev/zero", O_RDWR));
+   DCHECK(fd.is_valid());
+@@ -41,7 +41,7 @@ static base::AtomicSequenceNumber buffer
+ 
+ }  // namespace
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ gfx::GpuMemoryBufferHandle CreatePixmapHandleForTesting(
+     const gfx::Size& size,
+     gfx::BufferFormat format,
diff --git a/chromium-wip/patches/patch-gpu_command__buffer_client_fake__gpu__memory__buffer.h b/chromium-wip/patches/patch-gpu_command__buffer_client_fake__gpu__memory__buffer.h
new file mode 100644
index 0000000000..280c61bc36
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_command__buffer_client_fake__gpu__memory__buffer.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/command_buffer/client/fake_gpu_memory_buffer.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/command_buffer/client/fake_gpu_memory_buffer.h
+@@ -12,7 +12,7 @@
+ 
+ namespace gpu {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // This method is used by tests to create a fake pixmap handle instead of
+ // creating a FakeGpuMemoryBuffer. Once all tests are converted to use it,
+ // FakeGpuMemoryBuffer will be removed and this file will be renamed
diff --git a/chromium-wip/patches/patch-gpu_command__buffer_service_dawn__context__provider.cc b/chromium-wip/patches/patch-gpu_command__buffer_service_dawn__context__provider.cc
new file mode 100644
index 0000000000..b52002a0ae
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_command__buffer_service_dawn__context__provider.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/command_buffer/service/dawn_context_provider.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/command_buffer/service/dawn_context_provider.cc
+@@ -402,7 +402,7 @@ wgpu::BackendType DawnContextProvider::G
+   return base::FeatureList::IsEnabled(features::kSkiaGraphiteDawnUseD3D12)
+              ? wgpu::BackendType::D3D12
+              : wgpu::BackendType::D3D11;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   return wgpu::BackendType::Vulkan;
+ #elif BUILDFLAG(IS_APPLE)
+   return wgpu::BackendType::Metal;
diff --git a/chromium-wip/patches/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc b/chromium-wip/patches/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc
new file mode 100644
index 0000000000..62508711ef
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/command_buffer/service/gles2_cmd_decoder.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/command_buffer/service/gles2_cmd_decoder.cc
+@@ -2863,7 +2863,7 @@ GLES2Decoder* GLES2Decoder::Create(
+   }
+ 
+ // Allow linux to run fuzzers.
+-#if BUILDFLAG(ENABLE_VALIDATING_COMMAND_DECODER) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(ENABLE_VALIDATING_COMMAND_DECODER) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return new GLES2DecoderImpl(client, command_buffer_service, outputter, group);
+ #else
+   LOG(FATAL) << "Validating command decoder is not supported.";
diff --git a/chromium-wip/patches/patch-gpu_command__buffer_service_raster__decoder__unittest__context__lost.cc b/chromium-wip/patches/patch-gpu_command__buffer_service_raster__decoder__unittest__context__lost.cc
new file mode 100644
index 0000000000..f0c70db21d
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_command__buffer_service_raster__decoder__unittest__context__lost.cc
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/command_buffer/service/raster_decoder_unittest_context_lost.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/command_buffer/service/raster_decoder_unittest_context_lost.cc
+@@ -15,6 +15,18 @@ using ::testing::Return;
+ using ::testing::SaveArg;
+ using ::testing::SetArrayArgument;
+ 
++#ifndef GL_CONTEXT_LOST_KHR
++#define GL_CONTEXT_LOST_KHR 0x0507
++#endif
++
++#ifndef GL_GUILTY_CONTEXT_RESET_KHR
++#define GL_GUILTY_CONTEXT_RESET_KHR 0x8253
++#endif
++
++#ifndef GL_INNOCENT_CONTEXT_RESET_KHR
++#define GL_INNOCENT_CONTEXT_RESET_KHR 0x8254
++#endif
++
+ namespace gpu {
+ namespace raster {
+ 
diff --git a/chromium-wip/patches/patch-gpu_command__buffer_service_shared__context__state.cc b/chromium-wip/patches/patch-gpu_command__buffer_service_shared__context__state.cc
new file mode 100644
index 0000000000..a104ed4e6c
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_command__buffer_service_shared__context__state.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/command_buffer/service/shared_context_state.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/command_buffer/service/shared_context_state.cc
+@@ -65,7 +65,7 @@
+ #include "gpu/vulkan/vulkan_implementation.h"
+ #include "gpu/vulkan/vulkan_util.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "gpu/command_buffer/service/external_semaphore_pool.h"
+ #endif
+ 
+@@ -302,7 +302,7 @@ SharedContextState::SharedContextState(
+   if (gr_context_type_ == GrContextType::kVulkan) {
+     if (vk_context_provider_) {
+ #if BUILDFLAG(ENABLE_VULKAN) && \
+-    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN))
++    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD))
+       external_semaphore_pool_ = std::make_unique<ExternalSemaphorePool>(this);
+ #endif
+       use_virtualized_gl_contexts_ = false;
+@@ -339,7 +339,7 @@ SharedContextState::~SharedContextState(
+   }
+ 
+ #if BUILDFLAG(ENABLE_VULKAN) && \
+-    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN))
++    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD))
+   external_semaphore_pool_.reset();
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-gpu_command__buffer_service_shared__context__state.h b/chromium-wip/patches/patch-gpu_command__buffer_service_shared__context__state.h
new file mode 100644
index 0000000000..f3d891a82a
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_command__buffer_service_shared__context__state.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/command_buffer/service/shared_context_state.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/command_buffer/service/shared_context_state.h
+@@ -234,7 +234,7 @@ class GPU_GLES2_EXPORT SharedContextStat
+     return &memory_type_tracker_;
+   }
+ #if BUILDFLAG(ENABLE_VULKAN) && \
+-    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN))
++    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD))
+   ExternalSemaphorePool* external_semaphore_pool() {
+     return external_semaphore_pool_.get();
+   }
+@@ -399,7 +399,7 @@ class GPU_GLES2_EXPORT SharedContextStat
+   bool disable_check_reset_status_throttling_for_test_ = false;
+ 
+ #if BUILDFLAG(ENABLE_VULKAN) && \
+-    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN))
++    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD))
+   std::unique_ptr<ExternalSemaphorePool> external_semaphore_pool_;
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc b/chromium-wip/patches/patch-gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc
new file mode 100644
index 0000000000..6c87a28b26
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/command_buffer/service/shared_image/angle_vulkan_image_backing_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/command_buffer/service/shared_image/angle_vulkan_image_backing_factory.cc
+@@ -20,7 +20,7 @@ namespace {
+ // TODO(penghuang): verify the scanout is the right usage for video playback.
+ // crbug.com/1280798
+ constexpr SharedImageUsageSet kSupportedUsage =
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     SHARED_IMAGE_USAGE_SCANOUT |
+ #endif
+     SHARED_IMAGE_USAGE_GLES2_READ | SHARED_IMAGE_USAGE_GLES2_WRITE |
+@@ -121,7 +121,7 @@ bool AngleVulkanImageBackingFactory::IsG
+   switch (gmb_type) {
+     case gfx::EMPTY_BUFFER:
+       return true;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+     case gfx::NATIVE_PIXMAP: {
+       auto* vulkan_implementation =
+           context_state_->vk_context_provider()->GetVulkanImplementation();
diff --git a/chromium-wip/patches/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing.cc b/chromium-wip/patches/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing.cc
new file mode 100644
index 0000000000..a4432fef78
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/command_buffer/service/shared_image/external_vk_image_backing.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/command_buffer/service/shared_image/external_vk_image_backing.cc
+@@ -57,7 +57,7 @@
+ #include "ui/gl/gl_version_info.h"
+ #include "ui/gl/scoped_binders.h"
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DAWN)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN)
+ #include "gpu/command_buffer/service/shared_image/external_vk_image_dawn_representation.h"
+ #if BUILDFLAG(DAWN_ENABLE_BACKEND_OPENGLES)
+ #include "gpu/command_buffer/service/shared_image/dawn_gl_texture_representation.h"
+@@ -697,7 +697,7 @@ std::unique_ptr<DawnImageRepresentation>
+     wgpu::BackendType backend_type,
+     std::vector<wgpu::TextureFormat> view_formats,
+     scoped_refptr<SharedContextState> context_state) {
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DAWN)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN)
+   auto wgpu_format = ToDawnFormat(format());
+ 
+   if (wgpu_format == wgpu::TextureFormat::Undefined) {
diff --git a/chromium-wip/patches/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc b/chromium-wip/patches/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc
new file mode 100644
index 0000000000..cc35c3edab
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc
+@@ -140,7 +140,7 @@ bool IsFormatSupported(viz::SharedImageF
+ 
+ SharedImageUsageSet SupportedUsage() {
+   SharedImageUsageSet supported_usage =
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DAWN)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN)
+       SHARED_IMAGE_USAGE_WEBGPU_READ | SHARED_IMAGE_USAGE_WEBGPU_WRITE |
+       SHARED_IMAGE_USAGE_WEBGPU_SWAP_CHAIN_TEXTURE |
+       SHARED_IMAGE_USAGE_WEBGPU_STORAGE_TEXTURE |
diff --git a/chromium-wip/patches/patch-gpu_command__buffer_service_shared__image_shared__image__factory.cc b/chromium-wip/patches/patch-gpu_command__buffer_service_shared__image_shared__image__factory.cc
new file mode 100644
index 0000000000..942e64451d
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_command__buffer_service_shared__image_shared__image__factory.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/command_buffer/service/shared_image/shared_image_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/command_buffer/service/shared_image/shared_image_factory.cc
+@@ -51,7 +51,7 @@
+ #include "gpu/command_buffer/service/shared_image/angle_vulkan_image_backing_factory.h"
+ #include "gpu/vulkan/vulkan_device_queue.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.h"
+ #endif
+ 
+@@ -105,7 +105,7 @@ const char* GmbTypeToString(gfx::GpuMemo
+     case gfx::IO_SURFACE_BUFFER:
+       return "platform";
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+     case gfx::NATIVE_PIXMAP:
+       return "platform";
+ #endif
+@@ -126,7 +126,7 @@ gfx::GpuMemoryBufferType GetNativeBuffer
+   return gfx::GpuMemoryBufferType::IO_SURFACE_BUFFER;
+ #elif BUILDFLAG(IS_ANDROID)
+   return gfx::GpuMemoryBufferType::ANDROID_HARDWARE_BUFFER;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   return gfx::GpuMemoryBufferType::NATIVE_PIXMAP;
+ #elif BUILDFLAG(IS_WIN)
+   return gfx::GpuMemoryBufferType::DXGI_SHARED_HANDLE;
+@@ -298,7 +298,7 @@ SharedImageFactory::SharedImageFactory(
+         context_state_, workarounds_);
+     factories_.push_back(std::move(ozone_factory));
+   }
+-#if BUILDFLAG(ENABLE_VULKAN) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA))
++#if BUILDFLAG(ENABLE_VULKAN) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD))
+   if (gr_context_type_ == GrContextType::kVulkan) {
+     auto external_vk_image_factory =
+         std::make_unique<ExternalVkImageBackingFactory>(context_state_);
diff --git a/chromium-wip/patches/patch-gpu_command__buffer_service_shared__image_shared__image__manager.cc b/chromium-wip/patches/patch-gpu_command__buffer_service_shared__image_shared__image__manager.cc
new file mode 100644
index 0000000000..453ed650cc
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_command__buffer_service_shared__image_shared__image__manager.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/command_buffer/service/shared_image/shared_image_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/command_buffer/service/shared_image/shared_image_manager.cc
+@@ -736,7 +736,7 @@ bool SharedImageManager::SupportsScanout
+   return true;
+ #elif BUILDFLAG(IS_ANDROID)
+   return base::AndroidHardwareBufferCompat::IsSupportAvailable();
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   return supports_overlays_on_ozone_;
+ #elif BUILDFLAG(IS_WIN)
+   return gl::DirectCompositionTextureSupported();
diff --git a/chromium-wip/patches/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc b/chromium-wip/patches/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc
new file mode 100644
index 0000000000..488332ab52
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc
+@@ -214,7 +214,7 @@ bool WrappedSkImageBacking::Initialize(c
+ 
+     constexpr GrRenderable is_renderable = GrRenderable::kYes;
+     constexpr GrProtected is_protected = GrProtected::kNo;
+-#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX)
++#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)
+     // Blue for single-planar and magenta-ish for multi-planar.
+     SkColor4f fallback_color =
+         format().is_single_plane() ? SkColors::kBlue : SkColors::kWhite;
diff --git a/chromium-wip/patches/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc b/chromium-wip/patches/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc
new file mode 100644
index 0000000000..08bfb644f6
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/command_buffer/service/webgpu_decoder_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/command_buffer/service/webgpu_decoder_impl.cc
+@@ -1725,7 +1725,7 @@ wgpu::Adapter WebGPUDecoderImpl::CreateP
+       backend_types = {wgpu::BackendType::D3D12};
+ #elif BUILDFLAG(IS_APPLE)
+       backend_types = {wgpu::BackendType::Metal};
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       if (shared_context_state_->GrContextIsVulkan() ||
+           shared_context_state_->IsGraphiteDawnVulkan()) {
+         backend_types = {wgpu::BackendType::Vulkan};
+@@ -1970,7 +1970,7 @@ WebGPUDecoderImpl::AssociateMailboxDawn(
+   }
+ 
+ #if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_APPLE) && \
+-    !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_LINUX)
++    !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)
+   if (usage & wgpu::TextureUsage::StorageBinding) {
+     LOG(ERROR) << "AssociateMailbox: wgpu::TextureUsage::StorageBinding is NOT "
+                   "supported yet on this platform.";
diff --git a/chromium-wip/patches/patch-gpu_command__buffer_tests_gl__gpu__memory__buffer__unittest.cc b/chromium-wip/patches/patch-gpu_command__buffer_tests_gl__gpu__memory__buffer__unittest.cc
new file mode 100644
index 0000000000..1464d0d57c
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_command__buffer_tests_gl__gpu__memory__buffer__unittest.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc
+@@ -29,7 +29,7 @@
+ #include "ui/gfx/half_float.h"
+ #include "ui/gl/test/gl_test_support.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "ui/gfx/linux/client_native_pixmap_factory_dmabuf.h"
+ #endif
+ 
+@@ -71,7 +71,7 @@ class GpuMemoryBufferTest : public testi
+   GLManager gl_;
+ };
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ class GpuMemoryBufferTestEGL : public testing::Test,
+                                public gpu::GpuCommandBufferTestEGL {
+  public:
diff --git a/chromium-wip/patches/patch-gpu_config_gpu__control__list.cc b/chromium-wip/patches/patch-gpu_config_gpu__control__list.cc
new file mode 100644
index 0000000000..70632047d8
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_config_gpu__control__list.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/config/gpu_control_list.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/config/gpu_control_list.cc
+@@ -830,7 +830,7 @@ GpuControlList::OsType GpuControlList::G
+   return kOsAndroid;
+ #elif BUILDFLAG(IS_FUCHSIA)
+   return kOsFuchsia;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return kOsLinux;
+ #elif BUILDFLAG(IS_MAC)
+   return kOsMacosx;
diff --git a/chromium-wip/patches/patch-gpu_config_gpu__finch__features.cc b/chromium-wip/patches/patch-gpu_config_gpu__finch__features.cc
new file mode 100644
index 0000000000..ea57354cbf
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_config_gpu__finch__features.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/config/gpu_finch_features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/config/gpu_finch_features.cc
+@@ -156,7 +156,8 @@ BASE_FEATURE(kAllowHardwareBufferUsageFl
+ BASE_FEATURE(kDefaultEnableGpuRasterization,
+              "DefaultEnableGpuRasterization",
+ #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \
++    BUILDFLAG(IS_BSD)
+              base::FEATURE_ENABLED_BY_DEFAULT
+ #else
+              base::FEATURE_DISABLED_BY_DEFAULT
diff --git a/chromium-wip/patches/patch-gpu_config_gpu__info__collector.cc b/chromium-wip/patches/patch-gpu_config_gpu__info__collector.cc
new file mode 100644
index 0000000000..d2ef90b385
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_config_gpu__info__collector.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/config/gpu_info_collector.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/config/gpu_info_collector.cc
+@@ -363,7 +363,7 @@ void ReportWebGPUAdapterMetrics(dawn::na
+ void ReportWebGPUSupportMetrics(dawn::native::Instance* instance) {
+   static BASE_FEATURE(kCollectWebGPUSupportMetrics,
+                       "CollectWebGPUSupportMetrics",
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+                       base::FEATURE_DISABLED_BY_DEFAULT);
+ #else
+                       base::FEATURE_ENABLED_BY_DEFAULT);
diff --git a/chromium-wip/patches/patch-gpu_config_gpu__test__config.cc b/chromium-wip/patches/patch-gpu_config_gpu__test__config.cc
new file mode 100644
index 0000000000..a68620a470
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_config_gpu__test__config.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/config/gpu_test_config.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/config/gpu_test_config.cc
+@@ -27,7 +27,7 @@ namespace {
+ GPUTestConfig::OS GetCurrentOS() {
+ #if BUILDFLAG(IS_CHROMEOS)
+   return GPUTestConfig::kOsChromeOS;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return GPUTestConfig::kOsLinux;
+ #elif BUILDFLAG(IS_WIN)
+   int32_t major_version = 0;
diff --git a/chromium-wip/patches/patch-gpu_ipc_common_gpu__memory__buffer__support.h b/chromium-wip/patches/patch-gpu_ipc_common_gpu__memory__buffer__support.h
new file mode 100644
index 0000000000..3bb12d4d8f
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_ipc_common_gpu__memory__buffer__support.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/ipc/common/gpu_memory_buffer_support.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/ipc/common/gpu_memory_buffer_support.h
+@@ -22,7 +22,7 @@
+ #include "ui/gfx/geometry/size.h"
+ #include "ui/gfx/gpu_memory_buffer_handle.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_BSD)
+ namespace gfx {
+ class ClientNativePixmapFactory;
+ }  // namespace gfx
diff --git a/chromium-wip/patches/patch-gpu_ipc_service_gpu__init.cc b/chromium-wip/patches/patch-gpu_ipc_service_gpu__init.cc
new file mode 100644
index 0000000000..c317e457c3
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_ipc_service_gpu__init.cc
@@ -0,0 +1,89 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/ipc/service/gpu_init.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/ipc/service/gpu_init.cc
+@@ -155,7 +155,7 @@ void InitializePlatformOverlaySettings(G
+ 
+ #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CASTOS)
+ bool CanAccessDeviceFile(const GPUInfo& gpu_info) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (gpu_info.gpu.vendor_id != 0x10de ||  // NVIDIA
+       gpu_info.gpu.driver_vendor != "NVIDIA")
+     return true;
+@@ -393,7 +393,7 @@ bool GpuInit::InitializeAndStartSandbox(
+   enable_watchdog = false;
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   bool gpu_sandbox_start_early = gpu_preferences_.gpu_sandbox_start_early;
+ #else   // !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
+   // For some reasons MacOSX's VideoToolbox might crash when called after
+@@ -431,7 +431,7 @@ bool GpuInit::InitializeAndStartSandbox(
+   }
+ 
+   bool attempted_startsandbox = false;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // On Chrome OS ARM Mali, GPU driver userspace creates threads when
+   // initializing a GL context, so start the sandbox early.
+   // TODO(zmo): Need to collect OS version before this.
+@@ -528,7 +528,7 @@ bool GpuInit::InitializeAndStartSandbox(
+     gpu_preferences_.gr_context_type = GrContextType::kGL;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // The ContentSandboxHelper is currently the only one implementation of
+   // GpuSandboxHelper and it has no dependency. Except on Linux where
+   // VaapiWrapper checks the GL implementation to determine which display
+@@ -586,7 +586,7 @@ bool GpuInit::InitializeAndStartSandbox(
+           command_line, gpu_feature_info_,
+           gpu_preferences_.disable_software_rasterizer, false);
+       if (gl_use_swiftshader_) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+         VLOG(1) << "Quit GPU process launch to fallback to SwiftShader cleanly "
+                 << "on Linux";
+         return false;
+@@ -754,7 +754,7 @@ bool GpuInit::InitializeAndStartSandbox(
+               ->GetSupportedFormatsForGLNativePixmapImport();
+ #endif  // BUILDFLAG(IS_OZONE)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Driver may create a compatibility profile context when collect graphics
+   // information on Linux platform. Try to collect graphics information
+   // based on core profile context after disabling platform extensions.
+@@ -806,7 +806,7 @@ bool GpuInit::InitializeAndStartSandbox(
+       }
+     }
+   }
+-#if BUILDFLAG(IS_LINUX) || \
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \
+     (BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_CHROMEOS_DEVICE))
+   if (!gl_disabled && !gl_use_swiftshader_ && std::getenv("RUNNING_UNDER_RR")) {
+     // https://rr-project.org/ is a Linux-only record-and-replay debugger that
+@@ -1008,7 +1008,7 @@ void GpuInit::InitializeInProcess(base::
+   }
+   bool gl_disabled = gl::GetGLImplementation() == gl::kGLImplementationDisabled;
+ 
+-#if BUILDFLAG(IS_LINUX) || \
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \
+     (BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_CHROMEOS_DEVICE))
+   if (!gl_disabled && !gl_use_swiftshader_ && std::getenv("RUNNING_UNDER_RR")) {
+     // https://rr-project.org/ is a Linux-only record-and-replay debugger that
+@@ -1064,7 +1064,7 @@ void GpuInit::InitializeInProcess(base::
+     }
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Driver may create a compatibility profile context when collect graphics
+   // information on Linux platform. Try to collect graphics information
+   // based on core profile context after disabling platform extensions.
diff --git a/chromium-wip/patches/patch-gpu_ipc_service_gpu__memory__buffer__factory.cc b/chromium-wip/patches/patch-gpu_ipc_service_gpu__memory__buffer__factory.cc
new file mode 100644
index 0000000000..0a905a36f7
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_ipc_service_gpu__memory__buffer__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/ipc/service/gpu_memory_buffer_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/ipc/service/gpu_memory_buffer_factory.cc
+@@ -14,7 +14,7 @@
+ #include "gpu/ipc/service/gpu_memory_buffer_factory_io_surface.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ #include "gpu/ipc/service/gpu_memory_buffer_factory_native_pixmap.h"
+ #endif
+ 
+@@ -71,7 +71,7 @@ GpuMemoryBufferFactory::CreateNativeType
+   // to have a factory that vends invalid GMB handles rather than having no
+   // factory at all.
+   return std::make_unique<GpuMemoryBufferFactoryStub>();
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   return std::make_unique<GpuMemoryBufferFactoryNativePixmap>(
+       vulkan_context_provider);
+ #elif BUILDFLAG(IS_WIN)
diff --git a/chromium-wip/patches/patch-gpu_ipc_service_x__util.h b/chromium-wip/patches/patch-gpu_ipc_service_x__util.h
new file mode 100644
index 0000000000..314d648769
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_ipc_service_x__util.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/ipc/service/x_util.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/ipc/service/x_util.h
+@@ -12,7 +12,7 @@
+ #include "gpu/ipc/service/gpu_config.h"
+ #include "ui/base/ozone_buildflags.h"
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+ 
+ namespace gpu {
+ 
diff --git a/chromium-wip/patches/patch-gpu_vulkan_generate__bindings.py b/chromium-wip/patches/patch-gpu_vulkan_generate__bindings.py
new file mode 100644
index 0000000000..f00dd8fa05
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_vulkan_generate__bindings.py
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/vulkan/generate_bindings.py.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/vulkan/generate_bindings.py
+@@ -271,7 +271,7 @@ VULKAN_DEVICE_FUNCTIONS = [
+     ]
+   },
+   {
+-    'ifdef': 'BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)',
++    'ifdef': 'BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)',
+     'extension': 'VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME',
+     'functions': [
+       'vkGetImageDrmFormatModifierPropertiesEXT',
diff --git a/chromium-wip/patches/patch-gpu_vulkan_semaphore__handle.cc b/chromium-wip/patches/patch-gpu_vulkan_semaphore__handle.cc
new file mode 100644
index 0000000000..a980fd39c2
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_vulkan_semaphore__handle.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/vulkan/semaphore_handle.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/vulkan/semaphore_handle.cc
+@@ -39,7 +39,7 @@ SemaphoreHandle::SemaphoreHandle(gfx::Gp
+   // https://fuchsia.dev/reference/fidl/fuchsia.ui.scenic.
+   Init(VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA,
+        fence_handle.Release());
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   Init(VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR,
+        fence_handle.Release());
+ #elif BUILDFLAG(IS_POSIX)
+@@ -64,7 +64,7 @@ gfx::GpuFenceHandle SemaphoreHandle::ToG
+   // VkSemaphore, which can then be used to submit present work, see
+   // https://fuchsia.dev/reference/fidl/fuchsia.ui.scenic.
+   fence_handle.Adopt(TakeHandle());
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   if (type_ == VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR) {
+     fence_handle.Adopt(TakeHandle());
+   } else {
diff --git a/chromium-wip/patches/patch-gpu_vulkan_vulkan__device__queue.cc b/chromium-wip/patches/patch-gpu_vulkan_vulkan__device__queue.cc
new file mode 100644
index 0000000000..e5f490d31b
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_vulkan_vulkan__device__queue.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/vulkan/vulkan_device_queue.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/vulkan/vulkan_device_queue.cc
+@@ -145,7 +145,7 @@ bool VulkanDeviceQueue::Initialize(
+ 
+       // In dual-CPU cases, we cannot detect the active GPU correctly on Linux,
+       // so don't select GPU device based on the |gpu_info|.
+-#if !BUILDFLAG(IS_LINUX)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)
+     // If gpu_info is provided, the device should match it.
+     if (gpu_info && (device_properties.vendorID != gpu_info->gpu.vendor_id ||
+                      device_properties.deviceID != gpu_info->gpu.device_id)) {
+@@ -292,7 +292,7 @@ bool VulkanDeviceQueue::Initialize(
+   // Android, Fuchsia, Linux, and CrOS (VaapiVideoDecoder) need YCbCr sampler
+   // support.
+ #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (!physical_device_info.feature_sampler_ycbcr_conversion) {
+     LOG(ERROR) << "samplerYcbcrConversion is not supported.";
+     return false;
diff --git a/chromium-wip/patches/patch-gpu_vulkan_vulkan__device__queue.h b/chromium-wip/patches/patch-gpu_vulkan_vulkan__device__queue.h
new file mode 100644
index 0000000000..af10ec9b58
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_vulkan_vulkan__device__queue.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/vulkan/vulkan_device_queue.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/vulkan/vulkan_device_queue.h
+@@ -188,7 +188,7 @@ class COMPONENT_EXPORT(VULKAN) VulkanDev
+ #endif
+ 
+ #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   VkPhysicalDeviceSamplerYcbcrConversionFeatures
+       sampler_ycbcr_conversion_features_{
+           VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES};
diff --git a/chromium-wip/patches/patch-gpu_vulkan_vulkan__function__pointers.cc b/chromium-wip/patches/patch-gpu_vulkan_vulkan__function__pointers.cc
new file mode 100644
index 0000000000..9b21db013e
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_vulkan_vulkan__function__pointers.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/vulkan/vulkan_function_pointers.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/vulkan/vulkan_function_pointers.cc
+@@ -1297,7 +1297,7 @@ bool VulkanFunctionPointers::BindDeviceF
+     }
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (gfx::HasExtension(enabled_extensions,
+                         VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME)) {
+     constexpr char kvkGetImageDrmFormatModifierPropertiesEXT[] =
+@@ -1498,7 +1498,7 @@ void VulkanFunctionPointers::ResetForTes
+   vkGetSwapchainImagesKHR = nullptr;
+   vkQueuePresentKHR = nullptr;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   vkGetImageDrmFormatModifierPropertiesEXT = nullptr;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ }
diff --git a/chromium-wip/patches/patch-gpu_vulkan_vulkan__function__pointers.h b/chromium-wip/patches/patch-gpu_vulkan_vulkan__function__pointers.h
new file mode 100644
index 0000000000..4250c67fdf
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_vulkan_vulkan__function__pointers.h
@@ -0,0 +1,33 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/vulkan/vulkan_function_pointers.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/vulkan/vulkan_function_pointers.h
+@@ -391,7 +391,7 @@ struct COMPONENT_EXPORT(VULKAN) VulkanFu
+   VulkanFunction<PFN_vkGetSwapchainImagesKHR> vkGetSwapchainImagesKHR;
+   VulkanFunction<PFN_vkQueuePresentKHR> vkQueuePresentKHR;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   VulkanFunction<PFN_vkGetImageDrmFormatModifierPropertiesEXT>
+       vkGetImageDrmFormatModifierPropertiesEXT;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+@@ -1405,7 +1405,7 @@ ALWAYS_INLINE VkResult vkQueuePresentKHR
+                                                              pPresentInfo);
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ ALWAYS_INLINE VkResult vkGetImageDrmFormatModifierPropertiesEXT(
+     VkDevice device,
+     VkImage image,
+@@ -1415,4 +1415,4 @@ ALWAYS_INLINE VkResult vkGetImageDrmForm
+ }
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+-#endif  // GPU_VULKAN_VULKAN_FUNCTION_POINTERS_H_
+\ No newline at end of file
++#endif  // GPU_VULKAN_VULKAN_FUNCTION_POINTERS_H_
diff --git a/chromium-wip/patches/patch-gpu_vulkan_vulkan__image.h b/chromium-wip/patches/patch-gpu_vulkan_vulkan__image.h
new file mode 100644
index 0000000000..467533fd81
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_vulkan_vulkan__image.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/vulkan/vulkan_image.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/vulkan/vulkan_image.h
+@@ -87,7 +87,7 @@ class COMPONENT_EXPORT(VULKAN) VulkanIma
+       VkImageUsageFlags usage,
+       VkImageCreateFlags flags);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   static std::unique_ptr<VulkanImage> CreateWithExternalMemoryAndModifiers(
+       VulkanDeviceQueue* device_queue,
+       const gfx::Size& size,
+@@ -199,7 +199,7 @@ class COMPONENT_EXPORT(VULKAN) VulkanIma
+       VkImageTiling image_tiling,
+       uint32_t queue_family_index);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   bool InitializeWithExternalMemoryAndModifiers(VulkanDeviceQueue* device_queue,
+                                                 const gfx::Size& size,
+                                                 VkFormat format,
diff --git a/chromium-wip/patches/patch-gpu_vulkan_vulkan__util.cc b/chromium-wip/patches/patch-gpu_vulkan_vulkan__util.cc
new file mode 100644
index 0000000000..2bdc0168df
--- /dev/null
+++ b/chromium-wip/patches/patch-gpu_vulkan_vulkan__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- gpu/vulkan/vulkan_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ gpu/vulkan/vulkan_util.cc
+@@ -476,7 +476,7 @@ bool CheckVulkanCompatibilities(
+     }
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) && !defined(OZONE_PLATFORM_IS_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !defined(OZONE_PLATFORM_IS_X11)
+   // Vulkan is only supported with X11 on Linux for now.
+   return false;
+ #else
diff --git a/chromium-wip/patches/patch-headless_BUILD.gn b/chromium-wip/patches/patch-headless_BUILD.gn
new file mode 100644
index 0000000000..dbd6555e83
--- /dev/null
+++ b/chromium-wip/patches/patch-headless_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- headless/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ headless/BUILD.gn
+@@ -478,7 +478,7 @@ component("headless_non_renderer") {
+     }
+   }
+ 
+-  if (!is_fuchsia) {
++  if (!is_fuchsia && !is_bsd) {
+     deps += [
+       "//components/crash/content/browser",
+       "//components/crash/core/app",
diff --git a/chromium-wip/patches/patch-headless_lib_browser_headless__browser__main__parts__posix.cc b/chromium-wip/patches/patch-headless_lib_browser_headless__browser__main__parts__posix.cc
new file mode 100644
index 0000000000..b506ed1e23
--- /dev/null
+++ b/chromium-wip/patches/patch-headless_lib_browser_headless__browser__main__parts__posix.cc
@@ -0,0 +1,45 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- headless/lib/browser/headless_browser_main_parts_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ headless/lib/browser/headless_browser_main_parts_posix.cc
+@@ -26,13 +26,13 @@
+ #include "content/public/browser/browser_thread.h"
+ #include "headless/lib/browser/headless_browser_impl.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "base/command_line.h"
+ #include "components/os_crypt/sync/key_storage_config_linux.h"
+ #include "components/os_crypt/sync/os_crypt.h"
+ #include "headless/public/switches.h"
+ 
+-#if BUILDFLAG(USE_DBUS)
++#if BUILDFLAG(USE_DBUS) && !BUILDFLAG(IS_BSD)
+ #include "device/bluetooth/dbus/bluez_dbus_manager.h"
+ #endif
+ 
+@@ -166,7 +166,7 @@ class BrowserShutdownHandler {
+ 
+ }  // namespace
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ constexpr char kProductName[] = "HeadlessChrome";
+ #endif
+ 
+@@ -174,9 +174,9 @@ void HeadlessBrowserMainParts::PostCreat
+   BrowserShutdownHandler::Install(base::BindOnce(
+       &HeadlessBrowserImpl::ShutdownWithExitCode, browser_->GetWeakPtr()));
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ 
+-#if BUILDFLAG(USE_DBUS)
++#if BUILDFLAG(USE_DBUS) && !BUILDFLAG(IS_BSD)
+   bluez::BluezDBusManager::Initialize(/*system_bus=*/nullptr);
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-headless_lib_browser_headless__content__browser__client.cc b/chromium-wip/patches/patch-headless_lib_browser_headless__content__browser__client.cc
new file mode 100644
index 0000000000..7bc2b02247
--- /dev/null
+++ b/chromium-wip/patches/patch-headless_lib_browser_headless__content__browser__client.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- headless/lib/browser/headless_content_browser_client.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ headless/lib/browser/headless_content_browser_client.cc
+@@ -59,7 +59,7 @@
+ #include "content/public/common/content_descriptors.h"
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+-#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)) && defined(HEADLESS_USE_PREFS)
++#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(HEADLESS_USE_PREFS)
+ #include "components/os_crypt/sync/os_crypt.h"  // nogncheck
+ #include "content/public/browser/network_service_util.h"
+ #endif
+@@ -557,7 +557,7 @@ void HeadlessContentBrowserClient::Handl
+ 
+ void HeadlessContentBrowserClient::SetEncryptionKey(
+     ::network::mojom::NetworkService* network_service) {
+-#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)) && defined(HEADLESS_USE_PREFS)
++#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(HEADLESS_USE_PREFS)
+   // The OSCrypt keys are process bound, so if network service is out of
+   // process, send it the required key if it is available.
+   if (content::IsOutOfProcessNetworkService()
diff --git a/chromium-wip/patches/patch-headless_lib_browser_headless__content__browser__client.h b/chromium-wip/patches/patch-headless_lib_browser_headless__content__browser__client.h
new file mode 100644
index 0000000000..1756387d7a
--- /dev/null
+++ b/chromium-wip/patches/patch-headless_lib_browser_headless__content__browser__client.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- headless/lib/browser/headless_content_browser_client.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ headless/lib/browser/headless_content_browser_client.h
+@@ -48,7 +48,7 @@ class HeadlessContentBrowserClient : pub
+   CreateDevToolsManagerDelegate() override;
+   content::GeneratedCodeCacheSettings GetGeneratedCodeCacheSettings(
+       content::BrowserContext* context) override;
+-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD)
+   void GetAdditionalMappedFilesForChildProcess(
+       const base::CommandLine& command_line,
+       int child_process_id,
diff --git a/chromium-wip/patches/patch-headless_lib_browser_headless__web__contents__impl.cc b/chromium-wip/patches/patch-headless_lib_browser_headless__web__contents__impl.cc
new file mode 100644
index 0000000000..e44bc52bc4
--- /dev/null
+++ b/chromium-wip/patches/patch-headless_lib_browser_headless__web__contents__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- headless/lib/browser/headless_web_contents_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ headless/lib/browser/headless_web_contents_impl.cc
+@@ -70,7 +70,7 @@ BASE_FEATURE(kPrerender2InHeadlessMode,
+ namespace {
+ 
+ void UpdatePrefsFromSystemSettings(blink::RendererPreferences* prefs) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   content::UpdateFontRendererPreferencesFromSystemSettings(prefs);
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-headless_lib_headless__content__main__delegate.cc b/chromium-wip/patches/patch-headless_lib_headless__content__main__delegate.cc
new file mode 100644
index 0000000000..1f1ef94084
--- /dev/null
+++ b/chromium-wip/patches/patch-headless_lib_headless__content__main__delegate.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- headless/lib/headless_content_main_delegate.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ headless/lib/headless_content_main_delegate.cc
+@@ -407,7 +407,7 @@ void HeadlessContentMainDelegate::InitCr
+   if (process_type != ::switches::kZygoteProcess) {
+     g_headless_crash_client.Pointer()->set_crash_dumps_dir(
+         command_line.GetSwitchValuePath(switches::kCrashDumpsDir));
+-#if !BUILDFLAG(IS_WIN)
++#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_BSD)
+     crash_reporter::InitializeCrashpad(process_type.empty(), process_type);
+ #endif  // !BUILDFLAG(IS_WIN)
+     crash_keys::SetSwitchesFromCommandLine(command_line, nullptr);
diff --git a/chromium-wip/patches/patch-ipc_ipc__channel.h b/chromium-wip/patches/patch-ipc_ipc__channel.h
new file mode 100644
index 0000000000..92d5fcdddc
--- /dev/null
+++ b/chromium-wip/patches/patch-ipc_ipc__channel.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ipc/ipc_channel.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ipc/ipc_channel.h
+@@ -218,7 +218,7 @@ class COMPONENT_EXPORT(IPC) Channel : pu
+   static std::string GenerateUniqueRandomChannelID();
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Sandboxed processes live in a PID namespace, so when sending the IPC hello
+   // message from client to server we need to send the PID from the global
+   // PID namespace.
diff --git a/chromium-wip/patches/patch-ipc_ipc__channel__common.cc b/chromium-wip/patches/patch-ipc_ipc__channel__common.cc
new file mode 100644
index 0000000000..0c52b23d76
--- /dev/null
+++ b/chromium-wip/patches/patch-ipc_ipc__channel__common.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ipc/ipc_channel_common.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ipc/ipc_channel_common.cc
+@@ -10,7 +10,7 @@
+ 
+ namespace IPC {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ 
+ namespace {
+ int g_global_pid = 0;
diff --git a/chromium-wip/patches/patch-ipc_ipc__channel__mojo.cc b/chromium-wip/patches/patch-ipc_ipc__channel__mojo.cc
new file mode 100644
index 0000000000..162fb9274a
--- /dev/null
+++ b/chromium-wip/patches/patch-ipc_ipc__channel__mojo.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ipc/ipc_channel_mojo.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ipc/ipc_channel_mojo.cc
+@@ -105,7 +105,7 @@ class ThreadSafeChannelProxy : public mo
+ };
+ 
+ base::ProcessId GetSelfPID() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (int global_pid = Channel::GetGlobalPid())
+     return global_pid;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
diff --git a/chromium-wip/patches/patch-ipc_ipc__message__utils.cc b/chromium-wip/patches/patch-ipc_ipc__message__utils.cc
new file mode 100644
index 0000000000..9464b8b97e
--- /dev/null
+++ b/chromium-wip/patches/patch-ipc_ipc__message__utils.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ipc/ipc_message_utils.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ipc/ipc_message_utils.cc
+@@ -399,7 +399,7 @@ void ParamTraits<unsigned int>::Log(cons
+ }
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_FUCHSIA) ||                                              \
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) ||                         \
+     (BUILDFLAG(IS_ANDROID) && defined(ARCH_CPU_64_BITS))
+ void ParamTraits<long>::Log(const param_type& p, std::string* l) {
+   l->append(base::NumberToString(p));
diff --git a/chromium-wip/patches/patch-ipc_ipc__message__utils.h b/chromium-wip/patches/patch-ipc_ipc__message__utils.h
new file mode 100644
index 0000000000..4ed9dc5d54
--- /dev/null
+++ b/chromium-wip/patches/patch-ipc_ipc__message__utils.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ipc/ipc_message_utils.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ipc/ipc_message_utils.h
+@@ -216,7 +216,7 @@ struct ParamTraits<unsigned int> {
+ // Since we want to support Android 32<>64 bit IPC, as long as we don't have
+ // these traits for 32 bit ARM then that'll catch any errors.
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_FUCHSIA) ||                                              \
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) ||                         \
+     (BUILDFLAG(IS_ANDROID) && defined(ARCH_CPU_64_BITS))
+ template <>
+ struct ParamTraits<long> {
diff --git a/chromium-wip/patches/patch-media_BUILD.gn b/chromium-wip/patches/patch-media_BUILD.gn
new file mode 100644
index 0000000000..bfe3297b33
--- /dev/null
+++ b/chromium-wip/patches/patch-media_BUILD.gn
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/BUILD.gn
+@@ -105,6 +105,12 @@ config("media_config") {
+       defines += [ "DLOPEN_PULSEAUDIO" ]
+     }
+   }
++  if (use_sndio) {
++    defines += [ "USE_SNDIO" ]
++  }
++#  if (use_audioio) {
++#    defines += [ "USE_AUDIOIO" ]
++#  }
+ }
+ 
+ # Internal grouping of the configs necessary to support sub-folders having their
diff --git a/chromium-wip/patches/patch-media_audio_BUILD.gn b/chromium-wip/patches/patch-media_audio_BUILD.gn
new file mode 100644
index 0000000000..c3966bea71
--- /dev/null
+++ b/chromium-wip/patches/patch-media_audio_BUILD.gn
@@ -0,0 +1,45 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/audio/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/audio/BUILD.gn
+@@ -290,10 +290,35 @@ source_set("audio") {
+     deps += [ "//media/base/android:media_jni_headers" ]
+   }
+ 
+-  if (is_linux || is_chromeos) {
++  if ((is_linux || is_chromeos) && !is_bsd) {
+     sources += [ "linux/audio_manager_linux.cc" ]
+   }
+ 
++  if (is_bsd && !use_audioio) {
++    sources += [ "sndio/audio_manager_sndio.cc" ]
++  }
++
++  if (use_sndio) {
++    libs += [ "sndio" ]
++    sources += [
++      "sndio/sndio_input.cc",
++      "sndio/sndio_input.h",
++      "sndio/sndio_output.cc",
++      "sndio/sndio_output.h"
++    ]
++   }
++
++  if (use_audioio) {
++    sources += [
++      "audioio/audio_manager_audioio.cc",
++      "audioio/audio_manager_audioio.h",
++      "audioio/audioio_input.cc",
++      "audioio/audioio_input.h",
++      "audioio/audioio_output.cc",
++      "audioio/audioio_output.h"
++    ]
++   }
++
+   if (use_alsa) {
+     libs += [ "asound" ]
+     sources += [
diff --git a/chromium-wip/patches/patch-media_audio_alsa_audio__manager__alsa.cc b/chromium-wip/patches/patch-media_audio_alsa_audio__manager__alsa.cc
new file mode 100644
index 0000000000..a0b89a9653
--- /dev/null
+++ b/chromium-wip/patches/patch-media_audio_alsa_audio__manager__alsa.cc
@@ -0,0 +1,60 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/audio/alsa/audio_manager_alsa.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/audio/alsa/audio_manager_alsa.cc
+@@ -106,7 +106,9 @@ void AudioManagerAlsa::GetAlsaAudioDevic
+   int card = -1;
+ 
+   // Loop through the physical sound cards to get ALSA device hints.
++#if !BUILDFLAG(IS_BSD) 
+   while (!wrapper_->CardNext(&card) && card >= 0) {
++#endif
+     void** hints = nullptr;
+     int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints);
+     if (!error) {
+@@ -118,7 +120,9 @@ void AudioManagerAlsa::GetAlsaAudioDevic
+       DLOG(WARNING) << "GetAlsaAudioDevices: unable to get device hints: "
+                     << wrapper_->StrError(error);
+     }
++#if !BUILDFLAG(IS_BSD) 
+   }
++#endif
+ }
+ 
+ void AudioManagerAlsa::GetAlsaDevicesInfo(AudioManagerAlsa::StreamType type,
+@@ -202,7 +206,11 @@ bool AudioManagerAlsa::IsAlsaDeviceAvail
+   // goes through software conversion if needed (e.g. incompatible
+   // sample rate).
+   // TODO(joi): Should we prefer "hw" instead?
++#if BUILDFLAG(IS_BSD)
++  static const char kDeviceTypeDesired[] = "plug";
++#else
+   static const char kDeviceTypeDesired[] = "plughw";
++#endif
+   return strncmp(kDeviceTypeDesired, device_name,
+                  std::size(kDeviceTypeDesired) - 1) == 0;
+ }
+@@ -254,7 +262,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDe
+   // Loop through the sound cards.
+   // Don't use snd_device_name_hint(-1,..) since there is an access violation
+   // inside this ALSA API with libasound.so.2.0.0.
++#if !BUILDFLAG(IS_BSD)
+   while (!wrapper_->CardNext(&card) && (card >= 0) && !has_device) {
++#endif
+     int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints);
+     if (!error) {
+       for (void** hint_iter = hints; *hint_iter != nullptr; hint_iter++) {
+@@ -279,7 +289,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDe
+       DLOG(WARNING) << "HasAnyAudioDevice: unable to get device hints: "
+                     << wrapper_->StrError(error);
+     }
++#if !BUILDFLAG(IS_BSD)
+   }
++#endif
+ 
+   return has_device;
+ }
diff --git a/chromium-wip/patches/patch-media_audio_audio__input__device.cc b/chromium-wip/patches/patch-media_audio_audio__input__device.cc
new file mode 100644
index 0000000000..63749393d0
--- /dev/null
+++ b/chromium-wip/patches/patch-media_audio_audio__input__device.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/audio/audio_input_device.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/audio/audio_input_device.cc
+@@ -275,7 +275,7 @@ void AudioInputDevice::OnStreamCreated(
+ // here. See comments in AliveChecker and PowerObserverHelper for details and
+ // todos.
+   if (detect_dead_stream_ == DeadStreamDetection::kEnabled) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     const bool stop_at_first_alive_notification = true;
+     const bool pause_check_during_suspend = false;
+ #else
diff --git a/chromium-wip/patches/patch-media_audio_audio__output__proxy__unittest.cc b/chromium-wip/patches/patch-media_audio_audio__output__proxy__unittest.cc
new file mode 100644
index 0000000000..125bf02d92
--- /dev/null
+++ b/chromium-wip/patches/patch-media_audio_audio__output__proxy__unittest.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/audio/audio_output_proxy_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/audio/audio_output_proxy_unittest.cc
+@@ -443,7 +443,11 @@ class AudioOutputProxyTest : public test
+     // |stream| is closed at this point. Start() should reopen it again.
+     EXPECT_CALL(manager(), MakeAudioOutputStream(_, _, _))
+         .Times(2)
++#if BUILDFLAG(IS_BSD)
++        .WillRepeatedly(Return(static_cast<AudioOutputStream*>(NULL)));
++#else
+         .WillRepeatedly(Return(reinterpret_cast<AudioOutputStream*>(NULL)));
++#endif
+ 
+     EXPECT_CALL(callback_, OnError(_)).Times(2);
+ 
diff --git a/chromium-wip/patches/patch-media_audio_pulse_pulse__util.cc b/chromium-wip/patches/patch-media_audio_pulse_pulse__util.cc
new file mode 100644
index 0000000000..d8a6dfece7
--- /dev/null
+++ b/chromium-wip/patches/patch-media_audio_pulse_pulse__util.cc
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/audio/pulse/pulse_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/audio/pulse/pulse_util.cc
+@@ -50,8 +50,12 @@ constexpr char kBrowserDisplayName[] = "
+ 
+ #if defined(DLOPEN_PULSEAUDIO)
+ static const base::FilePath::CharType kPulseLib[] =
++#if BUILDFLAG(IS_BSD)
++    FILE_PATH_LITERAL("libpulse.so");
++#else
+     FILE_PATH_LITERAL("libpulse.so.0");
+ #endif
++#endif
+ 
+ void DestroyMainloop(pa_threaded_mainloop* mainloop) {
+   pa_threaded_mainloop_stop(mainloop);
diff --git a/chromium-wip/patches/patch-media_audio_sndio_audio__manager__sndio.cc b/chromium-wip/patches/patch-media_audio_sndio_audio__manager__sndio.cc
new file mode 100644
index 0000000000..672af45978
--- /dev/null
+++ b/chromium-wip/patches/patch-media_audio_sndio_audio__manager__sndio.cc
@@ -0,0 +1,222 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/audio/sndio/audio_manager_sndio.cc.orig	2025-08-12 17:48:59.490173384 +0000
++++ media/audio/sndio/audio_manager_sndio.cc
+@@ -0,0 +1,213 @@
++// Copyright (c) 2012 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.
++
++#include "base/command_line.h"
++#include "base/metrics/histogram_macros.h"
++#include "base/memory/ptr_util.h"
++
++#include "media/audio/sndio/audio_manager_sndio.h"
++
++#include "media/audio/audio_device_description.h"
++#include "media/audio/audio_output_dispatcher.h"
++#if defined(USE_SNDIO)
++#include "media/audio/sndio/sndio_input.h"
++#include "media/audio/sndio/sndio_output.h"
++#endif
++#if defined(USE_PULSEAUDIO)
++#include "media/audio/pulse/audio_manager_pulse.h"
++#include "media/audio/pulse/pulse_util.h"
++#endif
++#if defined(USE_ALSA)
++#include "media/audio/alsa/audio_manager_alsa.h"
++#endif
++#include "media/audio/fake_audio_manager.h"
++#include "media/base/limits.h"
++#include "media/base/media_switches.h"
++
++namespace media {
++
++#if defined(USE_SNDIO)
++// Maximum number of output streams that can be open simultaneously.
++static const int kMaxOutputStreams = 50;
++
++// Default sample rate for input and output streams.
++static const int kDefaultSampleRate = 48000;
++
++void AddDefaultDevice(AudioDeviceNames* device_names) {
++  DCHECK(device_names->empty());
++  device_names->push_front(AudioDeviceName::CreateDefault());
++}
++
++bool AudioManagerSndio::HasAudioOutputDevices() {
++  return true;
++}
++
++bool AudioManagerSndio::HasAudioInputDevices() {
++  return true;
++}
++
++void AudioManagerSndio::GetAudioInputDeviceNames(
++    AudioDeviceNames* device_names) {
++  DCHECK(device_names->empty());
++  AddDefaultDevice(device_names);
++}
++
++void AudioManagerSndio::GetAudioOutputDeviceNames(
++    AudioDeviceNames* device_names) {
++  AddDefaultDevice(device_names);
++}
++
++#if defined(USE_SNDIO)
++const std::string_view AudioManagerSndio::GetName() {
++  return "SNDIO";
++}
++#endif
++
++AudioParameters AudioManagerSndio::GetInputStreamParameters(
++    const std::string& device_id) {
++  static const int kDefaultInputBufferSize = 1024;
++
++  int user_buffer_size = GetUserBufferSize();
++  int buffer_size = user_buffer_size ?
++      user_buffer_size : kDefaultInputBufferSize;
++
++  return AudioParameters(
++      AudioParameters::AUDIO_PCM_LOW_LATENCY, ChannelLayoutConfig::Stereo(),
++      kDefaultSampleRate, buffer_size);
++}
++
++AudioManagerSndio::AudioManagerSndio(std::unique_ptr<AudioThread> audio_thread,
++                                         AudioLogFactory* audio_log_factory)
++    : AudioManagerBase(std::move(audio_thread),
++                       audio_log_factory) {
++  DLOG(WARNING) << "AudioManagerSndio";
++  SetMaxOutputStreamsAllowed(kMaxOutputStreams);
++}
++
++AudioManagerSndio::~AudioManagerSndio() = default;
++
++AudioOutputStream* AudioManagerSndio::MakeLinearOutputStream(
++    const AudioParameters& params,
++    const LogCallback& log_callback) {
++  DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format());
++  return MakeOutputStream(params);
++}
++
++AudioOutputStream* AudioManagerSndio::MakeLowLatencyOutputStream(
++    const AudioParameters& params,
++    const std::string& device_id,
++    const LogCallback& log_callback) {
++  DLOG_IF(ERROR, !device_id.empty()) << "Not implemented!";
++  DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format());
++  return MakeOutputStream(params);
++}
++
++AudioInputStream* AudioManagerSndio::MakeLinearInputStream(
++    const AudioParameters& params,
++    const std::string& device_id,
++    const LogCallback& log_callback) {
++  DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format());
++  return MakeInputStream(params);
++}
++
++AudioInputStream* AudioManagerSndio::MakeLowLatencyInputStream(
++    const AudioParameters& params,
++    const std::string& device_id,
++    const LogCallback& log_callback) {
++  DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format());
++  return MakeInputStream(params);
++}
++
++AudioParameters AudioManagerSndio::GetPreferredOutputStreamParameters(
++    const std::string& output_device_id,
++    const AudioParameters& input_params) {
++  // TODO(tommi): Support |output_device_id|.
++  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 buffer_size = kDefaultOutputBufferSize;
++  if (input_params.IsValid()) {
++    sample_rate = input_params.sample_rate();
++    channel_layout_config = input_params.channel_layout_config();
++    buffer_size = std::min(buffer_size, input_params.frames_per_buffer());
++  }
++
++  int user_buffer_size = GetUserBufferSize();
++  if (user_buffer_size)
++    buffer_size = user_buffer_size;
++
++  return AudioParameters(
++      AudioParameters::AUDIO_PCM_LOW_LATENCY,
++      channel_layout_config, sample_rate, buffer_size);
++}
++
++AudioInputStream* AudioManagerSndio::MakeInputStream(
++    const AudioParameters& params) {
++  DLOG(WARNING) << "MakeInputStream";
++  return new SndioAudioInputStream(this,
++             AudioDeviceDescription::kDefaultDeviceId, params);
++}
++
++AudioOutputStream* AudioManagerSndio::MakeOutputStream(
++    const AudioParameters& params) {
++  DLOG(WARNING) << "MakeOutputStream";
++  return new SndioAudioOutputStream(params, this);
++}
++#endif
++
++std::unique_ptr<media::AudioManager> CreateAudioManager(
++    std::unique_ptr<AudioThread> audio_thread,
++    AudioLogFactory* audio_log_factory) {
++  DLOG(WARNING) << "CreateAudioManager";
++
++  auto _ab = kAudioBackendParam.Get();
++
++  // For testing allow audio output to be disabled.
++  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
++          switches::kDisableAudioOutput) ||
++	  !base::FeatureList::IsEnabled(media::kAudioBackend)) {
++    return std::make_unique<FakeAudioManager>(std::move(audio_thread),
++                                              audio_log_factory);
++  }
++
++#if defined(USE_PULSEAUDIO)
++  pa_threaded_mainloop* pa_mainloop = nullptr;
++  pa_context* pa_context = nullptr;
++  if (_ab != AudioBackend::kSndio && _ab != AudioBackend::kAlsa &&
++          pulse::InitPulse(&pa_mainloop, &pa_context)) {
++    return std::make_unique<AudioManagerPulse>(
++        std::move(audio_thread), audio_log_factory, pa_mainloop, pa_context);
++  } else if (_ab == AudioBackend::kAuto) {
++    LOG(WARNING) << "Falling back to SNDIO for audio output. PulseAudio is not "
++                    "available or could not be initialized.";
++  }
++#endif
++
++#if defined(USE_SNDIO)
++  if (_ab != AudioBackend::kPulseAudio && _ab != AudioBackend::kAlsa) {
++    return std::make_unique<AudioManagerSndio>(std::move(audio_thread),
++                                              audio_log_factory);
++  } else if (_ab == AudioBackend::kAuto) {
++    LOG(WARNING) << "Falling back to ALSA audio output. SNDIO is not "
++                    "available or could not be initialized.";
++  }
++#endif
++
++#if defined(USE_ALSA)
++  if (_ab != AudioBackend::kPulseAudio && _ab != AudioBackend::kSndio) {
++    return std::make_unique<AudioManagerAlsa>(std::move(audio_thread),
++                                              audio_log_factory);
++  } else if (_ab == AudioBackend::kAuto) {
++    LOG(WARNING) << "Falling back to fake audio output. ALSA is not "
++                    "available or could not be initialized.";
++  }
++#endif
++
++  return std::make_unique<FakeAudioManager>(std::move(audio_thread),
++                                            audio_log_factory);
++}
++
++}  // namespace media
diff --git a/chromium-wip/patches/patch-media_audio_sndio_audio__manager__sndio.h b/chromium-wip/patches/patch-media_audio_sndio_audio__manager__sndio.h
new file mode 100644
index 0000000000..8e088e21bf
--- /dev/null
+++ b/chromium-wip/patches/patch-media_audio_sndio_audio__manager__sndio.h
@@ -0,0 +1,75 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/audio/sndio/audio_manager_sndio.h.orig	2025-08-12 17:48:59.490319447 +0000
++++ media/audio/sndio/audio_manager_sndio.h
+@@ -0,0 +1,66 @@
++// Copyright (c) 2012 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.
++
++#ifndef MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_
++#define MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_
++
++#include <set>
++
++#include "base/compiler_specific.h"
++#include "base/memory/ref_counted.h"
++#include "base/threading/thread.h"
++#include "media/audio/audio_manager_base.h"
++
++namespace media {
++
++class MEDIA_EXPORT AudioManagerSndio : public AudioManagerBase {
++ public:
++  AudioManagerSndio(std::unique_ptr<AudioThread> audio_thread,
++                   AudioLogFactory* audio_log_factory);
++
++  AudioManagerSndio(const AudioManagerSndio&) = delete;
++  AudioManagerSndio& operator=(const AudioManagerSndio&) = delete;
++
++  ~AudioManagerSndio() override;
++
++  // Implementation of AudioManager.
++  bool HasAudioOutputDevices() override;
++  bool HasAudioInputDevices() override;
++  void GetAudioInputDeviceNames(AudioDeviceNames* device_names) override;
++  void GetAudioOutputDeviceNames(AudioDeviceNames* device_names) override;
++  AudioParameters GetInputStreamParameters(
++      const std::string& device_id) override;
++  const std::string_view GetName() override;
++
++  // Implementation of AudioManagerBase.
++  AudioOutputStream* MakeLinearOutputStream(
++      const AudioParameters& params,
++      const LogCallback& log_callback) override;
++  AudioOutputStream* MakeLowLatencyOutputStream(
++      const AudioParameters& params,
++      const std::string& device_id,
++      const LogCallback& log_callback) override;
++  AudioInputStream* MakeLinearInputStream(
++      const AudioParameters& params,
++      const std::string& device_id,
++      const LogCallback& log_callback) override;
++  AudioInputStream* MakeLowLatencyInputStream(
++      const AudioParameters& params,
++      const std::string& device_id,
++      const LogCallback& log_callback) override;
++
++ protected:
++  AudioParameters GetPreferredOutputStreamParameters(
++      const std::string& output_device_id,
++      const AudioParameters& input_params) override;
++
++ private:
++  // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream.
++  AudioOutputStream* MakeOutputStream(const AudioParameters& params);
++  AudioInputStream* MakeInputStream(const AudioParameters& params);
++};
++
++}  // namespace media
++
++#endif  // MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_
diff --git a/chromium-wip/patches/patch-media_audio_sndio_sndio__input.cc b/chromium-wip/patches/patch-media_audio_sndio_sndio__input.cc
new file mode 100644
index 0000000000..827226196a
--- /dev/null
+++ b/chromium-wip/patches/patch-media_audio_sndio_sndio__input.cc
@@ -0,0 +1,209 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/audio/sndio/sndio_input.cc.orig	2025-08-12 17:48:59.490451182 +0000
++++ media/audio/sndio/sndio_input.cc
+@@ -0,0 +1,200 @@
++// Copyright 2013 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.
++
++#include "base/logging.h"
++#include "media/base/audio_timestamp_helper.h"
++#include "media/audio/sndio/audio_manager_sndio.h"
++#include "media/audio/audio_manager.h"
++#include "media/audio/sndio/sndio_input.h"
++
++namespace media {
++
++static const SampleFormat kSampleFormat = kSampleFormatS16;
++
++void SndioAudioInputStream::OnMoveCallback(void *arg, int delta)
++{
++  SndioAudioInputStream* self = static_cast<SndioAudioInputStream*>(arg);
++
++  self->hw_delay += delta;
++}
++
++void *SndioAudioInputStream::ThreadEntry(void *arg) {
++  SndioAudioInputStream* self = static_cast<SndioAudioInputStream*>(arg);
++
++  self->ThreadLoop();
++  return NULL;
++}
++
++SndioAudioInputStream::SndioAudioInputStream(AudioManagerBase* manager,
++                                             const std::string& device_name,
++                                             const AudioParameters& params)
++    : manager(manager),
++      params(params),
++      audio_bus(AudioBus::Create(params)),
++      state(kClosed) {
++}
++
++SndioAudioInputStream::~SndioAudioInputStream() {
++  if (state != kClosed)
++    Close();
++}
++
++AudioInputStream::OpenOutcome SndioAudioInputStream::Open() {
++  struct sio_par par;
++  int sig;
++
++  if (state != kClosed)
++    return OpenOutcome::kFailed;
++
++  if (params.format() != AudioParameters::AUDIO_PCM_LINEAR &&
++      params.format() != AudioParameters::AUDIO_PCM_LOW_LATENCY) {
++    LOG(WARNING) << "Unsupported audio format.";
++    return OpenOutcome::kFailed;
++  }
++
++  sio_initpar(&par);
++  par.rate = params.sample_rate();
++  par.rchan = params.channels();
++  par.bits = SampleFormatToBitsPerChannel(kSampleFormat);
++  par.bps = par.bits / 8;
++  par.sig = sig = par.bits != 8 ? 1 : 0;
++  par.le = SIO_LE_NATIVE;
++  par.appbufsz = params.frames_per_buffer();
++
++  hdl = sio_open(SIO_DEVANY, SIO_REC, 0);
++
++  if (hdl == NULL) {
++    LOG(ERROR) << "Couldn't open audio device.";
++    return OpenOutcome::kFailed;
++  }
++
++  if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) {
++    LOG(ERROR) << "Couldn't set audio parameters.";
++    goto bad_close;
++  }
++
++  if (par.rate  != (unsigned int)params.sample_rate() ||
++      par.rchan != (unsigned int)params.channels() ||
++      par.bits  != (unsigned int)SampleFormatToBitsPerChannel(kSampleFormat) ||
++      par.sig   != (unsigned int)sig ||
++      (par.bps > 1 && par.le != SIO_LE_NATIVE) ||
++      (par.bits != par.bps * 8)) {
++    LOG(ERROR) << "Unsupported audio parameters.";
++    goto bad_close;
++  }
++  state = kStopped;
++  buffer = new char[audio_bus->frames() * params.GetBytesPerFrame(kSampleFormat)];
++  sio_onmove(hdl, &OnMoveCallback, this);
++  return OpenOutcome::kSuccess;
++bad_close:
++  sio_close(hdl);
++  return OpenOutcome::kFailed;
++}
++
++void SndioAudioInputStream::Start(AudioInputCallback* cb) {
++
++  StartAgc();
++
++  state = kRunning;
++  hw_delay = 0;
++  callback = cb;
++  sio_start(hdl);
++  if (pthread_create(&thread, NULL, &ThreadEntry, this) != 0) {
++    LOG(ERROR) << "Failed to create real-time thread for recording.";
++    sio_stop(hdl);
++    state = kStopped;
++  }
++}
++
++void SndioAudioInputStream::Stop() {
++
++  if (state == kStopped)
++    return;
++
++  state = kStopWait;
++  pthread_join(thread, NULL);
++  sio_stop(hdl);
++  state = kStopped;
++
++  StopAgc();
++}
++
++void SndioAudioInputStream::Close() {
++
++  if (state == kClosed)
++    goto release;
++
++  if (state == kRunning)
++    Stop();
++
++  state = kClosed;
++  delete [] buffer;
++  sio_close(hdl);
++
++release:
++  manager->ReleaseInputStream(this);
++}
++
++double SndioAudioInputStream::GetMaxVolume() {
++  // Not supported
++  return 0.0;
++}
++
++void SndioAudioInputStream::SetVolume(double volume) {
++  // Not supported. Do nothing.
++}
++
++double SndioAudioInputStream::GetVolume() {
++  // Not supported.
++  return 0.0;
++}
++
++bool SndioAudioInputStream::IsMuted() {
++  // Not supported.
++  return false;
++}
++
++void SndioAudioInputStream::SetOutputDeviceForAec(
++    const std::string& output_device_id) {
++  // Not supported.
++}
++
++void SndioAudioInputStream::ThreadLoop(void) {
++  size_t todo, n;
++  char *data;
++  unsigned int nframes;
++  double normalized_volume = 0.0;
++
++  nframes = audio_bus->frames();
++
++  while (state == kRunning && !sio_eof(hdl)) {
++
++    GetAgcVolume(&normalized_volume);
++
++    // read one block
++    todo = nframes * params.GetBytesPerFrame(kSampleFormat);
++    data = buffer;
++    while (todo > 0) {
++      n = sio_read(hdl, data, todo);
++      if (n == 0)
++        return;	// unrecoverable I/O error
++      todo -= n;
++      data += n;
++    }
++    hw_delay -= nframes;
++
++    // convert frames count to TimeDelta
++    const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay,
++      params.sample_rate());
++
++    // push into bus
++    audio_bus->FromInterleaved<SignedInt16SampleTypeTraits>(reinterpret_cast<int16_t*>(buffer), nframes);
++
++
++    // invoke callback
++    callback->OnData(audio_bus.get(), base::TimeTicks::Now() - delay, 1., {});
++  }
++}
++
++}  // namespace media
diff --git a/chromium-wip/patches/patch-media_audio_sndio_sndio__input.h b/chromium-wip/patches/patch-media_audio_sndio_sndio__input.h
new file mode 100644
index 0000000000..3ee581873f
--- /dev/null
+++ b/chromium-wip/patches/patch-media_audio_sndio_sndio__input.h
@@ -0,0 +1,100 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/audio/sndio/sndio_input.h.orig	2025-08-12 17:48:59.490591514 +0000
++++ media/audio/sndio/sndio_input.h
+@@ -0,0 +1,91 @@
++// Copyright 2013 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.
++
++#ifndef MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
++#define MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
++
++#include <stdint.h>
++#include <string>
++#include <sndio.h>
++
++#include "base/compiler_specific.h"
++#include "base/memory/weak_ptr.h"
++#include "base/time/time.h"
++#include "media/audio/agc_audio_stream.h"
++#include "media/audio/audio_io.h"
++#include "media/audio/audio_device_description.h"
++#include "media/base/audio_parameters.h"
++
++namespace media {
++
++class AudioManagerBase;
++
++// Implementation of AudioOutputStream using sndio(7)
++class SndioAudioInputStream : public AgcAudioStream<AudioInputStream> {
++ public:
++  // Pass this to the constructor if you want to attempt auto-selection
++  // of the audio recording device.
++  static const char kAutoSelectDevice[];
++
++  // Create a PCM Output stream for the SNDIO device identified by
++  // |device_name|. If unsure of what to use for |device_name|, use
++  // |kAutoSelectDevice|.
++  SndioAudioInputStream(AudioManagerBase* audio_manager,
++                     const std::string& device_name,
++                     const AudioParameters& params);
++
++  SndioAudioInputStream(const SndioAudioInputStream&) = delete;
++  SndioAudioInputStream& operator=(const SndioAudioInputStream&) = delete;
++
++  ~SndioAudioInputStream() override;
++
++  // Implementation of AudioInputStream.
++  OpenOutcome Open() override;
++  void Start(AudioInputCallback* callback) override;
++  void Stop() override;
++  void Close() override;
++  double GetMaxVolume() override;
++  void SetVolume(double volume) override;
++  double GetVolume() override;
++  bool IsMuted() override;
++  void SetOutputDeviceForAec(const std::string& output_device_id) override;
++
++ private:
++
++  enum StreamState {
++    kClosed,            // Not opened yet
++    kStopped,           // Device opened, but not started yet
++    kRunning,           // Started, device playing
++    kStopWait           // Stopping, waiting for the real-time thread to exit
++  };
++
++  // C-style call-backs
++  static void OnMoveCallback(void *arg, int delta);
++  static void* ThreadEntry(void *arg);
++
++  // Continuously moves data from the device to the consumer
++  void ThreadLoop();
++  // Our creator, the audio manager needs to be notified when we close.
++  AudioManagerBase* manager;
++  // Parameters of the source
++  AudioParameters params;
++  // We store data here for consumer
++  std::unique_ptr<AudioBus> audio_bus;
++  // Call-back that consumes recorded data
++  AudioInputCallback* callback;  // Valid during a recording session.
++  // Handle of the audio device
++  struct sio_hdl* hdl;
++  // Current state of the stream
++  enum StreamState state;
++  // High priority thread running ThreadLoop()
++  pthread_t thread;
++  // Number of frames buffered in the hardware
++  int hw_delay;
++  // Temporary buffer where data is stored sndio-compatible format
++  char* buffer;
++};
++
++}  // namespace media
++
++#endif  // MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
diff --git a/chromium-wip/patches/patch-media_audio_sndio_sndio__output.cc b/chromium-wip/patches/patch-media_audio_sndio_sndio__output.cc
new file mode 100644
index 0000000000..cf54f7cb78
--- /dev/null
+++ b/chromium-wip/patches/patch-media_audio_sndio_sndio__output.cc
@@ -0,0 +1,196 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/audio/sndio/sndio_output.cc.orig	2025-08-12 17:48:59.490722548 +0000
++++ media/audio/sndio/sndio_output.cc
+@@ -0,0 +1,187 @@
++// Copyright (c) 2012 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.
++
++#include "base/logging.h"
++#include "base/time/time.h"
++#include "base/time/default_tick_clock.h"
++#include "media/audio/audio_manager_base.h"
++#include "media/base/audio_timestamp_helper.h"
++#include "media/audio/sndio/sndio_output.h"
++
++namespace media {
++
++static const SampleFormat kSampleFormat = kSampleFormatS16;
++
++void SndioAudioOutputStream::OnMoveCallback(void *arg, int delta) {
++  SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
++
++  self->hw_delay -= delta;
++}
++
++void SndioAudioOutputStream::OnVolCallback(void *arg, unsigned int vol) {
++  SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
++
++  self->vol = vol;
++}
++
++void *SndioAudioOutputStream::ThreadEntry(void *arg) {
++  SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
++
++  self->ThreadLoop();
++  return NULL;
++}
++
++SndioAudioOutputStream::SndioAudioOutputStream(const AudioParameters& params,
++                                               AudioManagerBase* manager)
++    : manager(manager),
++      params(params),
++      audio_bus(AudioBus::Create(params)),
++      state(kClosed),
++      mutex(PTHREAD_MUTEX_INITIALIZER) {
++}
++
++SndioAudioOutputStream::~SndioAudioOutputStream() {
++  if (state != kClosed)
++    Close();
++}
++
++bool SndioAudioOutputStream::Open() {
++  if (params.format() != AudioParameters::AUDIO_PCM_LINEAR &&
++      params.format() != AudioParameters::AUDIO_PCM_LOW_LATENCY) {
++    LOG(WARNING) << "Unsupported audio format.";
++    return false;
++  }
++  state = kStopped;
++  volpending = 0;
++  vol = SIO_MAXVOL;
++  buffer = new char[audio_bus->frames() * params.GetBytesPerFrame(kSampleFormat)];
++  return true;
++}
++
++void SndioAudioOutputStream::Close() {
++  if (state == kClosed)
++    goto release;
++  if (state == kRunning)
++    Stop();
++  state = kClosed;
++  delete [] buffer;
++release:
++  manager->ReleaseOutputStream(this);  // Calls the destructor
++}
++
++void SndioAudioOutputStream::Start(AudioSourceCallback* callback) {
++  struct sio_par par;
++  int sig;
++
++  sio_initpar(&par);
++  par.rate = params.sample_rate();
++  par.pchan = params.channels();
++  par.bits = SampleFormatToBitsPerChannel(kSampleFormat);
++  par.bps = par.bits / 8;
++  par.sig = sig = par.bits != 8 ? 1 : 0;
++  par.le = SIO_LE_NATIVE;
++  par.appbufsz = params.frames_per_buffer();
++
++  hdl = sio_open(SIO_DEVANY, SIO_PLAY, 0);
++  if (hdl == NULL) {
++    LOG(ERROR) << "Couldn't open audio device.";
++    return;
++  }
++  if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) {
++    LOG(ERROR) << "Couldn't set audio parameters.";
++    sio_close(hdl);
++    return;
++  }
++  if (par.rate  != (unsigned int)params.sample_rate() ||
++      par.pchan != (unsigned int)params.channels() ||
++      par.bits  != (unsigned int)SampleFormatToBitsPerChannel(kSampleFormat) ||
++      par.sig   != (unsigned int)sig ||
++      (par.bps > 1 && par.le != SIO_LE_NATIVE) ||
++      (par.bits != par.bps * 8)) {
++    LOG(ERROR) << "Unsupported audio parameters.";
++    sio_close(hdl);
++    return;
++  }
++
++  sio_onmove(hdl, &OnMoveCallback, this);
++  sio_onvol(hdl, &OnVolCallback, this);
++
++  state = kRunning;
++  hw_delay = 0;
++  source = callback;
++  sio_start(hdl);
++
++  if (pthread_create(&thread, NULL, &ThreadEntry, this) != 0) {
++    LOG(ERROR) << "Failed to create real-time thread.";
++    sio_stop(hdl);
++    sio_close(hdl);
++    state = kStopped;
++  }
++}
++
++void SndioAudioOutputStream::Stop() {
++  if (state == kStopped)
++    return;
++  state = kStopWait;
++  pthread_join(thread, NULL);
++  sio_stop(hdl);
++  sio_close(hdl);
++  state = kStopped;
++}
++
++void SndioAudioOutputStream::SetVolume(double v) {
++  pthread_mutex_lock(&mutex);
++  vol = v * SIO_MAXVOL;
++  volpending = 1;
++  pthread_mutex_unlock(&mutex);
++}
++
++void SndioAudioOutputStream::GetVolume(double* v) {
++  pthread_mutex_lock(&mutex);
++  *v = vol * (1. / SIO_MAXVOL);
++  pthread_mutex_unlock(&mutex);
++}
++
++// This stream is always used with sub second buffer sizes, where it's
++// sufficient to simply always flush upon Start().
++void SndioAudioOutputStream::Flush() {}
++
++void SndioAudioOutputStream::ThreadLoop(void) {
++  int avail, count, result;
++
++  while (state == kRunning) {
++    // Update volume if needed
++    pthread_mutex_lock(&mutex);
++    if (volpending) {
++      volpending = 0;
++      sio_setvol(hdl, vol);
++    }
++    pthread_mutex_unlock(&mutex);
++
++    // Get data to play
++    const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay,
++	params.sample_rate());
++    count = source->OnMoreData(delay, base::TimeTicks::Now(), {}, audio_bus.get());
++    audio_bus->ToInterleaved<SignedInt16SampleTypeTraits>(count, reinterpret_cast<int16_t*>(buffer));
++    if (count == 0) {
++      // We have to submit something to the device
++      count = audio_bus->frames();
++      memset(buffer, 0, count * params.GetBytesPerFrame(kSampleFormat));
++      LOG(WARNING) << "No data to play, running empty cycle.";
++    }
++
++    // Submit data to the device
++    avail = count * params.GetBytesPerFrame(kSampleFormat);
++    result = sio_write(hdl, buffer, avail);
++    if (result == 0) {
++      LOG(WARNING) << "Audio device disconnected.";
++      break;
++    }
++
++    // Update hardware pointer
++    hw_delay += count;
++  }
++}
++
++}  // namespace media
diff --git a/chromium-wip/patches/patch-media_audio_sndio_sndio__output.h b/chromium-wip/patches/patch-media_audio_sndio_sndio__output.h
new file mode 100644
index 0000000000..a9ebd4bc56
--- /dev/null
+++ b/chromium-wip/patches/patch-media_audio_sndio_sndio__output.h
@@ -0,0 +1,97 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/audio/sndio/sndio_output.h.orig	2025-08-12 17:48:59.490861057 +0000
++++ media/audio/sndio/sndio_output.h
+@@ -0,0 +1,88 @@
++// Copyright (c) 2012 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.
++
++#ifndef MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
++#define MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
++
++#include <pthread.h>
++#include <sndio.h>
++
++#include "base/time/tick_clock.h"
++#include "base/time/time.h"
++#include "media/audio/audio_io.h"
++
++namespace media {
++
++class AudioManagerBase;
++
++// Implementation of AudioOutputStream using sndio(7)
++class SndioAudioOutputStream : public AudioOutputStream {
++ public:
++  // The manager is creating this object
++  SndioAudioOutputStream(const AudioParameters& params,
++                         AudioManagerBase* manager);
++
++  SndioAudioOutputStream(const SndioAudioOutputStream&) = delete;
++  SndioAudioOutputStream& operator=(const SndioAudioOutputStream&) = delete;
++
++  virtual ~SndioAudioOutputStream();
++
++  // Implementation of AudioOutputStream.
++  bool Open() override;
++  void Close() override;
++  void Start(AudioSourceCallback* callback) override;
++  void Stop() override;
++  void SetVolume(double volume) override;
++  void GetVolume(double* volume) override;
++  void Flush() override;
++
++  friend void sndio_onmove(void *arg, int delta);
++  friend void sndio_onvol(void *arg, unsigned int vol);
++  friend void *sndio_threadstart(void *arg);
++
++ private:
++  enum StreamState {
++    kClosed,            // Not opened yet
++    kStopped,           // Device opened, but not started yet
++    kRunning,           // Started, device playing
++    kStopWait           // Stopping, waiting for the real-time thread to exit
++  };
++
++  // C-style call-backs
++  static void OnMoveCallback(void *arg, int delta);
++  static void OnVolCallback(void *arg, unsigned int vol);
++  static void* ThreadEntry(void *arg);
++
++  // Continuously moves data from the producer to the device
++  void ThreadLoop(void);
++
++  // Our creator, the audio manager needs to be notified when we close.
++  AudioManagerBase* manager;
++  // Parameters of the source
++  AudioParameters params;
++  // Source stores data here
++  std::unique_ptr<AudioBus> audio_bus;
++  // Call-back that produces data to play
++  AudioSourceCallback* source;
++  // Handle of the audio device
++  struct sio_hdl* hdl;
++  // Current state of the stream
++  enum StreamState state;
++  // High priority thread running ThreadLoop()
++  pthread_t thread;
++  // Protects vol, volpending and hw_delay
++  pthread_mutex_t mutex;
++  // Current volume in the 0..SIO_MAXVOL range
++  int vol;
++  // Set to 1 if volumes must be refreshed in the realtime thread
++  int volpending;
++  // Number of frames buffered in the hardware
++  int hw_delay;
++  // Temporary buffer where data is stored sndio-compatible format
++  char* buffer;
++};
++
++}  // namespace media
++
++#endif  // MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
diff --git a/chromium-wip/patches/patch-media_base_audio__latency.cc b/chromium-wip/patches/patch-media_base_audio__latency.cc
new file mode 100644
index 0000000000..b79f54533b
--- /dev/null
+++ b/chromium-wip/patches/patch-media_base_audio__latency.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/base/audio_latency.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/base/audio_latency.cc
+@@ -147,7 +147,7 @@ int AudioLatency::GetRtcBufferSize(int s
+   }
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   // On Linux, MacOS and Fuchsia, the low level IO implementations on the
+   // browser side supports all buffer size the clients want. We use the native
+   // peer connection buffer size (10ms) to achieve best possible performance.
diff --git a/chromium-wip/patches/patch-media_base_libaom__thread__wrapper.cc b/chromium-wip/patches/patch-media_base_libaom__thread__wrapper.cc
new file mode 100644
index 0000000000..6a973fa7bd
--- /dev/null
+++ b/chromium-wip/patches/patch-media_base_libaom__thread__wrapper.cc
@@ -0,0 +1,30 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/base/libaom_thread_wrapper.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/base/libaom_thread_wrapper.cc
+@@ -5,17 +5,21 @@
+ #include "base/logging.h"
+ #include "media/base/codec_worker_impl.h"
+ #include "media/base/libvpx_thread_wrapper.h"
++#if !BUILDFLAG(IS_BSD)
+ #include "third_party/libaom/source/libaom/aom_util/aom_thread.h"
++#endif
+ 
+ namespace media {
+ 
+ void InitLibAomThreadWrapper() {
++#if !BUILDFLAG(IS_BSD)
+   const AVxWorkerInterface interface =
+       CodecWorkerImpl<AVxWorkerInterface, AVxWorkerImpl, AVxWorker,
+                       AVxWorkerStatus, AVX_WORKER_STATUS_NOT_OK,
+                       AVX_WORKER_STATUS_OK,
+                       AVX_WORKER_STATUS_WORKING>::GetCodecWorkerInterface();
+   CHECK(aom_set_worker_interface(&interface));
++#endif
+ }
+ 
+ }  // namespace media
diff --git a/chromium-wip/patches/patch-media_base_libvpx__thread__wrapper.cc b/chromium-wip/patches/patch-media_base_libvpx__thread__wrapper.cc
new file mode 100644
index 0000000000..66f246cd40
--- /dev/null
+++ b/chromium-wip/patches/patch-media_base_libvpx__thread__wrapper.cc
@@ -0,0 +1,31 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/base/libvpx_thread_wrapper.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/base/libvpx_thread_wrapper.cc
+@@ -5,11 +5,14 @@
+ #include "media/base/libvpx_thread_wrapper.h"
+ 
+ #include "media/base/codec_worker_impl.h"
++#if !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_NETBSD)
+ #include "third_party/libvpx/source/libvpx/vpx_util/vpx_thread.h"
++#endif
+ 
+ namespace media {
+ 
+ void InitLibVpxThreadWrapper() {
++#if !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_NETBSD)
+   const VPxWorkerInterface interface =
+       CodecWorkerImpl<VPxWorkerInterface, VPxWorkerImpl, VPxWorker,
+                       VPxWorkerStatus, VPX_WORKER_STATUS_NOT_OK,
+@@ -17,6 +20,7 @@ void InitLibVpxThreadWrapper() {
+                       VPX_WORKER_STATUS_WORKING>::GetCodecWorkerInterface();
+ 
+   CHECK(vpx_set_worker_interface(&interface));
++#endif
+ }
+ 
+ }  // namespace media
diff --git a/chromium-wip/patches/patch-media_base_media__switches.cc b/chromium-wip/patches/patch-media_base_media__switches.cc
new file mode 100644
index 0000000000..d3908b506c
--- /dev/null
+++ b/chromium-wip/patches/patch-media_base_media__switches.cc
@@ -0,0 +1,132 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/base/media_switches.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/base/media_switches.cc
+@@ -19,7 +19,7 @@
+ #include "ui/gl/gl_features.h"
+ #include "ui/gl/gl_utils.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "base/cpu.h"
+ #endif
+ 
+@@ -59,7 +59,7 @@ const char kReportVp9AsAnUnsupportedMime
+     "report-vp9-as-an-unsupported-mime-type";
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD) || \
+-    BUILDFLAG(IS_SOLARIS)
++    BUILDFLAG(IS_SOLARIS) || BUILDFLAG(IS_NETBSD)
+ // The Alsa device to use when opening an audio input stream.
+ const char kAlsaInputDevice[] = "alsa-input-device";
+ // The Alsa device to use when opening an audio stream.
+@@ -371,8 +371,8 @@ BASE_FEATURE(kUseSCContentSharingPicker,
+              "UseSCContentSharingPicker",
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ #endif  // BUILDFLAG(IS_MAC)
+-
+-#if BUILDFLAG(IS_LINUX)
++ 
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Enables system audio mirroring using pulseaudio.
+ BASE_FEATURE(kPulseaudioLoopbackForCast,
+              "PulseaudioLoopbackForCast",
+@@ -382,6 +382,31 @@ BASE_FEATURE(kPulseaudioLoopbackForCast,
+ BASE_FEATURE(kPulseaudioLoopbackForScreenShare,
+              "PulseaudioLoopbackForScreenShare",
+              base::FEATURE_DISABLED_BY_DEFAULT);
++
++BASE_FEATURE(kAudioBackend,
++             "AudioBackend",
++             base::FEATURE_ENABLED_BY_DEFAULT);
++
++constexpr base::FeatureParam<AudioBackend>::Option
++    kAudioBackendOptions[] = {
++        {AudioBackend::kAuto,
++         "auto"},
++        {AudioBackend::kAudioIO, "audioio"},
++        {AudioBackend::kPulseAudio, "pulseaudio"},
++        {AudioBackend::kSndio, "sndio"},
++        {AudioBackend::kAlsa, "alsa"}};
++
++const base::FeatureParam<AudioBackend>
++    kAudioBackendParam{
++        &kAudioBackend, "audio-backend",
++#if BUILDFLAG(IS_OPENBSD)
++        AudioBackend::kSndio,
++#elif BUILDFLAG(IS_NETBSD)
++        AudioBackend::kAudioIO,
++#elif BUILDFLAG(IS_FREEBSD)
++        AudioBackend::kAuto,
++#endif
++        &kAudioBackendOptions};
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+ // When enabled, MediaCapabilities will check with GPU Video Accelerator
+@@ -684,7 +709,7 @@ BASE_FEATURE(kFileDialogsTuckPictureInPi
+ // Show toolbar button that opens dialog for controlling media sessions.
+ BASE_FEATURE(kGlobalMediaControls,
+              "GlobalMediaControls",
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+              base::FEATURE_ENABLED_BY_DEFAULT
+ #else
+              base::FEATURE_DISABLED_BY_DEFAULT
+@@ -707,7 +732,7 @@ BASE_FEATURE(kGlobalMediaControlsUpdated
+ // If enabled, users can request Media Remoting without fullscreen-in-tab.
+ BASE_FEATURE(kMediaRemotingWithoutFullscreen,
+              "MediaRemotingWithoutFullscreen",
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+              base::FEATURE_ENABLED_BY_DEFAULT
+ #else
+              base::FEATURE_DISABLED_BY_DEFAULT
+@@ -719,7 +744,7 @@ BASE_FEATURE(kMediaRemotingWithoutFullsc
+ BASE_FEATURE(kGlobalMediaControlsPictureInPicture,
+              "GlobalMediaControlsPictureInPicture",
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+              base::FEATURE_ENABLED_BY_DEFAULT
+ #else
+              base::FEATURE_DISABLED_BY_DEFAULT
+@@ -748,7 +773,7 @@ BASE_FEATURE(kUnifiedAutoplay,
+              "UnifiedAutoplay",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Enable vaapi/v4l2 video decoding on linux. This is already enabled by default
+ // on chromeos, but needs an experiment on linux.
+ BASE_FEATURE(kAcceleratedVideoDecodeLinux,
+@@ -821,7 +846,7 @@ BASE_FEATURE(kVSyncMjpegDecoding,
+              "VSyncMjpegDecoding",
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ #endif  // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS)
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Enable H264 temporal layer encoding with V4L2 HW encoder on ChromeOS.
+ BASE_FEATURE(kV4L2H264TemporalLayerHWEncoding,
+              "V4L2H264TemporalLayerHWEncoding",
+@@ -1398,7 +1423,7 @@ BASE_FEATURE(kUseOutOfProcessVideoDecodi
+ );
+ #endif  // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Spawn utility processes to perform hardware encode acceleration instead of
+ // using the GPU process.
+ BASE_FEATURE(kUseOutOfProcessVideoEncoding,
+@@ -1480,7 +1505,7 @@ BASE_FEATURE(kRecordWebAudioEngagement,
+              "RecordWebAudioEngagement",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Reduces the number of buffers needed in the output video frame pool to
+ // populate the Renderer pipeline for hardware accelerated VideoDecoder in
+ // non-low latency scenarios.
diff --git a/chromium-wip/patches/patch-media_base_media__switches.h b/chromium-wip/patches/patch-media_base_media__switches.h
new file mode 100644
index 0000000000..f3015ec72e
--- /dev/null
+++ b/chromium-wip/patches/patch-media_base_media__switches.h
@@ -0,0 +1,73 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/base/media_switches.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/base/media_switches.h
+@@ -43,7 +43,7 @@ MEDIA_EXPORT extern const char kDisableB
+ MEDIA_EXPORT extern const char kReportVp9AsAnUnsupportedMimeType[];
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD) || \
+-    BUILDFLAG(IS_SOLARIS)
++    BUILDFLAG(IS_SOLARIS) || BUILDFLAG(IS_NETBSD)
+ MEDIA_EXPORT extern const char kAlsaInputDevice[];
+ MEDIA_EXPORT extern const char kAlsaOutputDevice[];
+ #endif
+@@ -340,13 +340,26 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kMedia
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kPlaybackSpeedButton);
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kPreloadMediaEngagementData);
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kPreloadMetadataSuspend);
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kPulseaudioLoopbackForCast);
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kPulseaudioLoopbackForScreenShare);
++
++enum class AudioBackend {
++  kAuto,
++  kPulseAudio,
++  kSndio,
++  kAudioIO,
++  kAlsa
++};
++
++MEDIA_EXPORT BASE_DECLARE_FEATURE(kAudioBackend);
++MEDIA_EXPORT extern const base::FeatureParam<
++    AudioBackend>
++    kAudioBackendParam;
+ #endif  // BUILDFLAG(IS_LINUX)
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kRecordMediaEngagementScores);
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kRecordWebAudioEngagement);
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kReduceHardwareVideoDecoderBuffers);
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kResumeBackgroundVideo);
+@@ -360,7 +373,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kSuspe
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUnifiedAutoplay);
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseAndroidOverlayForSecureOnly);
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseFakeDeviceForMediaStream);
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kAcceleratedVideoDecodeLinux);
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kAcceleratedVideoDecodeLinuxGL);
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kAcceleratedVideoEncodeLinux);
+@@ -376,7 +389,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapi
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp9SModeHWEncoding);
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVSyncMjpegDecoding);
+ #endif  // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS)
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2H264TemporalLayerHWEncoding);
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVideoBlitColorAccuracy);
+@@ -498,7 +511,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kBackg
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVideoDecoding);
+ #endif  // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVideoEncoding);
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
diff --git a/chromium-wip/patches/patch-media_base_video__frame.cc b/chromium-wip/patches/patch-media_base_video__frame.cc
new file mode 100644
index 0000000000..dd886c14f2
--- /dev/null
+++ b/chromium-wip/patches/patch-media_base_video__frame.cc
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/base/video_frame.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/base/video_frame.cc
+@@ -96,7 +96,7 @@ std::string VideoFrame::StorageTypeToStr
+       return "OWNED_MEMORY";
+     case VideoFrame::STORAGE_SHMEM:
+       return "SHMEM";
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     case VideoFrame::STORAGE_DMABUFS:
+       return "DMABUFS";
+ #endif
+@@ -110,7 +110,7 @@ std::string VideoFrame::StorageTypeToStr
+ // static
+ bool VideoFrame::IsStorageTypeMappable(VideoFrame::StorageType storage_type) {
+   return
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       // This is not strictly needed but makes explicit that, at VideoFrame
+       // level, DmaBufs are not mappable from userspace.
+       storage_type != VideoFrame::STORAGE_DMABUFS &&
+@@ -421,7 +421,7 @@ VideoFrame::CreateFrameForGpuMemoryBuffe
+         plane_size.width() * VideoFrame::BytesPerElement(*format, plane);
+   }
+   uint64_t modifier = gfx::NativePixmapHandle::kNoModifier;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   bool is_native_buffer =
+       gpu_memory_buffer
+           ? (gpu_memory_buffer->GetType() != gfx::SHARED_MEMORY_BUFFER)
+@@ -850,7 +850,7 @@ scoped_refptr<VideoFrame> VideoFrame::Wr
+   return frame;
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // static
+ scoped_refptr<VideoFrame> VideoFrame::WrapExternalDmabufs(
+     const VideoFrameLayout& layout,
+@@ -1541,7 +1541,7 @@ scoped_refptr<gpu::ClientSharedImage> Vi
+   return wrapped_frame_ ? wrapped_frame_->shared_image() : shared_image_;
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ size_t VideoFrame::NumDmabufFds() const {
+   if (wrapped_frame_) {
+     return wrapped_frame_->NumDmabufFds();
diff --git a/chromium-wip/patches/patch-media_base_video__frame.h b/chromium-wip/patches/patch-media_base_video__frame.h
new file mode 100644
index 0000000000..90971600bb
--- /dev/null
+++ b/chromium-wip/patches/patch-media_base_video__frame.h
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/base/video_frame.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/base/video_frame.h
+@@ -42,7 +42,7 @@
+ #include "ui/gfx/geometry/size.h"
+ #include "ui/gfx/hdr_metadata.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "base/files/scoped_file.h"
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+@@ -88,7 +88,7 @@ class MEDIA_EXPORT VideoFrame : public b
+     STORAGE_UNOWNED_MEMORY = 2,  // External, non owned data pointers.
+     STORAGE_OWNED_MEMORY = 3,  // VideoFrame has allocated its own data buffer.
+     STORAGE_SHMEM = 4,         // Backed by read-only shared memory.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     STORAGE_DMABUFS = 5,  // Each plane is stored into a DmaBuf.
+ #endif
+     STORAGE_GPU_MEMORY_BUFFER = 6,
+@@ -400,7 +400,7 @@ class MEDIA_EXPORT VideoFrame : public b
+       ReleaseMailboxAndGpuMemoryBufferCB mailbox_holder_and_gmb_release_cb,
+       base::TimeDelta timestamp);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Wraps provided dmabufs
+   // (https://www.kernel.org/doc/html/latest/driver-api/dma-buf.html) with a
+   // VideoFrame. The frame will take ownership of |dmabuf_fds|, and will
+@@ -716,7 +716,7 @@ class MEDIA_EXPORT VideoFrame : public b
+   // wait for the included sync point.
+   scoped_refptr<gpu::ClientSharedImage> shared_image() const;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // The number of DmaBufs will be equal or less than the number of planes of
+   // the frame. If there are less, this means that the last FD contains the
+   // remaining planes. Should be > 0 for STORAGE_DMABUFS.
+@@ -954,7 +954,7 @@ class MEDIA_EXPORT VideoFrame : public b
+   // GpuMemoryBuffers. Clients will set this flag while creating a VideoFrame.
+   bool is_mappable_si_enabled_ = false;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Dmabufs for the frame, used when storage is STORAGE_DMABUFS. Size is either
+   // equal or less than the number of planes of the frame. If it is less, then
+   // the memory area represented by the last FD contains the remaining planes.
diff --git a/chromium-wip/patches/patch-media_capture_video_create__video__capture__device__factory.cc b/chromium-wip/patches/patch-media_capture_video_create__video__capture__device__factory.cc
new file mode 100644
index 0000000000..7dbdfc7f4c
--- /dev/null
+++ b/chromium-wip/patches/patch-media_capture_video_create__video__capture__device__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/capture/video/create_video_capture_device_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/capture/video/create_video_capture_device_factory.cc
+@@ -13,7 +13,7 @@
+ #include "media/capture/video/fake_video_capture_device_factory.h"
+ #include "media/capture/video/file_video_capture_device_factory.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "media/capture/video/linux/video_capture_device_factory_linux.h"
+ #elif BUILDFLAG(IS_CHROMEOS)
+ #include "media/capture/video/chromeos/public/cros_features.h"
+@@ -56,7 +56,7 @@ CreateFakeVideoCaptureDeviceFactory() {
+ std::unique_ptr<VideoCaptureDeviceFactory>
+ CreatePlatformSpecificVideoCaptureDeviceFactory(
+     scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return std::make_unique<VideoCaptureDeviceFactoryLinux>(ui_task_runner);
+ #elif BUILDFLAG(IS_CHROMEOS)
+   if (base::SysInfo::IsRunningOnChromeOS())
diff --git a/chromium-wip/patches/patch-media_capture_video_fake__video__capture__device__factory.cc b/chromium-wip/patches/patch-media_capture_video_fake__video__capture__device__factory.cc
new file mode 100644
index 0000000000..bb7171730e
--- /dev/null
+++ b/chromium-wip/patches/patch-media_capture_video_fake__video__capture__device__factory.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/capture/video/fake_video_capture_device_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/capture/video/fake_video_capture_device_factory.cc
+@@ -228,7 +228,7 @@ void FakeVideoCaptureDeviceFactory::GetD
+   int entry_index = 0;
+   for (const auto& entry : devices_config_) {
+     VideoCaptureApi api =
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+         VideoCaptureApi::LINUX_V4L2_SINGLE_PLANE;
+ #elif BUILDFLAG(IS_IOS)
+         VideoCaptureApi::UNKNOWN;
diff --git a/chromium-wip/patches/patch-media_capture_video_file__video__capture__device__factory.cc b/chromium-wip/patches/patch-media_capture_video_file__video__capture__device__factory.cc
new file mode 100644
index 0000000000..491cb68ccf
--- /dev/null
+++ b/chromium-wip/patches/patch-media_capture_video_file__video__capture__device__factory.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/capture/video/file_video_capture_device_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/capture/video/file_video_capture_device_factory.cc
+@@ -52,7 +52,7 @@ void FileVideoCaptureDeviceFactory::GetD
+       VideoCaptureApi::WIN_DIRECT_SHOW;
+ #elif BUILDFLAG(IS_MAC)
+       VideoCaptureApi::MACOSX_AVFOUNDATION;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       VideoCaptureApi::LINUX_V4L2_SINGLE_PLANE;
+ #else
+       VideoCaptureApi::UNKNOWN;
diff --git a/chromium-wip/patches/patch-media_capture_video_linux_fake__v4l2__impl.cc b/chromium-wip/patches/patch-media_capture_video_linux_fake__v4l2__impl.cc
new file mode 100644
index 0000000000..ff8d8a9ef4
--- /dev/null
+++ b/chromium-wip/patches/patch-media_capture_video_linux_fake__v4l2__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/capture/video/linux/fake_v4l2_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/capture/video/linux/fake_v4l2_impl.cc
+@@ -570,7 +570,7 @@ int FakeV4L2Impl::close(int fd) {
+   return kSuccessReturnValue;
+ }
+ 
+-int FakeV4L2Impl::ioctl(int fd, int request, void* argp) {
++int FakeV4L2Impl::ioctl(int fd, unsigned long request, void* argp) {
+   base::AutoLock lock(lock_);
+   auto device_iter = opened_devices_.find(fd);
+   if (device_iter == opened_devices_.end())
diff --git a/chromium-wip/patches/patch-media_capture_video_linux_fake__v4l2__impl.h b/chromium-wip/patches/patch-media_capture_video_linux_fake__v4l2__impl.h
new file mode 100644
index 0000000000..1e943a28b5
--- /dev/null
+++ b/chromium-wip/patches/patch-media_capture_video_linux_fake__v4l2__impl.h
@@ -0,0 +1,31 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/capture/video/linux/fake_v4l2_impl.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/capture/video/linux/fake_v4l2_impl.h
+@@ -8,7 +8,13 @@
+ #include <map>
+ #include <string>
+ 
++#include "build/build_config.h"
++#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_NETBSD)
++#include <sys/videoio.h>
++typedef __uint32_t __u32;
++#else
+ #include <linux/videodev2.h>
++#endif
+ 
+ #include "base/synchronization/lock.h"
+ #include "media/capture/capture_export.h"
+@@ -38,7 +44,7 @@ class CAPTURE_EXPORT FakeV4L2Impl : publ
+   // Implementation of V4L2CaptureDevice interface:
+   int open(const char* device_name, int flags) override;
+   int close(int fd) override;
+-  int ioctl(int fd, int request, void* argp) override;
++  int ioctl(int fd, unsigned long request, void* argp) override;
+   void* mmap(void* start,
+              size_t length,
+              int prot,
diff --git a/chromium-wip/patches/patch-media_capture_video_linux_v4l2__capture__delegate.cc b/chromium-wip/patches/patch-media_capture_video_linux_v4l2__capture__delegate.cc
new file mode 100644
index 0000000000..27340c066c
--- /dev/null
+++ b/chromium-wip/patches/patch-media_capture_video_linux_v4l2__capture__delegate.cc
@@ -0,0 +1,183 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/capture/video/linux/v4l2_capture_delegate.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/capture/video/linux/v4l2_capture_delegate.cc
+@@ -10,8 +10,10 @@
+ #include "media/capture/video/linux/v4l2_capture_delegate.h"
+ 
+ #include <fcntl.h>
++#if !BUILDFLAG(IS_BSD)
+ #include <linux/version.h>
+ #include <linux/videodev2.h>
++#endif
+ #include <poll.h>
+ #include <sys/ioctl.h>
+ #include <sys/mman.h>
+@@ -35,17 +37,19 @@
+ #include "media/capture/video/blob_utils.h"
+ #include "media/capture/video/linux/video_capture_device_linux.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "media/capture/capture_switches.h"
+ #include "media/capture/video/linux/v4l2_capture_delegate_gpu_helper.h"
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+ using media::mojom::MeteringMode;
+ 
++#if !BUILDFLAG(IS_BSD)
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
+ // 16 bit depth, Realsense F200.
+ #define V4L2_PIX_FMT_Z16 v4l2_fourcc('Z', '1', '6', ' ')
+ #endif
++#endif
+ 
+ // TODO(aleksandar.stojiljkovic): Wrap this with kernel version check once the
+ // format is introduced to kernel.
+@@ -55,6 +59,14 @@ using media::mojom::MeteringMode;
+ #define V4L2_PIX_FMT_INVZ v4l2_fourcc('I', 'N', 'V', 'Z')
+ #endif
+ 
++#ifndef V4L2_COLORSPACE_OPRGB
++#define V4L2_COLORSPACE_OPRGB V4L2_COLORSPACE_ADOBERGB
++#endif
++
++#ifndef V4L2_XFER_FUNC_OPRGB
++#define V4L2_XFER_FUNC_OPRGB V4L2_XFER_FUNC_ADOBERGB
++#endif
++
+ namespace media {
+ 
+ namespace {
+@@ -274,7 +286,7 @@ bool V4L2CaptureDelegate::IsBlockedContr
+ // static
+ bool V4L2CaptureDelegate::IsControllableControl(
+     int control_id,
+-    const base::RepeatingCallback<int(int, void*)>& do_ioctl) {
++    const base::RepeatingCallback<int(unsigned int, void*)>& do_ioctl) {
+   const int special_control_id = GetControllingSpecialControl(control_id);
+   if (!special_control_id) {
+     // The control is not controlled by a special control thus the control is
+@@ -330,7 +342,7 @@ V4L2CaptureDelegate::V4L2CaptureDelegate
+       is_capturing_(false),
+       timeout_count_(0),
+       rotation_(rotation) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   use_gpu_buffer_ = switches::IsVideoCaptureUseGpuMemoryBufferEnabled();
+ #endif  // BUILDFLAG(IS_LINUX)
+ }
+@@ -457,7 +469,7 @@ void V4L2CaptureDelegate::AllocateAndSta
+ 
+   client_->OnStarted();
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (use_gpu_buffer_) {
+     v4l2_gpu_helper_ = std::make_unique<V4L2CaptureDelegateGpuHelper>();
+   }
+@@ -801,7 +813,7 @@ base::WeakPtr<V4L2CaptureDelegate> V4L2C
+ 
+ V4L2CaptureDelegate::~V4L2CaptureDelegate() = default;
+ 
+-bool V4L2CaptureDelegate::RunIoctl(int request, void* argp) {
++bool V4L2CaptureDelegate::RunIoctl(unsigned int request, void* argp) {
+   int num_retries = 0;
+   for (; DoIoctl(request, argp) < 0 && num_retries < kMaxIOCtrlRetries;
+        ++num_retries) {
+@@ -811,7 +823,7 @@ bool V4L2CaptureDelegate::RunIoctl(int r
+   return num_retries != kMaxIOCtrlRetries;
+ }
+ 
+-int V4L2CaptureDelegate::DoIoctl(int request, void* argp) {
++int V4L2CaptureDelegate::DoIoctl(unsigned int request, void* argp) {
+   return HANDLE_EINTR(v4l2_->ioctl(device_fd_.get(), request, argp));
+ }
+ 
+@@ -822,6 +834,7 @@ bool V4L2CaptureDelegate::IsControllable
+ }
+ 
+ void V4L2CaptureDelegate::ReplaceControlEventSubscriptions() {
++#if !BUILDFLAG(IS_BSD)
+   constexpr uint32_t kControlIds[] = {V4L2_CID_AUTO_EXPOSURE_BIAS,
+                                       V4L2_CID_AUTO_WHITE_BALANCE,
+                                       V4L2_CID_BRIGHTNESS,
+@@ -849,6 +862,7 @@ void V4L2CaptureDelegate::ReplaceControl
+                   << ", {type = V4L2_EVENT_CTRL, id = " << control_id << "}";
+     }
+   }
++#endif
+ }
+ 
+ mojom::RangePtr V4L2CaptureDelegate::RetrieveUserControlRange(int control_id) {
+@@ -1029,7 +1043,11 @@ void V4L2CaptureDelegate::DoCapture() {
+ 
+   pollfd device_pfd = {};
+   device_pfd.fd = device_fd_.get();
++#if !BUILDFLAG(IS_BSD)
+   device_pfd.events = POLLIN | POLLPRI;
++#else
++  device_pfd.events = POLLIN;
++#endif
+ 
+   const int result =
+       HANDLE_EINTR(v4l2_->poll(&device_pfd, 1, kCaptureTimeoutMs));
+@@ -1049,6 +1067,12 @@ void V4L2CaptureDelegate::DoCapture() {
+       // in older kernels, and stopping and starting the stream gets the camera
+       // out of this bad state. Upgrading the kernel is difficult so this is our
+       // way out for now.
++#if BUILDFLAG(IS_NETBSD)
++      // On NetBSD cause: StartStream@media/capture/video/linux/v4l2_capture_delegate.cc:1017,
++      // Error requesting MMAP buffers from V4L2, OS message: Device busy (16)
++      // so do nothing, just wait for timeout_count_ >= kContinuousTimeoutLimit
++      DLOG(WARNING) << "DoCapture: poll timeout";
++#else
+       DLOG(WARNING) << "Restarting camera stream";
+       if (!StopStream() || !StartStream())
+         return;
+@@ -1056,6 +1080,7 @@ void V4L2CaptureDelegate::DoCapture() {
+           FROM_HERE,
+           base::BindOnce(&V4L2CaptureDelegate::DoCapture, GetWeakPtr()));
+       return;
++#endif
+     } else if (timeout_count_ >= kContinuousTimeoutLimit) {
+       SetErrorState(
+           VideoCaptureError::kV4L2MultipleContinuousTimeoutsWhileReadPolling,
+@@ -1067,6 +1092,7 @@ void V4L2CaptureDelegate::DoCapture() {
+     timeout_count_ = 0;
+   }
+ 
++#if !BUILDFLAG(IS_BSD)
+   // Dequeue events if the driver has filled in some.
+   if (device_pfd.revents & POLLPRI) {
+     bool controls_changed = false;
+@@ -1100,6 +1126,7 @@ void V4L2CaptureDelegate::DoCapture() {
+       client_->OnCaptureConfigurationChanged();
+     }
+   }
++#endif
+ 
+   // Deenqueue, send and reenqueue a buffer if the driver has filled one in.
+   if (device_pfd.revents & POLLIN) {
+@@ -1153,7 +1180,7 @@ void V4L2CaptureDelegate::DoCapture() {
+       // workable on Linux.
+ 
+       // See http://crbug.com/959919.
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       if (use_gpu_buffer_) {
+         v4l2_gpu_helper_->OnIncomingCapturedData(
+             client_.get(), buffer_tracker->start(),
+@@ -1227,7 +1254,7 @@ void V4L2CaptureDelegate::SetErrorState(
+   client_->OnError(error, from_here, reason);
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ gfx::ColorSpace V4L2CaptureDelegate::BuildColorSpaceFromv4l2() {
+   v4l2_colorspace v4l2_primary = (v4l2_colorspace)video_fmt_.fmt.pix.colorspace;
+   v4l2_quantization v4l2_range =
diff --git a/chromium-wip/patches/patch-media_capture_video_linux_v4l2__capture__delegate.h b/chromium-wip/patches/patch-media_capture_video_linux_v4l2__capture__delegate.h
new file mode 100644
index 0000000000..21fb272aa2
--- /dev/null
+++ b/chromium-wip/patches/patch-media_capture_video_linux_v4l2__capture__delegate.h
@@ -0,0 +1,66 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/capture/video/linux/v4l2_capture_delegate.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/capture/video/linux/v4l2_capture_delegate.h
+@@ -22,7 +22,7 @@
+ #include "media/capture/video/linux/v4l2_capture_device_impl.h"
+ #include "media/capture/video/video_capture_device.h"
+ 
+-#if BUILDFLAG(IS_OPENBSD)
++#if BUILDFLAG(IS_OPENBSD) || defined(OS_NETBSD)
+ #include <sys/videoio.h>
+ #else
+ #include <linux/videodev2.h>
+@@ -34,7 +34,7 @@ class Location;
+ 
+ namespace media {
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ class V4L2CaptureDelegateGpuHelper;
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+@@ -85,7 +85,7 @@ class CAPTURE_EXPORT V4L2CaptureDelegate
+   static bool IsBlockedControl(int control_id);
+   static bool IsControllableControl(
+       int control_id,
+-      const base::RepeatingCallback<int(int, void*)>& do_ioctl);
++      const base::RepeatingCallback<int(unsigned int, void*)>& do_ioctl);
+ 
+  private:
+   friend class V4L2CaptureDelegateTest;
+@@ -96,10 +96,10 @@ class CAPTURE_EXPORT V4L2CaptureDelegate
+   // device file descriptor or (re)starting streaming, can fail but works after
+   // retrying (https://crbug.com/670262). Returns false if the |request| ioctl
+   // fails too many times.
+-  bool RunIoctl(int request, void* argp);
++  bool RunIoctl(unsigned int request, void* argp);
+ 
+   // Simple wrapper to do HANDLE_EINTR(v4l2_->ioctl(device_fd_.get(), ...)).
+-  int DoIoctl(int request, void* argp);
++  int DoIoctl(unsigned int request, void* argp);
+ 
+   // Check whether the control is controllable (and not changed automatically).
+   bool IsControllableControl(int control_id);
+@@ -129,7 +129,7 @@ class CAPTURE_EXPORT V4L2CaptureDelegate
+                      const base::Location& from_here,
+                      const std::string& reason);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Systems which describe a "color space" usually map that to one or more of
+   // {primary, matrix, transfer, range}. BuildColorSpaceFromv4l2() will use the
+   // matched value as first priority. Otherwise, if there is no best matching
+@@ -163,7 +163,7 @@ class CAPTURE_EXPORT V4L2CaptureDelegate
+   // Clockwise rotation in degrees. This value should be 0, 90, 180, or 270.
+   int rotation_;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Support GPU memory buffer.
+   bool use_gpu_buffer_;
+   std::unique_ptr<V4L2CaptureDelegateGpuHelper> v4l2_gpu_helper_;
diff --git a/chromium-wip/patches/patch-media_capture_video_linux_v4l2__capture__device.h b/chromium-wip/patches/patch-media_capture_video_linux_v4l2__capture__device.h
new file mode 100644
index 0000000000..a5bddfef25
--- /dev/null
+++ b/chromium-wip/patches/patch-media_capture_video_linux_v4l2__capture__device.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/capture/video/linux/v4l2_capture_device.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/capture/video/linux/v4l2_capture_device.h
+@@ -23,7 +23,7 @@ class CAPTURE_EXPORT V4L2CaptureDevice
+ 
+   virtual int open(const char* device_name, int flags) = 0;
+   virtual int close(int fd) = 0;
+-  virtual int ioctl(int fd, int request, void* argp) = 0;
++  virtual int ioctl(int fd, unsigned long request, void* argp) = 0;
+   virtual void* mmap(void* start,
+                      size_t length,
+                      int prot,
diff --git a/chromium-wip/patches/patch-media_capture_video_linux_v4l2__capture__device__impl.cc b/chromium-wip/patches/patch-media_capture_video_linux_v4l2__capture__device__impl.cc
new file mode 100644
index 0000000000..fc1bfe430e
--- /dev/null
+++ b/chromium-wip/patches/patch-media_capture_video_linux_v4l2__capture__device__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/capture/video/linux/v4l2_capture_device_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/capture/video/linux/v4l2_capture_device_impl.cc
+@@ -22,7 +22,7 @@ int V4L2CaptureDeviceImpl::close(int fd)
+   return ::close(fd);
+ }
+ 
+-int V4L2CaptureDeviceImpl::ioctl(int fd, int request, void* argp) {
++int V4L2CaptureDeviceImpl::ioctl(int fd, unsigned long request, void* argp) {
+   return ::ioctl(fd, request, argp);
+ }
+ 
diff --git a/chromium-wip/patches/patch-media_capture_video_linux_v4l2__capture__device__impl.h b/chromium-wip/patches/patch-media_capture_video_linux_v4l2__capture__device__impl.h
new file mode 100644
index 0000000000..e94d7fcdde
--- /dev/null
+++ b/chromium-wip/patches/patch-media_capture_video_linux_v4l2__capture__device__impl.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/capture/video/linux/v4l2_capture_device_impl.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/capture/video/linux/v4l2_capture_device_impl.h
+@@ -19,7 +19,7 @@ class CAPTURE_EXPORT V4L2CaptureDeviceIm
+  public:
+   int open(const char* device_name, int flags) override;
+   int close(int fd) override;
+-  int ioctl(int fd, int request, void* argp) override;
++  int ioctl(int fd, unsigned long request, void* argp) override;
+   void* mmap(void* start,
+              size_t length,
+              int prot,
diff --git a/chromium-wip/patches/patch-media_capture_video_linux_video__capture__device__factory__v4l2.cc b/chromium-wip/patches/patch-media_capture_video_linux_video__capture__device__factory__v4l2.cc
new file mode 100644
index 0000000000..0b14a0bab9
--- /dev/null
+++ b/chromium-wip/patches/patch-media_capture_video_linux_video__capture__device__factory__v4l2.cc
@@ -0,0 +1,107 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/capture/video/linux/video_capture_device_factory_v4l2.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/capture/video/linux/video_capture_device_factory_v4l2.cc
+@@ -29,7 +29,7 @@
+ #include "media/capture/video/linux/scoped_v4l2_device_fd.h"
+ #include "media/capture/video/linux/video_capture_device_linux.h"
+ 
+-#if BUILDFLAG(IS_OPENBSD)
++#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_NETBSD)
+ #include <sys/videoio.h>
+ #else
+ #include <linux/videodev2.h>
+@@ -44,6 +44,7 @@ bool CompareCaptureDevices(const VideoCa
+   return a.descriptor < b.descriptor;
+ }
+ 
++#if !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_NETBSD)
+ // USB VID and PID are both 4 bytes long.
+ const size_t kVidPidSize = 4;
+ const size_t kMaxInterfaceNameSize = 256;
+@@ -76,11 +77,24 @@ std::string ExtractFileNameFromDeviceId(
+   DCHECK(base::StartsWith(device_id, kDevDir, base::CompareCase::SENSITIVE));
+   return device_id.substr(strlen(kDevDir), device_id.length());
+ }
++#endif
+ 
+ class DevVideoFilePathsDeviceProvider
+     : public VideoCaptureDeviceFactoryV4L2::DeviceProvider {
+  public:
+   void GetDeviceIds(std::vector<std::string>* target_container) override {
++#if BUILDFLAG(IS_OPENBSD)
++    char device[12];
++    int fd;
++    /* unveil(2) limits access to /dev/, try /dev/video[0-7] */
++    for (int n = 0; n < 8; n++) {
++      snprintf(device, sizeof(device), "/dev/video%d", n);
++      if ((fd = open(device, O_RDONLY)) != -1) {
++        close(fd);
++        target_container->emplace_back(device);
++      }
++    }
++#else
+     const base::FilePath path("/dev/");
+     base::FileEnumerator enumerator(path, false, base::FileEnumerator::FILES,
+                                     "video*");
+@@ -88,9 +102,13 @@ class DevVideoFilePathsDeviceProvider
+       const base::FileEnumerator::FileInfo info = enumerator.GetInfo();
+       target_container->emplace_back(path.value() + info.GetName().value());
+     }
++#endif
+   }
+ 
+   std::string GetDeviceModelId(const std::string& device_id) override {
++#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_NETBSD)
++    return std::string();
++#else
+     const std::string file_name = ExtractFileNameFromDeviceId(device_id);
+     std::string usb_id;
+     const std::string vid_path =
+@@ -107,9 +125,13 @@ class DevVideoFilePathsDeviceProvider
+     }
+ 
+     return usb_id;
++#endif
+   }
+ 
+   std::string GetDeviceDisplayName(const std::string& device_id) override {
++#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_NETBSD)
++    return std::string();
++#else
+     const std::string file_name = ExtractFileNameFromDeviceId(device_id);
+     const std::string interface_path =
+         base::StringPrintf(kInterfacePathTemplate, file_name.c_str());
+@@ -120,6 +142,7 @@ class DevVideoFilePathsDeviceProvider
+       return std::string();
+     }
+     return display_name;
++#endif
+   }
+ };
+ 
+@@ -225,7 +248,7 @@ void VideoCaptureDeviceFactoryV4L2::GetD
+   std::move(callback).Run(std::move(devices_info));
+ }
+ 
+-int VideoCaptureDeviceFactoryV4L2::DoIoctl(int fd, int request, void* argp) {
++int VideoCaptureDeviceFactoryV4L2::DoIoctl(int fd, unsigned int request, void* argp) {
+   return HANDLE_EINTR(v4l2_->ioctl(fd, request, argp));
+ }
+ 
+@@ -285,6 +308,11 @@ std::vector<float> VideoCaptureDeviceFac
+         frame_rates.push_back(
+             frame_interval.discrete.denominator /
+             static_cast<float>(frame_interval.discrete.numerator));
++#if BUILDFLAG(IS_NETBSD)
++        // On NetBSD VIDIOC_ENUM_FRAMEINTERVALS(video_enum_frameival) always return the same values
++        // and not handle index, what is cause infinity loop. One round is enough.
++        break;
++#endif
+       }
+     } else if (frame_interval.type == V4L2_FRMIVAL_TYPE_CONTINUOUS ||
+                frame_interval.type == V4L2_FRMIVAL_TYPE_STEPWISE) {
diff --git a/chromium-wip/patches/patch-media_capture_video_linux_video__capture__device__factory__v4l2.h b/chromium-wip/patches/patch-media_capture_video_linux_video__capture__device__factory__v4l2.h
new file mode 100644
index 0000000000..d8d1ab846a
--- /dev/null
+++ b/chromium-wip/patches/patch-media_capture_video_linux_video__capture__device__factory__v4l2.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/capture/video/linux/video_capture_device_factory_v4l2.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/capture/video/linux/video_capture_device_factory_v4l2.h
+@@ -51,7 +51,7 @@ class CAPTURE_EXPORT VideoCaptureDeviceF
+ 
+  private:
+   // Simple wrapper to do HANDLE_EINTR(v4l2_->ioctl(fd, ...)).
+-  int DoIoctl(int fd, int request, void* argp);
++  int DoIoctl(int fd, unsigned int request, void* argp);
+ 
+   VideoCaptureControlSupport GetControlSupport(int fd);
+   bool GetControlSupport(int fd, int control_id);
diff --git a/chromium-wip/patches/patch-media_capture_video_linux_video__capture__device__linux.cc b/chromium-wip/patches/patch-media_capture_video_linux_video__capture__device__linux.cc
new file mode 100644
index 0000000000..397c5a9fc2
--- /dev/null
+++ b/chromium-wip/patches/patch-media_capture_video_linux_video__capture__device__linux.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/capture/video/linux/video_capture_device_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/capture/video/linux/video_capture_device_linux.cc
+@@ -15,7 +15,7 @@
+ #include "build/build_config.h"
+ #include "media/capture/video/linux/v4l2_capture_delegate.h"
+ 
+-#if BUILDFLAG(IS_OPENBSD)
++#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_NETBSD)
+ #include <sys/videoio.h>
+ #else
+ #include <linux/videodev2.h>
diff --git a/chromium-wip/patches/patch-media_capture_video_video__capture__buffer__tracker__factory__impl.cc b/chromium-wip/patches/patch-media_capture_video_video__capture__buffer__tracker__factory__impl.cc
new file mode 100644
index 0000000000..0fd6fb1a60
--- /dev/null
+++ b/chromium-wip/patches/patch-media_capture_video_video__capture__buffer__tracker__factory__impl.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/capture/video/video_capture_buffer_tracker_factory_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/capture/video/video_capture_buffer_tracker_factory_impl.cc
+@@ -13,7 +13,7 @@
+ #include "media/capture/video/chromeos/gpu_memory_buffer_tracker_cros.h"
+ #elif BUILDFLAG(IS_APPLE)
+ #include "media/capture/video/apple/gpu_memory_buffer_tracker_apple.h"
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "media/capture/video/linux/v4l2_gpu_memory_buffer_tracker.h"
+ #elif BUILDFLAG(IS_WIN)
+ #include "media/capture/video/win/gpu_memory_buffer_tracker_win.h"
+@@ -41,7 +41,7 @@ VideoCaptureBufferTrackerFactoryImpl::Cr
+       return std::make_unique<GpuMemoryBufferTrackerCros>();
+ #elif BUILDFLAG(IS_APPLE)
+       return std::make_unique<GpuMemoryBufferTrackerApple>();
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       return std::make_unique<V4L2GpuMemoryBufferTracker>();
+ #elif BUILDFLAG(IS_WIN)
+       if (!dxgi_device_manager_) {
diff --git a/chromium-wip/patches/patch-media_capture_video_video__capture__device__client.cc b/chromium-wip/patches/patch-media_capture_video_video__capture__device__client.cc
new file mode 100644
index 0000000000..42c2bfa105
--- /dev/null
+++ b/chromium-wip/patches/patch-media_capture_video_video__capture__device__client.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/capture/video/video_capture_device_client.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/capture/video/video_capture_device_client.cc
+@@ -173,7 +173,7 @@ FourccAndFlip GetFourccAndFlipFromPixelF
+       CHECK(!is_width_odd && !is_height_odd);
+       return {libyuv::FOURCC_UYVY};
+     case media::PIXEL_FORMAT_RGB24:
+-      if constexpr (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) {
++      if constexpr (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) {
+         // Linux RGB24 defines red at lowest byte address,
+         // see http://linuxtv.org/downloads/v4l-dvb-apis/packed-rgb.html.
+         return {libyuv::FOURCC_RAW};
diff --git a/chromium-wip/patches/patch-media_cdm_cdm__paths__unittest.cc b/chromium-wip/patches/patch-media_cdm_cdm__paths__unittest.cc
new file mode 100644
index 0000000000..2bb139c1f3
--- /dev/null
+++ b/chromium-wip/patches/patch-media_cdm_cdm__paths__unittest.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/cdm/cdm_paths_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/cdm/cdm_paths_unittest.cc
+@@ -26,7 +26,7 @@ const char kComponentPlatform[] =
+     "win";
+ #elif BUILDFLAG(IS_CHROMEOS)
+     "cros";
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     "linux";
+ #elif BUILDFLAG(IS_FUCHSIA)
+     "fuchsia";
diff --git a/chromium-wip/patches/patch-media_cdm_library__cdm_cdm__paths.gni b/chromium-wip/patches/patch-media_cdm_library__cdm_cdm__paths.gni
new file mode 100644
index 0000000000..38466f1a03
--- /dev/null
+++ b/chromium-wip/patches/patch-media_cdm_library__cdm_cdm__paths.gni
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/cdm/library_cdm/cdm_paths.gni.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/cdm/library_cdm/cdm_paths.gni
+@@ -14,7 +14,7 @@ assert(enable_library_cdms)
+ # Explicitly define what we use to avoid confusion.
+ if (is_chromeos) {
+   component_os = "cros"
+-} else if (is_linux) {
++} else if (is_linux || is_bsd) {
+   component_os = "linux"
+ } else if (is_win) {
+   component_os = "win"
diff --git a/chromium-wip/patches/patch-media_ffmpeg_scripts_build__ffmpeg.py b/chromium-wip/patches/patch-media_ffmpeg_scripts_build__ffmpeg.py
new file mode 100644
index 0000000000..6582f16454
--- /dev/null
+++ b/chromium-wip/patches/patch-media_ffmpeg_scripts_build__ffmpeg.py
@@ -0,0 +1,82 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/ffmpeg/scripts/build_ffmpeg.py.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/ffmpeg/scripts/build_ffmpeg.py
+@@ -33,7 +33,7 @@ NDK_ROOT_DIR = os.path.abspath(
+ SUCCESS_TOKEN = 'THIS_BUILD_WORKED'
+ 
+ sys.path.append(os.path.join(CHROMIUM_ROOT_DIR, 'build'))
+-import gn_helpers
++#import gn_helpers
+ 
+ BRANDINGS = [
+     'Chrome',
+@@ -43,6 +43,9 @@ BRANDINGS = [
+ ARCH_MAP = {
+     'android': ['ia32', 'x64', 'arm-neon', 'arm64'],
+     'linux': ['ia32', 'x64', 'noasm-x64', 'arm', 'arm-neon', 'arm64'],
++    'openbsd': ['x64', 'arm64', 'ia32'],
++    'freebsd': ['x64', 'arm64', 'ia32'],
++    'netbsd': ['x64', 'arm64', 'ia32'],
+     'mac': ['x64', 'arm64'],
+     'win': ['ia32', 'x64', 'arm64'],
+ }
+@@ -122,7 +125,7 @@ def PrintAndCheckCall(argv, *args, **kwa
+ 
+ 
+ def GetDsoName(target_os, dso_name, dso_version):
+-    if target_os in ('linux', 'linux-noasm', 'android'):
++    if target_os in ('linux', 'linux-noasm', 'android', 'openbsd', 'freebsd', 'netbsd'):
+         return 'lib%s.so.%s' % (dso_name, dso_version)
+     elif target_os == 'mac':
+         return 'lib%s.%s.dylib' % (dso_name, dso_version)
+@@ -473,7 +476,7 @@ def BuildFFmpeg(target_os, target_arch, 
+     # removing <sys/sysctl.h> soon, so this is needed to silence a deprecation
+     # #warning which will be converted to an error via -Werror.
+     # There is also no prctl.h
+-    if target_os in ['linux', 'linux-noasm']:
++    if target_os in ['linux', 'linux-noasm', 'openbsd', 'freebsd', 'netbsd']:
+         pre_make_rewrites += [
+             (r'(#define HAVE_SYSCTL [01])',
+              r'#define HAVE_SYSCTL 0 /* \1 -- forced to 0 for Fuchsia */'),
+@@ -596,7 +599,7 @@ def main(argv):
+     configure_args = args[2:]
+ 
+     if target_os not in ('android', 'linux', 'linux-noasm', 'mac', 'win',
+-                         'all'):
++                         'all', 'openbsd', 'freebsd', 'netbsd'):
+         parser.print_help()
+         return 1
+ 
+@@ -710,7 +713,7 @@ def ConfigureAndBuild(target_arch, targe
+             '--optflags="-O2"',
+         ])
+ 
+-    if target_os in ('linux', 'linux-noasm', 'android'):
++    if target_os in ('linux', 'linux-noasm', 'android', 'openbsd', 'freebsd', 'netbsd'):
+         if target_arch == 'x64':
+             if target_os == 'android':
+                 configure_flags['Common'].extend([
+@@ -825,9 +828,6 @@ def ConfigureAndBuild(target_arch, targe
+ 
+                 configure_flags['Common'].extend([
+                     '--target-os=linux',
+-                    '--sysroot=' +
+-                    os.path.join(CHROMIUM_ROOT_DIR,
+-                                 'build/linux/debian_bullseye_arm64-sysroot'),
+                     # See crbug.com/1467681. These could be removed eventually
+                     '--disable-dotprod',
+                     '--disable-i8mm',
+@@ -919,7 +919,7 @@ def ConfigureAndBuild(target_arch, targe
+         # typically be the system one, so explicitly configure use of Clang's
+         # ld.lld, to ensure that things like cross-compilation and LTO work.
+         # This does not work for ia32 and is always used on mac.
+-        if target_arch != 'ia32' and target_os != 'mac':
++        if target_arch != 'ia32' and target_os != 'mac' and target_os != 'netbsd':
+             configure_flags['Common'].append('--extra-ldflags=-fuse-ld=lld')
+ 
+     # Should be run on Mac, unless we're cross-compiling on Linux.
diff --git a/chromium-wip/patches/patch-media_ffmpeg_scripts_robo__lib_config.py b/chromium-wip/patches/patch-media_ffmpeg_scripts_robo__lib_config.py
new file mode 100644
index 0000000000..1d9ed3b8be
--- /dev/null
+++ b/chromium-wip/patches/patch-media_ffmpeg_scripts_robo__lib_config.py
@@ -0,0 +1,64 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/ffmpeg/scripts/robo_lib/config.py.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/ffmpeg/scripts/robo_lib/config.py
+@@ -56,19 +56,13 @@ class RoboConfiguration:
+         self._llvm_path = os.path.join(self.chrome_src(), "third_party",
+                                        "llvm-build", "Release+Asserts", "bin")
+ 
+-        self.EnsurePathContainsLLVM()
+-        self.EnsureNoMakeInfo()
+         self.EnsureFFmpegHome()
+         self.EnsureGNConfig()
+-        self.ComputeBranchName()
+ 
+         if not quiet:
+             shell.log(f"Using chrome src: {self.chrome_src()}")
+             shell.log(f"Using script dir: {self._script_directory}")
+             shell.log(f"Using ffmpeg home: {self.ffmpeg_home()}")
+-            shell.log(f"On branch: {self.branch_name()}")
+-            if self.sushi_branch_name():
+-                shell.log(f"On sushi branch: {self.sushi_branch_name()}")
+ 
+         # Filename that we'll ask generate_gn.py to write git commands to.
+         # TODO: Should this use script_directory, or stay with ffmpeg?  As long
+@@ -187,9 +181,9 @@ class RoboConfiguration:
+ 
+         if re.match(r"i.86", platform.machine()):
+             self._host_architecture = "ia32"
+-        elif platform.machine() == "x86_64" or platform.machine() == "AMD64":
++        elif platform.machine() == "x86_64" or platform.machine() == "AMD64" or platform.machine() == "amd64":
+             self._host_architecture = "x64"
+-        elif platform.machine() == "aarch64":
++        elif platform.machine() == "aarch64" or platform.machine() == "arm64" or platform.machine() == "evbarm":
+             self._host_architecture = "arm64"
+         elif platform.machine() == "mips32":
+             self._host_architecture = "mipsel"
+@@ -228,6 +222,12 @@ class RoboConfiguration:
+         elif platform.system() == "Windows" or "CYGWIN_NT" in platform.system(
+         ):
+             self._host_operating_system = "win"
++        elif platform.system() == "OpenBSD":
++            self._host_operating_system = "openbsd"
++        elif platform.system() == "FreeBSD":
++            self._host_operating_system = "freebsd"
++        elif platform.system() == "NetBSD":
++            self._host_operating_system = "netbsd"
+         else:
+             raise ValueError(f"Unsupported platform: {platform.system()}")
+ 
+@@ -236,8 +236,8 @@ class RoboConfiguration:
+         wd = os.getcwd()
+         # Walk up the tree until we find src/AUTHORS
+         while wd != "/":
+-            if os.path.isfile(os.path.join(wd, "src", "AUTHORS")):
+-                self._chrome_src = os.path.join(wd, "src")
++            if os.path.isfile(os.path.join(wd, "third_party", "DEPS")):
++                self._chrome_src = wd
+                 return
+             wd = os.path.dirname(wd)
+         raise Exception("could not find src/AUTHORS in any parent of the wd")
diff --git a/chromium-wip/patches/patch-media_gpu_chromeos_gl__image__processor__backend.cc b/chromium-wip/patches/patch-media_gpu_chromeos_gl__image__processor__backend.cc
new file mode 100644
index 0000000000..29d9a4bce9
--- /dev/null
+++ b/chromium-wip/patches/patch-media_gpu_chromeos_gl__image__processor__backend.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/gpu/chromeos/gl_image_processor_backend.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/gpu/chromeos/gl_image_processor_backend.cc
+@@ -28,6 +28,10 @@
+ #include "ui/ozone/public/ozone_platform.h"
+ #include "ui/ozone/public/surface_factory_ozone.h"
+ 
++#ifndef GL_CONTEXT_LOST_KHR
++#define GL_CONTEXT_LOST_KHR 0x0507
++#endif
++
+ namespace media {
+ 
+ namespace {
diff --git a/chromium-wip/patches/patch-media_gpu_chromeos_libyuv__image__processor__backend.cc b/chromium-wip/patches/patch-media_gpu_chromeos_libyuv__image__processor__backend.cc
new file mode 100644
index 0000000000..a86ff16e6f
--- /dev/null
+++ b/chromium-wip/patches/patch-media_gpu_chromeos_libyuv__image__processor__backend.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/gpu/chromeos/libyuv_image_processor_backend.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/gpu/chromeos/libyuv_image_processor_backend.cc
+@@ -53,7 +53,7 @@ static constexpr struct {
+ #define CONV(in, out, trans, result) \
+   {Fourcc::in, Fourcc::out, Transform::trans, SupportResult::result}
+     // Conversion.
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     CONV(NV12, AR24, kConversion, Supported),
+ #endif
+     CONV(NV12, NV12, kConversion, Supported),
+@@ -412,7 +412,7 @@ int LibYUVImageProcessorBackend::DoConve
+           fr->GetWritableVisibleData(VideoFrame::Plane::kUV)), \
+       fr->stride(VideoFrame::Plane::kUV)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #define ARGB_DATA(fr)                                   \
+   fr->GetWritableVisibleData(VideoFrame::Plane::kARGB), \
+       fr->stride(VideoFrame::Plane::kARGB)
+@@ -574,7 +574,7 @@ int LibYUVImageProcessorBackend::DoConve
+     }
+   }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (output->format() == PIXEL_FORMAT_ARGB) {
+     if (input_config_.fourcc == Fourcc(Fourcc::NV12)) {
+       return LIBYUV_FUNC(NV12ToARGB, Y_UV_DATA(input),
diff --git a/chromium-wip/patches/patch-media_gpu_chromeos_mailbox__video__frame__converter.cc b/chromium-wip/patches/patch-media_gpu_chromeos_mailbox__video__frame__converter.cc
new file mode 100644
index 0000000000..63805c7bdf
--- /dev/null
+++ b/chromium-wip/patches/patch-media_gpu_chromeos_mailbox__video__frame__converter.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/gpu/chromeos/mailbox_video_frame_converter.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/gpu/chromeos/mailbox_video_frame_converter.cc
+@@ -68,7 +68,7 @@ viz::SharedImageFormat GetSharedImageFor
+                     << static_cast<int>(buffer_format);
+       NOTREACHED();
+   }
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // If format is true multiplanar format, we prefer external sampler on
+   // ChromeOS and Linux.
+   if (format.is_multi_plane()) {
diff --git a/chromium-wip/patches/patch-media_gpu_chromeos_platform__video__frame__utils.cc b/chromium-wip/patches/patch-media_gpu_chromeos_platform__video__frame__utils.cc
new file mode 100644
index 0000000000..9ad51c8e30
--- /dev/null
+++ b/chromium-wip/patches/patch-media_gpu_chromeos_platform__video__frame__utils.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/gpu/chromeos/platform_video_frame_utils.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/gpu/chromeos/platform_video_frame_utils.cc
+@@ -69,7 +69,7 @@ static std::unique_ptr<ui::GbmDevice> Cr
+     const base::FilePath dev_path(FILE_PATH_LITERAL(
+         base::StrCat({drm_node_file_prefix, base::NumberToString(i)})));
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_V4L2_CODEC)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_V4L2_CODEC)
+     const bool is_render_node = base::Contains(drm_node_file_prefix, "render");
+ 
+     // TODO(b/313513760): don't guard base::File::FLAG_WRITE behind
+@@ -190,7 +190,7 @@ class GbmDeviceWrapper {
+       const base::FilePath dev_path(
+           base::CommandLine::ForCurrentProcess()->GetSwitchValuePath(
+               switches::kRenderNodeOverride));
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_V4L2_CODEC)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_V4L2_CODEC)
+       const bool is_render_node = base::Contains(dev_path.value(), "render");
+ 
+       // TODO(b/313513760): don't guard base::File::FLAG_WRITE behind
diff --git a/chromium-wip/patches/patch-media_gpu_chromeos_video__decoder__pipeline.cc b/chromium-wip/patches/patch-media_gpu_chromeos_video__decoder__pipeline.cc
new file mode 100644
index 0000000000..ad9aec8e8d
--- /dev/null
+++ b/chromium-wip/patches/patch-media_gpu_chromeos_video__decoder__pipeline.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/gpu/chromeos/video_decoder_pipeline.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/gpu/chromeos/video_decoder_pipeline.cc
+@@ -1128,7 +1128,7 @@ VideoDecoderPipeline::PickDecoderOutputF
+   }
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_VAAPI)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_VAAPI)
+   // Linux should always use a custom allocator (to allocate buffers using
+   // libva) and a PlatformVideoFramePool.
+   CHECK(allocator.has_value());
+@@ -1137,7 +1137,7 @@ VideoDecoderPipeline::PickDecoderOutputF
+   // VideoFrame::StorageType of VideoFrame::STORAGE_DMABUFS.
+   main_frame_pool_->AsPlatformVideoFramePool()->SetCustomFrameAllocator(
+       *allocator, VideoFrame::STORAGE_DMABUFS);
+-#elif BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_V4L2_CODEC)
++#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_V4L2_CODEC)
+   // Linux w/ V4L2 should not use a custom allocator
+   // Only tested with video_decode_accelerator_tests
+   // TODO(wenst@) Test with full Chromium Browser
+@@ -1311,7 +1311,7 @@ VideoDecoderPipeline::PickDecoderOutputF
+              << " VideoFrames";
+     auxiliary_frame_pool_->set_parent_task_runner(decoder_task_runner_);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // The custom allocator creates frames backed by NativePixmap, which uses a
+     // VideoFrame::StorageType of VideoFrame::STORAGE_DMABUFS.
+     auxiliary_frame_pool_->AsPlatformVideoFramePool()->SetCustomFrameAllocator(
diff --git a/chromium-wip/patches/patch-media_gpu_gpu__video__decode__accelerator__factory.cc b/chromium-wip/patches/patch-media_gpu_gpu__video__decode__accelerator__factory.cc
new file mode 100644
index 0000000000..ea0a2962fe
--- /dev/null
+++ b/chromium-wip/patches/patch-media_gpu_gpu__video__decode__accelerator__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/gpu/gpu_video_decode_accelerator_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/gpu/gpu_video_decode_accelerator_factory.cc
+@@ -13,7 +13,7 @@
+ #include "media/gpu/media_gpu_export.h"
+ #include "media/media_buildflags.h"
+ 
+-#if BUILDFLAG(USE_V4L2_CODEC) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
++#if BUILDFLAG(USE_V4L2_CODEC) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))
+ #include "media/gpu/v4l2/legacy/v4l2_video_decode_accelerator.h"
+ #include "media/gpu/v4l2/v4l2_device.h"
+ #endif
+@@ -29,7 +29,7 @@ GpuVideoDecodeAcceleratorFactory::Create
+   if (gpu_preferences.disable_accelerated_video_decode)
+     return nullptr;
+ 
+-#if BUILDFLAG(USE_V4L2_CODEC) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
++#if BUILDFLAG(USE_V4L2_CODEC) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))
+ 
+   std::unique_ptr<VideoDecodeAccelerator> vda;
+   vda.reset(new V4L2VideoDecodeAccelerator(base::MakeRefCounted<V4L2Device>()));
diff --git a/chromium-wip/patches/patch-media_gpu_gpu__video__encode__accelerator__factory.cc b/chromium-wip/patches/patch-media_gpu_gpu__video__encode__accelerator__factory.cc
new file mode 100644
index 0000000000..1e34f02bbe
--- /dev/null
+++ b/chromium-wip/patches/patch-media_gpu_gpu__video__encode__accelerator__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/gpu/gpu_video_encode_accelerator_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/gpu/gpu_video_encode_accelerator_factory.cc
+@@ -160,7 +160,7 @@ std::vector<VEAFactoryFunction> GetVEAFa
+   }
+ 
+ #if BUILDFLAG(USE_VAAPI)
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (base::FeatureList::IsEnabled(kAcceleratedVideoEncodeLinux)) {
+     vea_factory_functions->push_back(base::BindRepeating(&CreateVaapiVEA));
+   }
+@@ -168,7 +168,7 @@ std::vector<VEAFactoryFunction> GetVEAFa
+   vea_factory_functions->push_back(base::BindRepeating(&CreateVaapiVEA));
+ #endif
+ #elif BUILDFLAG(USE_V4L2_CODEC)
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (base::FeatureList::IsEnabled(kAcceleratedVideoEncodeLinux)) {
+     vea_factory_functions->push_back(base::BindRepeating(&CreateV4L2VEA));
+   }
diff --git a/chromium-wip/patches/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc b/chromium-wip/patches/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc
new file mode 100644
index 0000000000..c674bbf66d
--- /dev/null
+++ b/chromium-wip/patches/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc
@@ -0,0 +1,50 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.cc
+@@ -17,7 +17,9 @@
+ #include "media/gpu/vaapi/vaapi_wrapper.h"
+ #endif
+ 
++#if !BUILDFLAG(IS_BSD)
+ using sandbox::syscall_broker::BrokerFilePermission;
++#endif
+ 
+ // TODO(b/195769334): the hardware video decoding sandbox is really only useful
+ // when building with VA-API or V4L2 (otherwise, we're not really doing hardware
+@@ -33,6 +35,7 @@ using sandbox::syscall_broker::BrokerFil
+ namespace media {
+ namespace {
+ 
++#if !BUILDFLAG(IS_BSD)
+ void AllowAccessToRenderNodes(std::vector<BrokerFilePermission>& permissions,
+                               bool include_sys_dev_char,
+                               bool read_write) {
+@@ -180,6 +183,7 @@ bool HardwareVideoDecodingPreSandboxHook
+   NOTREACHED();
+ #endif  // BUILDFLAG(USE_V4L2_CODEC)
+ }
++#endif
+ 
+ }  // namespace
+ 
+@@ -195,6 +199,7 @@ bool HardwareVideoDecodingPreSandboxHook
+ //   (at least).
+ bool HardwareVideoDecodingPreSandboxHook(
+     sandbox::policy::SandboxLinux::Options options) {
++#if !BUILDFLAG(IS_BSD)
+   using HardwareVideoDecodingProcessPolicy =
+       sandbox::policy::HardwareVideoDecodingProcessPolicy;
+   using PolicyType =
+@@ -240,6 +245,7 @@ bool HardwareVideoDecodingPreSandboxHook
+   // |permissions| is empty?
+   sandbox::policy::SandboxLinux::GetInstance()->StartBrokerProcess(
+       command_set, permissions, options);
++#endif
+   return true;
+ }
+ 
diff --git a/chromium-wip/patches/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.h b/chromium-wip/patches/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.h
new file mode 100644
index 0000000000..e4090d4041
--- /dev/null
+++ b/chromium-wip/patches/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.h
+@@ -5,7 +5,13 @@
+ #ifndef MEDIA_GPU_SANDBOX_HARDWARE_VIDEO_DECODING_SANDBOX_HOOK_LINUX_H_
+ #define MEDIA_GPU_SANDBOX_HARDWARE_VIDEO_DECODING_SANDBOX_HOOK_LINUX_H_
+ 
++#include "build/build_config.h"
++
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#else
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#endif
+ 
+ namespace media {
+ 
diff --git a/chromium-wip/patches/patch-media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.cc b/chromium-wip/patches/patch-media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.cc
new file mode 100644
index 0000000000..6cd1d3b379
--- /dev/null
+++ b/chromium-wip/patches/patch-media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.cc
@@ -0,0 +1,32 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.cc
+@@ -18,12 +18,15 @@
+ #include "media/gpu/v4l2/v4l2_device.h"
+ #endif
+ 
++#if !BUILDFLAG(IS_BSD)
+ using sandbox::syscall_broker::BrokerFilePermission;
++#endif
+ 
+ namespace media {
+ 
+ bool HardwareVideoEncodingPreSandboxHook(
+     sandbox::policy::SandboxLinux::Options options) {
++#if !BUILDFLAG(IS_BSD)
+   sandbox::syscall_broker::BrokerCommandSet command_set;
+   std::vector<BrokerFilePermission> permissions;
+ 
+@@ -132,6 +135,7 @@ bool HardwareVideoEncodingPreSandboxHook
+     dlopen("libvulkan_radeon.so", kDlopenFlags);
+   }
+ #endif
++#endif
+   return true;
+ }
+ 
diff --git a/chromium-wip/patches/patch-media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.h b/chromium-wip/patches/patch-media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.h
new file mode 100644
index 0000000000..cf327dcce7
--- /dev/null
+++ b/chromium-wip/patches/patch-media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.h
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.h
+@@ -5,7 +5,13 @@
+ #ifndef MEDIA_GPU_SANDBOX_HARDWARE_VIDEO_ENCODING_SANDBOX_HOOK_LINUX_H_
+ #define MEDIA_GPU_SANDBOX_HARDWARE_VIDEO_ENCODING_SANDBOX_HOOK_LINUX_H_
+ 
++#include "build/build_config.h"
++
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#else
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#endif
+ 
+ namespace media {
+ 
+@@ -14,4 +20,4 @@ bool HardwareVideoEncodingPreSandboxHook
+ 
+ }  // namespace media
+ 
+-#endif  // MEDIA_GPU_SANDBOX_HARDWARE_VIDEO_ENCODING_SANDBOX_HOOK_LINUX_H_
+\ No newline at end of file
++#endif  // MEDIA_GPU_SANDBOX_HARDWARE_VIDEO_ENCODING_SANDBOX_HOOK_LINUX_H_
diff --git a/chromium-wip/patches/patch-media_gpu_test_raw__video.cc b/chromium-wip/patches/patch-media_gpu_test_raw__video.cc
new file mode 100644
index 0000000000..1cd26fe0d7
--- /dev/null
+++ b/chromium-wip/patches/patch-media_gpu_test_raw__video.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/gpu/test/raw_video.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/gpu/test/raw_video.cc
+@@ -63,7 +63,7 @@ std::unique_ptr<base::MemoryMappedFile> 
+                              base::File::FLAG_READ | base::File::FLAG_WRITE
+ // On Windows FLAG_CREATE_ALWAYS will require FLAG_WRITE, and FLAG_APPEND
+ // must not be specified.
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+                              | base::File::FLAG_APPEND
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+           ),
diff --git a/chromium-wip/patches/patch-media_gpu_test_video__frame__file__writer.cc b/chromium-wip/patches/patch-media_gpu_test_video__frame__file__writer.cc
new file mode 100644
index 0000000000..0679f84c18
--- /dev/null
+++ b/chromium-wip/patches/patch-media_gpu_test_video__frame__file__writer.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/gpu/test/video_frame_file_writer.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/gpu/test/video_frame_file_writer.cc
+@@ -25,7 +25,7 @@
+ #include "testing/gtest/include/gtest/gtest.h"
+ #include "ui/gfx/codec/png_codec.h"
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include <sys/mman.h>
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+ 
diff --git a/chromium-wip/patches/patch-media_gpu_test_video__frame__helpers.cc b/chromium-wip/patches/patch-media_gpu_test_video__frame__helpers.cc
new file mode 100644
index 0000000000..8d1b39a5ec
--- /dev/null
+++ b/chromium-wip/patches/patch-media_gpu_test_video__frame__helpers.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/gpu/test/video_frame_helpers.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/gpu/test/video_frame_helpers.cc
+@@ -23,7 +23,7 @@
+ #include "ui/gfx/buffer_format_util.h"
+ #include "ui/gfx/gpu_memory_buffer_handle.h"
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include <sys/mman.h>
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+ 
diff --git a/chromium-wip/patches/patch-media_gpu_test_video__frame__validator.cc b/chromium-wip/patches/patch-media_gpu_test_video__frame__validator.cc
new file mode 100644
index 0000000000..13d6067537
--- /dev/null
+++ b/chromium-wip/patches/patch-media_gpu_test_video__frame__validator.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/gpu/test/video_frame_validator.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/gpu/test/video_frame_validator.cc
+@@ -33,7 +33,7 @@
+ #include "media/media_buildflags.h"
+ #include "testing/gtest/include/gtest/gtest.h"
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include <sys/mman.h>
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+ 
diff --git a/chromium-wip/patches/patch-media_gpu_vaapi_vaapi__video__decoder.cc b/chromium-wip/patches/patch-media_gpu_vaapi_vaapi__video__decoder.cc
new file mode 100644
index 0000000000..3aeeac4461
--- /dev/null
+++ b/chromium-wip/patches/patch-media_gpu_vaapi_vaapi__video__decoder.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/gpu/vaapi/vaapi_video_decoder.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/gpu/vaapi/vaapi_video_decoder.cc
+@@ -785,7 +785,7 @@ void VaapiVideoDecoder::ApplyResolutionC
+   const gfx::Size decoder_natural_size =
+       aspect_ratio_.GetNaturalSize(decoder_visible_rect);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   std::optional<DmabufVideoFramePool::CreateFrameCB> allocator =
+       base::BindRepeating(&AllocateCustomFrameProxy, weak_this_);
+   std::vector<ImageProcessor::PixelLayoutCandidate> candidates = {
diff --git a/chromium-wip/patches/patch-media_gpu_vaapi_vaapi__wrapper.cc b/chromium-wip/patches/patch-media_gpu_vaapi_vaapi__wrapper.cc
new file mode 100644
index 0000000000..98bf94ceab
--- /dev/null
+++ b/chromium-wip/patches/patch-media_gpu_vaapi_vaapi__wrapper.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/gpu/vaapi/vaapi_wrapper.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/gpu/vaapi/vaapi_wrapper.cc
+@@ -83,7 +83,7 @@
+ using media_gpu_vaapi::kModuleVa_prot;
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "base/files/file_util.h"
+ #include "base/strings/string_split.h"
+ #endif
diff --git a/chromium-wip/patches/patch-media_media__options.gni b/chromium-wip/patches/patch-media_media__options.gni
new file mode 100644
index 0000000000..dd382997d8
--- /dev/null
+++ b/chromium-wip/patches/patch-media_media__options.gni
@@ -0,0 +1,28 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/media_options.gni.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/media_options.gni
+@@ -200,12 +200,18 @@ declare_args() {
+   # Enables runtime selection of ALSA library for audio.
+   use_alsa = false
+ 
++  # Enable runtime selection of sndio(7)
++  use_sndio = false
++
++  # Enable runtime selection of audio(4)
++  use_audioio = false
++
+   # Alsa should be used on all non-Android, non-Mac POSIX systems - with the
+   # exception of CastOS desktop builds.
+   #
+   # TODO(crbug.com/1336055): Remove legacy target_cpu hack used for targeting
+   # desktop Chromecast builds.
+-  if (is_posix && !is_android && !is_apple &&
++  if (is_posix && !is_android && !is_apple && !is_bsd &&
+       (!is_castos || (target_cpu == "x86" || target_cpu == "x64") ||
+        is_cast_audio_only)) {
+     use_alsa = true
diff --git a/chromium-wip/patches/patch-media_mojo_mojom_BUILD.gn b/chromium-wip/patches/patch-media_mojo_mojom_BUILD.gn
new file mode 100644
index 0000000000..c8be681857
--- /dev/null
+++ b/chromium-wip/patches/patch-media_mojo_mojom_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/mojo/mojom/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/mojo/mojom/BUILD.gn
+@@ -979,7 +979,7 @@ source_set("test_support") {
+   sources = []
+   deps = []
+ 
+-  if (is_linux || is_chromeos) {
++  if (!is_bsd && (is_linux || is_chromeos)) {
+     sources += [
+       "buffer_handle_test_util.cc",
+       "buffer_handle_test_util.h",
diff --git a/chromium-wip/patches/patch-media_mojo_mojom_video__frame__mojom__traits.cc b/chromium-wip/patches/patch-media_mojo_mojom_video__frame__mojom__traits.cc
new file mode 100644
index 0000000000..23c48b19bd
--- /dev/null
+++ b/chromium-wip/patches/patch-media_mojo_mojom_video__frame__mojom__traits.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/mojo/mojom/video_frame_mojom_traits.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/mojo/mojom/video_frame_mojom_traits.cc
+@@ -23,7 +23,7 @@
+ #include "ui/gfx/mojom/color_space_mojom_traits.h"
+ #include "ui/gfx/mojom/hdr_metadata_mojom_traits.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "base/posix/eintr_wrapper.h"
+ #include "media/gpu/buffer_validation.h"
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+@@ -160,7 +160,7 @@ media::mojom::VideoFrameDataPtr MakeVide
+         media::mojom::OpaqueVideoFrameData::New());
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (input->storage_type() == media::VideoFrame::STORAGE_DMABUFS) {
+     // Duplicates the DMA buffer FDs to a new vector since this cannot take
+     // ownership of the FDs in |input| due to constness.
+@@ -191,7 +191,7 @@ media::mojom::VideoFrameDataPtr MakeVide
+ 
+ }  // namespace
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // static
+ bool StructTraits<
+     media::mojom::ColorPlaneLayoutDataView,
+@@ -430,7 +430,7 @@ bool StructTraits<media::mojom::VideoFra
+     frame = media::VideoFrame::WrapTrackingToken(
+         format, *metadata.tracking_token, coded_size, visible_rect,
+         natural_size, timestamp);
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   } else if (data.is_dmabuf_data()) {
+     media::mojom::DmabufVideoFrameDataDataView dmabuf_data;
+     data.GetDmabufDataDataView(&dmabuf_data);
diff --git a/chromium-wip/patches/patch-media_mojo_mojom_video__frame__mojom__traits.h b/chromium-wip/patches/patch-media_mojo_mojom_video__frame__mojom__traits.h
new file mode 100644
index 0000000000..c9514fe5f6
--- /dev/null
+++ b/chromium-wip/patches/patch-media_mojo_mojom_video__frame__mojom__traits.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/mojo/mojom/video_frame_mojom_traits.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/mojo/mojom/video_frame_mojom_traits.h
+@@ -21,7 +21,7 @@
+ 
+ namespace mojo {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ template <>
+ struct StructTraits<media::mojom::ColorPlaneLayoutDataView,
+                     media::ColorPlaneLayout> {
diff --git a/chromium-wip/patches/patch-media_video_gpu__memory__buffer__video__frame__pool.cc b/chromium-wip/patches/patch-media_video_gpu__memory__buffer__video__frame__pool.cc
new file mode 100644
index 0000000000..fd1392ddae
--- /dev/null
+++ b/chromium-wip/patches/patch-media_video_gpu__memory__buffer__video__frame__pool.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/video/gpu_memory_buffer_video_frame_pool.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/video/gpu_memory_buffer_video_frame_pool.cc
+@@ -647,7 +647,7 @@ void GpuMemoryBufferVideoFramePool::Pool
+   }
+ 
+   bool is_software_backed_video_frame = !video_frame->HasSharedImage();
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   is_software_backed_video_frame &= !video_frame->HasDmaBufs();
+ #endif
+ 
+@@ -1054,7 +1054,7 @@ scoped_refptr<VideoFrame> GpuMemoryBuffe
+       media::IOSurfaceIsWebGPUCompatible(handle.io_surface.get());
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   is_webgpu_compatible =
+       handle.type == gfx::NATIVE_PIXMAP &&
+       handle.native_pixmap_handle().supports_zero_copy_webgpu_import;
+@@ -1226,7 +1226,7 @@ GpuMemoryBufferVideoFramePool::PoolImpl:
+       si_usage |= gpu::SHARED_IMAGE_USAGE_SCANOUT;
+     }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     // TODO(crbug.com/40194712): Always add the flag once the
+     // OzoneImageBacking is by default turned on.
+     if (base::CommandLine::ForCurrentProcess()->HasSwitch(
diff --git a/chromium-wip/patches/patch-media_video_video__encode__accelerator__adapter.cc b/chromium-wip/patches/patch-media_video_video__encode__accelerator__adapter.cc
new file mode 100644
index 0000000000..6238d8617f
--- /dev/null
+++ b/chromium-wip/patches/patch-media_video_video__encode__accelerator__adapter.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/video/video_encode_accelerator_adapter.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/video/video_encode_accelerator_adapter.cc
+@@ -470,7 +470,7 @@ void VideoEncodeAcceleratorAdapter::Init
+ 
+   auto format = PIXEL_FORMAT_I420;
+   auto storage_type = VideoEncodeAccelerator::Config::StorageType::kShmem;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Linux/ChromeOS require a special configuration to use dmabuf storage.
+   // We need to keep sending frames with the same storage type.
+   // Other platforms will happily mix GpuMemoryBuffer storage with shared-mem
diff --git a/chromium-wip/patches/patch-media_video_video__encode__accelerator__adapter__test.cc b/chromium-wip/patches/patch-media_video_video__encode__accelerator__adapter__test.cc
new file mode 100644
index 0000000000..a4e7a6ee53
--- /dev/null
+++ b/chromium-wip/patches/patch-media_video_video__encode__accelerator__adapter__test.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/video/video_encode_accelerator_adapter_test.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/video/video_encode_accelerator_adapter_test.cc
+@@ -260,7 +260,7 @@ TEST_F(VideoEncodeAcceleratorAdapterTest
+       });
+ 
+   VideoPixelFormat expected_input_format = PIXEL_FORMAT_I420;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   expected_input_format = PIXEL_FORMAT_NV12;
+ #endif
+   vea()->SetEncodingCallback(base::BindLambdaForTesting(
+@@ -369,7 +369,7 @@ TEST_F(VideoEncodeAcceleratorAdapterTest
+       });
+ 
+   VideoPixelFormat expected_input_format = PIXEL_FORMAT_I420;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   expected_input_format = PIXEL_FORMAT_NV12;
+ #endif
+ 
+@@ -467,7 +467,7 @@ TEST_P(VideoEncodeAcceleratorAdapterTest
+       CreateGreenFrame(large_size, pixel_format, base::Milliseconds(2));
+ 
+   VideoPixelFormat expected_input_format = PIXEL_FORMAT_I420;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     expected_input_format = PIXEL_FORMAT_NV12;
+ #endif
+   const gfx::ColorSpace expected_color_space =
+@@ -674,7 +674,7 @@ TEST_F(VideoEncodeAcceleratorAdapterTest
+       });
+ 
+   VideoPixelFormat expected_input_format = PIXEL_FORMAT_I420;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   expected_input_format = PIXEL_FORMAT_NV12;
+ #endif
+   vea()->SetEncodingCallback(base::BindLambdaForTesting(
diff --git a/chromium-wip/patches/patch-media_webrtc_audio__processor.cc b/chromium-wip/patches/patch-media_webrtc_audio__processor.cc
new file mode 100644
index 0000000000..3de88b1790
--- /dev/null
+++ b/chromium-wip/patches/patch-media_webrtc_audio__processor.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/webrtc/audio_processor.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/webrtc/audio_processor.cc
+@@ -507,7 +507,7 @@ std::optional<double> AudioProcessor::Pr
+   // controller.
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
+   DCHECK_LE(volume, 1.0);
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // We have a special situation on Linux where the microphone volume can be
+   // "higher than maximum". The input volume slider in the sound preference
+   // allows the user to set a scaling that is higher than 100%. It means that
diff --git a/chromium-wip/patches/patch-media_webrtc_helpers.cc b/chromium-wip/patches/patch-media_webrtc_helpers.cc
new file mode 100644
index 0000000000..2993138d6b
--- /dev/null
+++ b/chromium-wip/patches/patch-media_webrtc_helpers.cc
@@ -0,0 +1,25 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/webrtc/helpers.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/webrtc/helpers.cc
+@@ -46,14 +46,14 @@ void ConfigAutomaticGainControl(const Au
+     return;
+   }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   const bool kInputVolumeAdjustmentOverrideAllowed = true;
+ #elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
+   const bool kInputVolumeAdjustmentOverrideAllowed = false;
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   // Use AGC2 digital and input volume controller.
+   // TODO(crbug.com/40872787): Remove `kWebRtcAllowInputVolumeAdjustment` safely
+   // and set `input_volume_controller.enabled` true.
diff --git a/chromium-wip/patches/patch-media_webrtc_helpers__unittests.cc b/chromium-wip/patches/patch-media_webrtc_helpers__unittests.cc
new file mode 100644
index 0000000000..9451c79a4e
--- /dev/null
+++ b/chromium-wip/patches/patch-media_webrtc_helpers__unittests.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- media/webrtc/helpers_unittests.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ media/webrtc/helpers_unittests.cc
+@@ -39,7 +39,7 @@ TEST(CreateWebRtcAudioProcessingModuleTe
+   EXPECT_TRUE(config.echo_canceller.enabled);
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   EXPECT_FALSE(config.gain_controller1.enabled);
+   EXPECT_TRUE(config.gain_controller2.enabled);
+ #elif BUILDFLAG(IS_CASTOS) || BUILDFLAG(IS_CAST_ANDROID)
+@@ -66,7 +66,7 @@ TEST(CreateWebRtcAudioProcessingModuleTe
+ }
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ TEST(CreateWebRtcAudioProcessingModuleTest,
+      InputVolumeAdjustmentEnabledWithAgc2) {
+   ::base::test::ScopedFeatureList feature_list;
+@@ -82,7 +82,7 @@ TEST(CreateWebRtcAudioProcessingModuleTe
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
+         // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ TEST(CreateWebRtcAudioProcessingModuleTest,
+      CanDisableInputVolumeAdjustmentWithAgc2) {
+   ::base::test::ScopedFeatureList feature_list;
+@@ -99,7 +99,7 @@ TEST(CreateWebRtcAudioProcessingModuleTe
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ TEST(CreateWebRtcAudioProcessingModuleTest,
+      OnlyOneInputVolumeControllerEnabledOnDesktopPlatforms) {
+   auto config = CreateApmGetConfig(
diff --git a/chromium-wip/patches/patch-mojo_core_BUILD.gn b/chromium-wip/patches/patch-mojo_core_BUILD.gn
new file mode 100644
index 0000000000..263390b21d
--- /dev/null
+++ b/chromium-wip/patches/patch-mojo_core_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- mojo/core/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ mojo/core/BUILD.gn
+@@ -164,7 +164,7 @@ source_set("impl_for_embedder") {
+       ]
+     }
+ 
+-    if ((is_linux || is_chromeos || is_android) && !is_nacl) {
++    if ((is_linux || is_chromeos || is_android) && !is_nacl && !is_bsd) {
+       sources += [
+         "channel_linux.cc",
+         "channel_linux.h",
diff --git a/chromium-wip/patches/patch-mojo_core_channel.cc b/chromium-wip/patches/patch-mojo_core_channel.cc
new file mode 100644
index 0000000000..25f5bc3514
--- /dev/null
+++ b/chromium-wip/patches/patch-mojo_core_channel.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- mojo/core/channel.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ mojo/core/channel.cc
+@@ -84,7 +84,11 @@ const size_t kMaxAttachedHandles = 64;
+ const size_t kMaxAttachedHandles = 253;
+ #endif  // BUILDFLAG(IS_FUCHSIA)
+ 
++#if defined(__i386__) && defined(OS_FREEBSD)
++const size_t kChannelMessageAlignment = 4;
++#else
+ static_assert(alignof(std::max_align_t) >= kChannelMessageAlignment, "");
++#endif
+ Channel::AlignedBuffer MakeAlignedBuffer(size_t size) {
+   // Generic allocators (such as malloc) return a pointer that is suitably
+   // aligned for storing any type of object with a fundamental alignment
diff --git a/chromium-wip/patches/patch-mojo_core_embedder_features.h b/chromium-wip/patches/patch-mojo_core_embedder_features.h
new file mode 100644
index 0000000000..d4e8f52db7
--- /dev/null
+++ b/chromium-wip/patches/patch-mojo_core_embedder_features.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- mojo/core/embedder/features.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ mojo/core/embedder/features.h
+@@ -16,7 +16,7 @@ namespace core {
+ 
+ #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_NACL) && \
+     !BUILDFLAG(MOJO_USE_APPLE_CHANNEL)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(MOJO_CORE_EMBEDDER_FEATURES)
+ BASE_DECLARE_FEATURE(kMojoLinuxChannelSharedMem);
+ 
diff --git a/chromium-wip/patches/patch-mojo_public_cpp_platform_socket__utils__posix.cc b/chromium-wip/patches/patch-mojo_public_cpp_platform_socket__utils__posix.cc
new file mode 100644
index 0000000000..1f7c4c0235
--- /dev/null
+++ b/chromium-wip/patches/patch-mojo_public_cpp_platform_socket__utils__posix.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- mojo/public/cpp/platform/socket_utils_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ mojo/public/cpp/platform/socket_utils_posix.cc
+@@ -34,7 +34,7 @@ bool IsRecoverableError() {
+ }
+ 
+ bool GetPeerEuid(base::PlatformFile fd, uid_t* peer_euid) {
+-#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FREEBSD)
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_NETBSD)
+   uid_t socket_euid;
+   gid_t socket_gid;
+   if (getpeereid(fd, &socket_euid, &socket_gid) < 0) {
diff --git a/chromium-wip/patches/patch-mojo_public_tools_bindings_mojom.gni b/chromium-wip/patches/patch-mojo_public_tools_bindings_mojom.gni
new file mode 100644
index 0000000000..3a527a093c
--- /dev/null
+++ b/chromium-wip/patches/patch-mojo_public_tools_bindings_mojom.gni
@@ -0,0 +1,30 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- mojo/public/tools/bindings/mojom.gni.orig	2025-07-29 22:51:44.000000000 +0000
++++ mojo/public/tools/bindings/mojom.gni
+@@ -774,6 +774,21 @@ template("mojom") {
+       enabled_features += [ "is_apple" ]
+     }
+ 
++    if (is_openbsd) {
++      enabled_features += [ "is_openbsd" ]
++      enabled_features += [ "is_bsd" ]
++    }
++
++    if (is_netbsd) {
++      enabled_features += [ "is_netbsd" ]
++      enabled_features += [ "is_bsd" ]
++    }
++
++    if (is_freebsd) {
++      enabled_features += [ "is_freebsd" ]
++      enabled_features += [ "is_bsd" ]
++    }
++
+     action_outputs = []
+     foreach(base_path, output_file_base_paths) {
+       filename = get_path_info(base_path, "file")
diff --git a/chromium-wip/patches/patch-net_BUILD.gn b/chromium-wip/patches/patch-net_BUILD.gn
new file mode 100644
index 0000000000..4084eebe30
--- /dev/null
+++ b/chromium-wip/patches/patch-net_BUILD.gn
@@ -0,0 +1,101 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/BUILD.gn
+@@ -126,7 +126,7 @@ net_configs = [
+   "//build/config/compiler:wexit_time_destructors",
+ ]
+ 
+-if (is_linux || is_chromeos) {
++if ((is_linux || is_chromeos) && !is_bsd) {
+   net_configs += [ "//build/config/linux:libresolv" ]
+ }
+ 
+@@ -1349,6 +1349,19 @@ component("net") {
+     ]
+   }
+ 
++  if (is_bsd) {
++    sources -= [
++      "base/address_map_cache_linux.cc",
++      "base/address_map_cache_linux.h",
++      "base/address_map_linux.cc",
++      "base/address_map_linux.h",
++      "base/address_tracker_linux.cc",
++      "base/address_tracker_linux.h",
++      "base/network_change_notifier_linux.cc",
++      "base/network_interfaces_linux.cc",
++    ]
++  }   
++
+   if (is_mac) {
+     sources += [
+       "base/network_notification_thread_mac.cc",
+@@ -1512,7 +1525,7 @@ component("net") {
+   }
+ 
+   # Use getifaddrs() on POSIX platforms, except Linux.
+-  if (is_posix && !is_linux && !is_chromeos) {
++  if ((is_posix && !is_linux && !is_chromeos) || is_bsd) {
+     sources += [
+       "base/network_interfaces_getifaddrs.cc",
+       "base/network_interfaces_getifaddrs.h",
+@@ -2236,7 +2249,7 @@ static_library("test_support") {
+     ]
+   }
+ 
+-  if (is_linux || is_chromeos || is_android) {
++  if (!is_bsd && (is_linux || is_chromeos || is_android)) {
+     sources += [
+       "base/address_tracker_linux_test_util.cc",
+       "base/address_tracker_linux_test_util.h",
+@@ -3056,14 +3069,14 @@ target(_test_target_type, "net_unittests
+     ]
+   }
+ 
+-  if (is_linux) {
++  if (is_linux && !is_bsd) {
+     sources += [
+       "base/network_change_notifier_linux_unittest.cc",
+       "proxy_resolution/proxy_config_service_linux_unittest.cc",
+     ]
+   }
+ 
+-  if (is_linux || is_chromeos) {
++  if ((is_linux || is_chromeos) && !is_bsd) {
+     sources += [
+       "base/address_tracker_linux_unittest.cc",
+       "base/network_interfaces_linux_unittest.cc",
+@@ -3164,6 +3177,10 @@ target(_test_target_type, "net_unittests
+     ]
+   }
+ 
++  if (is_bsd) {
++    deps += [ "//sandbox/policy" ]
++  }
++
+   if (enable_websockets) {
+     sources += [
+       "server/http_connection_unittest.cc",
+@@ -3229,7 +3246,7 @@ target(_test_target_type, "net_unittests
+     ]
+   }
+ 
+-  if (is_linux || is_chromeos) {
++  if ((is_linux || is_chromeos) && !is_bsd) {
+     sources += [ "tools/quic/quic_simple_server_test.cc" ]
+   }
+ 
+@@ -3367,7 +3384,7 @@ target(_test_target_type, "net_unittests
+   }
+ 
+   # Use getifaddrs() on POSIX platforms, except Linux.
+-  if (is_posix && !is_linux && !is_chromeos) {
++  if (is_posix && !is_linux && !is_chromeos && !is_bsd) {
+     sources += [ "base/network_interfaces_getifaddrs_unittest.cc" ]
+   }
+ 
diff --git a/chromium-wip/patches/patch-net_base_features.cc b/chromium-wip/patches/patch-net_base_features.cc
new file mode 100644
index 0000000000..e5491cfed4
--- /dev/null
+++ b/chromium-wip/patches/patch-net_base_features.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/base/features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/base/features.cc
+@@ -31,7 +31,7 @@ BASE_FEATURE(kCapReferrerToOriginOnCross
+ BASE_FEATURE(kAsyncDns,
+              "AsyncDns",
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+              base::FEATURE_ENABLED_BY_DEFAULT
+ #else
+              base::FEATURE_DISABLED_BY_DEFAULT
diff --git a/chromium-wip/patches/patch-net_base_network__change__notifier.cc b/chromium-wip/patches/patch-net_base_network__change__notifier.cc
new file mode 100644
index 0000000000..8349d47e55
--- /dev/null
+++ b/chromium-wip/patches/patch-net_base_network__change__notifier.cc
@@ -0,0 +1,45 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/base/network_change_notifier.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/base/network_change_notifier.cc
+@@ -38,7 +38,7 @@
+ #include "net/base/network_change_notifier_linux.h"
+ #elif BUILDFLAG(IS_APPLE)
+ #include "net/base/network_change_notifier_apple.h"
+-#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ #include "net/base/network_change_notifier_passive.h"
+ #elif BUILDFLAG(IS_FUCHSIA)
+ #include "net/base/network_change_notifier_fuchsia.h"
+@@ -325,6 +325,9 @@ std::unique_ptr<NetworkChangeNotifier> N
+ #elif BUILDFLAG(IS_FUCHSIA)
+   return std::make_unique<NetworkChangeNotifierFuchsia>(
+       /*require_wlan=*/false);
++#elif BUILDFLAG(IS_BSD)
++  return std::make_unique<MockNetworkChangeNotifier>(
++      /*dns_config_notifier*/nullptr);
+ #else
+   NOTIMPLEMENTED();
+   return nullptr;
+@@ -521,7 +524,7 @@ base::cstring_view NetworkChangeNotifier
+   return kConnectionTypeNames[type];
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // static
+ AddressMapOwnerLinux* NetworkChangeNotifier::GetAddressMapOwner() {
+   return g_network_change_notifier
+@@ -867,7 +870,7 @@ NetworkChangeNotifier::NetworkChangeNoti
+   }
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ AddressMapOwnerLinux* NetworkChangeNotifier::GetAddressMapOwnerInternal() {
+   return nullptr;
+ }
diff --git a/chromium-wip/patches/patch-net_base_network__change__notifier.h b/chromium-wip/patches/patch-net_base_network__change__notifier.h
new file mode 100644
index 0000000000..73a21702d8
--- /dev/null
+++ b/chromium-wip/patches/patch-net_base_network__change__notifier.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/base/network_change_notifier.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/base/network_change_notifier.h
+@@ -19,7 +19,7 @@
+ #include "net/base/net_export.h"
+ #include "net/base/network_handle.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "net/base/address_map_linux.h"
+ #endif
+ 
+@@ -451,7 +451,7 @@ class NET_EXPORT NetworkChangeNotifier {
+   // packets sent lazily.
+   static bool IsDefaultNetworkActive();
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Returns the AddressTrackerLinux if present.
+   static AddressMapOwnerLinux* GetAddressMapOwner();
+ #endif
+@@ -621,7 +621,7 @@ class NET_EXPORT NetworkChangeNotifier {
+       SystemDnsConfigChangeNotifier* system_dns_config_notifier = nullptr,
+       bool omit_observers_in_constructor_for_testing = false);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Returns the AddressMapOwnerLinux if present.
+   virtual AddressMapOwnerLinux* GetAddressMapOwnerInternal();
+ #endif
diff --git a/chromium-wip/patches/patch-net_base_network__change__notifier__passive.cc b/chromium-wip/patches/patch-net_base_network__change__notifier__passive.cc
new file mode 100644
index 0000000000..17ff566f19
--- /dev/null
+++ b/chromium-wip/patches/patch-net_base_network__change__notifier__passive.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/base/network_change_notifier_passive.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/base/network_change_notifier_passive.cc
+@@ -107,7 +107,7 @@ NetworkChangeNotifierPassive::GetAddress
+ NetworkChangeNotifier::NetworkChangeCalculatorParams
+ NetworkChangeNotifierPassive::NetworkChangeCalculatorParamsPassive() {
+   NetworkChangeCalculatorParams params;
+-#if BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Delay values arrived at by simple experimentation and adjusted so as to
+   // produce a single signal when switching between network connections.
+   params.ip_address_offline_delay_ = base::Milliseconds(4000);
diff --git a/chromium-wip/patches/patch-net_base_network__interfaces__posix.h b/chromium-wip/patches/patch-net_base_network__interfaces__posix.h
new file mode 100644
index 0000000000..a911c26a59
--- /dev/null
+++ b/chromium-wip/patches/patch-net_base_network__interfaces__posix.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/base/network_interfaces_posix.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/base/network_interfaces_posix.h
+@@ -8,6 +8,8 @@
+ // This file provides some basic functionality shared between
+ // network_interfaces_linux.cc and network_interfaces_getifaddrs.cc.
+ 
++#include <sys/socket.h>
++
+ #include <string>
+ 
+ struct sockaddr;
diff --git a/chromium-wip/patches/patch-net_base_sockaddr__util__posix.cc b/chromium-wip/patches/patch-net_base_sockaddr__util__posix.cc
new file mode 100644
index 0000000000..d71a554324
--- /dev/null
+++ b/chromium-wip/patches/patch-net_base_sockaddr__util__posix.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/base/sockaddr_util_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/base/sockaddr_util_posix.cc
+@@ -60,7 +60,8 @@ bool FillUnixAddress(const std::string& 
+     return true;
+   }
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
++  // XXX ?
+   // Convert the path given into abstract socket name. It must start with
+   // the '\0' character, so we are adding it. |addr_len| must specify the
+   // length of the structure exactly, as potentially the socket name may
diff --git a/chromium-wip/patches/patch-net_base_sockaddr__util__posix__unittest.cc b/chromium-wip/patches/patch-net_base_sockaddr__util__posix__unittest.cc
new file mode 100644
index 0000000000..2e692e0d84
--- /dev/null
+++ b/chromium-wip/patches/patch-net_base_sockaddr__util__posix__unittest.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/base/sockaddr_util_posix_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/base/sockaddr_util_posix_unittest.cc
+@@ -88,7 +88,8 @@ TEST(FillUnixAddressTest, AbstractLinuxA
+   size_t path_max = MaxPathLength(&storage);
+   std::string path(path_max, '0');
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
++  // XXX?
+   EXPECT_TRUE(FillUnixAddress(path, /*use_abstract_namespace=*/true, &storage));
+ 
+   EXPECT_EQ(path.size() + 1U + offsetof(struct sockaddr_un, sun_path),
diff --git a/chromium-wip/patches/patch-net_disk__cache_backend__experiment.h b/chromium-wip/patches/patch-net_disk__cache_backend__experiment.h
new file mode 100644
index 0000000000..afad0511f1
--- /dev/null
+++ b/chromium-wip/patches/patch-net_disk__cache_backend__experiment.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/disk_cache/backend_experiment.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/disk_cache/backend_experiment.h
+@@ -14,7 +14,7 @@ namespace disk_cache {
+ // default.
+ constexpr bool IsSimpleBackendEnabledByDefaultPlatform() {
+   return BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) ||
+-         BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC);
++         BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD);
+ }
+ 
+ // True if assigned to any of disk cache backend experiment groups.
diff --git a/chromium-wip/patches/patch-net_disk__cache_simple_simple__file__tracker.cc b/chromium-wip/patches/patch-net_disk__cache_simple_simple__file__tracker.cc
new file mode 100644
index 0000000000..5f31207e84
--- /dev/null
+++ b/chromium-wip/patches/patch-net_disk__cache_simple_simple__file__tracker.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/disk_cache/simple/simple_file_tracker.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/disk_cache/simple/simple_file_tracker.cc
+@@ -36,7 +36,17 @@ bool SimpleFileTracker::TrackedFiles::In
+ }
+ 
+ SimpleFileTracker::SimpleFileTracker(int file_limit)
++#if defined(OS_OPENBSD)
++{
++  // cap the file descriptor limit at 85% of the size of the
++  // file descriptor table and also substract the amount of
++  // currently used file descriptors as this should give us
++  // enough reserve to avoid hitting the limit 
++  file_limit_ = (getdtablesize() * 0.85) -  getdtablecount();
++}
++#else
+     : file_limit_(file_limit) {}
++#endif
+ 
+ SimpleFileTracker::~SimpleFileTracker() {
+   DCHECK(lru_.empty());
diff --git a/chromium-wip/patches/patch-net_dns_BUILD.gn b/chromium-wip/patches/patch-net_dns_BUILD.gn
new file mode 100644
index 0000000000..c732e697f4
--- /dev/null
+++ b/chromium-wip/patches/patch-net_dns_BUILD.gn
@@ -0,0 +1,49 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/dns/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/dns/BUILD.gn
+@@ -140,7 +140,7 @@ source_set("dns") {
+       "dns_config_service_android.cc",
+       "dns_config_service_android.h",
+     ]
+-  } else if (is_linux) {
++  } else if (is_linux && !is_bsd) {
+     sources += [
+       "dns_config_service_linux.cc",
+       "dns_config_service_linux.h",
+@@ -173,7 +173,10 @@ source_set("dns") {
+     ]
+   }
+ 
+-  deps = [ "//net:net_deps" ]
++  deps = [
++    "//net:net_deps",
++    "///services/screen_ai/buildflags",
++  ]
+ 
+   public_deps = [
+     ":dns_client",
+@@ -181,6 +184,7 @@ source_set("dns") {
+     ":host_resolver_manager",
+     ":mdns_client",
+     "//net:net_public_deps",
++    "//printing/buildflags",
+   ]
+ 
+   if (enable_mdns) {
+@@ -454,9 +458,9 @@ source_set("tests") {
+ 
+   if (is_android) {
+     sources += [ "dns_config_service_android_unittest.cc" ]
+-  } else if (is_linux) {
++  } else if (is_linux && !is_bsd) {
+     sources += [ "dns_config_service_linux_unittest.cc" ]
+-  } else if (is_posix) {
++  } else if (is_posix && !is_bsd) {
+     sources += [ "dns_config_service_posix_unittest.cc" ]
+   }
+ 
diff --git a/chromium-wip/patches/patch-net_dns_address__info.cc b/chromium-wip/patches/patch-net_dns_address__info.cc
new file mode 100644
index 0000000000..3af7a7215e
--- /dev/null
+++ b/chromium-wip/patches/patch-net_dns_address__info.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/dns/address_info.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/dns/address_info.cc
+@@ -78,8 +78,12 @@ AddressInfo::AddressInfoAndResult Addres
+     // error.
+     // http://crbug.com/134142
+     err = ERR_NAME_NOT_RESOLVED;
+-#elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_FREEBSD)
++#elif BUILDFLAG(IS_POSIX)
++#ifdef EAI_NODATA
+     if (os_error != EAI_NONAME && os_error != EAI_NODATA)
++#else
++    if (os_error != EAI_NONAME)
++#endif
+       err = ERR_NAME_RESOLUTION_FAILED;
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-net_dns_address__sorter__posix.cc b/chromium-wip/patches/patch-net_dns_address__sorter__posix.cc
new file mode 100644
index 0000000000..e630a9f0c5
--- /dev/null
+++ b/chromium-wip/patches/patch-net_dns_address__sorter__posix.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/dns/address_sorter_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/dns/address_sorter_posix.cc
+@@ -32,6 +32,7 @@
+ #include "net/dns/netinet_in_var_ios.h"
+ #else
+ #include <netinet/in_var.h>
++#include <netinet6/in6_var.h>
+ #endif  // BUILDFLAG(IS_IOS)
+ #endif
+ #include <vector>
diff --git a/chromium-wip/patches/patch-net_dns_dns__config__service__posix.cc b/chromium-wip/patches/patch-net_dns_dns__config__service__posix.cc
new file mode 100644
index 0000000000..afe96c5e94
--- /dev/null
+++ b/chromium-wip/patches/patch-net_dns_dns__config__service__posix.cc
@@ -0,0 +1,32 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/dns/dns_config_service_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/dns/dns_config_service_posix.cc
+@@ -39,6 +39,11 @@
+ #include "net/dns/dns_config_watcher_mac.h"
+ #endif
+ 
++#if BUILDFLAG(IS_BSD)
++#include "base/command_line.h"
++#include "sandbox/policy/switches.h"
++#endif
++
+ namespace net {
+ 
+ namespace internal {
+@@ -136,6 +141,11 @@ class DnsConfigServicePosix::Watcher : p
+   bool Watch() override {
+     CheckOnCorrectSequence();
+ 
++// pledge + unveil
++    base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
++    if (!command_line->HasSwitch(sandbox::policy::switches::kNoSandbox))
++      return false;
++
+     bool success = true;
+     if (!config_watcher_.Watch(base::BindRepeating(&Watcher::OnConfigChanged,
+                                                    base::Unretained(this)))) {
diff --git a/chromium-wip/patches/patch-net_dns_dns__reloader.cc b/chromium-wip/patches/patch-net_dns_dns__reloader.cc
new file mode 100644
index 0000000000..b828275373
--- /dev/null
+++ b/chromium-wip/patches/patch-net_dns_dns__reloader.cc
@@ -0,0 +1,25 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/dns/dns_reloader.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/dns/dns_reloader.cc
+@@ -10,6 +10,7 @@
+ // - there's not guarantee it exists at all. :(
+ #if BUILDFLAG(IS_POSIX)
+ 
++#include <netinet/in.h>
+ #include <resolv.h>
+ 
+ // This code only works on systems where the C library provides res_ninit(3) and
+@@ -31,7 +32,7 @@
+ // an old musl bug that was fixed by musl c8fdcfe5, but Fuchsia's SDK doesn't
+ // have that change.
+ #if defined(__RES) && __RES >= 19991006 && !BUILDFLAG(IS_APPLE) && \
+-    !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_FUCHSIA)
++    !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_NETBSD)
+ // We define this so we don't need to restate the complex condition here twice
+ // below - it would be easy for the copies below to get out of sync.
+ #define USE_RES_NINIT
diff --git a/chromium-wip/patches/patch-net_dns_dns__util.cc b/chromium-wip/patches/patch-net_dns_dns__util.cc
new file mode 100644
index 0000000000..0bbbaef200
--- /dev/null
+++ b/chromium-wip/patches/patch-net_dns_dns__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/dns/dns_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/dns/dns_util.cc
+@@ -29,6 +29,8 @@
+ #include "net/dns/public/util.h"
+ #include "net/third_party/uri_template/uri_template.h"
+ 
++#include <sys/socket.h>
++
+ #if BUILDFLAG(IS_POSIX)
+ #include <net/if.h>
+ #include <netinet/in.h>
diff --git a/chromium-wip/patches/patch-net_dns_host__resolver__proc.cc b/chromium-wip/patches/patch-net_dns_host__resolver__proc.cc
new file mode 100644
index 0000000000..977ef44827
--- /dev/null
+++ b/chromium-wip/patches/patch-net_dns_host__resolver__proc.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/dns/host_resolver_proc.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/dns/host_resolver_proc.cc
+@@ -16,10 +16,6 @@
+ #include "net/base/net_errors.h"
+ #include "net/dns/host_resolver_system_task.h"
+ 
+-#if BUILDFLAG(IS_OPENBSD)
+-#define AI_ADDRCONFIG 0
+-#endif
+-
+ namespace net {
+ 
+ HostResolverProc* HostResolverProc::default_proc_ = nullptr;
diff --git a/chromium-wip/patches/patch-net_dns_public_BUILD.gn b/chromium-wip/patches/patch-net_dns_public_BUILD.gn
new file mode 100644
index 0000000000..059357d87c
--- /dev/null
+++ b/chromium-wip/patches/patch-net_dns_public_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/dns/public/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/dns/public/BUILD.gn
+@@ -78,7 +78,7 @@ source_set("tests") {
+     "doh_provider_entry_unittest.cc",
+   ]
+ 
+-  if (is_posix && !is_android) {
++  if (is_posix && !is_android && !is_bsd) {
+     sources += [ "resolv_reader_unittest.cc" ]
+   }
+ 
diff --git a/chromium-wip/patches/patch-net_dns_public_resolv__reader.cc b/chromium-wip/patches/patch-net_dns_public_resolv__reader.cc
new file mode 100644
index 0000000000..88cbf6b612
--- /dev/null
+++ b/chromium-wip/patches/patch-net_dns_public_resolv__reader.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/dns/public/resolv_reader.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/dns/public/resolv_reader.cc
+@@ -40,7 +40,7 @@ std::optional<std::vector<IPEndPoint>> G
+   if (!(res.options & RES_INIT))
+     return std::nullopt;
+ 
+-#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD)
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_NETBSD)
+   union res_sockaddr_union addresses[MAXNS];
+   int nscount = res_getservers(const_cast<res_state>(&res), addresses, MAXNS);
+   DCHECK_GE(nscount, 0);
diff --git a/chromium-wip/patches/patch-net_dns_public_resolv__reader.h b/chromium-wip/patches/patch-net_dns_public_resolv__reader.h
new file mode 100644
index 0000000000..0bd918da29
--- /dev/null
+++ b/chromium-wip/patches/patch-net_dns_public_resolv__reader.h
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/dns/public/resolv_reader.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/dns/public/resolv_reader.h
+@@ -5,6 +5,7 @@
+ #ifndef NET_DNS_PUBLIC_RESOLV_READER_H_
+ #define NET_DNS_PUBLIC_RESOLV_READER_H_
+ 
++#include <netinet/in.h>
+ #include <resolv.h>
+ 
+ #include <memory>
diff --git a/chromium-wip/patches/patch-net_dns_public_scoped__res__state.cc b/chromium-wip/patches/patch-net_dns_public_scoped__res__state.cc
new file mode 100644
index 0000000000..4ca6aff8f8
--- /dev/null
+++ b/chromium-wip/patches/patch-net_dns_public_scoped__res__state.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/dns/public/scoped_res_state.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/dns/public/scoped_res_state.cc
+@@ -33,7 +33,7 @@ ScopedResState::~ScopedResState() {
+ #if !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA)
+ 
+   // Prefer res_ndestroy where available.
+-#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD)
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_NETBSD)
+   res_ndestroy(&res_);
+ #else
+   res_nclose(&res_);
diff --git a/chromium-wip/patches/patch-net_dns_public_scoped__res__state.h b/chromium-wip/patches/patch-net_dns_public_scoped__res__state.h
new file mode 100644
index 0000000000..722453627d
--- /dev/null
+++ b/chromium-wip/patches/patch-net_dns_public_scoped__res__state.h
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/dns/public/scoped_res_state.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/dns/public/scoped_res_state.h
+@@ -5,6 +5,7 @@
+ #ifndef NET_DNS_PUBLIC_SCOPED_RES_STATE_H_
+ #define NET_DNS_PUBLIC_SCOPED_RES_STATE_H_
+ 
++#include <netinet/in.h>
+ #include <resolv.h>
+ 
+ #include <optional>
diff --git a/chromium-wip/patches/patch-net_filter_zstd__source__stream.cc b/chromium-wip/patches/patch-net_filter_zstd__source__stream.cc
new file mode 100644
index 0000000000..2acc7b90a6
--- /dev/null
+++ b/chromium-wip/patches/patch-net_filter_zstd__source__stream.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/filter/zstd_source_stream.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/filter/zstd_source_stream.cc
+@@ -7,6 +7,7 @@
+ #include <algorithm>
+ #include <unordered_map>
+ #include <utility>
++#include <unordered_map>
+ 
+ #define ZSTD_STATIC_LINKING_ONLY
+ 
diff --git a/chromium-wip/patches/patch-net_http_http__auth__gssapi__posix.cc b/chromium-wip/patches/patch-net_http_http__auth__gssapi__posix.cc
new file mode 100644
index 0000000000..85cad3a698
--- /dev/null
+++ b/chromium-wip/patches/patch-net_http_http__auth__gssapi__posix.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/http/http_auth_gssapi_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/http/http_auth_gssapi_posix.cc
+@@ -366,7 +366,9 @@ base::NativeLibrary GSSAPISharedLibrary:
+   } else {
+ #if BUILDFLAG(IS_APPLE)
+     library_names.emplace_back("/System/Library/Frameworks/GSS.framework/GSS");
+-#elif BUILDFLAG(IS_OPENBSD)
++#elif BUILDFLAG(IS_BSD)
++    // MIT Kerberos - FreeBSD
++    library_names.emplace_back("libgssapi_krb5.so.2");
+     // Heimdal - OpenBSD
+     library_names.emplace_back("libgssapi.so");
+ #else
diff --git a/chromium-wip/patches/patch-net_http_http__auth__gssapi__posix.h b/chromium-wip/patches/patch-net_http_http__auth__gssapi__posix.h
new file mode 100644
index 0000000000..fbd3b91728
--- /dev/null
+++ b/chromium-wip/patches/patch-net_http_http__auth__gssapi__posix.h
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/http/http_auth_gssapi_posix.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/http/http_auth_gssapi_posix.h
+@@ -21,6 +21,9 @@
+ #if BUILDFLAG(IS_APPLE)
+ #include <GSS/gssapi.h>
+ #elif BUILDFLAG(IS_FREEBSD)
++#ifndef GSS_C_DELEG_POLICY_FLAG
++#define GSS_C_DELEG_POLICY_FLAG 32768
++#endif
+ #include <gssapi/gssapi.h>
+ #else
+ #include <gssapi.h>
diff --git a/chromium-wip/patches/patch-net_http_http__auth__handler__negotiate.cc b/chromium-wip/patches/patch-net_http_http__auth__handler__negotiate.cc
new file mode 100644
index 0000000000..7fce42142c
--- /dev/null
+++ b/chromium-wip/patches/patch-net_http_http__auth__handler__negotiate.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/http/http_auth_handler_negotiate.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/http/http_auth_handler_negotiate.cc
+@@ -119,7 +119,7 @@ int HttpAuthHandlerNegotiate::Factory::C
+ #elif BUILDFLAG(IS_POSIX)
+   if (is_unsupported_)
+     return ERR_UNSUPPORTED_AUTH_SCHEME;
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Note: Don't set is_unsupported_ = true here. AllowGssapiLibraryLoad()
+   // might change to true during a session.
+   if (!http_auth_preferences() ||
diff --git a/chromium-wip/patches/patch-net_http_http__auth__preferences.cc b/chromium-wip/patches/patch-net_http_http__auth__preferences.cc
new file mode 100644
index 0000000000..6a7c28016f
--- /dev/null
+++ b/chromium-wip/patches/patch-net_http_http__auth__preferences.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/http/http_auth_preferences.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/http/http_auth_preferences.cc
+@@ -38,7 +38,7 @@ std::string HttpAuthPreferences::AuthAnd
+ }
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ bool HttpAuthPreferences::AllowGssapiLibraryLoad() const {
+   return allow_gssapi_library_load_;
+ }
diff --git a/chromium-wip/patches/patch-net_http_http__auth__preferences.h b/chromium-wip/patches/patch-net_http_http__auth__preferences.h
new file mode 100644
index 0000000000..ab27ce7106
--- /dev/null
+++ b/chromium-wip/patches/patch-net_http_http__auth__preferences.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/http/http_auth_preferences.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/http/http_auth_preferences.h
+@@ -49,7 +49,7 @@ class NET_EXPORT HttpAuthPreferences {
+ #if BUILDFLAG(IS_ANDROID)
+   virtual std::string AuthAndroidNegotiateAccountType() const;
+ #endif
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   virtual bool AllowGssapiLibraryLoad() const;
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+   virtual bool CanUseDefaultCredentials(
+@@ -85,7 +85,7 @@ class NET_EXPORT HttpAuthPreferences {
+   }
+ #endif  // BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   void set_allow_gssapi_library_load(bool allow_gssapi_library_load) {
+     allow_gssapi_library_load_ = allow_gssapi_library_load;
+   }
+@@ -136,7 +136,7 @@ class NET_EXPORT HttpAuthPreferences {
+   std::string auth_android_negotiate_account_type_;
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   bool allow_gssapi_library_load_ = true;
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+ 
diff --git a/chromium-wip/patches/patch-net_http_http__network__session.cc b/chromium-wip/patches/patch-net_http_http__network__session.cc
new file mode 100644
index 0000000000..d81aaf3fec
--- /dev/null
+++ b/chromium-wip/patches/patch-net_http_http__network__session.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/http/http_network_session.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/http/http_network_session.cc
+@@ -21,7 +21,9 @@
+ #include "build/build_config.h"
+ #include "net/base/features.h"
+ #include "net/dns/host_resolver.h"
++#if defined(USE_KERBEROS)
+ #include "net/http/http_auth_handler_factory.h"
++#endif
+ #include "net/http/http_response_body_drainer.h"
+ #include "net/http/http_stream_factory.h"
+ #include "net/http/http_stream_pool.h"
diff --git a/chromium-wip/patches/patch-net_proxy__resolution_proxy__config__service.cc b/chromium-wip/patches/patch-net_proxy__resolution_proxy__config__service.cc
new file mode 100644
index 0000000000..511cc281f8
--- /dev/null
+++ b/chromium-wip/patches/patch-net_proxy__resolution_proxy__config__service.cc
@@ -0,0 +1,41 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/proxy_resolution/proxy_config_service.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/proxy_resolution/proxy_config_service.cc
+@@ -19,20 +19,20 @@
+ #include "net/proxy_resolution/proxy_config_service_ios.h"
+ #elif BUILDFLAG(IS_MAC)
+ #include "net/proxy_resolution/proxy_config_service_mac.h"
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "net/proxy_resolution/proxy_config_service_linux.h"
+ #elif BUILDFLAG(IS_ANDROID)
+ #include "net/proxy_resolution/proxy_config_service_android.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "net/traffic_annotation/network_traffic_annotation.h"
+ #endif
+ 
+ namespace net {
+ 
+ namespace {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ constexpr net::NetworkTrafficAnnotationTag kSystemProxyConfigTrafficAnnotation =
+     net::DefineNetworkTrafficAnnotation("proxy_config_system", R"(
+       semantics {
+@@ -108,7 +108,7 @@ ProxyConfigService::CreateSystemProxyCon
+              << "profile_io_data.cc::CreateProxyConfigService and this should "
+              << "be used only for examples.";
+   return std::make_unique<UnsetProxyConfigService>();
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<ProxyConfigServiceLinux> linux_config_service(
+       std::make_unique<ProxyConfigServiceLinux>());
+ 
diff --git a/chromium-wip/patches/patch-net_proxy__resolution_proxy__config__service__linux.cc b/chromium-wip/patches/patch-net_proxy__resolution_proxy__config__service__linux.cc
new file mode 100644
index 0000000000..9561e0181b
--- /dev/null
+++ b/chromium-wip/patches/patch-net_proxy__resolution_proxy__config__service__linux.cc
@@ -0,0 +1,46 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/proxy_resolution/proxy_config_service_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/proxy_resolution/proxy_config_service_linux.cc
+@@ -11,7 +11,9 @@
+ 
+ #include <errno.h>
+ #include <limits.h>
++#if !BUILDFLAG(IS_BSD)
+ #include <sys/inotify.h>
++#endif
+ #include <unistd.h>
+ 
+ #include <map>
+@@ -502,6 +504,7 @@ bool SettingGetterImplGSettings::CheckVe
+ }
+ #endif  // defined(USE_GIO)
+ 
++#if !BUILDFLAG(IS_BSD)
+ // Converts |value| from a decimal string to an int. If there was a failure
+ // parsing, returns |default_value|.
+ int StringToIntOrDefault(std::string_view value, int default_value) {
+@@ -1039,6 +1042,7 @@ class SettingGetterImplKDE : public Prox
+   // events on.
+   scoped_refptr<base::SequencedTaskRunner> file_task_runner_;
+ };
++#endif
+ 
+ }  // namespace
+ 
+@@ -1259,9 +1263,11 @@ ProxyConfigServiceLinux::Delegate::Deleg
+     case base::nix::DESKTOP_ENVIRONMENT_KDE4:
+     case base::nix::DESKTOP_ENVIRONMENT_KDE5:
+     case base::nix::DESKTOP_ENVIRONMENT_KDE6:
++#if !BUILDFLAG(IS_BSD)
+       setting_getter_ =
+           std::make_unique<SettingGetterImplKDE>(env_var_getter_.get());
+       break;
++#endif
+     case base::nix::DESKTOP_ENVIRONMENT_XFCE:
+     case base::nix::DESKTOP_ENVIRONMENT_LXQT:
+     case base::nix::DESKTOP_ENVIRONMENT_OTHER:
diff --git a/chromium-wip/patches/patch-net_quic_quic__network__transaction__unittest.cc b/chromium-wip/patches/patch-net_quic_quic__network__transaction__unittest.cc
new file mode 100644
index 0000000000..2b82f82a0e
--- /dev/null
+++ b/chromium-wip/patches/patch-net_quic_quic__network__transaction__unittest.cc
@@ -0,0 +1,34 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/quic/quic_network_transaction_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/quic/quic_network_transaction_unittest.cc
+@@ -5203,10 +5203,10 @@ TEST_P(QuicNetworkTransactionTest, RstSt
+ 
+ TEST_P(QuicNetworkTransactionTest, BrokenAlternateProtocol) {
+   // Alternate-protocol job
+-  std::unique_ptr<quic::QuicEncryptedPacket> close(
++  std::unique_ptr<quic::QuicEncryptedPacket> test_close(
+       ConstructServerConnectionClosePacket(1));
+   MockRead quic_reads[] = {
+-      MockRead(ASYNC, close->data(), close->length()),
++      MockRead(ASYNC, test_close->data(), test_close->length()),
+       MockRead(ASYNC, ERR_IO_PENDING),  // No more data to read
+       MockRead(ASYNC, OK),              // EOF
+   };
+@@ -5249,10 +5249,10 @@ TEST_P(QuicNetworkTransactionTest,
+   http_server_properties_ = std::make_unique<HttpServerProperties>();
+ 
+   // Alternate-protocol job
+-  std::unique_ptr<quic::QuicEncryptedPacket> close(
++  std::unique_ptr<quic::QuicEncryptedPacket> test_close(
+       ConstructServerConnectionClosePacket(1));
+   MockRead quic_reads[] = {
+-      MockRead(ASYNC, close->data(), close->length()),
++      MockRead(ASYNC, test_close->data(), test_close->length()),
+       MockRead(ASYNC, ERR_IO_PENDING),  // No more data to read
+       MockRead(ASYNC, OK),              // EOF
+   };
diff --git a/chromium-wip/patches/patch-net_socket_socks5__client__socket.cc b/chromium-wip/patches/patch-net_socket_socks5__client__socket.cc
new file mode 100644
index 0000000000..5fca67a22b
--- /dev/null
+++ b/chromium-wip/patches/patch-net_socket_socks5__client__socket.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/socket/socks5_client_socket.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/socket/socks5_client_socket.cc
+@@ -23,6 +23,9 @@
+ #include "net/log/net_log_event_type.h"
+ #include "net/traffic_annotation/network_traffic_annotation.h"
+ 
++#include <sys/types.h>
++#include <netinet/in.h>
++
+ namespace net {
+ 
+ const unsigned int SOCKS5ClientSocket::kGreetReadHeaderSize = 2;
diff --git a/chromium-wip/patches/patch-net_socket_tcp__socket__posix.cc b/chromium-wip/patches/patch-net_socket_tcp__socket__posix.cc
new file mode 100644
index 0000000000..a10db38cd8
--- /dev/null
+++ b/chromium-wip/patches/patch-net_socket_tcp__socket__posix.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/socket/tcp_socket_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/socket/tcp_socket_posix.cc
+@@ -99,6 +99,17 @@ bool SetTCPKeepAlive(int fd, bool enable
+       PLOG(ERROR) << "Failed to set TCP_KEEPALIVE on fd: " << fd;
+       return false;
+     }
++#elif BUILDFLAG(IS_FREEBSD)
++  // Set seconds until first TCP keep alive.
++  if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &delay, sizeof(delay))) {
++    PLOG(ERROR) << "Failed to set TCP_KEEPIDLE on fd: " << fd;
++    return false;
++  }
++  // Set seconds between TCP keep alives.  
++  if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &delay, sizeof(delay))) {
++    PLOG(ERROR) << "Failed to set TCP_KEEPINTVL on fd: " << fd;
++    return false;
++  }
+ #endif
+   }
+ 
diff --git a/chromium-wip/patches/patch-net_socket_udp__socket__posix.cc b/chromium-wip/patches/patch-net_socket_udp__socket__posix.cc
new file mode 100644
index 0000000000..50c840b3c4
--- /dev/null
+++ b/chromium-wip/patches/patch-net_socket_udp__socket__posix.cc
@@ -0,0 +1,132 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/socket/udp_socket_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/socket/udp_socket_posix.cc
+@@ -75,6 +75,32 @@ constexpr int kBindRetries = 10;
+ constexpr int kPortStart = 1024;
+ constexpr int kPortEnd = 65535;
+ 
++#if BUILDFLAG(IS_NETBSD)
++int GetIPv4AddressFromIndex(int socket, uint32_t index, uint32_t* address) {
++  if (!index) {
++    *address = htonl(INADDR_ANY);
++    return OK;
++  }
++
++  sockaddr_in* result = nullptr;
++
++  ifreq ifr;
++  ifr.ifr_addr.sa_family = AF_INET;
++  if (!if_indextoname(index, ifr.ifr_name))
++    return MapSystemError(errno);
++  int rv = ioctl(socket, SIOCGIFADDR, &ifr);
++  if (rv == -1)
++    return MapSystemError(errno);
++  result = reinterpret_cast<sockaddr_in*>(&ifr.ifr_addr);
++
++  if (!result)
++    return ERR_ADDRESS_INVALID;
++
++  *address = result->sin_addr.s_addr;
++  return OK;
++}
++#endif
++
+ int GetSocketFDHash(int fd) {
+   return fd ^ 1595649551;
+ }
+@@ -524,12 +550,17 @@ int UDPSocketPosix::SetRecvTos() {
+ #endif  // BUILDFLAG(IS_APPLE)
+   }
+ 
++#ifdef IP_RECVTOS
+   int rv = setsockopt(socket_, IPPROTO_IP, IP_RECVTOS, &ecn, sizeof(ecn));
++#else
++  int rv = -1;
++  errno = EOPNOTSUPP;
++#endif
+   return rv == 0 ? OK : MapSystemError(errno);
+ }
+ 
+ void UDPSocketPosix::SetMsgConfirm(bool confirm) {
+-#if !BUILDFLAG(IS_APPLE)
++#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)
+   if (confirm) {
+     sendto_flags_ |= MSG_CONFIRM;
+   } else {
+@@ -550,7 +581,7 @@ int UDPSocketPosix::SetBroadcast(bool br
+   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
+   int value = broadcast ? 1 : 0;
+   int rv;
+-#if BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
+   // SO_REUSEPORT on OSX permits multiple processes to each receive
+   // UDP multicast or broadcast datagrams destined for the bound
+   // port.
+@@ -857,9 +888,17 @@ int UDPSocketPosix::SetMulticastOptions(
+   if (multicast_interface_ != 0) {
+     switch (addr_family_) {
+       case AF_INET: {
++#if BUILDFLAG(IS_NETBSD)
++        ip_mreq mreq = {};
++        int error = GetIPv4AddressFromIndex(socket_, multicast_interface_,
++                                            &mreq.imr_interface.s_addr);
++        if (error != OK)
++          return error;
++#else
+         ip_mreqn mreq = {};
+         mreq.imr_ifindex = multicast_interface_;
+         mreq.imr_address.s_addr = htonl(INADDR_ANY);
++#endif
+         int rv = setsockopt(socket_, IPPROTO_IP, IP_MULTICAST_IF,
+                             reinterpret_cast<const char*>(&mreq), sizeof(mreq));
+         if (rv)
+@@ -894,7 +933,7 @@ int UDPSocketPosix::DoBind(const IPEndPo
+ #if BUILDFLAG(IS_CHROMEOS)
+   if (last_error == EINVAL)
+     return ERR_ADDRESS_IN_USE;
+-#elif BUILDFLAG(IS_APPLE)
++#elif BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
+   if (last_error == EADDRNOTAVAIL)
+     return ERR_ADDRESS_IN_USE;
+ #endif
+@@ -922,9 +961,17 @@ int UDPSocketPosix::JoinGroup(const IPAd
+     case IPAddress::kIPv4AddressSize: {
+       if (addr_family_ != AF_INET)
+         return ERR_ADDRESS_INVALID;
++#if BUILDFLAG(IS_NETBSD)
++      ip_mreq mreq = {};
++      int error = GetIPv4AddressFromIndex(socket_, multicast_interface_,
++                                          &mreq.imr_interface.s_addr);
++      if (error != OK)
++        return error;
++#else
+       ip_mreqn mreq = {};
+       mreq.imr_ifindex = multicast_interface_;
+       mreq.imr_address.s_addr = htonl(INADDR_ANY);
++#endif
+       mreq.imr_multiaddr = ToInAddr(group_address);
+       int rv = setsockopt(socket_, IPPROTO_IP, IP_ADD_MEMBERSHIP,
+                           &mreq, sizeof(mreq));
+@@ -959,9 +1006,17 @@ int UDPSocketPosix::LeaveGroup(const IPA
+     case IPAddress::kIPv4AddressSize: {
+       if (addr_family_ != AF_INET)
+         return ERR_ADDRESS_INVALID;
++#if BUILDFLAG(IS_NETBSD)
++      ip_mreq mreq = {};
++      int error = GetIPv4AddressFromIndex(socket_, multicast_interface_,
++                                          &mreq.imr_interface.s_addr);
++      if (error != OK)
++        return error;
++#else
+       ip_mreqn mreq = {};
+       mreq.imr_ifindex = multicast_interface_;
+       mreq.imr_address.s_addr = INADDR_ANY;
++#endif
+       mreq.imr_multiaddr = ToInAddr(group_address);
+       int rv = setsockopt(socket_, IPPROTO_IP, IP_DROP_MEMBERSHIP,
+                           &mreq, sizeof(mreq));
diff --git a/chromium-wip/patches/patch-net_socket_udp__socket__unittest.cc b/chromium-wip/patches/patch-net_socket_udp__socket__unittest.cc
new file mode 100644
index 0000000000..d658677aba
--- /dev/null
+++ b/chromium-wip/patches/patch-net_socket_udp__socket__unittest.cc
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/socket/udp_socket_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/socket/udp_socket_unittest.cc
+@@ -397,7 +397,7 @@ TEST_F(UDPSocketTest, PartialRecv) {
+   EXPECT_EQ(second_packet, received);
+ }
+ 
+-#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ // - MacOS: requires root permissions on OSX 10.7+.
+ // - Android: devices attached to testbots don't have default network, so
+ // broadcasting to 255.255.255.255 returns error -109 (Address not reachable).
+@@ -708,7 +708,7 @@ TEST_F(UDPSocketTest, ClientSetDoNotFrag
+     EXPECT_THAT(rv, IsOk());
+ 
+     rv = client.SetDoNotFragment();
+-#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+     // TODO(crbug.com/42050633): IP_MTU_DISCOVER is not implemented on Fuchsia.
+     EXPECT_THAT(rv, IsError(ERR_NOT_IMPLEMENTED));
+ #else
+@@ -730,7 +730,7 @@ TEST_F(UDPSocketTest, ServerSetDoNotFrag
+     EXPECT_THAT(rv, IsOk());
+ 
+     rv = server.SetDoNotFragment();
+-#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+     // TODO(crbug.com/42050633): IP_MTU_DISCOVER is not implemented on Fuchsia.
+     EXPECT_THAT(rv, IsError(ERR_NOT_IMPLEMENTED));
+ #else
+@@ -796,7 +796,7 @@ TEST_F(UDPSocketTest, JoinMulticastGroup
+ 
+ // TODO(crbug.com/40620614): failing on device on iOS 12.2.
+ // TODO(crbug.com/40189274): flaky on Mac 11.
+-#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ #define MAYBE_SharedMulticastAddress DISABLED_SharedMulticastAddress
+ #else
+ #define MAYBE_SharedMulticastAddress SharedMulticastAddress
+@@ -850,7 +850,7 @@ TEST_F(UDPSocketTest, MAYBE_SharedMultic
+                                 NetLogSource());
+   ASSERT_THAT(client_socket.Connect(send_address), IsOk());
+ 
+-#if !BUILDFLAG(IS_CHROMEOS)
++#if !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD)
+   // Send a message via the multicast group. That message is expected be be
+   // received by both receving sockets.
+   //
diff --git a/chromium-wip/patches/patch-net_third__party_quiche_BUILD.gn b/chromium-wip/patches/patch-net_third__party_quiche_BUILD.gn
new file mode 100644
index 0000000000..3428daaf39
--- /dev/null
+++ b/chromium-wip/patches/patch-net_third__party_quiche_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/third_party/quiche/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/third_party/quiche/BUILD.gn
+@@ -28,7 +28,7 @@ import("//net/third_party/quiche/src/bui
+ import("//testing/libfuzzer/fuzzer_test.gni")
+ import("//third_party/protobuf/proto_library.gni")
+ 
+-build_epoll_based_tools = is_linux || is_chromeos
++build_epoll_based_tools = (is_linux && !is_bsd) || is_chromeos
+ 
+ config("quiche_internal_config") {
+   cflags = []
diff --git a/chromium-wip/patches/patch-net_tools_cert__verify__tool_cert__verify__tool.cc b/chromium-wip/patches/patch-net_tools_cert__verify__tool_cert__verify__tool.cc
new file mode 100644
index 0000000000..c13aa2af3a
--- /dev/null
+++ b/chromium-wip/patches/patch-net_tools_cert__verify__tool_cert__verify__tool.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/tools/cert_verify_tool/cert_verify_tool.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/tools/cert_verify_tool/cert_verify_tool.cc
+@@ -35,7 +35,7 @@
+ #include "third_party/boringssl/src/pki/trust_store.h"
+ #include "third_party/boringssl/src/pki/trust_store_collection.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "net/proxy_resolution/proxy_config.h"
+ #include "net/proxy_resolution/proxy_config_service_fixed.h"
+ #endif
+@@ -67,7 +67,7 @@ void SetUpOnNetworkThread(
+     base::WaitableEvent* initialization_complete_event) {
+   net::URLRequestContextBuilder url_request_context_builder;
+   url_request_context_builder.set_user_agent(GetUserAgent());
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // On Linux, use a fixed ProxyConfigService, since the default one
+   // depends on glib.
+   //
diff --git a/chromium-wip/patches/patch-net_tools_net__watcher_net__watcher.cc b/chromium-wip/patches/patch-net_tools_net__watcher_net__watcher.cc
new file mode 100644
index 0000000000..9853108108
--- /dev/null
+++ b/chromium-wip/patches/patch-net_tools_net__watcher_net__watcher.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/tools/net_watcher/net_watcher.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/tools/net_watcher/net_watcher.cc
+@@ -31,7 +31,7 @@
+ #include "net/proxy_resolution/proxy_config_service.h"
+ #include "net/proxy_resolution/proxy_config_with_annotation.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "net/base/network_change_notifier_linux.h"
+ #endif
+ 
+@@ -41,7 +41,7 @@
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Flag to specifies which network interfaces to ignore. Interfaces should
+ // follow as a comma seperated list.
+ const char kIgnoreNetifFlag[] = "ignore-netif";
+@@ -143,7 +143,7 @@ class NetWatcher :
+ }  // namespace
+ 
+ int main(int argc, char* argv[]) {
+-#if BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   base::apple::ScopedNSAutoreleasePool pool;
+ #endif
+   base::AtExitManager exit_manager;
+@@ -160,7 +160,7 @@ int main(int argc, char* argv[]) {
+ 
+   NetWatcher net_watcher;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+   std::string ignored_netifs_str =
+       command_line->GetSwitchValueASCII(kIgnoreNetifFlag);
diff --git a/chromium-wip/patches/patch-net_traffic__annotation_network__traffic__annotation.h b/chromium-wip/patches/patch-net_traffic__annotation_network__traffic__annotation.h
new file mode 100644
index 0000000000..4f1b622b4f
--- /dev/null
+++ b/chromium-wip/patches/patch-net_traffic__annotation_network__traffic__annotation.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/traffic_annotation/network_traffic_annotation.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/traffic_annotation/network_traffic_annotation.h
+@@ -374,7 +374,7 @@ struct MutablePartialNetworkTrafficAnnot
+ }  // namespace net
+ 
+ // Placeholder for unannotated usages.
+-#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)
++#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD)
+ #define TRAFFIC_ANNOTATION_WITHOUT_PROTO(ANNOTATION_ID) \
+   net::DefineNetworkTrafficAnnotation(ANNOTATION_ID, "No proto yet.")
+ #endif
+@@ -385,7 +385,7 @@ struct MutablePartialNetworkTrafficAnnot
+ //
+ // On Linux and Windows, use MISSING_TRAFFIC_ANNOTATION or
+ // TRAFFIC_ANNOTATION_FOR_TESTS.
+-#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX)
++#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)
+ 
+ #define NO_TRAFFIC_ANNOTATION_YET \
+   net::DefineNetworkTrafficAnnotation("undefined", "Nothing here yet.")
diff --git a/chromium-wip/patches/patch-net_url__request_url__request__context.cc b/chromium-wip/patches/patch-net_url__request_url__request__context.cc
new file mode 100644
index 0000000000..2348404dba
--- /dev/null
+++ b/chromium-wip/patches/patch-net_url__request_url__request__context.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/url_request/url_request_context.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/url_request/url_request_context.cc
+@@ -120,7 +120,7 @@ const HttpNetworkSessionContext* URLRequ
+   return &network_session->context();
+ }
+ 
+-#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX)
++#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)
+ std::unique_ptr<URLRequest> URLRequestContext::CreateRequest(
+     const GURL& url,
+     RequestPriority priority,
diff --git a/chromium-wip/patches/patch-net_url__request_url__request__context.h b/chromium-wip/patches/patch-net_url__request_url__request__context.h
new file mode 100644
index 0000000000..450080ae89
--- /dev/null
+++ b/chromium-wip/patches/patch-net_url__request_url__request__context.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/url_request/url_request_context.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/url_request/url_request_context.h
+@@ -86,7 +86,7 @@ class NET_EXPORT URLRequestContext final
+   // session.
+   const HttpNetworkSessionContext* GetNetworkSessionContext() const;
+ 
+-#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX)
++#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)
+   // This function should not be used in Chromium, please use the version with
+   // NetworkTrafficAnnotationTag in the future.
+   //
diff --git a/chromium-wip/patches/patch-net_url__request_url__request__context__builder.cc b/chromium-wip/patches/patch-net_url__request_url__request__context__builder.cc
new file mode 100644
index 0000000000..dd9b4e0ac2
--- /dev/null
+++ b/chromium-wip/patches/patch-net_url__request_url__request__context__builder.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/url_request/url_request_context_builder.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/url_request/url_request_context_builder.cc
+@@ -444,7 +444,7 @@ std::unique_ptr<URLRequestContext> URLRe
+   }
+ 
+   if (!proxy_resolution_service_) {
+-#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD)
+     // TODO(willchan): Switch to using this code when
+     // ProxyConfigService::CreateSystemProxyConfigService()'s
+     // signature doesn't suck.
diff --git a/chromium-wip/patches/patch-net_websockets_websocket__basic__stream__adapters__test.cc b/chromium-wip/patches/patch-net_websockets_websocket__basic__stream__adapters__test.cc
new file mode 100644
index 0000000000..e1b15bdbac
--- /dev/null
+++ b/chromium-wip/patches/patch-net_websockets_websocket__basic__stream__adapters__test.cc
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- net/websockets/websocket_basic_stream_adapters_test.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ net/websockets/websocket_basic_stream_adapters_test.cc
+@@ -1098,10 +1098,10 @@ TEST_F(WebSocketSpdyStreamAdapterTest,
+        OnCloseOkShouldBeTranslatedToConnectionClose) {
+   spdy::SpdySerializedFrame response_headers(
+       spdy_util_.ConstructSpdyResponseHeaders(1, ResponseHeaders(), false));
+-  spdy::SpdySerializedFrame close(
++  spdy::SpdySerializedFrame test_close(
+       spdy_util_.ConstructSpdyRstStream(1, spdy::ERROR_CODE_NO_ERROR));
+   MockRead reads[] = {CreateMockRead(response_headers, 1),
+-                      CreateMockRead(close, 2), MockRead(ASYNC, 0, 3)};
++                      CreateMockRead(test_close, 2), MockRead(ASYNC, 0, 3)};
+   spdy::SpdySerializedFrame request_headers(spdy_util_.ConstructSpdyHeaders(
+       1, RequestHeaders(), DEFAULT_PRIORITY, false));
+   MockWrite writes[] = {CreateMockWrite(request_headers, 0)};
diff --git a/chromium-wip/patches/patch-pdf_pdfium_pdfium__engine.cc b/chromium-wip/patches/patch-pdf_pdfium_pdfium__engine.cc
new file mode 100644
index 0000000000..28d586a264
--- /dev/null
+++ b/chromium-wip/patches/patch-pdf_pdfium_pdfium__engine.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- pdf/pdfium/pdfium_engine.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ pdf/pdfium/pdfium_engine.cc
+@@ -114,7 +114,7 @@
+ #include "ui/accessibility/ax_features.mojom-features.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "pdf/pdfium/pdfium_font_linux.h"
+ #endif
+ 
+@@ -566,7 +566,7 @@ void InitializeSDK(bool enable_v8,
+ 
+   FPDF_InitLibraryWithConfig(&config);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   g_font_mapping_mode = font_mapping_mode;
+   InitializeLinuxFontMapper();
+ #endif
diff --git a/chromium-wip/patches/patch-ppapi_tests_test__utils.h b/chromium-wip/patches/patch-ppapi_tests_test__utils.h
new file mode 100644
index 0000000000..8975fe9ea7
--- /dev/null
+++ b/chromium-wip/patches/patch-ppapi_tests_test__utils.h
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ppapi/tests/test_utils.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ppapi/tests/test_utils.h
+@@ -314,6 +314,8 @@ do { \
+ #define PPAPI_OS_FREEBSD 1
+ #elif defined(__OpenBSD__)
+ #define PPAPI_OS_OPENBSD 1
++#elif defined(__NetBSD__)
++#define PPAPI_OS_NETBSD 1
+ #elif defined(__sun)
+ #define PPAPI_OS_SOLARIS 1
+ #else
+@@ -322,7 +324,8 @@ do { \
+ 
+ /* These are used to determine POSIX-like implementations vs Windows. */
+ #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
+-    defined(__OpenBSD__) || defined(__sun) || defined(__native_client__)
++    defined(__OpenBSD__) || defined(__sun) || defined(__native_client__) \
++    defined(__NetBSD__)
+ #define PPAPI_POSIX 1
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-printing_backend_cups__ipp__helper.cc b/chromium-wip/patches/patch-printing_backend_cups__ipp__helper.cc
new file mode 100644
index 0000000000..02b30da732
--- /dev/null
+++ b/chromium-wip/patches/patch-printing_backend_cups__ipp__helper.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- printing/backend/cups_ipp_helper.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ printing/backend/cups_ipp_helper.cc
+@@ -202,7 +202,7 @@ void ExtractResolutions(const CupsOption
+   // Provide a default DPI if no valid DPI is found.
+ #if BUILDFLAG(IS_MAC)
+   constexpr gfx::Size kDefaultMissingDpi(kDefaultMacDpi, kDefaultMacDpi);
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   constexpr gfx::Size kDefaultMissingDpi(kPixelsPerInch, kPixelsPerInch);
+ #else
+   constexpr gfx::Size kDefaultMissingDpi(kDefaultPdfDpi, kDefaultPdfDpi);
diff --git a/chromium-wip/patches/patch-printing_backend_print__backend__cups.cc b/chromium-wip/patches/patch-printing_backend_print__backend__cups.cc
new file mode 100644
index 0000000000..d9306d2ecd
--- /dev/null
+++ b/chromium-wip/patches/patch-printing_backend_print__backend__cups.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- printing/backend/print_backend_cups.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ printing/backend/print_backend_cups.cc
+@@ -29,7 +29,7 @@
+ #include "printing/mojom/print.mojom.h"
+ #include "url/gurl.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ #include "base/feature_list.h"
+ #include "printing/backend/cups_connection.h"
+ #include "printing/backend/print_backend_cups_ipp.h"
+@@ -59,7 +59,7 @@ int CaptureCupsDestCallback(void* data, 
+   return 1;  // Keep going.
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ // This may be removed when Amazon Linux 2 reaches EOL (30 Jun 2025).
+ bool AreNewerCupsFunctionsAvailable() {
+   return cupsFindDestDefault && cupsFindDestSupported && cupsUserAgent &&
+@@ -286,7 +286,7 @@ bool PrintBackendCUPS::IsValidPrinter(co
+ #if !BUILDFLAG(IS_CHROMEOS)
+ scoped_refptr<PrintBackend> PrintBackend::CreateInstanceImpl(
+     const std::string& locale) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   if (AreNewerCupsFunctionsAvailable() &&
+       base::FeatureList::IsEnabled(features::kCupsIppPrintingBackend)) {
+     return base::MakeRefCounted<PrintBackendCupsIpp>(CupsConnection::Create());
diff --git a/chromium-wip/patches/patch-printing_mojom_printing__context__mojom__traits.cc b/chromium-wip/patches/patch-printing_mojom_printing__context__mojom__traits.cc
new file mode 100644
index 0000000000..282d4a3294
--- /dev/null
+++ b/chromium-wip/patches/patch-printing_mojom_printing__context__mojom__traits.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- printing/mojom/printing_context_mojom_traits.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ printing/mojom/printing_context_mojom_traits.cc
+@@ -19,7 +19,7 @@
+ #include "base/numerics/safe_conversions.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "mojo/public/mojom/base/values.mojom.h"
+ #endif
+ 
+@@ -162,7 +162,7 @@ bool StructTraits<
+   }
+ 
+   out->set_pages_per_sheet(data.pages_per_sheet());
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   DCHECK(out->advanced_settings().empty());
+   if (!data.ReadAdvancedSettings(&out->advanced_settings()))
+     return false;
+@@ -239,7 +239,7 @@ bool StructTraits<
+     if (system_print_dialog_data.size() != dictionary_entries) {
+       return false;
+     }
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // The dictionary must contain three strings.
+     const base::Value* value = system_print_dialog_data.Find(
+         printing::kLinuxSystemPrintDialogDataPrinter);
diff --git a/chromium-wip/patches/patch-printing_mojom_printing__context__mojom__traits.h b/chromium-wip/patches/patch-printing_mojom_printing__context__mojom__traits.h
new file mode 100644
index 0000000000..a0c030eb33
--- /dev/null
+++ b/chromium-wip/patches/patch-printing_mojom_printing__context__mojom__traits.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- printing/mojom/printing_context_mojom_traits.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ printing/mojom/printing_context_mojom_traits.h
+@@ -166,7 +166,7 @@ struct StructTraits<printing::mojom::Pri
+     return s.pages_per_sheet();
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   static const printing::PrintSettings::AdvancedSettings& advanced_settings(
+       const printing::PrintSettings& s) {
+     return s.advanced_settings();
diff --git a/chromium-wip/patches/patch-printing_mojom_printing__context__mojom__traits__unittest.cc b/chromium-wip/patches/patch-printing_mojom_printing__context__mojom__traits__unittest.cc
new file mode 100644
index 0000000000..b86958f92b
--- /dev/null
+++ b/chromium-wip/patches/patch-printing_mojom_printing__context__mojom__traits__unittest.cc
@@ -0,0 +1,71 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- printing/mojom/printing_context_mojom_traits_unittest.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ printing/mojom/printing_context_mojom_traits_unittest.cc
+@@ -79,7 +79,7 @@ base::Value::Dict GenerateSampleSystemPr
+     data.Set(kMacSystemPrintDialogDataDestinationLocation, "/foo/bar.pdf");
+   }
+ 
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   data.Set(kLinuxSystemPrintDialogDataPrinter, "printer-name");
+   data.Set(kLinuxSystemPrintDialogDataPrintSettings, "print-settings-foo");
+   data.Set(kLinuxSystemPrintDialogDataPageSetup, "page-setup-bar");
+@@ -116,7 +116,7 @@ const PageMargins kPrintSettingsCustomMa
+                                                        /*top=*/10583,
+                                                        /*bottom=*/12347);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ PrintSettings::AdvancedSettings GenerateSampleAdvancedSettings() {
+   PrintSettings::AdvancedSettings advanced_settings;
+   advanced_settings.emplace("advanced-setting-A", base::Value("setting-A"));
+@@ -209,7 +209,7 @@ PrintSettings GenerateSamplePrintSetting
+   settings.set_device_name(kPrintSettingsDeviceName);
+   settings.set_requested_media(kPrintSettingsRequestedMedia);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   PrintSettings::AdvancedSettings& advanced_settings =
+       settings.advanced_settings();
+   for (const auto& item : kPrintSettingsAdvancedSettings)
+@@ -547,7 +547,7 @@ TEST(PrintingContextMojomTraitsTest,
+ 
+   EXPECT_EQ(output.pages_per_sheet(), kPrintSettingsPagesPerSheet1);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   EXPECT_EQ(output.advanced_settings(), kPrintSettingsAdvancedSettings);
+ #endif
+ 
+@@ -600,7 +600,7 @@ TEST(PrintingContextMojomTraitsTest,
+                                kPrintSettingsCustomMarginsInMicrons));
+   EXPECT_EQ(output.pages_per_sheet(), kPrintSettingsPagesPerSheet2);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   EXPECT_EQ(output.advanced_settings(), kPrintSettingsAdvancedSettings);
+ #endif
+ 
+@@ -639,7 +639,7 @@ TEST(PrintingContextMojomTraitsTest,
+   EXPECT_EQ(output.page_setup_device_units(), kInput.page_setup_device_units());
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ TEST(PrintingContextMojomTraitsTest,
+      TestSerializeAndDeserializePrintSettingsEmptyAdvancedSettings) {
+   PrintSettings input = GenerateSamplePrintSettingsDefaultMargins();
+@@ -837,7 +837,7 @@ TEST(
+ }
+ #endif  // BUILDFLAG(IS_MAC)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ TEST(
+     PrintingContextMojomTraitsTest,
+     TestSerializeAndDeserializePrintSettingsSystemPrintDialogPrinterInvalidDataType) {
diff --git a/chromium-wip/patches/patch-printing_print__settings.cc b/chromium-wip/patches/patch-printing_print__settings.cc
new file mode 100644
index 0000000000..ca99a0e1e3
--- /dev/null
+++ b/chromium-wip/patches/patch-printing_print__settings.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- printing/print_settings.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ printing/print_settings.cc
+@@ -319,7 +319,7 @@ PrintSettings& PrintSettings::operator=(
+ #endif
+   is_modifiable_ = settings.is_modifiable_;
+   pages_per_sheet_ = settings.pages_per_sheet_;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   for (const auto& item : settings.advanced_settings_)
+     advanced_settings_.emplace(item.first, item.second.Clone());
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+@@ -349,7 +349,7 @@ bool PrintSettings::operator==(const Pri
+ #endif
+                   is_modifiable_, requested_custom_margins_in_microns_,
+                   pages_per_sheet_
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+                   ,
+                   advanced_settings_
+ #endif
+@@ -373,7 +373,7 @@ bool PrintSettings::operator==(const Pri
+                   other.is_modifiable_,
+                   other.requested_custom_margins_in_microns_,
+                   other.pages_per_sheet_
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+                   ,
+                   other.advanced_settings_
+ #endif
+@@ -413,7 +413,7 @@ void PrintSettings::Clear() {
+ #endif
+   is_modifiable_ = true;
+   pages_per_sheet_ = 1;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   advanced_settings_.clear();
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ #if BUILDFLAG(IS_CHROMEOS)
diff --git a/chromium-wip/patches/patch-printing_print__settings.h b/chromium-wip/patches/patch-printing_print__settings.h
new file mode 100644
index 0000000000..01413a38e3
--- /dev/null
+++ b/chromium-wip/patches/patch-printing_print__settings.h
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- printing/print_settings.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ printing/print_settings.h
+@@ -25,7 +25,7 @@
+ #include "base/values.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include <map>
+ 
+ #include "base/values.h"
+@@ -51,7 +51,7 @@ inline constexpr char kMacSystemPrintDia
+     "print_settings";
+ #endif  // BUILDFLAG(IS_MAC)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ inline constexpr char kLinuxSystemPrintDialogDataPrinter[] = "printer_name";
+ inline constexpr char kLinuxSystemPrintDialogDataPrintSettings[] =
+     "print_settings";
+@@ -101,7 +101,7 @@ class COMPONENT_EXPORT(PRINTING_SETTINGS
+     std::string vendor_id;
+   };
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   using AdvancedSettings = std::map<std::string, base::Value>;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+@@ -276,7 +276,7 @@ class COMPONENT_EXPORT(PRINTING_SETTINGS
+     pages_per_sheet_ = pages_per_sheet;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   AdvancedSettings& advanced_settings() { return advanced_settings_; }
+   const AdvancedSettings& advanced_settings() const {
+     return advanced_settings_;
+@@ -437,7 +437,7 @@ class COMPONENT_EXPORT(PRINTING_SETTINGS
+   // Number of pages per sheet.
+   int pages_per_sheet_;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Advanced settings.
+   AdvancedSettings advanced_settings_;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
diff --git a/chromium-wip/patches/patch-printing_print__settings__conversion.cc b/chromium-wip/patches/patch-printing_print__settings__conversion.cc
new file mode 100644
index 0000000000..d5c666cf56
--- /dev/null
+++ b/chromium-wip/patches/patch-printing_print__settings__conversion.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- printing/print_settings_conversion.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ printing/print_settings_conversion.cc
+@@ -291,7 +291,7 @@ std::unique_ptr<PrintSettings> PrintSett
+     settings->set_is_modifiable(is_modifiable.value());
+   }
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS))
++#if BUILDFLAG(IS_CHROMEOS) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_CUPS))
+   const base::Value::Dict* advanced_settings =
+       job_settings.FindDict(kSettingAdvancedSettings);
+   if (advanced_settings) {
diff --git a/chromium-wip/patches/patch-printing_printing__context__linux.cc b/chromium-wip/patches/patch-printing_printing__context__linux.cc
new file mode 100644
index 0000000000..5d1937aa6a
--- /dev/null
+++ b/chromium-wip/patches/patch-printing_printing__context__linux.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- printing/printing_context_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ printing/printing_context_linux.cc
+@@ -23,7 +23,7 @@
+ #endif
+ 
+ // Avoid using LinuxUi on Fuchsia.
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/linux/linux_ui.h"
+ #endif
+ 
+@@ -69,7 +69,7 @@ mojom::ResultCode PrintingContextLinux::
+ 
+   ResetSettings();
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (!ui::LinuxUi::instance())
+     return mojom::ResultCode::kSuccess;
+ 
+@@ -85,7 +85,7 @@ mojom::ResultCode PrintingContextLinux::
+ }
+ 
+ gfx::Size PrintingContextLinux::GetPdfPaperSizeDeviceUnits() {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (ui::LinuxUi::instance())
+     return ui::LinuxUi::instance()->GetPdfPaperSize(this);
+ #endif
+@@ -98,7 +98,7 @@ mojom::ResultCode PrintingContextLinux::
+   DCHECK(!printer_settings.show_system_dialog);
+   DCHECK(!in_print_job_);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (!ui::LinuxUi::instance())
+     return mojom::ResultCode::kSuccess;
+ 
diff --git a/chromium-wip/patches/patch-printing_printing__features.cc b/chromium-wip/patches/patch-printing_printing__features.cc
new file mode 100644
index 0000000000..822effac70
--- /dev/null
+++ b/chromium-wip/patches/patch-printing_printing__features.cc
@@ -0,0 +1,32 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- printing/printing_features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ printing/printing_features.cc
+@@ -26,12 +26,12 @@ BASE_FEATURE(kApiPrintingMarginsAndScale
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ // Use the CUPS IPP printing backend instead of the original CUPS backend that
+ // calls the deprecated PPD API.
+ BASE_FEATURE(kCupsIppPrintingBackend,
+              "CupsIppPrintingBackend",
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+              base::FEATURE_DISABLED_BY_DEFAULT
+ #else
+              base::FEATURE_ENABLED_BY_DEFAULT
+@@ -81,7 +81,7 @@ BASE_FEATURE(kUseXpsForPrintingFromPdf,
+ // out-of-process.
+ BASE_FEATURE(kEnableOopPrintDrivers,
+              "EnableOopPrintDrivers",
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+              base::FEATURE_ENABLED_BY_DEFAULT
+ #else
+              base::FEATURE_DISABLED_BY_DEFAULT
diff --git a/chromium-wip/patches/patch-printing_printing__features.h b/chromium-wip/patches/patch-printing_printing__features.h
new file mode 100644
index 0000000000..803f2fac6f
--- /dev/null
+++ b/chromium-wip/patches/patch-printing_printing__features.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- printing/printing_features.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ printing/printing_features.h
+@@ -24,7 +24,7 @@ COMPONENT_EXPORT(PRINTING_BASE)
+ BASE_DECLARE_FEATURE(kApiPrintingMarginsAndScale);
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(PRINTING_BASE) BASE_DECLARE_FEATURE(kCupsIppPrintingBackend);
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
+ 
diff --git a/chromium-wip/patches/patch-printing_sandbox_print__backend__sandbox__hook__linux.cc b/chromium-wip/patches/patch-printing_sandbox_print__backend__sandbox__hook__linux.cc
new file mode 100644
index 0000000000..5455daebaf
--- /dev/null
+++ b/chromium-wip/patches/patch-printing_sandbox_print__backend__sandbox__hook__linux.cc
@@ -0,0 +1,56 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- printing/sandbox/print_backend_sandbox_hook_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ printing/sandbox/print_backend_sandbox_hook_linux.cc
+@@ -10,20 +10,27 @@
+ #include "base/path_service.h"
+ #include "build/build_config.h"
+ #include "printing/buildflags/buildflags.h"
++#if !BUILDFLAG(IS_BSD)
+ #include "sandbox/linux/syscall_broker/broker_command.h"
+ #include "sandbox/linux/syscall_broker/broker_file_permission.h"
+ #include "sandbox/policy/export.h"
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#else
++#include "sandbox/policy/sandbox.h"
++#endif
+ 
+ #if BUILDFLAG(IS_CHROMEOS) && BUILDFLAG(USE_CUPS)
+ #include "printing/backend/cups_connection_pool.h"
+ #endif
+ 
++#if !BUILDFLAG(IS_BSD)
+ using sandbox::syscall_broker::BrokerFilePermission;
+ using sandbox::syscall_broker::MakeBrokerCommandSet;
++#endif
+ 
+ namespace printing {
+ 
++#if !BUILDFLAG(IS_BSD)
+ namespace {
+ 
+ sandbox::syscall_broker::BrokerCommandSet GetPrintBackendBrokerCommandSet() {
+@@ -76,9 +83,11 @@ std::vector<BrokerFilePermission> GetPri
+ }
+ 
+ }  // namespace
++#endif
+ 
+ bool PrintBackendPreSandboxHook(
+     sandbox::policy::SandboxLinux::Options options) {
++#if !BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(IS_CHROMEOS) && BUILDFLAG(USE_CUPS)
+   // Create the socket connections to the CUPS server before engaging the
+   // sandbox, since new connections cannot be made after that.
+@@ -91,6 +100,7 @@ bool PrintBackendPreSandboxHook(
+                                GetPrintBackendFilePermissions(), options);
+ 
+   instance->EngageNamespaceSandboxIfPossible();
++#endif
+   return true;
+ }
+ 
diff --git a/chromium-wip/patches/patch-printing_sandbox_print__backend__sandbox__hook__linux.h b/chromium-wip/patches/patch-printing_sandbox_print__backend__sandbox__hook__linux.h
new file mode 100644
index 0000000000..2724560cb2
--- /dev/null
+++ b/chromium-wip/patches/patch-printing_sandbox_print__backend__sandbox__hook__linux.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- printing/sandbox/print_backend_sandbox_hook_linux.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ printing/sandbox/print_backend_sandbox_hook_linux.h
+@@ -5,8 +5,13 @@
+ #ifndef PRINTING_SANDBOX_PRINT_BACKEND_SANDBOX_HOOK_LINUX_H_
+ #define PRINTING_SANDBOX_PRINT_BACKEND_SANDBOX_HOOK_LINUX_H_
+ 
++#include "build/build_config.h"
+ #include "base/component_export.h"
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#else
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#endif
+ 
+ namespace printing {
+ 
diff --git a/chromium-wip/patches/patch-remoting_base_constants.h b/chromium-wip/patches/patch-remoting_base_constants.h
new file mode 100644
index 0000000000..fddb374a63
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_base_constants.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/base/constants.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/base/constants.h
+@@ -27,7 +27,7 @@ const int kDefaultDpi = 96;
+ // The video frame rate.
+ constexpr int kTargetFrameRate = 30;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ inline constexpr char kChromeRemoteDesktopSessionEnvVar[] =
+     "CHROME_REMOTE_DESKTOP_SESSION";
+ #endif
diff --git a/chromium-wip/patches/patch-remoting_base_host__settings.cc b/chromium-wip/patches/patch-remoting_base_host__settings.cc
new file mode 100644
index 0000000000..f17d877081
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_base_host__settings.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/base/host_settings.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/base/host_settings.cc
+@@ -7,7 +7,7 @@
+ #include "base/no_destructor.h"
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_APPLE) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS))
++#if BUILDFLAG(IS_APPLE) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD)
+ #include "remoting/base/file_host_settings.h"
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+@@ -44,7 +44,7 @@ HostSettings::~HostSettings() = default;
+ 
+ // static
+ HostSettings* HostSettings::GetInstance() {
+-#if BUILDFLAG(IS_APPLE) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS))
++#if BUILDFLAG(IS_APPLE) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD)
+   static base::NoDestructor<FileHostSettings> instance(
+       FileHostSettings::GetSettingsFilePath());
+ #elif BUILDFLAG(IS_WIN)
diff --git a/chromium-wip/patches/patch-remoting_codec_webrtc__video__encoder__vpx.cc b/chromium-wip/patches/patch-remoting_codec_webrtc__video__encoder__vpx.cc
new file mode 100644
index 0000000000..d93799c68f
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_codec_webrtc__video__encoder__vpx.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/codec/webrtc_video_encoder_vpx.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/codec/webrtc_video_encoder_vpx.cc
+@@ -92,7 +92,7 @@ void SetVp8CodecParameters(vpx_codec_enc
+                            const webrtc::DesktopSize& size) {
+   SetCommonCodecParameters(config, size);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // On Linux, using too many threads for VP8 encoding has been linked to high
+   // CPU usage on machines that are under stress. See http://crbug.com/1151148.
+   // 5/3/2022 update: Perf testing has shown that doubling the number of threads
diff --git a/chromium-wip/patches/patch-remoting_host_base_desktop__environment__options.cc b/chromium-wip/patches/patch-remoting_host_base_desktop__environment__options.cc
new file mode 100644
index 0000000000..2398c50798
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_base_desktop__environment__options.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/base/desktop_environment_options.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/base/desktop_environment_options.cc
+@@ -109,7 +109,7 @@ bool DesktopEnvironmentOptions::capture_
+   // TODO(joedow): Determine whether we can migrate additional platforms to
+   // using the DesktopCaptureWrapper instead of the DesktopCaptureProxy. Then
+   // clean up DesktopCapturerProxy::Core::CreateCapturer().
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return capture_video_on_dedicated_thread_;
+ #else
+   return false;
diff --git a/chromium-wip/patches/patch-remoting_host_base_switches.cc b/chromium-wip/patches/patch-remoting_host_base_switches.cc
new file mode 100644
index 0000000000..6d7f6c23db
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_base_switches.cc
@@ -0,0 +1,24 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/base/switches.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/base/switches.cc
+@@ -23,13 +23,13 @@ const char kProcessTypeEvaluateCapabilit
+ const char kProcessTypeFileChooser[] = "file_chooser";
+ const char kProcessTypeUrlForwarderConfigurator[] =
+     "url_forwarder_configurator";
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ const char kProcessTypeXSessionChooser[] = "xsession_chooser";
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+ const char kEvaluateCapabilitySwitchName[] = "evaluate-type";
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ const char kEnableWtmpdb[] = "enable-wtmpdb";
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-remoting_host_base_switches.h b/chromium-wip/patches/patch-remoting_host_base_switches.h
new file mode 100644
index 0000000000..f1c8c2c4b3
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_base_switches.h
@@ -0,0 +1,24 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/base/switches.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/base/switches.h
+@@ -35,13 +35,13 @@ extern const char kProcessTypeRdpDesktop
+ extern const char kProcessTypeEvaluateCapability[];
+ extern const char kProcessTypeFileChooser[];
+ extern const char kProcessTypeUrlForwarderConfigurator[];
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ extern const char kProcessTypeXSessionChooser[];
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+ extern const char kEvaluateCapabilitySwitchName[];
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Used to record client sessions to wtmpd.
+ extern const char kEnableWtmpdb[];
+ #endif
diff --git a/chromium-wip/patches/patch-remoting_host_chromoting__host.cc b/chromium-wip/patches/patch-remoting_host_chromoting__host.cc
new file mode 100644
index 0000000000..25c7b566a9
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_chromoting__host.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/chromoting_host.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/chromoting_host.cc
+@@ -138,7 +138,7 @@ void ChromotingHost::Start(const std::st
+       &ChromotingHost::OnIncomingSession, base::Unretained(this)));
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void ChromotingHost::StartChromotingHostServices() {
+   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+   DCHECK(!ipc_server_);
diff --git a/chromium-wip/patches/patch-remoting_host_chromoting__host.h b/chromium-wip/patches/patch-remoting_host_chromoting__host.h
new file mode 100644
index 0000000000..4a3367bd30
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_chromoting__host.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/chromoting_host.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/chromoting_host.h
+@@ -36,7 +36,7 @@
+ #include "remoting/protocol/session_manager.h"
+ #include "remoting/protocol/transport_context.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "remoting/host/chromoting_host_services_server.h"
+ #endif
+ 
+@@ -112,7 +112,7 @@ class ChromotingHost : public ClientSess
+   // This method can only be called once during the lifetime of this object.
+   void Start(const std::string& host_owner);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Starts running the ChromotingHostServices server and listening for incoming
+   // IPC binding requests.
+   // Currently only Linux runs the ChromotingHostServices server on the host
+@@ -222,7 +222,7 @@ class ChromotingHost : public ClientSess
+   // List of host extensions.
+   std::vector<std::unique_ptr<HostExtension>> extensions_;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // IPC server that runs the CRD host service API. Non-null if the server name
+   // is set and the host is started.
+   // Currently only Linux runs the ChromotingHostServices server on the host
diff --git a/chromium-wip/patches/patch-remoting_host_chromoting__host__context.cc b/chromium-wip/patches/patch-remoting_host_chromoting__host__context.cc
new file mode 100644
index 0000000000..9b2ca767cd
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_chromoting__host__context.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/chromoting_host_context.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/chromoting_host_context.cc
+@@ -335,7 +335,7 @@ std::unique_ptr<ChromotingHostContext> C
+   // on a UI thread.
+   scoped_refptr<AutoThreadTaskRunner> input_task_runner =
+       AutoThread::CreateWithType("ChromotingInputThread", ui_task_runner,
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+                                  base::MessagePumpType::UI);
+ #else
+                                  base::MessagePumpType::IO);
diff --git a/chromium-wip/patches/patch-remoting_host_chromoting__host__services__client.cc b/chromium-wip/patches/patch-remoting_host_chromoting__host__services__client.cc
new file mode 100644
index 0000000000..74be12a119
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_chromoting__host__services__client.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/chromoting_host_services_client.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/chromoting_host_services_client.cc
+@@ -139,7 +139,7 @@ bool ChromotingHostServicesClient::Ensur
+   if (session_services_remote_.is_bound()) {
+     return true;
+   }
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (!environment_->HasVar(kChromeRemoteDesktopSessionEnvVar)) {
+     LOG(WARNING) << "Current desktop environment is not remotable.";
+     return false;
diff --git a/chromium-wip/patches/patch-remoting_host_client__session.cc b/chromium-wip/patches/patch-remoting_host_client__session.cc
new file mode 100644
index 0000000000..c4508bb961
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_client__session.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/client_session.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/client_session.cc
+@@ -188,7 +188,7 @@ void ClientSession::NotifyClientResoluti
+   if (effective_policies_.curtain_required.value_or(false)) {
+     dpi_vector.set(resolution.x_dpi(), resolution.y_dpi());
+   }
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   dpi_vector.set(resolution.x_dpi(), resolution.y_dpi());
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-remoting_host_crash_crash__file__uploader.cc b/chromium-wip/patches/patch-remoting_host_crash_crash__file__uploader.cc
new file mode 100644
index 0000000000..03027add92
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_crash_crash__file__uploader.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/crash/crash_file_uploader.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/crash/crash_file_uploader.cc
+@@ -44,7 +44,7 @@ constexpr char kMinidumpFileName[] = "du
+ 
+ #if BUILDFLAG(IS_WIN)
+ constexpr char kProductNameValue[] = "Chromoting";
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ constexpr char kProductNameValue[] = "Chromoting_Linux";
+ #elif BUILDFLAG(IS_MAC)
+ constexpr char kProductNameValue[] = "Chromoting_Mac";
diff --git a/chromium-wip/patches/patch-remoting_host_create__desktop__interaction__strategy__factory.cc b/chromium-wip/patches/patch-remoting_host_create__desktop__interaction__strategy__factory.cc
new file mode 100644
index 0000000000..562a9cecbe
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_create__desktop__interaction__strategy__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/create_desktop_interaction_strategy_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/create_desktop_interaction_strategy_factory.cc
+@@ -13,7 +13,7 @@
+ #include "remoting/host/desktop_interaction_strategy.h"
+ #include "remoting/host/legacy_interaction_strategy.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "remoting/host/linux/gnome_interaction_strategy.h"
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+@@ -25,7 +25,7 @@ CreateDesktopInteractionStrategyFactory(
+     scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
+     scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner,
+     scoped_refptr<base::SingleThreadTaskRunner> input_task_runner) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (base::CommandLine::ForCurrentProcess()->HasSwitch("enable-wayland")) {
+     return std::make_unique<GnomeInteractionStrategyFactory>(ui_task_runner);
+   }
diff --git a/chromium-wip/patches/patch-remoting_host_evaluate__capability.cc b/chromium-wip/patches/patch-remoting_host_evaluate__capability.cc
new file mode 100644
index 0000000000..3fcee7f795
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_evaluate__capability.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/evaluate_capability.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/evaluate_capability.cc
+@@ -56,7 +56,7 @@ base::FilePath BuildHostBinaryPath() {
+   }
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (path.BaseName().value() ==
+       FILE_PATH_LITERAL("chrome-remote-desktop-host")) {
+     return path;
diff --git a/chromium-wip/patches/patch-remoting_host_host__attributes.cc b/chromium-wip/patches/patch-remoting_host_host__attributes.cc
new file mode 100644
index 0000000000..707d0579d9
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_host__attributes.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/host_attributes.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/host_attributes.cc
+@@ -103,7 +103,7 @@ std::string GetHostAttributes() {
+   if (media::InitializeMediaFoundation()) {
+     result.push_back("HWEncoder");
+   }
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   result.push_back("HWEncoder");
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-remoting_host_host__details.cc b/chromium-wip/patches/patch-remoting_host_host__details.cc
new file mode 100644
index 0000000000..7b75ed5777
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_host__details.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/host_details.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/host_details.cc
+@@ -7,7 +7,7 @@
+ #include "base/system/sys_info.h"
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "base/linux_util.h"
+ #endif
+ 
+@@ -22,7 +22,7 @@ std::string GetHostOperatingSystemName()
+   return "Mac";
+ #elif BUILDFLAG(IS_CHROMEOS)
+   return "ChromeOS";
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return "Linux";
+ #elif BUILDFLAG(IS_ANDROID)
+   return "Android";
+@@ -34,7 +34,7 @@ std::string GetHostOperatingSystemName()
+ // Get the host Operating System Version, removing the need to check for OS
+ // definitions and keeps the format used consistent.
+ std::string GetHostOperatingSystemVersion() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return base::GetLinuxDistro();
+ #else
+   return base::SysInfo::OperatingSystemVersion();
diff --git a/chromium-wip/patches/patch-remoting_host_host__main.cc b/chromium-wip/patches/patch-remoting_host_host__main.cc
new file mode 100644
index 0000000000..fdf6bb33be
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_host__main.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/host_main.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/host_main.cc
+@@ -57,7 +57,7 @@ int FileChooserMain();
+ int RdpDesktopSessionMain();
+ int UrlForwarderConfiguratorMain();
+ #endif  // BUILDFLAG(IS_WIN)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ int XSessionChooserMain();
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+@@ -70,7 +70,7 @@ const char kUsageMessage[] =
+     "\n"
+     "Options:\n"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     "  --audio-pipe-name=<pipe> - Sets the pipe name to capture audio on "
+     "Linux.\n"
+ #endif  // BUILDFLAG(IS_LINUX)
+@@ -163,7 +163,7 @@ MainRoutineFn SelectMainRoutine(const st
+   } else if (process_type == kProcessTypeUrlForwarderConfigurator) {
+     main_routine = &UrlForwarderConfiguratorMain;
+ #endif  // BUILDFLAG(IS_WIN)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   } else if (process_type == kProcessTypeXSessionChooser) {
+     main_routine = &XSessionChooserMain;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+@@ -231,7 +231,7 @@ int HostMain(int argc, char** argv) {
+   // Note that we enable crash reporting only if the user has opted in to having
+   // the crash reports uploaded.
+   if (IsUsageStatsAllowed()) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     InitializeCrashpadReporting();
+ #elif BUILDFLAG(IS_WIN)
+     // TODO: joedow - Enable crash reporting for the RDP process.
diff --git a/chromium-wip/patches/patch-remoting_host_ipc__constants.cc b/chromium-wip/patches/patch-remoting_host_ipc__constants.cc
new file mode 100644
index 0000000000..f675ce8452
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_ipc__constants.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/ipc_constants.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/ipc_constants.cc
+@@ -17,7 +17,7 @@ namespace remoting {
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ 
+ #if !defined(NDEBUG)
+ // Use a different IPC name for debug builds so that we can run the host
+@@ -81,7 +81,7 @@ GetChromotingHostServicesServerName() {
+   static const base::NoDestructor<mojo::NamedPlatformChannel::ServerName>
+       server_name(
+           named_mojo_ipc_server::WorkingDirectoryIndependentServerNameFromUTF8(
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+               // Linux host creates the socket file in /tmp, and it won't be
+               // deleted until reboot, so we put username in the path in case
+               // the user switches the host owner.
diff --git a/chromium-wip/patches/patch-remoting_host_it2me_it2me__native__messaging__host__main.cc b/chromium-wip/patches/patch-remoting_host_it2me_it2me__native__messaging__host__main.cc
new file mode 100644
index 0000000000..ad58c4cc78
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_it2me_it2me__native__messaging__host__main.cc
@@ -0,0 +1,71 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/it2me/it2me_native_messaging_host_main.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/it2me/it2me_native_messaging_host_main.cc
+@@ -29,7 +29,7 @@
+ #include "remoting/host/resources.h"
+ #include "remoting/host/usage_stats_consent.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #if defined(REMOTING_USE_X11)
+ #include <gtk/gtk.h>
+ #include "base/linux_util.h"
+@@ -43,7 +43,7 @@
+ #include "remoting/host/mac/permission_utils.h"
+ #endif  // BUILDFLAG(IS_APPLE)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "remoting/base/crash/crash_reporting_crashpad.h"
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+@@ -79,7 +79,7 @@ bool CurrentProcessHasUiAccess() {
+ // Creates a It2MeNativeMessagingHost instance, attaches it to stdin/stdout and
+ // runs the task executor until It2MeNativeMessagingHost signals shutdown.
+ int It2MeNativeMessagingHostMain(int argc, char** argv) {
+-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(REMOTING_USE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11)
+   // Initialize Xlib for multi-threaded use, allowing non-Chromium code to
+   // use X11 safely (such as the WebRTC capturer, GTK ...)
+   x11::InitXlib();
+@@ -104,7 +104,7 @@ int It2MeNativeMessagingHostMain(int arg
+   // needs to be initialized first, so that the preference for crash-reporting
+   // can be looked up in the config file.
+   if (IsUsageStatsAllowed()) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     InitializeCrashpadReporting();
+ #elif BUILDFLAG(IS_WIN)
+     InitializeBreakpadReporting();
+@@ -129,7 +129,7 @@ int It2MeNativeMessagingHostMain(int arg
+ 
+   remoting::LoadResources("");
+ 
+-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(REMOTING_USE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11)
+   // Required for any calls into GTK functions, such as the Disconnect and
+   // Continue windows. Calling with nullptr arguments because we don't have
+   // any command line arguments for gtk to consume.
+@@ -257,7 +257,7 @@ int It2MeNativeMessagingHostMain(int arg
+       PolicyWatcher::CreateWithTaskRunner(context->file_task_runner(),
+                                           context->management_service());
+ 
+-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(REMOTING_USE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11)
+   scoped_refptr<AutoThreadTaskRunner> input_task_runner;
+   // Create an X11EventSource on all UI threads, so the global X11 connection
+   // (x11::Connection::Get()) can dispatch X events.
+@@ -281,7 +281,7 @@ int It2MeNativeMessagingHostMain(int arg
+   // Run the loop until channel is alive.
+   run_loop.Run();
+ 
+-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(REMOTING_USE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11)
+   input_task_runner->PostTask(FROM_HERE, base::BindOnce([]() {
+                                 delete ui::X11EventSource::GetInstance();
+                               }));
diff --git a/chromium-wip/patches/patch-remoting_host_me2me__desktop__environment.cc b/chromium-wip/patches/patch-remoting_host_me2me__desktop__environment.cc
new file mode 100644
index 0000000000..222748f65e
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_me2me__desktop__environment.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/me2me_desktop_environment.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/me2me_desktop_environment.cc
+@@ -112,7 +112,7 @@ std::string Me2MeDesktopEnvironment::Get
+     capabilities += protocol::kRemoteWebAuthnCapability;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) && defined(REMOTING_USE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11)
+   capabilities += " ";
+   capabilities += protocol::kMultiStreamCapability;
+ 
+@@ -150,7 +150,7 @@ Me2MeDesktopEnvironment::Me2MeDesktopEnv
+   // properly under Xvfb.
+   mutable_desktop_capture_options()->set_use_update_notifications(true);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Setting this option to false means that the capture differ wrapper will not
+   // be used when the X11 capturer is selected. This reduces the X11 capture
+   // time by a few milliseconds per frame and is safe because we can rely on
+@@ -178,7 +178,7 @@ bool Me2MeDesktopEnvironment::Initialize
+ 
+   // Otherwise, if the session is shared with the local user start monitoring
+   // the local input and create the in-session UI.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   bool want_user_interface = false;
+ #elif BUILDFLAG(IS_APPLE)
+   // Don't try to display any UI on top of the system's login screen as this
diff --git a/chromium-wip/patches/patch-remoting_host_mojo__caller__security__checker.cc b/chromium-wip/patches/patch-remoting_host_mojo__caller__security__checker.cc
new file mode 100644
index 0000000000..b8f6c01bfd
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_mojo__caller__security__checker.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/mojo_caller_security_checker.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/mojo_caller_security_checker.cc
+@@ -32,7 +32,7 @@
+ namespace remoting {
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ constexpr auto kAllowedCallerProgramNames =
+     base::MakeFixedFlatSet<base::FilePath::StringViewType>({
+         "remote-open-url",
+@@ -60,7 +60,7 @@ bool IsTrustedMojoEndpoint(
+     const named_mojo_ipc_server::ConnectionInfo& caller) {
+ #if BUILDFLAG(IS_MAC)
+   return IsProcessTrusted(caller.audit_token, kAllowedIdentifiers);
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ 
+   // TODO: yuweih - see if it's possible to move away from PID-based security
+   // checks, which might be susceptible of PID reuse attacks.
+@@ -84,7 +84,7 @@ bool IsTrustedMojoEndpoint(
+   base::FilePath::StringType program_name =
+       caller_process_image_path.BaseName().value();
+   if (!kAllowedCallerProgramNames.contains(program_name)) {
+-#if BUILDFLAG(IS_LINUX) && !defined(NDEBUG)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !defined(NDEBUG)
+     // Linux binaries generated in out/Debug are underscore-separated. To make
+     // debugging easier, we just check the name again with underscores replaced
+     // with hyphens.
diff --git a/chromium-wip/patches/patch-remoting_host_policy__watcher.cc b/chromium-wip/patches/patch-remoting_host_policy__watcher.cc
new file mode 100644
index 0000000000..eb9a11a201
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_policy__watcher.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/policy_watcher.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/policy_watcher.cc
+@@ -183,7 +183,7 @@ base::Value::Dict PolicyWatcher::GetDefa
+   result.Set(key::kRemoteAccessHostAllowEnterpriseFileTransfer, false);
+   result.Set(key::kClassManagementEnabled, "disabled");
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   result.Set(key::kRemoteAccessHostMatchUsername, false);
+ #endif
+ #if !BUILDFLAG(IS_CHROMEOS)
diff --git a/chromium-wip/patches/patch-remoting_host_remote__open__url_remote__open__url__client.cc b/chromium-wip/patches/patch-remoting_host_remote__open__url_remote__open__url__client.cc
new file mode 100644
index 0000000000..e05d96c9d0
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_remote__open__url_remote__open__url__client.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/remote_open_url/remote_open_url_client.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/remote_open_url/remote_open_url_client.cc
+@@ -18,7 +18,7 @@
+ #include "remoting/host/mojom/chromoting_host_services.mojom.h"
+ #include "remoting/host/mojom/remote_url_opener.mojom.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "remoting/host/remote_open_url/remote_open_url_client_delegate_linux.h"
+ #elif BUILDFLAG(IS_WIN)
+ #include "remoting/host/remote_open_url/remote_open_url_client_delegate_win.h"
+@@ -31,7 +31,7 @@ namespace {
+ constexpr base::TimeDelta kRequestTimeout = base::Seconds(5);
+ 
+ std::unique_ptr<RemoteOpenUrlClient::Delegate> CreateDelegate() {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return std::make_unique<RemoteOpenUrlClientDelegateLinux>();
+ #elif BUILDFLAG(IS_WIN)
+   return std::make_unique<RemoteOpenUrlClientDelegateWin>();
diff --git a/chromium-wip/patches/patch-remoting_host_remote__open__url_remote__open__url__main.cc b/chromium-wip/patches/patch-remoting_host_remote__open__url_remote__open__url__main.cc
new file mode 100644
index 0000000000..4730b7df36
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_remote__open__url_remote__open__url__main.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/remote_open_url/remote_open_url_main.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/remote_open_url/remote_open_url_main.cc
+@@ -27,7 +27,7 @@
+ #include "remoting/host/usage_stats_consent.h"
+ #include "ui/base/l10n/l10n_util.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "remoting/base/crash/crash_reporting_crashpad.h"
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+@@ -51,7 +51,7 @@ int RemoteOpenUrlMain(int argc, char** a
+ 
+ #if defined(REMOTING_ENABLE_CRASH_REPORTING)
+   if (IsUsageStatsAllowed()) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     InitializeCrashpadReporting();
+ #elif BUILDFLAG(IS_WIN)
+     InitializeBreakpadReporting();
diff --git a/chromium-wip/patches/patch-remoting_host_remote__open__url_remote__open__url__util.cc b/chromium-wip/patches/patch-remoting_host_remote__open__url_remote__open__url__util.cc
new file mode 100644
index 0000000000..0eb597949e
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_remote__open__url_remote__open__url__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/remote_open_url/remote_open_url_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/remote_open_url/remote_open_url_util.cc
+@@ -29,7 +29,7 @@ const wchar_t kRegisteredApplicationsKey
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+ bool IsRemoteOpenUrlSupported() {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return true;
+ #elif BUILDFLAG(IS_WIN)
+   // The MSI installs the ProgID and capabilities into registry, but not the
diff --git a/chromium-wip/patches/patch-remoting_host_remote__open__url_url__forwarder__configurator.cc b/chromium-wip/patches/patch-remoting_host_remote__open__url_url__forwarder__configurator.cc
new file mode 100644
index 0000000000..56ef585323
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_remote__open__url_url__forwarder__configurator.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/remote_open_url/url_forwarder_configurator.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/remote_open_url/url_forwarder_configurator.cc
+@@ -13,7 +13,7 @@ UrlForwarderConfigurator::UrlForwarderCo
+ 
+ UrlForwarderConfigurator::~UrlForwarderConfigurator() = default;
+ 
+-#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_WIN)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_BSD)
+ 
+ // static
+ std::unique_ptr<UrlForwarderConfigurator> UrlForwarderConfigurator::Create() {
diff --git a/chromium-wip/patches/patch-remoting_host_remoting__me2me__host.cc b/chromium-wip/patches/patch-remoting_host_remoting__me2me__host.cc
new file mode 100644
index 0000000000..b4780fe056
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_remoting__me2me__host.cc
@@ -0,0 +1,152 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/remoting_me2me_host.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/remoting_me2me_host.cc
+@@ -140,7 +140,7 @@
+ #include "remoting/host/mac/permission_utils.h"
+ #endif  // BUILDFLAG(IS_APPLE)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #if defined(REMOTING_USE_X11)
+ #include <gtk/gtk.h>
+ 
+@@ -150,7 +150,7 @@
+ #endif  // defined(REMOTING_USE_X11)
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "base/linux_util.h"
+ #include "remoting/host/linux/audio_capturer_linux.h"
+ #include "remoting/host/linux/certificate_watcher.h"
+@@ -165,7 +165,7 @@
+ #include "remoting/host/pairing_registry_delegate_win.h"
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "remoting/base/crash/crash_reporting_crashpad.h"
+ #include "remoting/host/host_wtmpdb_logger.h"
+ #endif  // BUILDFLAG(IS_LINUX)
+@@ -199,7 +199,7 @@ const char kApplicationName[] = "chromot
+ const char kStdinConfigPath[] = "-";
+ #endif  // !defined(REMOTING_MULTI_PROCESS)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // The command line switch used to pass name of the pipe to capture audio on
+ // linux.
+ const char kAudioPipeSwitchName[] = "audio-pipe-name";
+@@ -448,7 +448,7 @@ class HostProcess : public ConfigWatcher
+   std::unique_ptr<AgentProcessBrokerClient> agent_process_broker_client_;
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Watch for certificate changes and kill the host when changes occur
+   std::unique_ptr<CertificateWatcher> cert_watcher_;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+@@ -513,7 +513,7 @@ class HostProcess : public ConfigWatcher
+   std::unique_ptr<FtlEchoMessageListener> ftl_echo_message_listener_;
+ 
+   std::unique_ptr<HostEventLogger> host_event_logger_;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<HostWtmpdbLogger> host_wtmpdb_logger_;
+ #endif
+   std::unique_ptr<HostPowerSaveBlocker> power_save_blocker_;
+@@ -840,7 +840,7 @@ void HostProcess::StartOnNetworkThread()
+ void HostProcess::ShutdownOnNetworkThread() {
+   DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
+   config_watcher_.reset();
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   cert_watcher_.reset();
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ }
+@@ -917,7 +917,7 @@ void HostProcess::CreateAuthenticatorFac
+             context_->create_client_cert_store_callback(),
+             service_account_email_, oauth_refresh_token_));
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     if (!cert_watcher_) {
+       cert_watcher_ = std::make_unique<CertificateWatcher>(
+           base::BindRepeating(&HostProcess::ShutdownHost,
+@@ -1059,7 +1059,7 @@ void HostProcess::StartOnUiThread() {
+       base::BindRepeating(&HostProcess::OnPolicyUpdate, base::Unretained(this)),
+       base::BindRepeating(&HostProcess::OnPolicyError, base::Unretained(this)));
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // If an audio pipe is specific on the command-line then initialize
+   // AudioCapturerLinux to capture from it.
+   base::FilePath audio_pipe_name =
+@@ -1138,7 +1138,7 @@ void HostProcess::ShutdownOnUiThread() {
+   // It is now safe for the HostProcess to be deleted.
+   self_ = nullptr;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Cause the global AudioPipeReader to be freed, otherwise the audio
+   // thread will remain in-use and prevent the process from exiting.
+   // TODO(wez): DesktopEnvironmentFactory should own the pipe reader.
+@@ -1146,7 +1146,7 @@ void HostProcess::ShutdownOnUiThread() {
+   AudioCapturerLinux::InitializePipeReader(nullptr, base::FilePath());
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(REMOTING_USE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11)
+   context_->input_task_runner()->PostTask(
+       FROM_HERE,
+       base::BindOnce([]() { delete ui::X11EventSource::GetInstance(); }));
+@@ -1929,7 +1929,7 @@ void HostProcess::StartHost() {
+ 
+   host_->AddExtension(std::make_unique<TestEchoExtension>());
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
+   if (cmd_line->HasSwitch(kEnableWtmpdb)) {
+     host_wtmpdb_logger_ =
+@@ -1965,7 +1965,7 @@ void HostProcess::StartHost() {
+   // addresses.
+   host_->Start(*host_owner_emails_.begin());
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // For Windows and Mac, ChromotingHostServices connections are handled by
+   // another process, then the message pipe is forwarded to the network process.
+   host_->StartChromotingHostServices();
+@@ -2110,7 +2110,7 @@ int HostProcessMain() {
+   HOST_LOG << "Starting host process: version " << STRINGIZE(VERSION);
+   const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #if defined(REMOTING_USE_X11)
+   // Initialize Xlib for multi-threaded use, allowing non-Chromium code to
+   // use X11 safely (such as the WebRTC capturer, GTK ...)
+@@ -2155,7 +2155,7 @@ int HostProcessMain() {
+     return kInitializationFailed;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Log and cleanup the crash database. We do this after a short delay so that
+   // the crash database has a chance to be updated properly if we just got
+   // relaunched after a crash.
+@@ -2175,7 +2175,7 @@ int HostProcessMain() {
+   std::unique_ptr<net::NetworkChangeNotifier> network_change_notifier(
+       net::NetworkChangeNotifier::CreateIfNeeded());
+ 
+-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(REMOTING_USE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11)
+   // Create an X11EventSource on all UI threads, so the global X11 connection
+   // (x11::Connection::Get()) can dispatch X events.
+   auto event_source =
diff --git a/chromium-wip/patches/patch-remoting_host_security__key_remote__security__key__main.cc b/chromium-wip/patches/patch-remoting_host_security__key_remote__security__key__main.cc
new file mode 100644
index 0000000000..4806ec38a7
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_security__key_remote__security__key__main.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/security_key/remote_security_key_main.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/security_key/remote_security_key_main.cc
+@@ -24,7 +24,7 @@
+ #include "remoting/host/security_key/security_key_message_handler.h"
+ #include "remoting/host/usage_stats_consent.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "remoting/base/crash/crash_reporting_crashpad.h"
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+@@ -96,7 +96,7 @@ int RemoteSecurityKeyMain(int argc, char
+ 
+ #if defined(REMOTING_ENABLE_CRASH_REPORTING)
+   if (IsUsageStatsAllowed()) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     InitializeCrashpadReporting();
+ #elif BUILDFLAG(IS_WIN)
+     InitializeBreakpadReporting();
diff --git a/chromium-wip/patches/patch-remoting_host_session__policies__from__dict.cc b/chromium-wip/patches/patch-remoting_host_session__policies__from__dict.cc
new file mode 100644
index 0000000000..e5ea7b3f87
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_session__policies__from__dict.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/session_policies_from_dict.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/session_policies_from_dict.cc
+@@ -75,7 +75,7 @@ std::optional<SessionPolicies> SessionPo
+   session_policies.curtain_required =
+       dict.FindBool(policy::key::kRemoteAccessHostRequireCurtain);
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   session_policies.host_username_match_required =
+       dict.FindBool(policy::key::kRemoteAccessHostMatchUsername);
+ #endif
diff --git a/chromium-wip/patches/patch-remoting_host_setup_me2me__native__messaging__host__main.cc b/chromium-wip/patches/patch-remoting_host_setup_me2me__native__messaging__host__main.cc
new file mode 100644
index 0000000000..9cf06ceb3b
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_setup_me2me__native__messaging__host__main.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/setup/me2me_native_messaging_host_main.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/setup/me2me_native_messaging_host_main.cc
+@@ -41,7 +41,7 @@
+ #include "base/apple/scoped_nsautorelease_pool.h"
+ #endif  // BUILDFLAG(IS_APPLE)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "remoting/base/crash/crash_reporting_crashpad.h"
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+@@ -99,7 +99,7 @@ int Me2MeNativeMessagingHostMain(int arg
+   // needs to be initialized first, so that the preference for crash-reporting
+   // can be looked up in the config file.
+   if (IsUsageStatsAllowed()) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     InitializeCrashpadReporting();
+ #elif BUILDFLAG(IS_WIN)
+     InitializeBreakpadReporting();
diff --git a/chromium-wip/patches/patch-remoting_host_setup_start__host__main.cc b/chromium-wip/patches/patch-remoting_host_setup_start__host__main.cc
new file mode 100644
index 0000000000..e5d0acca55
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_setup_start__host__main.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/setup/start_host_main.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/setup/start_host_main.cc
+@@ -44,7 +44,7 @@
+ #include <unistd.h>
+ #endif  // BUILDFLAG(IS_POSIX)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "remoting/base/crash/crash_reporting_crashpad.h"
+ #include "remoting/host/setup/daemon_controller_delegate_linux.h"
+ #include "remoting/host/setup/start_host_as_root.h"
+@@ -370,7 +370,7 @@ bool InitializeCloudMachineParams(HostSt
+ }  // namespace
+ 
+ int StartHostMain(int argc, char** argv) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Minimize the amount of code that runs as root on Posix systems.
+   if (getuid() == 0) {
+     return remoting::StartHostAsRoot(argc, argv);
+@@ -395,7 +395,7 @@ int StartHostMain(int argc, char** argv)
+ 
+   mojo::core::Init();
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (command_line->HasSwitch("no-start")) {
+     // On Linux, registering the host with systemd and starting it is the only
+     // reason start_host requires root. The --no-start options skips that final
+@@ -445,7 +445,7 @@ int StartHostMain(int argc, char** argv)
+   // We don't have a config file yet so we can't use IsUsageStatsAllowed(),
+   // instead we can just check the command line parameter.
+   if (params.enable_crash_reporting) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     InitializeCrashpadReporting();
+ #elif BUILDFLAG(IS_WIN)
+     InitializeBreakpadReporting();
diff --git a/chromium-wip/patches/patch-remoting_host_webauthn_desktop__session__type__util.cc b/chromium-wip/patches/patch-remoting_host_webauthn_desktop__session__type__util.cc
new file mode 100644
index 0000000000..681e461c3b
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_webauthn_desktop__session__type__util.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/webauthn/desktop_session_type_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/webauthn/desktop_session_type_util.cc
+@@ -11,7 +11,7 @@
+ namespace remoting {
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ DesktopSessionType GetDesktopSessionTypeInternal(
+     std::unique_ptr<base::Environment> environment) {
+   // Currently on Linux, a desktop session is either remote-only or local-only.
+@@ -29,7 +29,7 @@ DesktopSessionType GetDesktopSessionType
+ }  // namespace
+ 
+ DesktopSessionType GetDesktopSessionType() {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   static const DesktopSessionType desktop_session_type =
+       GetDesktopSessionTypeInternal(base::Environment::Create());
+   return desktop_session_type;
diff --git a/chromium-wip/patches/patch-remoting_host_webauthn_remote__webauthn__caller__security__utils.cc b/chromium-wip/patches/patch-remoting_host_webauthn_remote__webauthn__caller__security__utils.cc
new file mode 100644
index 0000000000..2eb3e409ff
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_webauthn_remote__webauthn__caller__security__utils.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/webauthn/remote_webauthn_caller_security_utils.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/webauthn/remote_webauthn_caller_security_utils.cc
+@@ -14,7 +14,7 @@
+ #include "base/strings/utf_string_conversions.h"
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "base/containers/fixed_flat_set.h"
+ #include "base/files/file_path.h"
+ #include "remoting/host/base/process_util.h"
+@@ -48,7 +48,7 @@ namespace {
+ 
+ // No static variables needed for debug builds.
+ 
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ 
+ constexpr auto kAllowedCallerPrograms =
+     base::MakeFixedFlatSet<base::FilePath::StringViewType>({
+@@ -99,7 +99,7 @@ bool IsLaunchedByTrustedProcess() {
+ #if !defined(NDEBUG)
+   // Just return true on debug builds for the convenience of development.
+   return true;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   base::ProcessId parent_pid =
+       base::GetParentProcessId(base::GetCurrentProcessHandle());
+   // Note that on Linux the process image may no longer exist in its original
diff --git a/chromium-wip/patches/patch-remoting_host_webauthn_remote__webauthn__extension__notifier.cc b/chromium-wip/patches/patch-remoting_host_webauthn_remote__webauthn__extension__notifier.cc
new file mode 100644
index 0000000000..36a71837ef
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_webauthn_remote__webauthn__extension__notifier.cc
@@ -0,0 +1,34 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/webauthn/remote_webauthn_extension_notifier.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/webauthn/remote_webauthn_extension_notifier.cc
+@@ -27,7 +27,7 @@
+ #include "base/task/thread_pool.h"
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "base/environment.h"
+ #include "base/nix/xdg_util.h"
+ #include "base/strings/string_util.h"
+@@ -72,14 +72,14 @@ static constexpr char kExtensionWakeupFi
+ // Caller should check if the directory exists before writing files to it. A
+ // directory only exists if the corresponding Chrome version is installed.
+ std::vector<base::FilePath> GetRemoteStateChangeDirPaths() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   constexpr base::FilePath::CharType kStateChangeDirName[] =
+       FILE_PATH_LITERAL("WebAuthenticationProxyRemoteSessionStateChange");
+ #endif
+ 
+   std::vector<base::FilePath> dirs;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // See: chrome/common/chrome_paths_linux.cc
+   auto env = base::Environment::Create();
+   base::FilePath base_path;
diff --git a/chromium-wip/patches/patch-remoting_host_webauthn_remote__webauthn__main.cc b/chromium-wip/patches/patch-remoting_host_webauthn_remote__webauthn__main.cc
new file mode 100644
index 0000000000..382659f349
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_host_webauthn_remote__webauthn__main.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/host/webauthn/remote_webauthn_main.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/host/webauthn/remote_webauthn_main.cc
+@@ -27,7 +27,7 @@
+ #include "remoting/host/webauthn/remote_webauthn_caller_security_utils.h"
+ #include "remoting/host/webauthn/remote_webauthn_native_messaging_host.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "remoting/base/crash/crash_reporting_crashpad.h"
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+@@ -50,7 +50,7 @@ int RemoteWebAuthnMain(int argc, char** 
+ 
+ #if defined(REMOTING_ENABLE_CRASH_REPORTING)
+   if (IsUsageStatsAllowed()) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     InitializeCrashpadReporting();
+ #elif BUILDFLAG(IS_WIN)
+     InitializeBreakpadReporting();
diff --git a/chromium-wip/patches/patch-remoting_protocol_webrtc__video__stream.cc b/chromium-wip/patches/patch-remoting_protocol_webrtc__video__stream.cc
new file mode 100644
index 0000000000..acc5d4ff9f
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_protocol_webrtc__video__stream.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/protocol/webrtc_video_stream.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/protocol/webrtc_video_stream.cc
+@@ -267,7 +267,7 @@ WebrtcVideoStream::WebrtcVideoStream(con
+     : session_options_(session_options) {
+ // TODO(joedow): Dig into the threading model on other platforms to see if they
+ // can also be updated to run on a dedicated thread.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   core_task_runner_ = base::ThreadPool::CreateSingleThreadTaskRunner(
+       {base::TaskPriority::HIGHEST},
+       base::SingleThreadTaskRunnerThreadMode::DEDICATED);
diff --git a/chromium-wip/patches/patch-remoting_signaling_ftl__host__device__id__provider.cc b/chromium-wip/patches/patch-remoting_signaling_ftl__host__device__id__provider.cc
new file mode 100644
index 0000000000..d780b1b203
--- /dev/null
+++ b/chromium-wip/patches/patch-remoting_signaling_ftl__host__device__id__provider.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- remoting/signaling/ftl_host_device_id_provider.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ remoting/signaling/ftl_host_device_id_provider.cc
+@@ -16,7 +16,7 @@ constexpr char kDeviceIdPrefix[] = "crd-
+ constexpr char kDeviceIdPrefix[] = "crd-mac-host-";
+ #elif BUILDFLAG(IS_CHROMEOS)
+ constexpr char kDeviceIdPrefix[] = "crd-cros-host-";
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ constexpr char kDeviceIdPrefix[] = "crd-linux-host-";
+ #else
+ constexpr char kDeviceIdPrefix[] = "crd-unknown-host-";
diff --git a/chromium-wip/patches/patch-sandbox_BUILD.gn b/chromium-wip/patches/patch-sandbox_BUILD.gn
new file mode 100644
index 0000000000..3526bf00a7
--- /dev/null
+++ b/chromium-wip/patches/patch-sandbox_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- sandbox/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ sandbox/BUILD.gn
+@@ -49,7 +49,7 @@ group("sandbox") {
+       "//sandbox/mac:system_services",
+       "//sandbox/mac/mojom",
+     ]
+-  } else if (is_linux || is_chromeos || is_android) {
++  } else if ((is_linux && !is_bsd) || is_chromeos || is_android) {
+     public_deps = [ "//sandbox/linux:sandbox" ]
+   }
+ }
diff --git a/chromium-wip/patches/patch-sandbox_features.gni b/chromium-wip/patches/patch-sandbox_features.gni
new file mode 100644
index 0000000000..a3885e34ac
--- /dev/null
+++ b/chromium-wip/patches/patch-sandbox_features.gni
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- sandbox/features.gni.orig	2025-07-29 22:51:44.000000000 +0000
++++ sandbox/features.gni
+@@ -6,7 +6,7 @@
+ # currently.
+ # Do not disable seccomp_bpf anywhere without talking to
+ # security%chromium.org@localhost!
+-use_seccomp_bpf = (is_linux || is_chromeos || is_android) &&
++use_seccomp_bpf = !is_bsd && (is_linux || is_chromeos || is_android) &&
+                   (current_cpu == "x86" || current_cpu == "x64" ||
+                    current_cpu == "arm" || current_cpu == "arm64" ||
+                    current_cpu == "mipsel" || current_cpu == "mips64el")
diff --git a/chromium-wip/patches/patch-sandbox_linux_BUILD.gn b/chromium-wip/patches/patch-sandbox_linux_BUILD.gn
new file mode 100644
index 0000000000..e46be1eff4
--- /dev/null
+++ b/chromium-wip/patches/patch-sandbox_linux_BUILD.gn
@@ -0,0 +1,41 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- sandbox/linux/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ sandbox/linux/BUILD.gn
+@@ -12,11 +12,11 @@ if (is_android) {
+ }
+ 
+ declare_args() {
+-  compile_suid_client = is_linux || is_chromeos
++  compile_suid_client = (is_linux || is_chromeos) && !is_bsd
+ 
+-  compile_credentials = is_linux || is_chromeos
++  compile_credentials = (is_linux || is_chromeos) && !is_bsd
+ 
+-  compile_syscall_broker = is_linux || is_chromeos
++  compile_syscall_broker = (is_linux || is_chromeos) && !is_bsd
+ 
+   # On Android, use plain GTest.
+   use_base_test_suite = is_linux || is_chromeos
+@@ -369,6 +369,17 @@ component("sandbox_services") {
+       "services/libc_interceptor.h",
+     ]
+   }
++
++  if (is_bsd) {
++    sources -= [
++      "services/scoped_process.cc",
++      "services/scoped_process.h",
++      "services/syscall_wrappers.cc",
++      "services/syscall_wrappers.h",
++      "services/yama.cc",
++      "services/yama.h",
++     ]
++   }
+ }
+ 
+ source_set("sandbox_services_headers") {
diff --git a/chromium-wip/patches/patch-sandbox_linux_services_init__process__reaper.cc b/chromium-wip/patches/patch-sandbox_linux_services_init__process__reaper.cc
new file mode 100644
index 0000000000..bdbf553080
--- /dev/null
+++ b/chromium-wip/patches/patch-sandbox_linux_services_init__process__reaper.cc
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- sandbox/linux/services/init_process_reaper.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ sandbox/linux/services/init_process_reaper.cc
+@@ -7,6 +7,7 @@
+ #pragma allow_unsafe_libc_calls
+ #endif
+ 
++#if 0
+ #include "sandbox/linux/services/init_process_reaper.h"
+ 
+ #include <signal.h>
+@@ -105,3 +106,4 @@ bool CreateInitProcessReaper(base::OnceC
+ }
+ 
+ }  // namespace sandbox.
++#endif
diff --git a/chromium-wip/patches/patch-sandbox_linux_services_libc__interceptor.cc b/chromium-wip/patches/patch-sandbox_linux_services_libc__interceptor.cc
new file mode 100644
index 0000000000..654525a965
--- /dev/null
+++ b/chromium-wip/patches/patch-sandbox_linux_services_libc__interceptor.cc
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- sandbox/linux/services/libc_interceptor.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ sandbox/linux/services/libc_interceptor.cc
+@@ -17,7 +17,9 @@
+ #include <stddef.h>
+ #include <stdint.h>
+ #include <string.h>
++#if !BUILDFLAG(IS_BSD)
+ #include <sys/prctl.h>
++#endif
+ #include <sys/socket.h>
+ #include <sys/types.h>
+ #include <time.h>
+@@ -173,7 +175,7 @@ bool ReadTimeStruct(base::PickleIterator
+   } else {
+     base::AutoLock lock(g_timezones_lock.Get());
+     auto ret_pair = g_timezones.Get().insert(timezone);
+-    output->tm_zone = ret_pair.first->c_str();
++    output->tm_zone = (char *)ret_pair.first->c_str();
+   }
+ 
+   return true;
diff --git a/chromium-wip/patches/patch-sandbox_policy_BUILD.gn b/chromium-wip/patches/patch-sandbox_policy_BUILD.gn
new file mode 100644
index 0000000000..8b08642ad8
--- /dev/null
+++ b/chromium-wip/patches/patch-sandbox_policy_BUILD.gn
@@ -0,0 +1,56 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- sandbox/policy/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ sandbox/policy/BUILD.gn
+@@ -46,7 +46,7 @@ component("policy") {
+       "//third_party/jni_zero",
+     ]
+   }
+-  if (is_linux || is_chromeos) {
++  if ((is_linux || is_chromeos) && !is_bsd) {
+     sources += [
+       "linux/bpf_audio_policy_linux.cc",
+       "linux/bpf_audio_policy_linux.h",
+@@ -117,6 +117,38 @@ component("policy") {
+       "//sandbox/linux:suid_sandbox_client",
+     ]
+   }
++  if (is_openbsd) {
++    sources += [
++      "openbsd/sandbox_openbsd.cc",
++      "openbsd/sandbox_openbsd.h",
++    ]
++    deps += [
++      "//sandbox:sandbox_buildflags",
++      "//ui/gfx/x",
++    ]
++    libs = [ "util" ]
++  }
++  if (is_netbsd) {
++    sources += [
++      "netbsd/sandbox_netbsd.cc",
++      "netbsd/sandbox_netbsd.h",
++    ]
++    deps += [
++      "//sandbox:sandbox_buildflags",
++      "//ui/gfx/x",
++    ]
++    libs = [ "util" ]
++  }
++  if (is_freebsd) {
++    sources += [
++      "freebsd/sandbox_freebsd.cc",
++      "freebsd/sandbox_freebsd.h",
++    ]
++    deps += [
++      "//sandbox:sandbox_buildflags",
++      "//ui/gfx/x",
++    ]
++  }
+   if (is_chromeos) {
+     sources += [
+       "linux/bpf_ime_policy_linux.cc",
diff --git a/chromium-wip/patches/patch-sandbox_policy_features.cc b/chromium-wip/patches/patch-sandbox_policy_features.cc
new file mode 100644
index 0000000000..dfd1aee2cc
--- /dev/null
+++ b/chromium-wip/patches/patch-sandbox_policy_features.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- sandbox/policy/features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ sandbox/policy/features.cc
+@@ -19,7 +19,11 @@ namespace sandbox::policy::features {
+ // (Only causes an effect when feature kNetworkServiceInProcess is disabled.)
+ BASE_FEATURE(kNetworkServiceSandbox,
+              "NetworkServiceSandbox",
++#if BUILDFLAG(IS_BSD)
++             base::FEATURE_ENABLED_BY_DEFAULT);
++#else
+              base::FEATURE_DISABLED_BY_DEFAULT);
++#endif
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ // Enables a fine-grained seccomp-BPF syscall filter for the network service.
diff --git a/chromium-wip/patches/patch-sandbox_policy_freebsd_sandbox__freebsd.cc b/chromium-wip/patches/patch-sandbox_policy_freebsd_sandbox__freebsd.cc
new file mode 100644
index 0000000000..8a1ed7b3a4
--- /dev/null
+++ b/chromium-wip/patches/patch-sandbox_policy_freebsd_sandbox__freebsd.cc
@@ -0,0 +1,220 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- sandbox/policy/freebsd/sandbox_freebsd.cc.orig	2025-08-12 17:48:59.520345404 +0000
++++ sandbox/policy/freebsd/sandbox_freebsd.cc
+@@ -0,0 +1,211 @@
++// Copyright (c) 2012 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.
++
++#include "sandbox/policy/freebsd/sandbox_freebsd.h"
++
++#include <dirent.h>
++#include <fcntl.h>
++#include <stdint.h>
++#include <sys/resource.h>
++#include <sys/stat.h>
++#include <sys/time.h>
++#include <sys/types.h>
++#include <unistd.h>
++
++#include <limits>
++#include <memory>
++#include <string>
++#include <vector>
++
++#include "base/command_line.h"
++#include "base/debug/stack_trace.h"
++#include "base/feature_list.h"
++#include "base/files/file_path.h"
++#include "base/files/file_util.h"
++#include "base/files/scoped_file.h"
++#include "base/logging.h"
++#include "base/memory/singleton.h"
++#include "base/path_service.h"
++#include "base/posix/eintr_wrapper.h"
++#include "base/strings/string_number_conversions.h"
++#include "base/system/sys_info.h"
++#include "base/threading/thread.h"
++#include "base/time/time.h"
++#include "build/build_config.h"
++#include "crypto/crypto_buildflags.h"
++#include "ppapi/buildflags/buildflags.h"
++#include "sandbox/constants.h"
++#include "sandbox/linux/services/credentials.h"
++#include "sandbox/linux/services/namespace_sandbox.h"
++#include "sandbox/linux/services/proc_util.h"
++#include "sandbox/linux/services/resource_limits.h"
++#include "sandbox/linux/services/thread_helpers.h"
++#include "sandbox/linux/syscall_broker/broker_command.h"
++#include "sandbox/linux/syscall_broker/broker_process.h"
++#include "sandbox/policy/sandbox.h"
++#include "sandbox/policy/sandbox_type.h"
++#include "sandbox/policy/mojom/sandbox.mojom.h"
++#include "sandbox/policy/switches.h"
++#include "sandbox/sandbox_buildflags.h" 
++
++#if BUILDFLAG(USING_SANITIZER)
++#include <sanitizer/common_interface_defs.h>
++#endif
++
++#if BUILDFLAG(USE_NSS_CERTS)
++#include "crypto/nss_util.h"
++#endif
++
++#include "third_party/boringssl/src/include/openssl/crypto.h"
++
++#include "ui/gfx/font_util.h"
++
++namespace sandbox {
++namespace policy {
++
++SandboxLinux::SandboxLinux()
++    : sandbox_status_flags_(kInvalid),
++      pre_initialized_(false),
++      initialize_sandbox_ran_(false),
++      broker_process_(nullptr) {
++}
++
++SandboxLinux::~SandboxLinux() {
++  if (pre_initialized_) {
++    CHECK(initialize_sandbox_ran_);
++  }
++}
++
++SandboxLinux* SandboxLinux::GetInstance() {
++  SandboxLinux* instance = base::Singleton<SandboxLinux>::get();
++  CHECK(instance);
++  return instance;
++}
++
++void SandboxLinux::StopThread(base::Thread* thread) {
++  DCHECK(thread);
++  thread->Stop();
++}
++
++void SandboxLinux::PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type) {
++  CHECK(!pre_initialized_);
++#if BUILDFLAG(USING_SANITIZER)
++  // Sanitizers need to open some resources before the sandbox is enabled.
++  // This should not fork, not launch threads, not open a directory.
++  __sanitizer_sandbox_on_notify(sanitizer_args());
++  sanitizer_args_.reset();
++#endif
++  base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
++  const std::string process_type =
++      command_line->GetSwitchValueASCII(switches::kProcessType);
++
++  base::SysInfo::AmountOfPhysicalMemory();
++  base::SysInfo::NumberOfProcessors();
++  base::SysInfo::CPUModelName();
++
++  switch (sandbox_type) {
++    case sandbox::mojom::Sandbox::kNoSandbox:
++    {
++#if BUILDFLAG(USE_NSS_CERTS)
++      // The main process has to initialize the ~/.pki dir which won't work
++      // after unveil(2).
++      crypto::EnsureNSSInit();
++#endif
++      CRYPTO_pre_sandbox_init();
++
++      base::FilePath cache_directory, local_directory;
++
++      base::PathService::Get(base::DIR_CACHE, &cache_directory);
++      base::PathService::Get(base::DIR_HOME, &local_directory);   
++
++      cache_directory = cache_directory.AppendASCII("chromium");
++      local_directory = local_directory.AppendASCII(".local").AppendASCII("share").AppendASCII("applications");
++
++      if (!base::CreateDirectory(cache_directory)) {
++        LOG(ERROR) << "Failed to create " << cache_directory.value() << " directory.";
++      }
++
++      if (!base::CreateDirectory(local_directory)) {
++        LOG(ERROR) << "Failed to create " << local_directory.value() << " directory.";
++      }
++
++      break;
++    }
++    case sandbox::mojom::Sandbox::kRenderer:
++      gfx::InitializeFonts();
++      break;
++    default:
++      break;
++  }
++
++  pre_initialized_ = true;
++}
++
++bool SandboxLinux::InitializeSandbox(sandbox::mojom::Sandbox sandbox_type,
++                                     SandboxLinux::PreSandboxHook hook,
++                                     const Options& options) {
++  DCHECK(!initialize_sandbox_ran_);
++  initialize_sandbox_ran_ = true;
++
++  base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
++  const std::string process_type =
++      command_line->GetSwitchValueASCII(switches::kProcessType);
++
++  if (command_line->HasSwitch(switches::kNoSandbox))
++    return true;
++
++  VLOG(1) << "SandboxLinux::InitializeSandbox: process_type="
++      << process_type << " sandbox_type=" << sandbox_type;
++
++  // Only one thread is running, pre-initialize if not already done.
++  if (!pre_initialized_)
++    PreinitializeSandbox(sandbox_type);
++
++  // Attempt to limit the future size of the address space of the process.
++  int error = 0;
++  const bool limited_as = LimitAddressSpace(&error);
++  if (error) {
++    // Restore errno. Internally to |LimitAddressSpace|, the errno due to
++    // setrlimit may be lost.
++    errno = error;
++    PCHECK(limited_as);
++  }
++
++  if (hook)
++    CHECK(std::move(hook).Run(options));
++
++  return true;
++}
++
++bool SandboxLinux::LimitAddressSpace(int* error) {
++#if !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) && \
++    !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER)
++  base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
++  if (SandboxTypeFromCommandLine(*command_line) == sandbox::mojom::Sandbox::kNoSandbox) {
++    return false;
++  }
++
++  // Unfortunately, it does not appear possible to set RLIMIT_AS such that it
++  // will both (a) be high enough to support V8's and WebAssembly's address
++  // space requirements while also (b) being low enough to mitigate exploits
++  // using integer overflows that require large allocations, heap spray, or
++  // other memory-hungry attack modes.
++
++  *error = sandbox::ResourceLimits::Lower(
++      RLIMIT_DATA, static_cast<rlim_t>(sandbox::kDataSizeLimit));
++
++  // Cache the resource limit before turning on the sandbox.
++  base::SysInfo::AmountOfVirtualMemory();
++  base::SysInfo::MaxSharedMemorySize();
++
++  return *error == 0;
++#else
++  base::SysInfo::AmountOfVirtualMemory();
++  return false;
++#endif  // !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) &&
++        // !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER)
++}
++
++}  // namespace policy
++}  // namespace sandbox
diff --git a/chromium-wip/patches/patch-sandbox_policy_freebsd_sandbox__freebsd.h b/chromium-wip/patches/patch-sandbox_policy_freebsd_sandbox__freebsd.h
new file mode 100644
index 0000000000..dac831cb3c
--- /dev/null
+++ b/chromium-wip/patches/patch-sandbox_policy_freebsd_sandbox__freebsd.h
@@ -0,0 +1,285 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- sandbox/policy/freebsd/sandbox_freebsd.h.orig	2025-08-12 17:48:59.520489573 +0000
++++ sandbox/policy/freebsd/sandbox_freebsd.h
+@@ -0,0 +1,276 @@
++// Copyright (c) 2012 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.
++#ifndef SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_
++#define SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_
++
++#include <memory>
++#include <string>
++#include <vector>
++
++#include "base/logging.h"
++#include "base/posix/global_descriptors.h"
++#include "sandbox/policy/export.h"
++#include "sandbox/policy/linux/sandbox_seccomp_bpf_linux.h"
++#include "sandbox/policy/mojom/sandbox.mojom.h"
++#include "base/sanitizer_buildflags.h"
++
++#if BUILDFLAG(USING_SANITIZER)
++#include <sanitizer/common_interface_defs.h>
++#endif
++
++namespace base {
++template <typename T>
++struct DefaultSingletonTraits;
++class Thread;
++}  // namespace base
++
++namespace sandbox {
++namespace syscall_broker {
++class BrokerProcess;
++}  // namespace syscall_broker
++}  // namespace sandbox
++
++namespace sandbox {
++namespace policy {
++
++// A singleton class to represent and change our sandboxing state for the
++// three main Linux sandboxes.
++// The sandboxing model allows using two layers of sandboxing. The first layer
++// can be implemented either with unprivileged namespaces or with the setuid
++// sandbox. This class provides a way to engage the namespace sandbox, but does
++// not deal with the legacy setuid sandbox directly.
++// The second layer is mainly based on seccomp-bpf and is engaged with
++// InitializeSandbox(). InitializeSandbox() is also responsible for "sealing"
++// the first layer of sandboxing. That is, InitializeSandbox must always be
++// called to have any meaningful sandboxing at all.
++class SANDBOX_POLICY_EXPORT SandboxLinux {
++ public:
++  // This is a list of sandbox IPC methods which the renderer may send to the
++  // sandbox host. See
++  // https://chromium.googlesource.com/chromium/src/+/master/docs/linux_sandbox_ipc.md
++  // This isn't the full list, values < 32 are reserved for methods called from
++  // Skia, and values < 64 are reserved for libc_interceptor.cc.
++  enum LinuxSandboxIPCMethods {
++    DEPRECATED_METHOD_GET_FALLBACK_FONT_FOR_CHAR = 64,
++    DEPRECATED_METHOD_GET_CHILD_WITH_INODE,
++    DEPRECATED_METHOD_GET_STYLE_FOR_STRIKE,
++    METHOD_MAKE_SHARED_MEMORY_SEGMENT,
++    DEPRECATED_METHOD_MATCH_WITH_FALLBACK,
++  };
++
++  // These form a bitmask which describes the conditions of the Linux sandbox.
++  // Note: this doesn't strictly give you the current status, it states
++  // what will be enabled when the relevant processes are initialized.
++  enum Status {
++    // SUID sandbox active.
++    kSUID = 1 << 0,
++
++    // Sandbox is using a new PID namespace.
++    kPIDNS = 1 << 1,
++
++    // Sandbox is using a new network namespace.
++    kNetNS = 1 << 2,
++
++    // seccomp-bpf sandbox active.
++    kSeccompBPF = 1 << 3,
++
++    // The Yama LSM module is present and enforcing.
++    kYama = 1 << 4,
++
++    // seccomp-bpf sandbox is active and the kernel supports TSYNC.
++    kSeccompTSYNC = 1 << 5,
++
++    // User namespace sandbox active.
++    kUserNS = 1 << 6,
++
++    // A flag that denotes an invalid sandbox status.
++    kInvalid = 1 << 31,
++  };
++
++  // SandboxLinux Options are a superset of SandboxSecompBPF Options.
++  struct Options : public SandboxSeccompBPF::Options {
++    // When running with a zygote, the namespace sandbox will have already
++    // been engaged prior to initializing SandboxLinux itself, and need not
++    // be done so again. Set to true to indicate that there isn't a zygote
++    // for this process and the step is to be performed here explicitly.
++    bool engage_namespace_sandbox = false;
++
++    // Allow starting the sandbox with multiple threads already running. This
++    // will enable TSYNC for seccomp-BPF, which syncs the seccomp-BPF policy
++    // across all running threads.
++    bool allow_threads_during_sandbox_init = false;
++
++    // Enables the CHECK for open directories. The open directory check is only
++    // useful for the chroot jail (from the semantic layer of the sandbox), and
++    // can safely be disabled if we are only enabling the seccomp-BPF layer.
++    bool check_for_open_directories = true;
++  };
++
++  // Callers can provide this hook to run code right before the policy
++  // is passed to the BPF compiler and the sandbox is engaged. If
++  // pre_sandbox_hook() returns true, the sandbox will be engaged
++  // afterwards, otherwise the process is terminated.
++  using PreSandboxHook = base::OnceCallback<bool(Options)>;
++
++  // Get our singleton instance.
++  static SandboxLinux* GetInstance();
++
++  SandboxLinux(const SandboxLinux&) = delete;
++  SandboxLinux& operator=(const SandboxLinux&) = delete;
++
++  bool SetPledge(const char *pstring, const char *ppath);
++  bool SetUnveil(const std::string process_type, sandbox::mojom::Sandbox sandbox_type);
++
++  // Do some initialization that can only be done before any of the sandboxes
++  // are enabled. If using the setuid sandbox, this should be called manually
++  // before the setuid sandbox is engaged.
++  // Security: When this runs, it is imperative that either InitializeSandbox()
++  // runs as well or that all file descriptors returned in
++  // GetFileDescriptorsToClose() get closed.
++  // Otherwise file descriptors that bypass the security of the setuid sandbox
++  // would be kept open. One must be particularly careful if a process performs
++  // a fork().
++  void PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type);
++
++  // Check that the current process is the init process of a new PID
++  // namespace and then proceed to drop access to the file system by using
++  // a new unprivileged namespace. This is a layer-1 sandbox.
++  // In order for this sandbox to be effective, it must be "sealed" by calling
++  // InitializeSandbox().
++  void EngageNamespaceSandbox(bool from_zygote);
++
++  // Return a list of file descriptors to close if PreinitializeSandbox() ran
++  // but InitializeSandbox() won't. Avoid using.
++  // TODO(jln): get rid of this hack.
++  std::vector<int> GetFileDescriptorsToClose();
++
++  // Seal an eventual layer-1 sandbox and initialize the layer-2 sandbox with
++  // an adequate policy depending on the process type and command line
++  // arguments.
++  // Currently the layer-2 sandbox is composed of seccomp-bpf and address space
++  // limitations.
++  // This function should only be called without any thread running.
++  bool InitializeSandbox(sandbox::mojom::Sandbox sandbox_type,
++                         PreSandboxHook hook,
++                         const Options& options);
++
++  // Stop |thread| in a way that can be trusted by the sandbox.
++  void StopThread(base::Thread* thread);
++
++  // Returns the status of the renderer, worker and ppapi sandbox. Can only
++  // be queried after going through PreinitializeSandbox(). This is a bitmask
++  // and uses the constants defined in "enum Status" above. Since the
++  // status needs to be provided before the sandboxes are actually started,
++  // this returns what will actually happen once InitializeSandbox()
++  // is called from inside these processes.
++  int GetStatus();
++
++  // Returns true if the current process is single-threaded or if the number
++  // of threads cannot be determined.
++  bool IsSingleThreaded() const;
++
++  // Returns true if we started Seccomp BPF.
++  bool seccomp_bpf_started() const;
++
++  // Check the policy and eventually start the seccomp-bpf sandbox. This should
++  // never be called with threads started. If we detect that threads have
++  // started we will crash.
++  bool StartSeccompBPF(sandbox::mojom::Sandbox sandbox_type,
++                       PreSandboxHook hook,
++                       const Options& options);
++
++  // Limit the address space of the current process (and its children) to make
++  // some vulnerabilities harder to exploit. Writes the errno due to setrlimit
++  // (including 0 if no error) into |error|.
++  bool LimitAddressSpace(int* error);
++
++  // Returns a file descriptor to proc. The file descriptor is no longer valid
++  // after the sandbox has been sealed.
++  int proc_fd() const {
++    DCHECK_NE(-1, proc_fd_);
++    return proc_fd_;
++  }
++
++#if BUILDFLAG(USING_SANITIZER)
++  __sanitizer_sandbox_arguments* sanitizer_args() const {
++    return sanitizer_args_.get();
++  };
++#endif
++
++  // A BrokerProcess is a helper that is started before the sandbox is engaged,
++  // typically from a pre-sandbox hook, that will serve requests to access
++  // files over an IPC channel. The client  of this runs from a SIGSYS handler
++  // triggered by the seccomp-bpf sandbox.
++  // |client_sandbox_policy| is the policy being run by the client, and is
++  // used to derive the equivalent broker-side policy.
++  // |broker_side_hook| is an alternate pre-sandbox hook to be run before the
++  // broker itself gets sandboxed, to which the broker side policy and
++  // |options| are passed.
++  // Crashes the process if the broker can not be started since continuation
++  // is impossible (and presumably unsafe).
++  // This should never be destroyed, as after the sandbox is started it is
++  // vital to the process.
++#if 0
++  void StartBrokerProcess(
++      const sandbox::syscall_broker::BrokerCommandSet& allowed_command_set,
++      std::vector<sandbox::syscall_broker::BrokerFilePermission> permissions,
++      PreSandboxHook broker_side_hook,
++      const Options& options);
++
++  sandbox::syscall_broker::BrokerProcess* broker_process() const {
++    return broker_process_;
++  }
++#endif
++
++ private:
++  friend struct base::DefaultSingletonTraits<SandboxLinux>;
++
++  SandboxLinux();
++  ~SandboxLinux();
++
++  // We must have been pre_initialized_ before using these.
++  bool seccomp_bpf_supported() const;
++  bool seccomp_bpf_with_tsync_supported() const;
++
++  // Returns true if it can be determined that the current process has open
++  // directories that are not managed by the SandboxLinux class. This would
++  // be a vulnerability as it would allow to bypass the setuid sandbox.
++  bool HasOpenDirectories() const;
++
++  // The last part of the initialization is to make sure any temporary "hole"
++  // in the sandbox is closed. For now, this consists of closing proc_fd_.
++  void SealSandbox();
++
++  // GetStatus() makes promises as to how the sandbox will behave. This
++  // checks that no promises have been broken.
++  void CheckForBrokenPromises(sandbox::mojom::Sandbox sandbox_type);
++
++  // Stop |thread| and make sure it does not appear in /proc/self/tasks/
++  // anymore.
++  void StopThreadAndEnsureNotCounted(base::Thread* thread) const;
++
++  // A file descriptor to /proc. It's dangerous to have it around as it could
++  // allow for sandbox bypasses. It needs to be closed before we consider
++  // ourselves sandboxed.
++  int proc_fd_;
++
++  bool seccomp_bpf_started_;
++  // The value returned by GetStatus(). Gets computed once and then cached.
++  int sandbox_status_flags_;
++  // Did PreinitializeSandbox() run?
++  bool pre_initialized_;
++  bool seccomp_bpf_supported_;             // Accurate if pre_initialized_.
++  bool seccomp_bpf_with_tsync_supported_;  // Accurate if pre_initialized_.
++  bool yama_is_enforcing_;                 // Accurate if pre_initialized_.
++  bool initialize_sandbox_ran_;            // InitializeSandbox() was called.
++#if BUILDFLAG(USING_SANITIZER)
++  std::unique_ptr<__sanitizer_sandbox_arguments> sanitizer_args_;
++#endif
++  sandbox::syscall_broker::BrokerProcess* broker_process_;  // Leaked as global.
++};
++
++}  // namespace policy
++}  // namespace sandbox
++
++#endif  // SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_
diff --git a/chromium-wip/patches/patch-sandbox_policy_mojom_sandbox.mojom b/chromium-wip/patches/patch-sandbox_policy_mojom_sandbox.mojom
new file mode 100644
index 0000000000..eb2aca9426
--- /dev/null
+++ b/chromium-wip/patches/patch-sandbox_policy_mojom_sandbox.mojom
@@ -0,0 +1,24 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- sandbox/policy/mojom/sandbox.mojom.orig	2025-07-29 22:51:44.000000000 +0000
++++ sandbox/policy/mojom/sandbox.mojom
+@@ -74,6 +74,15 @@ enum Sandbox {
+   // Minimally privileged sandbox on Fuchsia.
+   [EnableIf=is_fuchsia] kVideoCapture,
+ 
++  [EnableIf=is_openbsd]
++  kVideoCapture,
++
++  [EnableIf=is_netbsd]
++  kVideoCapture,
++
++  [EnableIf=is_freebsd]
++  kVideoCapture,
++
+   // Allows access to file contents and Windows APIs for parsing icons from PE
+   // files.
+   [EnableIf=is_win] kIconReader,
diff --git a/chromium-wip/patches/patch-sandbox_policy_netbsd_sandbox__netbsd.cc b/chromium-wip/patches/patch-sandbox_policy_netbsd_sandbox__netbsd.cc
new file mode 100644
index 0000000000..b31a819e02
--- /dev/null
+++ b/chromium-wip/patches/patch-sandbox_policy_netbsd_sandbox__netbsd.cc
@@ -0,0 +1,220 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- sandbox/policy/netbsd/sandbox_netbsd.cc.orig	2025-08-12 17:48:59.520803662 +0000
++++ sandbox/policy/netbsd/sandbox_netbsd.cc
+@@ -0,0 +1,211 @@
++// Copyright (c) 2012 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.
++
++#include "sandbox/policy/netbsd/sandbox_netbsd.h"
++
++#include <dirent.h>
++#include <fcntl.h>
++#include <stdint.h>
++#include <sys/resource.h>
++#include <sys/stat.h>
++#include <sys/time.h>
++#include <sys/types.h>
++#include <unistd.h>
++
++#include <limits>
++#include <memory>
++#include <string>
++#include <vector>
++
++#include "base/command_line.h"
++#include "base/debug/stack_trace.h"
++#include "base/feature_list.h"
++#include "base/files/file_path.h"
++#include "base/files/file_util.h"
++#include "base/files/scoped_file.h"
++#include "base/logging.h"
++#include "base/memory/singleton.h"
++#include "base/path_service.h"
++#include "base/posix/eintr_wrapper.h"
++#include "base/strings/string_number_conversions.h"
++#include "base/system/sys_info.h"
++#include "base/threading/thread.h"
++#include "base/time/time.h"
++#include "build/build_config.h"
++#include "crypto/crypto_buildflags.h"
++#include "ppapi/buildflags/buildflags.h"
++#include "sandbox/constants.h"
++#include "sandbox/linux/services/credentials.h"
++#include "sandbox/linux/services/namespace_sandbox.h"
++#include "sandbox/linux/services/proc_util.h"
++#include "sandbox/linux/services/resource_limits.h"
++#include "sandbox/linux/services/thread_helpers.h"
++#include "sandbox/linux/syscall_broker/broker_command.h"
++#include "sandbox/linux/syscall_broker/broker_process.h"
++#include "sandbox/policy/sandbox.h"
++#include "sandbox/policy/sandbox_type.h"
++#include "sandbox/policy/mojom/sandbox.mojom.h"
++#include "sandbox/policy/switches.h"
++#include "sandbox/sandbox_buildflags.h"
++
++#if BUILDFLAG(USING_SANITIZER)
++#include <sanitizer/common_interface_defs.h>
++#endif
++
++#if BUILDFLAG(USE_NSS_CERTS)
++#include "crypto/nss_util.h"
++#endif
++
++#include "third_party/boringssl/src/include/openssl/crypto.h"
++
++#include "ui/gfx/font_util.h"
++
++namespace sandbox {
++namespace policy {
++
++SandboxLinux::SandboxLinux()
++    : sandbox_status_flags_(kInvalid),
++      pre_initialized_(false),
++      initialize_sandbox_ran_(false),
++      broker_process_(nullptr) {
++}
++
++SandboxLinux::~SandboxLinux() {
++  if (pre_initialized_) {
++    CHECK(initialize_sandbox_ran_);
++  }
++}
++
++SandboxLinux* SandboxLinux::GetInstance() {
++  SandboxLinux* instance = base::Singleton<SandboxLinux>::get();
++  CHECK(instance);
++  return instance;
++}
++
++void SandboxLinux::StopThread(base::Thread* thread) {
++  DCHECK(thread);
++  thread->Stop();
++}
++
++void SandboxLinux::PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type) {
++  CHECK(!pre_initialized_);
++#if BUILDFLAG(USING_SANITIZER)
++  // Sanitizers need to open some resources before the sandbox is enabled.
++  // This should not fork, not launch threads, not open a directory.
++  __sanitizer_sandbox_on_notify(sanitizer_args());
++  sanitizer_args_.reset();
++#endif
++  base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
++  const std::string process_type =
++      command_line->GetSwitchValueASCII(switches::kProcessType);
++
++  base::SysInfo::AmountOfPhysicalMemory();
++  base::SysInfo::NumberOfProcessors();
++  base::SysInfo::CPUModelName();
++
++  switch (sandbox_type) {
++    case sandbox::mojom::Sandbox::kNoSandbox:
++    {
++#if BUILDFLAG(USE_NSS_CERTS)
++      // The main process has to initialize the ~/.pki dir which won't work
++      // after unveil(2).
++      crypto::EnsureNSSInit();
++#endif
++      CRYPTO_pre_sandbox_init();
++
++      base::FilePath cache_directory, local_directory;
++
++      base::PathService::Get(base::DIR_CACHE, &cache_directory);
++      base::PathService::Get(base::DIR_HOME, &local_directory);
++
++      cache_directory = cache_directory.AppendASCII("chromium");
++      local_directory = local_directory.AppendASCII(".local").AppendASCII("share").AppendASCII("applications");
++
++      if (!base::CreateDirectory(cache_directory)) {
++        LOG(ERROR) << "Failed to create " << cache_directory.value() << " directory.";
++      }
++
++      if (!base::CreateDirectory(local_directory)) {
++        LOG(ERROR) << "Failed to create " << local_directory.value() << " directory.";
++      }
++
++      break;
++    }
++    case sandbox::mojom::Sandbox::kRenderer:
++      gfx::InitializeFonts();
++      break;
++    default:
++      break;
++  }
++
++  pre_initialized_ = true;
++}
++
++bool SandboxLinux::InitializeSandbox(sandbox::mojom::Sandbox sandbox_type,
++                                     SandboxLinux::PreSandboxHook hook,
++                                     const Options& options) {
++  DCHECK(!initialize_sandbox_ran_);
++  initialize_sandbox_ran_ = true;
++
++  base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
++  const std::string process_type =
++      command_line->GetSwitchValueASCII(switches::kProcessType);
++
++  if (command_line->HasSwitch(switches::kNoSandbox))
++    return true;
++
++  VLOG(1) << "SandboxLinux::InitializeSandbox: process_type="
++      << process_type << " sandbox_type=" << sandbox_type;
++
++  // Only one thread is running, pre-initialize if not already done.
++  if (!pre_initialized_)
++    PreinitializeSandbox(sandbox_type);
++
++  // Attempt to limit the future size of the address space of the process.
++  int error = 0;
++  const bool limited_as = LimitAddressSpace(&error);
++  if (error) {
++    // Restore errno. Internally to |LimitAddressSpace|, the errno due to
++    // setrlimit may be lost.
++    errno = error;
++    PCHECK(limited_as);
++  }
++
++  if (hook)
++    CHECK(std::move(hook).Run(options));
++
++  return true;
++}
++
++bool SandboxLinux::LimitAddressSpace(int* error) {
++#if !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) && \
++    !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER)
++  base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
++  if (SandboxTypeFromCommandLine(*command_line) == sandbox::mojom::Sandbox::kNoSandbox) {
++    return false;
++  }
++
++  // Unfortunately, it does not appear possible to set RLIMIT_AS such that it
++  // will both (a) be high enough to support V8's and WebAssembly's address
++  // space requirements while also (b) being low enough to mitigate exploits
++  // using integer overflows that require large allocations, heap spray, or
++  // other memory-hungry attack modes.
++
++  *error = sandbox::ResourceLimits::Lower(
++      RLIMIT_DATA, static_cast<rlim_t>(sandbox::kDataSizeLimit));
++
++  // Cache the resource limit before turning on the sandbox.
++  base::SysInfo::AmountOfVirtualMemory();
++  base::SysInfo::MaxSharedMemorySize();
++
++  return *error == 0;
++#else
++  base::SysInfo::AmountOfVirtualMemory();
++  return false;
++#endif  // !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) &&
++        // !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER)
++}
++
++}  // namespace policy
++}  // namespace sandbox
diff --git a/chromium-wip/patches/patch-sandbox_policy_netbsd_sandbox__netbsd.h b/chromium-wip/patches/patch-sandbox_policy_netbsd_sandbox__netbsd.h
new file mode 100644
index 0000000000..0ae761fb02
--- /dev/null
+++ b/chromium-wip/patches/patch-sandbox_policy_netbsd_sandbox__netbsd.h
@@ -0,0 +1,285 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- sandbox/policy/netbsd/sandbox_netbsd.h.orig	2025-08-12 17:48:59.520944966 +0000
++++ sandbox/policy/netbsd/sandbox_netbsd.h
+@@ -0,0 +1,276 @@
++// Copyright (c) 2012 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.
++#ifndef SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_
++#define SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_
++
++#include <memory>
++#include <string>
++#include <vector>
++
++#include "base/logging.h"
++#include "base/posix/global_descriptors.h"
++#include "sandbox/policy/export.h"
++#include "sandbox/policy/linux/sandbox_seccomp_bpf_linux.h"
++#include "sandbox/policy/mojom/sandbox.mojom.h"
++#include "base/sanitizer_buildflags.h"
++
++#if BUILDFLAG(USING_SANITIZER)
++#include <sanitizer/common_interface_defs.h>
++#endif
++
++namespace base {
++template <typename T>
++struct DefaultSingletonTraits;
++class Thread;
++}  // namespace base
++
++namespace sandbox {
++namespace syscall_broker {
++class BrokerProcess;
++}  // namespace syscall_broker
++}  // namespace sandbox
++
++namespace sandbox {
++namespace policy {
++
++// A singleton class to represent and change our sandboxing state for the
++// three main Linux sandboxes.
++// The sandboxing model allows using two layers of sandboxing. The first layer
++// can be implemented either with unprivileged namespaces or with the setuid
++// sandbox. This class provides a way to engage the namespace sandbox, but does
++// not deal with the legacy setuid sandbox directly.
++// The second layer is mainly based on seccomp-bpf and is engaged with
++// InitializeSandbox(). InitializeSandbox() is also responsible for "sealing"
++// the first layer of sandboxing. That is, InitializeSandbox must always be
++// called to have any meaningful sandboxing at all.
++class SANDBOX_POLICY_EXPORT SandboxLinux {
++ public:
++  // This is a list of sandbox IPC methods which the renderer may send to the
++  // sandbox host. See
++  // https://chromium.googlesource.com/chromium/src/+/master/docs/linux_sandbox_ipc.md
++  // This isn't the full list, values < 32 are reserved for methods called from
++  // Skia, and values < 64 are reserved for libc_interceptor.cc.
++  enum LinuxSandboxIPCMethods {
++    DEPRECATED_METHOD_GET_FALLBACK_FONT_FOR_CHAR = 64,
++    DEPRECATED_METHOD_GET_CHILD_WITH_INODE,
++    DEPRECATED_METHOD_GET_STYLE_FOR_STRIKE,
++    METHOD_MAKE_SHARED_MEMORY_SEGMENT,
++    DEPRECATED_METHOD_MATCH_WITH_FALLBACK,
++  };
++
++  // These form a bitmask which describes the conditions of the Linux sandbox.
++  // Note: this doesn't strictly give you the current status, it states
++  // what will be enabled when the relevant processes are initialized.
++  enum Status {
++    // SUID sandbox active.
++    kSUID = 1 << 0,
++
++    // Sandbox is using a new PID namespace.
++    kPIDNS = 1 << 1,
++
++    // Sandbox is using a new network namespace.
++    kNetNS = 1 << 2,
++
++    // seccomp-bpf sandbox active.
++    kSeccompBPF = 1 << 3,
++
++    // The Yama LSM module is present and enforcing.
++    kYama = 1 << 4,
++
++    // seccomp-bpf sandbox is active and the kernel supports TSYNC.
++    kSeccompTSYNC = 1 << 5,
++
++    // User namespace sandbox active.
++    kUserNS = 1 << 6,
++
++    // A flag that denotes an invalid sandbox status.
++    kInvalid = 1 << 31,
++  };
++
++  // SandboxLinux Options are a superset of SandboxSecompBPF Options.
++  struct Options : public SandboxSeccompBPF::Options {
++    // When running with a zygote, the namespace sandbox will have already
++    // been engaged prior to initializing SandboxLinux itself, and need not
++    // be done so again. Set to true to indicate that there isn't a zygote
++    // for this process and the step is to be performed here explicitly.
++    bool engage_namespace_sandbox = false;
++
++    // Allow starting the sandbox with multiple threads already running. This
++    // will enable TSYNC for seccomp-BPF, which syncs the seccomp-BPF policy
++    // across all running threads.
++    bool allow_threads_during_sandbox_init = false;
++
++    // Enables the CHECK for open directories. The open directory check is only
++    // useful for the chroot jail (from the semantic layer of the sandbox), and
++    // can safely be disabled if we are only enabling the seccomp-BPF layer.
++    bool check_for_open_directories = true;
++  };
++
++  // Callers can provide this hook to run code right before the policy
++  // is passed to the BPF compiler and the sandbox is engaged. If
++  // pre_sandbox_hook() returns true, the sandbox will be engaged
++  // afterwards, otherwise the process is terminated.
++  using PreSandboxHook = base::OnceCallback<bool(Options)>;
++
++  // Get our singleton instance.
++  static SandboxLinux* GetInstance();
++
++  SandboxLinux(const SandboxLinux&) = delete;
++  SandboxLinux& operator=(const SandboxLinux&) = delete;
++
++  bool SetPledge(const char *pstring, const char *ppath);
++  bool SetUnveil(const std::string process_type, sandbox::mojom::Sandbox sandbox_type);
++
++  // Do some initialization that can only be done before any of the sandboxes
++  // are enabled. If using the setuid sandbox, this should be called manually
++  // before the setuid sandbox is engaged.
++  // Security: When this runs, it is imperative that either InitializeSandbox()
++  // runs as well or that all file descriptors returned in
++  // GetFileDescriptorsToClose() get closed.
++  // Otherwise file descriptors that bypass the security of the setuid sandbox
++  // would be kept open. One must be particularly careful if a process performs
++  // a fork().
++  void PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type);
++
++  // Check that the current process is the init process of a new PID
++  // namespace and then proceed to drop access to the file system by using
++  // a new unprivileged namespace. This is a layer-1 sandbox.
++  // In order for this sandbox to be effective, it must be "sealed" by calling
++  // InitializeSandbox().
++  void EngageNamespaceSandbox(bool from_zygote);
++
++  // Return a list of file descriptors to close if PreinitializeSandbox() ran
++  // but InitializeSandbox() won't. Avoid using.
++  // TODO(jln): get rid of this hack.
++  std::vector<int> GetFileDescriptorsToClose();
++
++  // Seal an eventual layer-1 sandbox and initialize the layer-2 sandbox with
++  // an adequate policy depending on the process type and command line
++  // arguments.
++  // Currently the layer-2 sandbox is composed of seccomp-bpf and address space
++  // limitations.
++  // This function should only be called without any thread running.
++  bool InitializeSandbox(sandbox::mojom::Sandbox sandbox_type,
++                         PreSandboxHook hook,
++                         const Options& options);
++
++  // Stop |thread| in a way that can be trusted by the sandbox.
++  void StopThread(base::Thread* thread);
++
++  // Returns the status of the renderer, worker and ppapi sandbox. Can only
++  // be queried after going through PreinitializeSandbox(). This is a bitmask
++  // and uses the constants defined in "enum Status" above. Since the
++  // status needs to be provided before the sandboxes are actually started,
++  // this returns what will actually happen once InitializeSandbox()
++  // is called from inside these processes.
++  int GetStatus();
++
++  // Returns true if the current process is single-threaded or if the number
++  // of threads cannot be determined.
++  bool IsSingleThreaded() const;
++
++  // Returns true if we started Seccomp BPF.
++  bool seccomp_bpf_started() const;
++
++  // Check the policy and eventually start the seccomp-bpf sandbox. This should
++  // never be called with threads started. If we detect that threads have
++  // started we will crash.
++  bool StartSeccompBPF(sandbox::mojom::Sandbox sandbox_type,
++                       PreSandboxHook hook,
++                       const Options& options);
++
++  // Limit the address space of the current process (and its children) to make
++  // some vulnerabilities harder to exploit. Writes the errno due to setrlimit
++  // (including 0 if no error) into |error|.
++  bool LimitAddressSpace(int* error);
++
++  // Returns a file descriptor to proc. The file descriptor is no longer valid
++  // after the sandbox has been sealed.
++  int proc_fd() const {
++    DCHECK_NE(-1, proc_fd_);
++    return proc_fd_;
++  }
++
++#if BUILDFLAG(USING_SANITIZER)
++  __sanitizer_sandbox_arguments* sanitizer_args() const {
++    return sanitizer_args_.get();
++  };
++#endif
++
++  // A BrokerProcess is a helper that is started before the sandbox is engaged,
++  // typically from a pre-sandbox hook, that will serve requests to access
++  // files over an IPC channel. The client  of this runs from a SIGSYS handler
++  // triggered by the seccomp-bpf sandbox.
++  // |client_sandbox_policy| is the policy being run by the client, and is
++  // used to derive the equivalent broker-side policy.
++  // |broker_side_hook| is an alternate pre-sandbox hook to be run before the
++  // broker itself gets sandboxed, to which the broker side policy and
++  // |options| are passed.
++  // Crashes the process if the broker can not be started since continuation
++  // is impossible (and presumably unsafe).
++  // This should never be destroyed, as after the sandbox is started it is
++  // vital to the process.
++#if 0
++  void StartBrokerProcess(
++      const sandbox::syscall_broker::BrokerCommandSet& allowed_command_set,
++      std::vector<sandbox::syscall_broker::BrokerFilePermission> permissions,
++      PreSandboxHook broker_side_hook,
++      const Options& options);
++
++  sandbox::syscall_broker::BrokerProcess* broker_process() const {
++    return broker_process_;
++  }
++#endif
++
++ private:
++  friend struct base::DefaultSingletonTraits<SandboxLinux>;
++
++  SandboxLinux();
++  ~SandboxLinux();
++
++  // We must have been pre_initialized_ before using these.
++  bool seccomp_bpf_supported() const;
++  bool seccomp_bpf_with_tsync_supported() const;
++
++  // Returns true if it can be determined that the current process has open
++  // directories that are not managed by the SandboxLinux class. This would
++  // be a vulnerability as it would allow to bypass the setuid sandbox.
++  bool HasOpenDirectories() const;
++
++  // The last part of the initialization is to make sure any temporary "hole"
++  // in the sandbox is closed. For now, this consists of closing proc_fd_.
++  void SealSandbox();
++
++  // GetStatus() makes promises as to how the sandbox will behave. This
++  // checks that no promises have been broken.
++  void CheckForBrokenPromises(sandbox::mojom::Sandbox sandbox_type);
++
++  // Stop |thread| and make sure it does not appear in /proc/self/tasks/
++  // anymore.
++  void StopThreadAndEnsureNotCounted(base::Thread* thread) const;
++
++  // A file descriptor to /proc. It's dangerous to have it around as it could
++  // allow for sandbox bypasses. It needs to be closed before we consider
++  // ourselves sandboxed.
++  int proc_fd_;
++
++  bool seccomp_bpf_started_;
++  // The value returned by GetStatus(). Gets computed once and then cached.
++  int sandbox_status_flags_;
++  // Did PreinitializeSandbox() run?
++  bool pre_initialized_;
++  bool seccomp_bpf_supported_;             // Accurate if pre_initialized_.
++  bool seccomp_bpf_with_tsync_supported_;  // Accurate if pre_initialized_.
++  bool yama_is_enforcing_;                 // Accurate if pre_initialized_.
++  bool initialize_sandbox_ran_;            // InitializeSandbox() was called.
++#if BUILDFLAG(USING_SANITIZER)
++  std::unique_ptr<__sanitizer_sandbox_arguments> sanitizer_args_;
++#endif
++  sandbox::syscall_broker::BrokerProcess* broker_process_;  // Leaked as global.
++};
++
++}  // namespace policy
++}  // namespace sandbox
++
++#endif  // SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_
diff --git a/chromium-wip/patches/patch-sandbox_policy_openbsd_sandbox__openbsd.cc b/chromium-wip/patches/patch-sandbox_policy_openbsd_sandbox__openbsd.cc
new file mode 100644
index 0000000000..31cde9fb6f
--- /dev/null
+++ b/chromium-wip/patches/patch-sandbox_policy_openbsd_sandbox__openbsd.cc
@@ -0,0 +1,409 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- sandbox/policy/openbsd/sandbox_openbsd.cc.orig	2025-08-12 17:48:59.521154803 +0000
++++ sandbox/policy/openbsd/sandbox_openbsd.cc
+@@ -0,0 +1,400 @@
++// Copyright (c) 2012 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.
++
++#include "sandbox/policy/openbsd/sandbox_openbsd.h"
++
++#include <dirent.h>
++#include <fcntl.h>
++#include <stdint.h>
++#include <sys/resource.h>
++#include <sys/stat.h>
++#include <sys/time.h>
++#include <sys/types.h>
++#include <unistd.h>
++#include <util.h>
++
++#include <limits>
++#include <memory>
++#include <string>
++#include <vector>
++
++#include "base/command_line.h"
++#include "base/debug/stack_trace.h"
++#include "base/feature_list.h"
++#include "base/files/file_path.h"
++#include "base/files/file_util.h"
++#include "base/files/scoped_file.h"
++#include "base/logging.h"
++#include "base/memory/singleton.h"
++#include "base/path_service.h"
++#include "base/posix/eintr_wrapper.h"
++#include "base/strings/string_number_conversions.h"
++#include "base/system/sys_info.h"
++#include "base/threading/thread.h"
++#include "base/time/time.h"
++#include "build/build_config.h"
++#include "crypto/crypto_buildflags.h"
++#include "ppapi/buildflags/buildflags.h"
++#include "sandbox/constants.h"
++#include "sandbox/linux/services/credentials.h"
++#include "sandbox/linux/services/namespace_sandbox.h"
++#include "sandbox/linux/services/proc_util.h"
++#include "sandbox/linux/services/resource_limits.h"
++#include "sandbox/linux/services/thread_helpers.h"
++#include "sandbox/linux/syscall_broker/broker_command.h"
++#include "sandbox/linux/syscall_broker/broker_process.h"
++#include "sandbox/policy/sandbox.h"
++#include "sandbox/policy/sandbox_type.h"
++#include "sandbox/policy/mojom/sandbox.mojom.h"
++#include "sandbox/policy/switches.h"
++#include "sandbox/sandbox_buildflags.h" 
++
++#if BUILDFLAG(USING_SANITIZER)
++#include <sanitizer/common_interface_defs.h>
++#endif
++
++#if BUILDFLAG(USE_NSS_CERTS)
++#include "crypto/nss_util.h"
++#endif
++
++#include "third_party/boringssl/src/include/openssl/crypto.h"
++
++#include <fontconfig/fontconfig.h>
++#include "ui/gfx/linux/fontconfig_util.h"
++
++#define MAXTOKENS	3
++
++#define _UNVEIL_MAIN		"@PKG_SYSCONFBASE@/chromium/unveil.main";
++#define _UNVEIL_GPU		"@PKG_SYSCONFBASE@/chromium/unveil.gpu";
++#define _UNVEIL_UTILITY_NETWORK	"@PKG_SYSCONFBASE@/chromium/unveil.utility_network";
++#define _UNVEIL_UTILITY_AUDIO	"@PKG_SYSCONFBASE@/chromium/unveil.utility_audio";
++#define _UNVEIL_UTILITY_VIDEO	"@PKG_SYSCONFBASE@/chromium/unveil.utility_video";
++
++namespace sandbox {
++namespace policy {
++
++SandboxLinux::SandboxLinux()
++    : unveil_initialized_(false),
++      sandbox_status_flags_(kInvalid),
++      pre_initialized_(false),
++      initialize_sandbox_ran_(false),
++      broker_process_(nullptr) {
++}
++
++SandboxLinux::~SandboxLinux() {
++  if (pre_initialized_) {
++    CHECK(initialize_sandbox_ran_);
++  }
++}
++
++SandboxLinux* SandboxLinux::GetInstance() {
++  SandboxLinux* instance = base::Singleton<SandboxLinux>::get();
++  CHECK(instance);
++  return instance;
++}
++
++void SandboxLinux::StopThread(base::Thread* thread) {
++  DCHECK(thread);
++  thread->Stop();
++}
++
++void SandboxLinux::PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type) {
++  CHECK(!pre_initialized_);
++#if BUILDFLAG(USING_SANITIZER)
++  // Sanitizers need to open some resources before the sandbox is enabled.
++  // This should not fork, not launch threads, not open a directory.
++  __sanitizer_sandbox_on_notify(sanitizer_args());
++  sanitizer_args_.reset();
++#endif
++  base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
++  const std::string process_type =
++      command_line->GetSwitchValueASCII(switches::kProcessType);
++
++  base::SysInfo::AmountOfPhysicalMemory();
++  base::SysInfo::NumberOfProcessors();
++  base::SysInfo::CPUModelName();
++
++  switch (sandbox_type) {
++    case sandbox::mojom::Sandbox::kNoSandbox:
++    {
++#if BUILDFLAG(USE_NSS_CERTS)
++      // The main process has to initialize the ~/.pki dir which won't work
++      // after unveil(2).
++      crypto::EnsureNSSInit();
++#endif
++      CRYPTO_pre_sandbox_init();
++
++      base::FilePath cache_directory, local_directory;
++
++      base::PathService::Get(base::DIR_CACHE, &cache_directory);
++      base::PathService::Get(base::DIR_HOME, &local_directory);   
++
++      cache_directory = cache_directory.AppendASCII("chromium");
++      local_directory = local_directory.AppendASCII(".local").AppendASCII("share").AppendASCII("applications");
++
++      if (!base::CreateDirectory(cache_directory)) {
++        LOG(ERROR) << "Failed to create " << cache_directory.value() << " directory.";
++      }
++
++      if (!base::CreateDirectory(local_directory)) {
++        LOG(ERROR) << "Failed to create " << local_directory.value() << " directory.";
++      }
++
++      break;
++    }
++    case sandbox::mojom::Sandbox::kRenderer:
++    {
++      FcConfig* config = gfx::GetGlobalFontConfig();
++      DCHECK(config);
++      break;
++    }
++    default:
++      break;
++  }
++
++  pre_initialized_ = true;
++}
++
++bool SandboxLinux::SetPledge(const char *pstring, const char *ppath) {
++  FILE *fp;
++  char *s = NULL;
++  size_t len = 0;
++  ssize_t read;
++
++  if (pstring != NULL) {
++    if (pledge(pstring, NULL) == -1)
++      goto err;
++    VLOG(5) << "pledge " << pstring;
++  } else if (ppath != NULL) {
++    fp = fopen(ppath, "r");
++    if (fp != NULL) {
++      while ((read = getline(&s, &len, fp)) != -1 ) {
++        if (s[strlen(s)-1] == '\n')
++          s[strlen(s)-1] = '\0';
++        if (pledge(s, NULL) == -1)
++  	  goto err;
++        VLOG(5) << "pledge " << s;
++      }
++      fclose(fp);
++    } else {
++      LOG(ERROR) << "fopen(" << ppath << ") failed, errno: " << errno;
++      return false;
++    }
++  }
++  return true;
++err:
++  LOG(ERROR) << "pledge() failed, errno: " << errno;
++  return false;
++}
++
++bool SandboxLinux::SetUnveil(const std::string process_type, sandbox::mojom::Sandbox sandbox_type) {
++  FILE *fp;
++  char *s = NULL, *cp = NULL, *home = NULL, **ap, *tokens[MAXTOKENS];
++  char *xdg_var = NULL;
++  char path[PATH_MAX];
++  const char *ufile;
++  size_t len = 0, lineno = 0;
++
++  switch (sandbox_type) {
++    case sandbox::mojom::Sandbox::kNoSandbox:
++      ufile = _UNVEIL_MAIN;
++      break;
++    case sandbox::mojom::Sandbox::kGpu:
++    case sandbox::mojom::Sandbox::kOnDeviceModelExecution:
++      ufile = _UNVEIL_GPU;
++      break;
++    case sandbox::mojom::Sandbox::kNetwork:
++      ufile = _UNVEIL_UTILITY_NETWORK;
++      break;
++    case sandbox::mojom::Sandbox::kAudio:
++      ufile = _UNVEIL_UTILITY_AUDIO;
++      break;
++    case sandbox::mojom::Sandbox::kVideoCapture:
++      ufile = _UNVEIL_UTILITY_VIDEO;
++      break;
++    default:
++      unveil("/dev/null", "r");
++      goto done;
++  }
++
++  fp = fopen(ufile, "r");
++  if (fp != NULL) {
++    while (!feof(fp)) {
++      if ((s = fparseln(fp, &len, &lineno, NULL,
++          FPARSELN_UNESCCOMM | FPARSELN_UNESCCONT)) == NULL) {
++        if (ferror(fp)) {
++          LOG(ERROR) << "ferror(), errno: " << errno;
++	  _exit(1);
++	} else {
++          continue;
++	}
++      }
++      cp = s;
++      cp += strspn(cp, " \t\n"); /* eat whitespace */
++      if (cp[0] == '\0')
++        continue;
++
++      for (ap = tokens; ap < &tokens[MAXTOKENS - 1] &&
++          (*ap = strsep(&cp, " \t")) != NULL;) {
++        if (**ap != '\0')
++          ap++;
++      }
++      *ap = NULL;
++
++      if (tokens[1] == NULL) {
++        LOG(ERROR) << ufile << ": line " << lineno << ": must supply value to " << s;
++        _exit(1);
++      }
++
++      if (tokens[0][0] == '~') {
++        if ((home = getenv("HOME")) == NULL || *home == '\0') {
++          LOG(ERROR) << "failed to get home";
++	  _exit(1);
++	}
++        memmove(tokens[0], tokens[0] + 1, strlen(tokens[0]));
++        strncpy(path, home, sizeof(path) - 1);
++        path[sizeof(path) - 1] = '\0';
++        strncat(path, tokens[0], sizeof(path) - 1 - strlen(path));
++      } else if (strncmp(tokens[0], "XDG_", 4) == 0) {
++        if ((xdg_var = getenv(tokens[0])) == NULL || *xdg_var == '\0') {
++          LOG(ERROR) << "failed to get " << tokens[0];
++          continue;
++	}
++        strncpy(path, xdg_var, sizeof(path) - 1);
++        path[sizeof(path) - 1] = '\0';
++      } else {
++        strncpy(path, tokens[0], sizeof(path) - 1);
++        path[sizeof(path) - 1] = '\0';
++      }
++
++      if (unveil(path, tokens[1]) == -1) {
++        LOG(ERROR) << "failed unveiling " << path << " with permissions " << tokens[1];
++        _exit(1);
++      } else {
++        VLOG(5) << "unveiling " << path << " with permissions " << tokens[1];
++      }
++    }
++    fclose(fp);
++  } else {
++        LOG(ERROR) << "failed to open " << ufile << " errno: " << errno;
++        _exit(1);
++  }
++
++done:
++  unveil_initialized_ = true;
++
++  return true;
++}
++
++bool SandboxLinux::unveil_initialized() const {
++  return unveil_initialized_;
++}
++
++bool SandboxLinux::InitializeSandbox(sandbox::mojom::Sandbox sandbox_type,
++                                     SandboxLinux::PreSandboxHook hook,
++                                     const Options& options) {
++  DCHECK(!initialize_sandbox_ran_);
++  initialize_sandbox_ran_ = true;
++
++  base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
++  const std::string process_type =
++      command_line->GetSwitchValueASCII(switches::kProcessType);
++
++  if (command_line->HasSwitch(switches::kNoSandbox))
++    return true;
++
++  VLOG(1) << "SandboxLinux::InitializeSandbox: process_type="
++      << process_type << " sandbox_type=" << sandbox_type;
++
++  // Only one thread is running, pre-initialize if not already done.
++  if (!pre_initialized_)
++    PreinitializeSandbox(sandbox_type);
++
++  // Attempt to limit the future size of the address space of the process.
++  int error = 0;
++  const bool limited_as = LimitAddressSpace(&error);
++  if (error) {
++    // Restore errno. Internally to |LimitAddressSpace|, the errno due to
++    // setrlimit may be lost.
++    errno = error;
++    PCHECK(limited_as);
++  }
++
++  if (hook)
++    CHECK(std::move(hook).Run(options));
++
++  if (!command_line->HasSwitch(switches::kDisableUnveil))
++    SetUnveil(process_type, sandbox_type);
++
++  switch(sandbox_type) {
++    case sandbox::mojom::Sandbox::kNoSandbox:
++      SetPledge(NULL, "@PKG_SYSCONFBASE@/chromium/pledge.main");
++      break;
++    case sandbox::mojom::Sandbox::kRenderer:
++      // prot_exec needed by v8
++      // flock needed by sqlite3 locking
++      SetPledge("stdio rpath flock prot_exec recvfd sendfd ps", NULL);
++      break;
++    case sandbox::mojom::Sandbox::kGpu:
++    case sandbox::mojom::Sandbox::kOnDeviceModelExecution:
++      SetPledge("stdio drm inet rpath flock cpath wpath prot_exec recvfd sendfd tmppath unix", NULL);
++      break;
++#if BUILDFLAG(ENABLE_PPAPI)
++    case sandbox::mojom::Sandbox::kPpapi:
++      // prot_exec needed by v8
++      SetPledge("stdio rpath prot_exec recvfd sendfd", NULL);
++      break;
++#endif
++    case sandbox::mojom::Sandbox::kAudio:
++      SetPledge(NULL, "@PKG_SYSCONFBASE@/chromium/pledge.utility_audio");
++      break;
++    case sandbox::mojom::Sandbox::kNetwork:
++      SetPledge(NULL, "@PKG_SYSCONFBASE@/chromium/pledge.utility_network");
++      break;
++    case sandbox::mojom::Sandbox::kVideoCapture:
++      SetPledge(NULL, "@PKG_SYSCONFBASE@/chromium/pledge.utility_video");
++      break;
++    case sandbox::mojom::Sandbox::kUtility:
++    case sandbox::mojom::Sandbox::kService:
++      SetPledge("stdio rpath cpath wpath fattr flock sendfd recvfd prot_exec", NULL);
++      break;
++    default:
++      LOG(ERROR) << "non-pledge()'d process: " << sandbox_type;
++      break;
++  }
++
++  return true;
++}
++
++bool SandboxLinux::LimitAddressSpace(int* error) {
++#if !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) && \
++    !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER)
++  base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
++  if (SandboxTypeFromCommandLine(*command_line) == sandbox::mojom::Sandbox::kNoSandbox) {
++    return false;
++  }
++
++  // Unfortunately, it does not appear possible to set RLIMIT_AS such that it
++  // will both (a) be high enough to support V8's and WebAssembly's address
++  // space requirements while also (b) being low enough to mitigate exploits
++  // using integer overflows that require large allocations, heap spray, or
++  // other memory-hungry attack modes.
++
++  *error = sandbox::ResourceLimits::Lower(
++      RLIMIT_DATA, static_cast<rlim_t>(sandbox::kDataSizeLimit));
++
++  // Cache the resource limit before turning on the sandbox.
++  base::SysInfo::AmountOfVirtualMemory();
++  base::SysInfo::MaxSharedMemorySize();
++
++  return *error == 0;
++#else
++  base::SysInfo::AmountOfVirtualMemory();
++  return false;
++#endif  // !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) &&
++        // !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER)
++}
++
++}  // namespace policy
++}  // namespace sandbox
diff --git a/chromium-wip/patches/patch-sandbox_policy_openbsd_sandbox__openbsd.h b/chromium-wip/patches/patch-sandbox_policy_openbsd_sandbox__openbsd.h
new file mode 100644
index 0000000000..6ef435ee6c
--- /dev/null
+++ b/chromium-wip/patches/patch-sandbox_policy_openbsd_sandbox__openbsd.h
@@ -0,0 +1,289 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- sandbox/policy/openbsd/sandbox_openbsd.h.orig	2025-08-12 17:48:59.521313741 +0000
++++ sandbox/policy/openbsd/sandbox_openbsd.h
+@@ -0,0 +1,280 @@
++// Copyright (c) 2012 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.
++#ifndef SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_
++#define SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_
++
++#include <memory>
++#include <string>
++#include <vector>
++
++#include "base/logging.h"
++#include "base/posix/global_descriptors.h"
++#include "sandbox/policy/export.h"
++#include "sandbox/policy/linux/sandbox_seccomp_bpf_linux.h"
++#include "sandbox/policy/mojom/sandbox.mojom.h"
++#include "base/sanitizer_buildflags.h"
++
++#if BUILDFLAG(USING_SANITIZER)
++#include <sanitizer/common_interface_defs.h>
++#endif
++
++namespace base {
++template <typename T>
++struct DefaultSingletonTraits;
++class Thread;
++}  // namespace base
++
++namespace sandbox {
++namespace syscall_broker {
++class BrokerProcess;
++}  // namespace syscall_broker
++}  // namespace sandbox
++
++namespace sandbox {
++namespace policy {
++
++// A singleton class to represent and change our sandboxing state for the
++// three main Linux sandboxes.
++// The sandboxing model allows using two layers of sandboxing. The first layer
++// can be implemented either with unprivileged namespaces or with the setuid
++// sandbox. This class provides a way to engage the namespace sandbox, but does
++// not deal with the legacy setuid sandbox directly.
++// The second layer is mainly based on seccomp-bpf and is engaged with
++// InitializeSandbox(). InitializeSandbox() is also responsible for "sealing"
++// the first layer of sandboxing. That is, InitializeSandbox must always be
++// called to have any meaningful sandboxing at all.
++class SANDBOX_POLICY_EXPORT SandboxLinux {
++ public:
++  // This is a list of sandbox IPC methods which the renderer may send to the
++  // sandbox host. See
++  // https://chromium.googlesource.com/chromium/src/+/master/docs/linux_sandbox_ipc.md
++  // This isn't the full list, values < 32 are reserved for methods called from
++  // Skia, and values < 64 are reserved for libc_interceptor.cc.
++  enum LinuxSandboxIPCMethods {
++    DEPRECATED_METHOD_GET_FALLBACK_FONT_FOR_CHAR = 64,
++    DEPRECATED_METHOD_GET_CHILD_WITH_INODE,
++    DEPRECATED_METHOD_GET_STYLE_FOR_STRIKE,
++    METHOD_MAKE_SHARED_MEMORY_SEGMENT,
++    DEPRECATED_METHOD_MATCH_WITH_FALLBACK,
++  };
++
++  // These form a bitmask which describes the conditions of the Linux sandbox.
++  // Note: this doesn't strictly give you the current status, it states
++  // what will be enabled when the relevant processes are initialized.
++  enum Status {
++    // SUID sandbox active.
++    kSUID = 1 << 0,
++
++    // Sandbox is using a new PID namespace.
++    kPIDNS = 1 << 1,
++
++    // Sandbox is using a new network namespace.
++    kNetNS = 1 << 2,
++
++    // seccomp-bpf sandbox active.
++    kSeccompBPF = 1 << 3,
++
++    // The Yama LSM module is present and enforcing.
++    kYama = 1 << 4,
++
++    // seccomp-bpf sandbox is active and the kernel supports TSYNC.
++    kSeccompTSYNC = 1 << 5,
++
++    // User namespace sandbox active.
++    kUserNS = 1 << 6,
++
++    // A flag that denotes an invalid sandbox status.
++    kInvalid = 1 << 31,
++  };
++
++  // SandboxLinux Options are a superset of SandboxSecompBPF Options.
++  struct Options : public SandboxSeccompBPF::Options {
++    // When running with a zygote, the namespace sandbox will have already
++    // been engaged prior to initializing SandboxLinux itself, and need not
++    // be done so again. Set to true to indicate that there isn't a zygote
++    // for this process and the step is to be performed here explicitly.
++    bool engage_namespace_sandbox = false;
++
++    // Allow starting the sandbox with multiple threads already running. This
++    // will enable TSYNC for seccomp-BPF, which syncs the seccomp-BPF policy
++    // across all running threads.
++    bool allow_threads_during_sandbox_init = false;
++
++    // Enables the CHECK for open directories. The open directory check is only
++    // useful for the chroot jail (from the semantic layer of the sandbox), and
++    // can safely be disabled if we are only enabling the seccomp-BPF layer.
++    bool check_for_open_directories = true;
++  };
++
++  // Callers can provide this hook to run code right before the policy
++  // is passed to the BPF compiler and the sandbox is engaged. If
++  // pre_sandbox_hook() returns true, the sandbox will be engaged
++  // afterwards, otherwise the process is terminated.
++  using PreSandboxHook = base::OnceCallback<bool(Options)>;
++
++  // Get our singleton instance.
++  static SandboxLinux* GetInstance();
++
++  SandboxLinux(const SandboxLinux&) = delete;
++  SandboxLinux& operator=(const SandboxLinux&) = delete;
++
++  bool SetPledge(const char *pstring, const char *ppath);
++  bool SetUnveil(const std::string process_type, sandbox::mojom::Sandbox sandbox_type);
++
++  // Do some initialization that can only be done before any of the sandboxes
++  // are enabled. If using the setuid sandbox, this should be called manually
++  // before the setuid sandbox is engaged.
++  // Security: When this runs, it is imperative that either InitializeSandbox()
++  // runs as well or that all file descriptors returned in
++  // GetFileDescriptorsToClose() get closed.
++  // Otherwise file descriptors that bypass the security of the setuid sandbox
++  // would be kept open. One must be particularly careful if a process performs
++  // a fork().
++  void PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type);
++
++  // Check that the current process is the init process of a new PID
++  // namespace and then proceed to drop access to the file system by using
++  // a new unprivileged namespace. This is a layer-1 sandbox.
++  // In order for this sandbox to be effective, it must be "sealed" by calling
++  // InitializeSandbox().
++  void EngageNamespaceSandbox(bool from_zygote);
++
++  // Return a list of file descriptors to close if PreinitializeSandbox() ran
++  // but InitializeSandbox() won't. Avoid using.
++  // TODO(jln): get rid of this hack.
++  std::vector<int> GetFileDescriptorsToClose();
++
++  // Seal an eventual layer-1 sandbox and initialize the layer-2 sandbox with
++  // an adequate policy depending on the process type and command line
++  // arguments.
++  // Currently the layer-2 sandbox is composed of seccomp-bpf and address space
++  // limitations.
++  // This function should only be called without any thread running.
++  bool InitializeSandbox(sandbox::mojom::Sandbox sandbox_type,
++                         PreSandboxHook hook,
++                         const Options& options);
++
++  // Stop |thread| in a way that can be trusted by the sandbox.
++  void StopThread(base::Thread* thread);
++
++  // Returns the status of the renderer, worker and ppapi sandbox. Can only
++  // be queried after going through PreinitializeSandbox(). This is a bitmask
++  // and uses the constants defined in "enum Status" above. Since the
++  // status needs to be provided before the sandboxes are actually started,
++  // this returns what will actually happen once InitializeSandbox()
++  // is called from inside these processes.
++  int GetStatus();
++
++  // Returns true if the current process is single-threaded or if the number
++  // of threads cannot be determined.
++  bool IsSingleThreaded() const;
++
++  // Returns true if we started Seccomp BPF.
++  bool seccomp_bpf_started() const;
++
++  // Returns true if unveil(2) is used.
++  bool unveil_initialized() const;
++
++  // Check the policy and eventually start the seccomp-bpf sandbox. This should
++  // never be called with threads started. If we detect that threads have
++  // started we will crash.
++  bool StartSeccompBPF(sandbox::mojom::Sandbox sandbox_type,
++                       PreSandboxHook hook,
++                       const Options& options);
++
++  // Limit the address space of the current process (and its children) to make
++  // some vulnerabilities harder to exploit. Writes the errno due to setrlimit
++  // (including 0 if no error) into |error|.
++  bool LimitAddressSpace(int* error);
++
++  // Returns a file descriptor to proc. The file descriptor is no longer valid
++  // after the sandbox has been sealed.
++  int proc_fd() const {
++    DCHECK_NE(-1, proc_fd_);
++    return proc_fd_;
++  }
++
++#if BUILDFLAG(USING_SANITIZER)
++  __sanitizer_sandbox_arguments* sanitizer_args() const {
++    return sanitizer_args_.get();
++  };
++#endif
++
++  // A BrokerProcess is a helper that is started before the sandbox is engaged,
++  // typically from a pre-sandbox hook, that will serve requests to access
++  // files over an IPC channel. The client  of this runs from a SIGSYS handler
++  // triggered by the seccomp-bpf sandbox.
++  // |client_sandbox_policy| is the policy being run by the client, and is
++  // used to derive the equivalent broker-side policy.
++  // |broker_side_hook| is an alternate pre-sandbox hook to be run before the
++  // broker itself gets sandboxed, to which the broker side policy and
++  // |options| are passed.
++  // Crashes the process if the broker can not be started since continuation
++  // is impossible (and presumably unsafe).
++  // This should never be destroyed, as after the sandbox is started it is
++  // vital to the process.
++#if 0
++  void StartBrokerProcess(
++      const sandbox::syscall_broker::BrokerCommandSet& allowed_command_set,
++      std::vector<sandbox::syscall_broker::BrokerFilePermission> permissions,
++      PreSandboxHook broker_side_hook,
++      const Options& options);
++
++  sandbox::syscall_broker::BrokerProcess* broker_process() const {
++    return broker_process_;
++  }
++#endif
++
++ private:
++  friend struct base::DefaultSingletonTraits<SandboxLinux>;
++
++  SandboxLinux();
++  ~SandboxLinux();
++
++  // We must have been pre_initialized_ before using these.
++  bool seccomp_bpf_supported() const;
++  bool seccomp_bpf_with_tsync_supported() const;
++
++  // Returns true if it can be determined that the current process has open
++  // directories that are not managed by the SandboxLinux class. This would
++  // be a vulnerability as it would allow to bypass the setuid sandbox.
++  bool HasOpenDirectories() const;
++
++  // The last part of the initialization is to make sure any temporary "hole"
++  // in the sandbox is closed. For now, this consists of closing proc_fd_.
++  void SealSandbox();
++
++  // GetStatus() makes promises as to how the sandbox will behave. This
++  // checks that no promises have been broken.
++  void CheckForBrokenPromises(sandbox::mojom::Sandbox sandbox_type);
++
++  // Stop |thread| and make sure it does not appear in /proc/self/tasks/
++  // anymore.
++  void StopThreadAndEnsureNotCounted(base::Thread* thread) const;
++
++  // A file descriptor to /proc. It's dangerous to have it around as it could
++  // allow for sandbox bypasses. It needs to be closed before we consider
++  // ourselves sandboxed.
++  int proc_fd_;
++
++  bool seccomp_bpf_started_;
++  bool unveil_initialized_;
++  // The value returned by GetStatus(). Gets computed once and then cached.
++  int sandbox_status_flags_;
++  // Did PreinitializeSandbox() run?
++  bool pre_initialized_;
++  bool seccomp_bpf_supported_;             // Accurate if pre_initialized_.
++  bool seccomp_bpf_with_tsync_supported_;  // Accurate if pre_initialized_.
++  bool yama_is_enforcing_;                 // Accurate if pre_initialized_.
++  bool initialize_sandbox_ran_;            // InitializeSandbox() was called.
++#if BUILDFLAG(USING_SANITIZER)
++  std::unique_ptr<__sanitizer_sandbox_arguments> sanitizer_args_;
++#endif
++  sandbox::syscall_broker::BrokerProcess* broker_process_;  // Leaked as global.
++};
++
++}  // namespace policy
++}  // namespace sandbox
++
++#endif  // SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_
diff --git a/chromium-wip/patches/patch-sandbox_policy_sandbox.cc b/chromium-wip/patches/patch-sandbox_policy_sandbox.cc
new file mode 100644
index 0000000000..b9291d61e5
--- /dev/null
+++ b/chromium-wip/patches/patch-sandbox_policy_sandbox.cc
@@ -0,0 +1,28 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- sandbox/policy/sandbox.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ sandbox/policy/sandbox.cc
+@@ -18,6 +18,10 @@
+ #include "sandbox/policy/linux/sandbox_linux.h"
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#endif  // BUILDFLAG(IS_BSD)
++
+ #if BUILDFLAG(IS_MAC)
+ #include "sandbox/mac/seatbelt.h"
+ #endif  // BUILDFLAG(IS_MAC)
+@@ -32,7 +36,7 @@
+ namespace sandbox {
+ namespace policy {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ bool Sandbox::Initialize(sandbox::mojom::Sandbox sandbox_type,
+                          SandboxLinux::PreSandboxHook hook,
+                          const SandboxLinux::Options& options) {
diff --git a/chromium-wip/patches/patch-sandbox_policy_sandbox.h b/chromium-wip/patches/patch-sandbox_policy_sandbox.h
new file mode 100644
index 0000000000..71cb8b956c
--- /dev/null
+++ b/chromium-wip/patches/patch-sandbox_policy_sandbox.h
@@ -0,0 +1,32 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- sandbox/policy/sandbox.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ sandbox/policy/sandbox.h
+@@ -12,6 +12,14 @@
+ #include "sandbox/policy/linux/sandbox_linux.h"
+ #endif
+ 
++#if BUILDFLAG(IS_OPENBSD)
++#include "sandbox/policy/openbsd/sandbox_openbsd.h"
++#elif BUILDFLAG(IS_NETBSD)
++#include "sandbox/policy/netbsd/sandbox_netbsd.h"
++#elif BUILDFLAG(IS_FREEBSD)
++#include "sandbox/policy/freebsd/sandbox_freebsd.h"
++#endif
++
+ namespace sandbox {
+ namespace mojom {
+ enum class Sandbox;
+@@ -32,7 +40,7 @@ namespace policy {
+ 
+ class SANDBOX_POLICY_EXPORT Sandbox {
+  public:
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   static bool Initialize(sandbox::mojom::Sandbox sandbox_type,
+                          SandboxLinux::PreSandboxHook hook,
+                          const SandboxLinux::Options& options);
diff --git a/chromium-wip/patches/patch-sandbox_policy_sandbox__type.cc b/chromium-wip/patches/patch-sandbox_policy_sandbox__type.cc
new file mode 100644
index 0000000000..c0d315f215
--- /dev/null
+++ b/chromium-wip/patches/patch-sandbox_policy_sandbox__type.cc
@@ -0,0 +1,190 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- sandbox/policy/sandbox_type.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ sandbox/policy/sandbox_type.cc
+@@ -17,7 +17,7 @@
+ #include "chromeos/ash/components/assistant/buildflags.h"
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "media/gpu/buildflags.h"  // nogncheck
+ #endif
+ 
+@@ -42,7 +42,7 @@ constexpr char kPpapiSandbox[] = "ppapi"
+ #endif
+ 
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ constexpr char kPrintBackendSandbox[] = "print_backend";
+ constexpr char kScreenAISandbox[] = "screen_ai";
+ #endif
+@@ -60,15 +60,15 @@ constexpr char kWindowsSystemProxyResolv
+ constexpr char kMirroringSandbox[] = "mirroring";
+ #endif  // BUILDFLAG(IS_MAC)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ constexpr char kVideoEffectsSandbox[] = "video_effects";
+ #endif
+ 
+-#if BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ constexpr char kVideoCaptureSandbox[] = "video_capture";
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // USE_LINUX_VIDEO_ACCELERATION implies IS_LINUX || IS_CHROMEOS, so this double
+ // #if is redundant, however, we cannot include "media/gpu/buildflags.h" on all
+ // platforms, only one those that need to evaluate the use..., hence this
+@@ -88,7 +88,7 @@ constexpr char kLibassistantSandbox[] = 
+ #endif  // BUILDFLAG(ENABLE_CROS_LIBASSISTANT)
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ constexpr char kOnDeviceTranslationSandbox[] = "on_device_translation";
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
+ 
+@@ -150,7 +150,7 @@ void SetCommandLineFlagsForSandboxType(b
+     case Sandbox::kCdm:
+     case Sandbox::kPrintCompositor:
+     case Sandbox::kAudio:
+-#if BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+     case Sandbox::kVideoCapture:
+ #endif
+ #if BUILDFLAG(IS_WIN)
+@@ -161,7 +161,7 @@ void SetCommandLineFlagsForSandboxType(b
+     case Sandbox::kMediaFoundationCdm:
+     case Sandbox::kWindowsSystemProxyResolver:
+ #endif  // BUILDFLAG(IS_WIN)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION)
+     case Sandbox::kHardwareVideoDecoding:
+     case Sandbox::kHardwareVideoEncoding:
+@@ -179,15 +179,15 @@ void SetCommandLineFlagsForSandboxType(b
+     case Sandbox::kMirroring:
+ #endif  // BUILDFLAG(IS_MAC)
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+     case Sandbox::kPrintBackend:
+     case Sandbox::kScreenAI:
+ #endif
+     case Sandbox::kSpeechRecognition:
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     case Sandbox::kVideoEffects:
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+     case Sandbox::kOnDeviceTranslation:
+ #endif
+       DCHECK(command_line->GetSwitchValueASCII(switches::kProcessType) ==
+@@ -197,7 +197,7 @@ void SetCommandLineFlagsForSandboxType(b
+           switches::kServiceSandboxType,
+           StringFromUtilitySandboxType(sandbox_type));
+       break;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     case Sandbox::kZygoteIntermediateSandbox:
+       break;
+ #endif
+@@ -237,7 +237,7 @@ sandbox::mojom::Sandbox SandboxTypeFromC
+     return Sandbox::kUtility;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Intermediate process gains a sandbox later.
+   if (process_type == switches::kZygoteProcessType)
+     return Sandbox::kZygoteIntermediateSandbox;
+@@ -279,7 +279,7 @@ std::string StringFromUtilitySandboxType
+       return kUtilitySandbox;
+     case Sandbox::kAudio:
+       return kAudioSandbox;
+-#if BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+     case Sandbox::kVideoCapture:
+       return kVideoCaptureSandbox;
+ #endif
+@@ -290,17 +290,17 @@ std::string StringFromUtilitySandboxType
+     case Sandbox::kSpeechRecognition:
+       return kSpeechRecognitionSandbox;
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+     case Sandbox::kPrintBackend:
+       return kPrintBackendSandbox;
+     case Sandbox::kScreenAI:
+       return kScreenAISandbox;
+ #endif
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     case Sandbox::kVideoEffects:
+       return kVideoEffectsSandbox;
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+     case Sandbox::kOnDeviceTranslation:
+       return kOnDeviceTranslationSandbox;
+ #endif
+@@ -320,7 +320,7 @@ std::string StringFromUtilitySandboxType
+     case Sandbox::kMirroring:
+       return kMirroringSandbox;
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION)
+     case Sandbox::kHardwareVideoDecoding:
+       return kHardwareVideoDecodingSandbox;
+@@ -343,7 +343,7 @@ std::string StringFromUtilitySandboxType
+       // The following are not utility processes so should not occur.
+     case Sandbox::kRenderer:
+     case Sandbox::kGpu:
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     case Sandbox::kZygoteIntermediateSandbox:
+ #endif
+       NOTREACHED();
+@@ -421,7 +421,7 @@ sandbox::mojom::Sandbox UtilitySandboxTy
+     return Sandbox::kSpeechRecognition;
+   }
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   if (sandbox_string == kPrintBackendSandbox) {
+     return Sandbox::kPrintBackend;
+   }
+@@ -429,7 +429,7 @@ sandbox::mojom::Sandbox UtilitySandboxTy
+     return Sandbox::kScreenAI;
+   }
+ #endif
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (sandbox_string == kVideoEffectsSandbox) {
+     return Sandbox::kVideoEffects;
+   }
+@@ -439,12 +439,12 @@ sandbox::mojom::Sandbox UtilitySandboxTy
+     return Sandbox::kOnDeviceTranslation;
+   }
+ #endif
+-#if BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   if (sandbox_string == kVideoCaptureSandbox) {
+     return Sandbox::kVideoCapture;
+   }
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION)
+   if (sandbox_string == kHardwareVideoDecodingSandbox) {
+     return Sandbox::kHardwareVideoDecoding;
diff --git a/chromium-wip/patches/patch-sandbox_policy_switches.cc b/chromium-wip/patches/patch-sandbox_policy_switches.cc
new file mode 100644
index 0000000000..b6b199da5d
--- /dev/null
+++ b/chromium-wip/patches/patch-sandbox_policy_switches.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- sandbox/policy/switches.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ sandbox/policy/switches.cc
+@@ -37,7 +37,9 @@ const char kGpuSandboxFailuresFatal[] = 
+ // Meant to be used as a browser-level switch for testing purposes only.
+ const char kNoSandbox[] = "no-sandbox";
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++const char kDisableUnveil[] = "disable-unveil";
++
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Instructs the zygote to launch without a sandbox. Processes forked from this
+ // type of zygote will apply their own custom sandboxes later.
+ const char kNoZygoteSandbox[] = "no-zygote-sandbox";
diff --git a/chromium-wip/patches/patch-sandbox_policy_switches.h b/chromium-wip/patches/patch-sandbox_policy_switches.h
new file mode 100644
index 0000000000..d3450ed214
--- /dev/null
+++ b/chromium-wip/patches/patch-sandbox_policy_switches.h
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- sandbox/policy/switches.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ sandbox/policy/switches.h
+@@ -23,7 +23,8 @@ SANDBOX_POLICY_EXPORT extern const char 
+ SANDBOX_POLICY_EXPORT extern const char kGpuSandboxAllowSysVShm[];
+ SANDBOX_POLICY_EXPORT extern const char kGpuSandboxFailuresFatal[];
+ SANDBOX_POLICY_EXPORT extern const char kNoSandbox[];
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++SANDBOX_POLICY_EXPORT extern const char kDisableUnveil[];
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ SANDBOX_POLICY_EXPORT extern const char kNoZygoteSandbox[];
+ #endif
+ #if BUILDFLAG(IS_WIN)
diff --git a/chromium-wip/patches/patch-services_audio_audio__sandbox__hook__linux.cc b/chromium-wip/patches/patch-services_audio_audio__sandbox__hook__linux.cc
new file mode 100644
index 0000000000..3decbc9490
--- /dev/null
+++ b/chromium-wip/patches/patch-services_audio_audio__sandbox__hook__linux.cc
@@ -0,0 +1,37 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/audio/audio_sandbox_hook_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/audio/audio_sandbox_hook_linux.cc
+@@ -147,6 +147,7 @@ void AddPulseAudioFilePermissions(
+ }
+ #endif
+ 
++#if !BUILDFLAG(IS_BSD)
+ std::vector<BrokerFilePermission> GetAudioFilePermissions() {
+   std::vector<BrokerFilePermission> permissions{
+       BrokerFilePermission::ReadOnly("/dev/urandom"),
+@@ -175,10 +176,12 @@ void LoadAudioLibraries() {
+     }
+   }
+ }
++#endif
+ 
+ }  // namespace
+ 
+ bool AudioPreSandboxHook(sandbox::policy::SandboxLinux::Options options) {
++#if !BUILDFLAG(IS_BSD)
+   LoadAudioLibraries();
+   auto* instance = sandbox::policy::SandboxLinux::GetInstance();
+   instance->StartBrokerProcess(MakeBrokerCommandSet({
+@@ -196,6 +199,7 @@ bool AudioPreSandboxHook(sandbox::policy
+   // TODO(crbug.com/40579955) enable namespace sandbox. Currently, if
+   // enabled, connect() on pulse native socket fails with ENOENT (called from
+   // pa_context_connect).
++#endif
+ 
+   return true;
+ }
diff --git a/chromium-wip/patches/patch-services_audio_audio__sandbox__hook__linux.h b/chromium-wip/patches/patch-services_audio_audio__sandbox__hook__linux.h
new file mode 100644
index 0000000000..eba392e452
--- /dev/null
+++ b/chromium-wip/patches/patch-services_audio_audio__sandbox__hook__linux.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/audio/audio_sandbox_hook_linux.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/audio/audio_sandbox_hook_linux.h
+@@ -5,7 +5,13 @@
+ #ifndef SERVICES_AUDIO_AUDIO_SANDBOX_HOOK_LINUX_H_
+ #define SERVICES_AUDIO_AUDIO_SANDBOX_HOOK_LINUX_H_
+ 
++#include "build/build_config.h"
++
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#else
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#endif
+ 
+ namespace audio {
+ 
diff --git a/chromium-wip/patches/patch-services_device_BUILD.gn b/chromium-wip/patches/patch-services_device_BUILD.gn
new file mode 100644
index 0000000000..4d09c012b4
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/device/BUILD.gn
+@@ -17,7 +17,7 @@ if (is_ios) {
+ }
+ 
+ is_serial_enabled_platform =
+-    is_win || ((is_linux || is_chromeos) && use_udev) || is_mac || is_android
++    is_win || ((!is_bsd && is_linux || is_chromeos) && use_udev) || is_mac || is_android
+ 
+ source_set("lib") {
+   # This should be visible only to embedders of the Device Service, and the
diff --git a/chromium-wip/patches/patch-services_device_geolocation_location__provider__manager.cc b/chromium-wip/patches/patch-services_device_geolocation_location__provider__manager.cc
new file mode 100644
index 0000000000..669e0598bb
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_geolocation_location__provider__manager.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/geolocation/location_provider_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/device/geolocation/location_provider_manager.cc
+@@ -91,7 +91,7 @@ LocationProviderManager::LocationProvide
+ #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS)
+   // On Android and iOS, default to using the platform location provider.
+   provider_manager_mode_ = kPlatformOnly;
+-#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // On Ash / Lacros / Linux, default to using the network location provider.
+   provider_manager_mode_ = kNetworkOnly;
+ #else
diff --git a/chromium-wip/patches/patch-services_device_hid_BUILD.gn b/chromium-wip/patches/patch-services_device_hid_BUILD.gn
new file mode 100644
index 0000000000..f6605d9410
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_hid_BUILD.gn
@@ -0,0 +1,43 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/hid/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/device/hid/BUILD.gn
+@@ -34,7 +34,33 @@ source_set("hid") {
+     "//services/device/public/mojom",
+   ]
+ 
+-  if ((is_linux || is_chromeos) && use_udev) {
++  if (is_openbsd) {
++    sources += [
++      "hid_connection_fido.cc",
++      "hid_connection_fido.h",
++      "hid_service_fido.cc",
++      "hid_service_fido.h",
++    ]
++    libs = ["fido2", "cbor", "usbhid", "crypto", "util"]
++  }
++
++  if (is_freebsd) {
++    sources += [
++      "hid_connection_freebsd.cc",
++      "hid_connection_freebsd.h",
++      "hid_service_freebsd.cc",
++      "hid_service_freebsd.h",
++    ]
++  }
++
++  if (is_netbsd) {
++    sources += [
++      "hid_service_netbsd.cc",
++      "hid_service_netbsd.h",
++    ]
++  }
++
++  if ((is_linux || is_chromeos) && !is_bsd && use_udev) {
+     sources += [
+       "hid_connection_linux.cc",
+       "hid_connection_linux.h",
diff --git a/chromium-wip/patches/patch-services_device_hid_hid__connection__fido.cc b/chromium-wip/patches/patch-services_device_hid_hid__connection__fido.cc
new file mode 100644
index 0000000000..d803b7bdb5
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_hid_hid__connection__fido.cc
@@ -0,0 +1,225 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/hid/hid_connection_fido.cc.orig	2025-08-12 17:48:59.525427845 +0000
++++ services/device/hid/hid_connection_fido.cc
+@@ -0,0 +1,216 @@
++// 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.
++
++#include "services/device/hid/hid_connection_fido.h"
++
++#include <errno.h>
++#include <sys/ioctl.h>
++
++#include <memory>
++#include <string>
++#include <utility>
++
++#include "base/files/file_descriptor_watcher_posix.h"
++#include "base/memory/ref_counted_memory.h"
++#include "base/posix/eintr_wrapper.h"
++#include "base/threading/scoped_blocking_call.h"
++#include "components/device_event_log/device_event_log.h"
++#include "services/device/hid/hid_service.h"
++
++namespace device {
++
++class HidConnectionFido::BlockingTaskRunnerHelper {
++ public:
++  BlockingTaskRunnerHelper(base::ScopedFD fd,
++                           scoped_refptr<HidDeviceInfo> device_info,
++                           base::WeakPtr<HidConnectionFido> connection)
++      : fd_(std::move(fd)),
++        connection_(connection),
++        origin_task_runner_(base::SequencedTaskRunner::GetCurrentDefault()) {
++    DETACH_FROM_SEQUENCE(sequence_checker_);
++    // Report buffers must always have room for the report ID.
++    report_buffer_size_ = device_info->max_input_report_size() + 1;
++    has_report_id_ = device_info->has_report_id();
++  }
++
++  BlockingTaskRunnerHelper(const BlockingTaskRunnerHelper&) = delete;
++  BlockingTaskRunnerHelper& operator=(const BlockingTaskRunnerHelper&) = delete;
++
++  ~BlockingTaskRunnerHelper() {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++  }
++
++  // Starts the FileDescriptorWatcher that reads input events from the device.
++  // Must be called on a thread that has a base::MessageLoopForIO.
++  void Start() {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++
++    file_watcher_ = base::FileDescriptorWatcher::WatchReadable(
++        fd_.get(), base::BindRepeating(
++                       &BlockingTaskRunnerHelper::OnFileCanReadWithoutBlocking,
++                       base::Unretained(this)));
++  }
++
++  void Write(scoped_refptr<base::RefCountedBytes> buffer,
++             WriteCallback callback) {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++    base::ScopedBlockingCall scoped_blocking_call(
++        FROM_HERE, base::BlockingType::MAY_BLOCK);
++
++    auto data = buffer->data();
++    size_t size = buffer->size();
++    // if report id is 0, it shouldn't be included
++    if (data[0] == 0) {
++      data++;
++      size--;
++    }
++
++    ssize_t result =
++        HANDLE_EINTR(write(fd_.get(), data, size));
++    if (result < 0) {
++      HID_PLOG(EVENT) << "Write failed";
++      origin_task_runner_->PostTask(FROM_HERE,
++                                    base::BindOnce(std::move(callback), false));
++    } else {
++      if (static_cast<size_t>(result) != size) {
++        HID_LOG(EVENT) << "Incomplete HID write: " << result
++                       << " != " << buffer->size();
++      }
++      origin_task_runner_->PostTask(FROM_HERE,
++                                    base::BindOnce(std::move(callback), true));
++    }
++  }
++
++  void GetFeatureReport(uint8_t report_id,
++                        scoped_refptr<base::RefCountedBytes> buffer,
++                        ReadCallback callback) {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++    base::ScopedBlockingCall scoped_blocking_call(
++        FROM_HERE, base::BlockingType::MAY_BLOCK);
++    HID_PLOG(EVENT) << "GendFeatureReport not implemented on OpenBSD";
++    origin_task_runner_->PostTask(
++        FROM_HERE, base::BindOnce(std::move(callback), false, nullptr, 0));
++  }
++
++  void SendFeatureReport(scoped_refptr<base::RefCountedBytes> buffer,
++                         WriteCallback callback) {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++    base::ScopedBlockingCall scoped_blocking_call(
++        FROM_HERE, base::BlockingType::MAY_BLOCK);
++    HID_PLOG(EVENT) << "SendFeatureReport not implemented on OpenBSD";
++    origin_task_runner_->PostTask(FROM_HERE,
++                                    base::BindOnce(std::move(callback), false));
++  }
++
++ private:
++  void OnFileCanReadWithoutBlocking() {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++
++    auto buffer =
++        base::MakeRefCounted<base::RefCountedBytes>(report_buffer_size_);
++    uint8_t* data = buffer->as_vector().data();
++    size_t length = report_buffer_size_;
++    if (!has_report_id_) {
++      // Fido will not prefix the buffer with a report ID if report IDs are not
++      // used by the device. Prefix the buffer with 0.
++      *data++ = 0;
++      length--;
++    }
++
++    ssize_t bytes_read = HANDLE_EINTR(read(fd_.get(), data, length));
++    if (bytes_read < 0) {
++      if (errno != EAGAIN) {
++        HID_PLOG(EVENT) << "Read failed";
++        // This assumes that the error is unrecoverable and disables reading
++        // from the device until it has been re-opened.
++        // TODO(reillyg): Investigate starting and stopping the file descriptor
++        // watcher in response to pending read requests so that per-request
++        // errors can be returned to the client.
++        file_watcher_.reset();
++      }
++      return;
++    }
++    if (!has_report_id_) {
++      // Behave as if the byte prefixed above as the the report ID was read.
++      bytes_read++;
++    }
++
++    origin_task_runner_->PostTask(
++        FROM_HERE, base::BindOnce(&HidConnectionFido::ProcessInputReport,
++                                  connection_, buffer, bytes_read));
++  }
++
++  SEQUENCE_CHECKER(sequence_checker_);
++  base::ScopedFD fd_;
++  size_t report_buffer_size_;
++  bool has_report_id_;
++  base::WeakPtr<HidConnectionFido> connection_;
++  const scoped_refptr<base::SequencedTaskRunner> origin_task_runner_;
++  std::unique_ptr<base::FileDescriptorWatcher::Controller> file_watcher_;
++};
++
++HidConnectionFido::HidConnectionFido(
++    scoped_refptr<HidDeviceInfo> device_info,
++    base::ScopedFD fd,
++    scoped_refptr<base::SequencedTaskRunner> blocking_task_runner,
++    bool allow_protected_reports,
++    bool allow_fido_reports)
++    : HidConnection(device_info, allow_protected_reports, allow_fido_reports),
++      helper_(nullptr, base::OnTaskRunnerDeleter(blocking_task_runner)),
++      blocking_task_runner_(std::move(blocking_task_runner)) {
++  helper_.reset(new BlockingTaskRunnerHelper(std::move(fd), device_info,
++                                             weak_factory_.GetWeakPtr()));
++  blocking_task_runner_->PostTask(
++      FROM_HERE, base::BindOnce(&BlockingTaskRunnerHelper::Start,
++                                base::Unretained(helper_.get())));
++}
++
++HidConnectionFido::~HidConnectionFido() {}
++
++void HidConnectionFido::PlatformClose() {
++  // By closing the device on the blocking task runner 1) the requirement that
++  // base::ScopedFD is destroyed on a thread where I/O is allowed is satisfied
++  // and 2) any tasks posted to this task runner that refer to this file will
++  // complete before it is closed.
++  helper_.reset();
++}
++
++void HidConnectionFido::PlatformWrite(
++    scoped_refptr<base::RefCountedBytes> buffer,
++    WriteCallback callback) {
++  // Fido expects the first byte of the buffer to always be a report ID so the
++  // buffer can be used directly.
++  blocking_task_runner_->PostTask(
++      FROM_HERE, base::BindOnce(&BlockingTaskRunnerHelper::Write,
++                                base::Unretained(helper_.get()), buffer,
++                                std::move(callback)));
++}
++
++void HidConnectionFido::PlatformGetFeatureReport(uint8_t report_id,
++                                                  ReadCallback callback) {
++  // The first byte of the destination buffer is the report ID being requested
++  // and is overwritten by the feature report.
++  DCHECK_GT(device_info()->max_feature_report_size(), 0u);
++  auto buffer = base::MakeRefCounted<base::RefCountedBytes>(
++      device_info()->max_feature_report_size() + 1);
++  buffer->as_vector().data()[0] = report_id;
++
++  blocking_task_runner_->PostTask(
++      FROM_HERE, base::BindOnce(&BlockingTaskRunnerHelper::GetFeatureReport,
++                                base::Unretained(helper_.get()), report_id,
++                                buffer, std::move(callback)));
++}
++
++void HidConnectionFido::PlatformSendFeatureReport(
++    scoped_refptr<base::RefCountedBytes> buffer,
++    WriteCallback callback) {
++  // Fido expects the first byte of the buffer to always be a report ID so the
++  // buffer can be used directly.
++  blocking_task_runner_->PostTask(
++      FROM_HERE, base::BindOnce(&BlockingTaskRunnerHelper::SendFeatureReport,
++                                base::Unretained(helper_.get()), buffer,
++                                std::move(callback)));
++}
++
++}  // namespace device
diff --git a/chromium-wip/patches/patch-services_device_hid_hid__connection__fido.h b/chromium-wip/patches/patch-services_device_hid_hid__connection__fido.h
new file mode 100644
index 0000000000..46ffb05265
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_hid_hid__connection__fido.h
@@ -0,0 +1,69 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/hid/hid_connection_fido.h.orig	2025-08-12 17:48:59.525586412 +0000
++++ services/device/hid/hid_connection_fido.h
+@@ -0,0 +1,60 @@
++// 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.
++
++#ifndef SERVICES_DEVICE_HID_HID_CONNECTION_LINUX_H_
++#define SERVICES_DEVICE_HID_HID_CONNECTION_LINUX_H_
++
++#include <stddef.h>
++#include <stdint.h>
++
++#include "base/files/scoped_file.h"
++#include "base/memory/weak_ptr.h"
++#include "base/task/sequenced_task_runner.h"
++#include "services/device/hid/hid_connection.h"
++
++namespace base {
++class SequencedTaskRunner;
++}
++
++namespace device {
++
++class HidConnectionFido : public HidConnection {
++ public:
++  HidConnectionFido(
++      scoped_refptr<HidDeviceInfo> device_info,
++      base::ScopedFD fd,
++      scoped_refptr<base::SequencedTaskRunner> blocking_task_runner,
++      bool allow_protected_reports,
++      bool allow_fido_reports);
++  HidConnectionFido(HidConnectionFido&) = delete;
++  HidConnectionFido& operator=(HidConnectionFido&) = delete;
++
++ private:
++  friend class base::RefCountedThreadSafe<HidConnectionFido>;
++  class BlockingTaskRunnerHelper;
++
++  ~HidConnectionFido() override;
++
++  // HidConnection implementation.
++  void PlatformClose() override;
++  void PlatformWrite(scoped_refptr<base::RefCountedBytes> buffer,
++                     WriteCallback callback) override;
++  void PlatformGetFeatureReport(uint8_t report_id,
++                                ReadCallback callback) override;
++  void PlatformSendFeatureReport(scoped_refptr<base::RefCountedBytes> buffer,
++                                 WriteCallback callback) override;
++
++  // |helper_| lives on the sequence to which |blocking_task_runner_| posts
++  // tasks so all calls must be posted there including this object's
++  // destruction.
++  std::unique_ptr<BlockingTaskRunnerHelper, base::OnTaskRunnerDeleter> helper_;
++
++  const scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
++
++  base::WeakPtrFactory<HidConnectionFido> weak_factory_{this};
++};
++
++}  // namespace device
++
++#endif  // SERVICES_DEVICE_HID_HID_CONNECTION_LINUX_H_
diff --git a/chromium-wip/patches/patch-services_device_hid_hid__connection__freebsd.cc b/chromium-wip/patches/patch-services_device_hid_hid__connection__freebsd.cc
new file mode 100644
index 0000000000..d88717d298
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_hid_hid__connection__freebsd.cc
@@ -0,0 +1,249 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/hid/hid_connection_freebsd.cc.orig	2025-08-12 17:48:59.525719570 +0000
++++ services/device/hid/hid_connection_freebsd.cc
+@@ -0,0 +1,240 @@
++// Copyright (c) 2014 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.
++
++#include "services/device/hid/hid_connection_freebsd.h"
++
++#include <dev/usb/usbhid.h>
++#include <dev/usb/usb_ioctl.h>
++
++#include "base/files/file_descriptor_watcher_posix.h"
++#include "base/location.h"
++#include "base/numerics/safe_math.h"
++#include "base/posix/eintr_wrapper.h"
++#include "base/strings/stringprintf.h"
++#include "base/task/single_thread_task_runner.h"
++#include "base/threading/scoped_blocking_call.h"
++#include "base/threading/thread_restrictions.h"
++#include "components/device_event_log/device_event_log.h"
++#include "services/device/hid/hid_service.h"
++
++namespace device {
++
++class HidConnectionFreeBSD::BlockingTaskRunnerHelper {
++ public:
++  BlockingTaskRunnerHelper(base::ScopedFD fd,
++                     scoped_refptr<HidDeviceInfo> device_info,
++                     base::WeakPtr<HidConnectionFreeBSD> connection)
++      : fd_(std::move(fd)),
++        connection_(connection),
++	origin_task_runner_(base::SequencedTaskRunner::GetCurrentDefault()) {
++    DETACH_FROM_SEQUENCE(sequence_checker_);
++    // Report buffers must always have room for the report ID.
++    report_buffer_size_ = device_info->max_input_report_size() + 1;
++    has_report_id_ = device_info->has_report_id();
++  }
++
++  BlockingTaskRunnerHelper(const BlockingTaskRunnerHelper&) = delete;
++  BlockingTaskRunnerHelper& operator=(const BlockingTaskRunnerHelper&) = delete;
++
++  ~BlockingTaskRunnerHelper() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); }
++
++  // Starts the FileDescriptorWatcher that reads input events from the device.
++  // Must be called on a thread that has a base::MessageLoopForIO.
++  void Start() {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++    base::AssertBlockingAllowed();
++
++    file_watcher_ = base::FileDescriptorWatcher::WatchReadable(
++        fd_.get(), base::BindRepeating(&BlockingTaskRunnerHelper::OnFileCanReadWithoutBlocking,
++                                       base::Unretained(this)));
++  }
++
++  void Write(scoped_refptr<base::RefCountedBytes> buffer,
++             WriteCallback callback) {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++    base::ScopedBlockingCall scoped_blocking_call(
++        FROM_HERE, base::BlockingType::MAY_BLOCK);
++
++    auto data = buffer->as_vector().data();
++    size_t size = buffer->size();
++    // if report id is 0, it shouldn't be included
++    if (data[0] == 0) {
++      data++;
++      size--;
++    }
++
++    ssize_t result = HANDLE_EINTR(write(fd_.get(), data, size));
++    if (result < 0) {
++      HID_PLOG(EVENT) << "Write failed";
++      origin_task_runner_->PostTask(FROM_HERE, base::BindOnce(std::move(callback), false));
++    } else {
++      if (static_cast<size_t>(result) != size)
++        HID_LOG(EVENT) << "Incomplete HID write: " << result << " != " << size;
++      origin_task_runner_->PostTask(FROM_HERE, base::BindOnce(std::move(callback), true));
++    }
++  }
++
++  void GetFeatureReport(uint8_t report_id,
++                        scoped_refptr<base::RefCountedBytes> buffer,
++                        ReadCallback callback) {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++    base::ScopedBlockingCall scoped_blocking_call(
++        FROM_HERE, base::BlockingType::MAY_BLOCK);
++    struct usb_gen_descriptor ugd;
++    ugd.ugd_report_type = UHID_FEATURE_REPORT;
++    ugd.ugd_data = buffer->as_vector().data();
++    ugd.ugd_maxlen = buffer->size();
++    int result = HANDLE_EINTR(
++        ioctl(fd_.get(), USB_GET_REPORT, &ugd));
++    if (result < 0) {
++      HID_PLOG(EVENT) << "Failed to get feature report";
++      origin_task_runner_->PostTask(FROM_HERE,
++                                    base::BindOnce(std::move(callback), false, nullptr, 0));
++    } else if (result == 0) {
++      HID_LOG(EVENT) << "Get feature result too short.";
++      origin_task_runner_->PostTask(FROM_HERE,
++                                    base::BindOnce(std::move(callback), false, nullptr, 0));
++    } else {
++      origin_task_runner_->PostTask(FROM_HERE,
++                                    base::BindOnce(std::move(callback), true, buffer, result));
++    }
++  }
++
++  void SendFeatureReport(scoped_refptr<base::RefCountedBytes> buffer,
++                         WriteCallback callback) {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++    struct usb_gen_descriptor ugd;
++    ugd.ugd_report_type = UHID_FEATURE_REPORT;
++    ugd.ugd_data = buffer->as_vector().data();
++    ugd.ugd_maxlen = buffer->size();
++    // FreeBSD does not require report id if it's not used
++    if (buffer->data()[0] == 0) {
++      ugd.ugd_data = buffer->as_vector().data() + 1;
++      ugd.ugd_maxlen = buffer->size() - 1;
++    } else {
++      ugd.ugd_data = buffer->as_vector().data();
++      ugd.ugd_maxlen = buffer->size();
++    }
++    int result = HANDLE_EINTR(
++        ioctl(fd_.get(), USB_SET_REPORT, &ugd));
++    if (result < 0) {
++      HID_PLOG(EVENT) << "Failed to send feature report";
++      origin_task_runner_->PostTask(FROM_HERE,
++                                    base::BindOnce(std::move(callback), false));
++    } else {
++      origin_task_runner_->PostTask(FROM_HERE,
++                                    base::BindOnce(std::move(callback), true));
++    }
++  }
++
++ private:
++  void OnFileCanReadWithoutBlocking() {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++
++    scoped_refptr<base::RefCountedBytes> buffer(new base::RefCountedBytes(report_buffer_size_));
++    unsigned char* data = buffer->as_vector().data();
++    size_t length = report_buffer_size_;
++    if (!has_report_id_) {
++      // FreeBSD will not prefix the buffer with a report ID if report IDs are not
++      // used by the device. Prefix the buffer with 0.
++      *data++ = 0;
++      length--;
++    }
++
++    ssize_t bytes_read = HANDLE_EINTR(read(fd_.get(), data, length));
++    if (bytes_read < 0) {
++      if (errno != EAGAIN) {
++        HID_PLOG(EVENT) << "Read failed";
++        // This assumes that the error is unrecoverable and disables reading
++        // from the device until it has been re-opened.
++        // TODO(reillyg): Investigate starting and stopping the file descriptor
++        // watcher in response to pending read requests so that per-request
++        // errors can be returned to the client.
++        file_watcher_.reset();
++      }
++      return;
++    }
++    if (!has_report_id_) {
++      // Behave as if the byte prefixed above as the the report ID was read.
++      bytes_read++;
++    }
++
++    origin_task_runner_->PostTask(
++        FROM_HERE, base::BindOnce(&HidConnectionFreeBSD::ProcessInputReport,
++                              connection_, buffer, bytes_read));
++  }
++
++  SEQUENCE_CHECKER(sequence_checker_);
++  base::ScopedFD fd_;
++  size_t report_buffer_size_;
++  bool has_report_id_;
++  base::WeakPtr<HidConnectionFreeBSD> connection_;
++  const scoped_refptr<base::SequencedTaskRunner> origin_task_runner_;
++  std::unique_ptr<base::FileDescriptorWatcher::Controller> file_watcher_;
++};
++
++HidConnectionFreeBSD::HidConnectionFreeBSD(
++    scoped_refptr<HidDeviceInfo> device_info,
++    base::ScopedFD fd,
++    scoped_refptr<base::SequencedTaskRunner> blocking_task_runner,
++    bool allow_protected_reports,
++    bool allow_fido_reports)
++    : HidConnection(device_info, allow_protected_reports, allow_fido_reports),
++      helper_(nullptr, base::OnTaskRunnerDeleter(blocking_task_runner)),
++      blocking_task_runner_(std::move(blocking_task_runner)) {
++  helper_.reset(new BlockingTaskRunnerHelper(std::move(fd), device_info,
++                                                 weak_factory_.GetWeakPtr()));
++  blocking_task_runner_->PostTask(
++      FROM_HERE, base::BindOnce(&BlockingTaskRunnerHelper::Start,
++                                base::Unretained(helper_.get())));
++}
++
++HidConnectionFreeBSD::~HidConnectionFreeBSD() {}
++
++void HidConnectionFreeBSD::PlatformClose() {
++  // By closing the device on the blocking task runner 1) the requirement that
++  // base::ScopedFD is destroyed on a thread where I/O is allowed is satisfied
++  // and 2) any tasks posted to this task runner that refer to this file will
++  // complete before it is closed.
++  blocking_task_runner_->DeleteSoon(FROM_HERE, helper_.release());
++}
++
++void HidConnectionFreeBSD::PlatformWrite(scoped_refptr<base::RefCountedBytes> buffer,
++                                     WriteCallback callback) {
++
++  blocking_task_runner_->PostTask(
++      FROM_HERE,
++      base::BindOnce(&BlockingTaskRunnerHelper::Write, base::Unretained(helper_.get()),
++                 buffer, std::move(callback)));
++}
++
++void HidConnectionFreeBSD::PlatformGetFeatureReport(uint8_t report_id,
++                                                ReadCallback callback) {
++  // The first byte of the destination buffer is the report ID being requested
++  // and is overwritten by the feature report.
++  DCHECK_GT(device_info()->max_feature_report_size(), 0u);
++  scoped_refptr<base::RefCountedBytes> buffer(
++      new base::RefCountedBytes(device_info()->max_feature_report_size() + 1));
++  if (report_id != 0)
++    buffer->as_vector().data()[0] = report_id;
++
++  blocking_task_runner_->PostTask(
++      FROM_HERE,
++      base::BindOnce(&BlockingTaskRunnerHelper::GetFeatureReport,
++                 base::Unretained(helper_.get()), report_id,
++                 buffer, std::move(callback)));
++}
++
++void HidConnectionFreeBSD::PlatformSendFeatureReport(
++    scoped_refptr<base::RefCountedBytes> buffer,
++    WriteCallback callback) {
++  base::ScopedBlockingCall scoped_blocking_call(
++      FROM_HERE, base::BlockingType::MAY_BLOCK);
++  blocking_task_runner_->PostTask(
++      FROM_HERE,
++      base::BindOnce(&BlockingTaskRunnerHelper::SendFeatureReport,
++                 base::Unretained(helper_.get()), buffer, std::move(callback)));
++}
++
++}  // namespace device
diff --git a/chromium-wip/patches/patch-services_device_hid_hid__connection__freebsd.h b/chromium-wip/patches/patch-services_device_hid_hid__connection__freebsd.h
new file mode 100644
index 0000000000..3485b022f2
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_hid_hid__connection__freebsd.h
@@ -0,0 +1,76 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/hid/hid_connection_freebsd.h.orig	2025-08-12 17:48:59.525878979 +0000
++++ services/device/hid/hid_connection_freebsd.h
+@@ -0,0 +1,67 @@
++// Copyright (c) 2014 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.
++
++#ifndef DEVICE_HID_HID_CONNECTION_FREEBSD_H_
++#define DEVICE_HID_HID_CONNECTION_FREEBSD_H_
++
++#include <stddef.h>
++#include <stdint.h>
++
++#include "base/files/scoped_file.h"
++#include "base/memory/weak_ptr.h"
++#include "base/memory/ref_counted_memory.h"
++#include "base/task/sequenced_task_runner.h"
++#include "services/device/hid/hid_connection.h"
++
++namespace base {
++class SequencedTaskRunner;
++}
++
++namespace net {
++class IOBuffer;
++}
++
++namespace device {
++
++class HidConnectionFreeBSD : public HidConnection {
++ public:
++  HidConnectionFreeBSD(
++      scoped_refptr<HidDeviceInfo> device_info,
++      base::ScopedFD fd,
++      scoped_refptr<base::SequencedTaskRunner> blocking_task_runner,
++      bool allow_protected_reports,
++      bool allow_fido_reports);
++
++ private:
++  friend class base::RefCountedThreadSafe<HidConnectionFreeBSD>;
++  class BlockingTaskRunnerHelper;
++
++  HidConnectionFreeBSD(const HidConnectionFreeBSD&) = delete;
++  HidConnectionFreeBSD& operator=(const HidConnectionFreeBSD&) = delete;
++
++  ~HidConnectionFreeBSD() override;
++
++  // HidConnection implementation.
++  void PlatformClose() override;
++  void PlatformWrite(scoped_refptr<base::RefCountedBytes> buffer,
++                     WriteCallback callback) override;
++  void PlatformGetFeatureReport(uint8_t report_id,
++                                ReadCallback callback) override;
++  void PlatformSendFeatureReport(scoped_refptr<base::RefCountedBytes> buffer,
++                                 WriteCallback callback) override;
++
++  // |helper_| lives on the sequence to which |blocking_task_runner_| posts
++  // tasks so all calls must be posted there including this object's
++  // destruction.
++  std::unique_ptr<BlockingTaskRunnerHelper, base::OnTaskRunnerDeleter> helper_;
++
++  const scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
++  const scoped_refptr<base::SequencedTaskRunner> task_runner_;
++
++  base::WeakPtrFactory<HidConnectionFreeBSD> weak_factory_{this};
++};
++
++}  // namespace device
++
++#endif  // DEVICE_HID_HID_CONNECTION_FREEBSD_H_
diff --git a/chromium-wip/patches/patch-services_device_hid_hid__service.cc b/chromium-wip/patches/patch-services_device_hid_hid__service.cc
new file mode 100644
index 0000000000..50d2e30710
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_hid_hid__service.cc
@@ -0,0 +1,46 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/hid/hid_service.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/device/hid/hid_service.cc
+@@ -20,12 +20,18 @@
+ 
+ #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_UDEV)
+ #include "services/device/hid/hid_service_linux.h"
++#elif BUILDFLAG(IS_OPENBSD)
++#include "services/device/hid/hid_service_fido.h"
++#elif BUILDFLAG(IS_FREEBSD)
++#include "services/device/hid/hid_service_freebsd.h"
+ #elif BUILDFLAG(IS_MAC)
+ #include "services/device/hid/hid_service_mac.h"
+ #elif BUILDFLAG(IS_WIN)
+ #include "services/device/hid/hid_service_win.h"
+ #elif BUILDFLAG(IS_FUCHSIA)
+ #include "services/device/hid/hid_service_fuchsia.h"
++#elif BUILDFLAG(IS_NETBSD)
++#include "services/device/hid/hid_service_netbsd.h"
+ #endif
+ 
+ namespace device {
+@@ -68,12 +74,18 @@ constexpr base::TaskTraits HidService::k
+ std::unique_ptr<HidService> HidService::Create() {
+ #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_UDEV)
+   return std::make_unique<HidServiceLinux>();
++#elif BUILDFLAG(IS_OPENBSD)
++  return std::make_unique<HidServiceFido>();
++#elif BUILDFLAG(IS_FREEBSD)
++  return std::make_unique<HidServiceFreeBSD>();
+ #elif BUILDFLAG(IS_MAC)
+   return std::make_unique<HidServiceMac>();
+ #elif BUILDFLAG(IS_WIN)
+   return std::make_unique<HidServiceWin>();
+ #elif BUILDFLAG(IS_FUCHSIA)
+   return std::make_unique<HidServiceFuchsia>();
++#elif BUILDFLAG(IS_NETBSD)
++  return std::make_unique<HidServiceNetBSD>();
+ #else
+   return nullptr;
+ #endif
diff --git a/chromium-wip/patches/patch-services_device_hid_hid__service__fido.cc b/chromium-wip/patches/patch-services_device_hid_hid__service__fido.cc
new file mode 100644
index 0000000000..d23cddc5c6
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_hid_hid__service__fido.cc
@@ -0,0 +1,405 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/hid/hid_service_fido.cc.orig	2025-08-12 17:48:59.526146187 +0000
++++ services/device/hid/hid_service_fido.cc
+@@ -0,0 +1,396 @@
++// 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.
++
++#include "services/device/hid/hid_service_fido.h"
++
++#include <fcntl.h>
++#include <poll.h>
++#include <stdint.h>
++
++#include <dlfcn.h>
++#include <fido.h>
++
++#include <limits>
++#include <memory>
++#include <string>
++#include <utility>
++
++#include "base/files/file.h"
++#include "base/files/file_path.h"
++#include "base/files/file_util.h"
++#include "base/files/scoped_file.h"
++#include "base/location.h"
++#include "base/sequence_checker.h"
++#include "base/strings/string_number_conversions.h"
++#include "base/strings/string_split.h"
++#include "base/strings/string_util.h"
++#include "base/task/sequenced_task_runner.h"
++#include "base/task/thread_pool.h"
++#include "base/threading/scoped_blocking_call.h"
++#include "build/build_config.h"
++#include "build/chromeos_buildflags.h"
++#include "components/device_event_log/device_event_log.h"
++#include "device/udev_linux/scoped_udev.h"
++#include "device/udev_linux/udev_watcher.h"
++#include "services/device/hid/hid_connection_fido.h"
++
++namespace device {
++
++namespace {
++
++bool terrible_ping_kludge(int fd, const std::string &path) {
++  u_char data[256];
++  int i, n;
++  struct pollfd pfd;
++
++  for (i = 0; i < 4; i++) {
++    memset(data, 0, sizeof(data));
++    /* broadcast channel ID */
++    data[1] = 0xff;
++    data[2] = 0xff;
++    data[3] = 0xff;
++    data[4] = 0xff;
++    /* Ping command */
++    data[5] = 0x81;
++    /* One byte ping only, Vasili */
++    data[6] = 0;   
++    data[7] = 1;   
++    HID_LOG(EVENT) << "send ping " << i << " " << path;
++    if (write(fd, data, 64) == -1) {
++      HID_PLOG(ERROR) << "write " << path;
++      return false;
++    }
++    HID_LOG(EVENT) << "wait reply " << path;
++    memset(&pfd, 0, sizeof(pfd));
++    pfd.fd = fd; 
++    pfd.events = POLLIN;
++    if ((n = poll(&pfd, 1, 100)) == -1) {
++      HID_PLOG(EVENT) << "poll " << path;
++      return false;
++    } else if (n == 0) {
++      HID_LOG(EVENT) << "timed out " << path;
++      continue;
++    }
++    if (read(fd, data, 64) == -1) {  
++      HID_PLOG(ERROR) << "read " << path;
++      return false;
++    }
++    /*
++     * Ping isn't always supported on the broadcast channel,
++     * so we might get an error, but we don't care - we're
++     * synched now.
++     */
++    HID_LOG(EVENT) << "got reply " << path;
++    return true;
++  }
++  HID_LOG(ERROR) << "no response " << path;
++  return false;
++}
++
++// HID report descriptor for U2F interface. Copied from:
++// https://chromium.googlesource.com/chromiumos/platform2/+/c6c7e4e54fce11932fedaa3ea10236bf75d85a2b%5E%21/u2fd/u2fhid.cc
++// Apparently Chromium wants to see these bytes, but OpenBSD fido(4)
++// devices prohibit USB_GET_REPORT_DESC ioctl that could be used to
++// get the bytes from the USB device.
++constexpr uint8_t kU2fReportDesc[] = {
++    0x06, 0xD0, 0xF1, /* Usage Page (FIDO Alliance), FIDO_USAGE_PAGE */
++    0x09, 0x01,       /* Usage (U2F HID Auth. Device) FIDO_USAGE_U2FHID */
++    0xA1, 0x01,       /* Collection (Application), HID_APPLICATION */
++    0x09, 0x20,       /*  Usage (Input Report Data), FIDO_USAGE_DATA_IN */
++    0x15, 0x00,       /*  Logical Minimum (0) */
++    0x26, 0xFF, 0x00, /*  Logical Maximum (255) */
++    0x75, 0x08,       /*  Report Size (8) */
++    0x95, 0x40,       /*  Report Count (64), HID_INPUT_REPORT_BYTES */
++    0x81, 0x02,       /*  Input (Data, Var, Abs), Usage */
++    0x09, 0x21,       /*  Usage (Output Report Data), FIDO_USAGE_DATA_OUT */
++    0x15, 0x00,       /*  Logical Minimum (0) */
++    0x26, 0xFF, 0x00, /*  Logical Maximum (255) */
++    0x75, 0x08,       /*  Report Size (8) */
++    0x95, 0x40,       /*  Report Count (64), HID_OUTPUT_REPORT_BYTES */
++    0x91, 0x02,       /*  Output (Data, Var, Abs), Usage */
++    0xC0              /* End Collection */
++};
++
++}  // namespace
++
++struct HidServiceFido::ConnectParams {
++  ConnectParams(scoped_refptr<HidDeviceInfo> device_info,
++                bool allow_protected_reports,
++                bool allow_fido_reports,
++                ConnectCallback callback)
++      : device_info(std::move(device_info)),
++        allow_protected_reports(allow_protected_reports),
++        allow_fido_reports(allow_fido_reports),
++        callback(std::move(callback)),
++	task_runner(base::SequencedTaskRunner::GetCurrentDefault()),
++        blocking_task_runner(
++            base::ThreadPool::CreateSequencedTaskRunner(kBlockingTaskTraits)) {}
++  ~ConnectParams() {}
++
++  scoped_refptr<HidDeviceInfo> device_info;
++  bool allow_protected_reports;
++  bool allow_fido_reports;
++  ConnectCallback callback;
++  scoped_refptr<base::SequencedTaskRunner> task_runner;
++  scoped_refptr<base::SequencedTaskRunner> blocking_task_runner;
++  base::ScopedFD fd;
++};
++
++class HidServiceFido::BlockingTaskRunnerHelper : public UdevWatcher::Observer {
++ public:
++  BlockingTaskRunnerHelper(base::WeakPtr<HidServiceFido> service)
++      : service_(std::move(service)),
++        task_runner_(base::SequencedTaskRunner::GetCurrentDefault()) {
++    DETACH_FROM_SEQUENCE(sequence_checker_);
++  }
++
++  BlockingTaskRunnerHelper(const BlockingTaskRunnerHelper&) = delete;
++  BlockingTaskRunnerHelper& operator=(const BlockingTaskRunnerHelper&) = delete;
++
++  ~BlockingTaskRunnerHelper() override {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++  }
++
++  void Start() {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++
++    void *library = dlopen("libudev.so", RTLD_NOW | RTLD_LOCAL);
++    if (library) {
++      dlclose(library);
++      watcher_ = UdevWatcher::StartWatching(this);
++      watcher_->EnumerateExistingDevices();
++    } else {
++      HID_LOG(ERROR) << "No udev available, failling back to single enumeration";
++      WalkFidoDevices(nullptr);
++    }
++
++    task_runner_->PostTask(
++        FROM_HERE,
++        base::BindOnce(&HidServiceFido::FirstEnumerationComplete, service_));
++  }
++
++ private:
++  void WalkFidoDevices(const char *name) {
++    fido_dev_info_t *devlist = NULL;
++    fido_dev_t *dev = NULL;
++    size_t devlist_len = 0, i;
++    const char *path;
++    int r;
++    const int MAX_FIDO_DEVICES = 256;
++
++    if ((devlist = fido_dev_info_new(MAX_FIDO_DEVICES)) == NULL) {
++      HID_LOG(ERROR) << "fido_dev_info_new failed";
++      goto out;
++    }
++    if ((r = fido_dev_info_manifest(devlist, MAX_FIDO_DEVICES, &devlist_len)) !=
++        FIDO_OK) {
++      HID_LOG(ERROR) << "fido_dev_info_manifest: " << fido_strerr(r);
++      goto out;
++    }
++
++    HID_LOG(EVENT) << "fido_dev_info_manifest found " << devlist_len
++                   << " device(s)";
++
++    for (i = 0; i < devlist_len; i++) {
++      const fido_dev_info_t *di = fido_dev_info_ptr(devlist, i);
++
++      if (di == NULL) {
++        HID_LOG(ERROR) << "fido_dev_info_ptr " << i << " failed";
++        continue;
++      }
++
++      if ((path = fido_dev_info_path(di)) == NULL) {
++        HID_LOG(ERROR) << "fido_dev_info_path " << i << " failed";
++        continue;
++      }
++
++      if (name != nullptr && !strcmp(path, name)) {
++        HID_LOG(EVENT) << "hotplug device " << i << ": " << path;
++        OnFidoDeviceAdded(di);
++        break;
++      }
++
++      HID_LOG(EVENT) << "trying device " << i << ": " << path;
++      if ((dev = fido_dev_new()) == NULL) {
++        HID_LOG(ERROR) << "fido_dev_new failed";
++        continue;
++      }
++
++      if ((r = fido_dev_open(dev, path)) != FIDO_OK) {
++        HID_LOG(ERROR) << "fido_dev_open failed " << path;
++        fido_dev_free(&dev);
++        continue;
++      }
++
++      fido_dev_close(dev);
++      fido_dev_free(&dev);
++
++      OnFidoDeviceAdded(di);
++    }
++  out:
++    if (devlist != NULL)
++      fido_dev_info_free(&devlist, MAX_FIDO_DEVICES);
++  }
++
++  void OnFidoDeviceAdded(const fido_dev_info_t *di) {
++    auto null_as_empty = [](const char *r) -> std::string {
++      return (r != nullptr) ? r : "";
++    };
++    std::string device_node(null_as_empty(fido_dev_info_path(di)));  
++    std::vector<uint8_t> report_descriptor(
++        kU2fReportDesc, kU2fReportDesc + sizeof(kU2fReportDesc));
++
++    auto device_info = base::MakeRefCounted<HidDeviceInfo>(
++        device_node, /*physical_device_id*/"", fido_dev_info_vendor(di),
++        fido_dev_info_product(di), null_as_empty(fido_dev_info_product_string(di)),
++        null_as_empty(fido_dev_info_manufacturer_string(di)),
++	device::mojom::HidBusType::kHIDBusTypeUSB, report_descriptor,
++        device_node);
++
++    task_runner_->PostTask(
++        FROM_HERE,
++        base::BindOnce(&HidServiceFido::AddDevice, service_, device_info));
++  }
++
++  // UdevWatcher::Observer
++  void OnDeviceAdded(ScopedUdevDevicePtr device) override {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++    base::ScopedBlockingCall scoped_blocking_call(
++        FROM_HERE, base::BlockingType::MAY_BLOCK);
++
++    const char* subsystem = udev_device_get_subsystem(device.get());
++    if (!subsystem || strcmp(subsystem, "fido") != 0)
++      return;
++
++    const char* device_path = udev_device_get_syspath(device.get());
++    if (!device_path)
++      return;
++
++    WalkFidoDevices(device_path);
++  }
++
++  void OnDeviceRemoved(ScopedUdevDevicePtr device) override {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++    base::ScopedBlockingCall scoped_blocking_call(
++        FROM_HERE, base::BlockingType::MAY_BLOCK);
++
++    const char* device_path = udev_device_get_syspath(device.get());
++    if (device_path) {
++      task_runner_->PostTask(
++          FROM_HERE, base::BindOnce(&HidServiceFido::RemoveDevice, service_,
++                                    std::string(device_path)));
++    }
++  }
++
++  void OnDeviceChanged(ScopedUdevDevicePtr) override {}
++
++  SEQUENCE_CHECKER(sequence_checker_);
++  std::unique_ptr<UdevWatcher> watcher_;
++
++  // This weak pointer is only valid when checked on this task runner.
++  base::WeakPtr<HidServiceFido> service_;
++  scoped_refptr<base::SequencedTaskRunner> task_runner_;
++};
++
++HidServiceFido::HidServiceFido()
++    : blocking_task_runner_(
++          base::ThreadPool::CreateSequencedTaskRunner(kBlockingTaskTraits)),
++      helper_(nullptr, base::OnTaskRunnerDeleter(blocking_task_runner_)) {
++  // We need to properly initialize |blocking_task_helper_| here because we need
++  // |weak_factory_| to be created first.
++  helper_.reset(new BlockingTaskRunnerHelper(weak_factory_.GetWeakPtr()));
++  blocking_task_runner_->PostTask(
++      FROM_HERE, base::BindOnce(&BlockingTaskRunnerHelper::Start,
++                                base::Unretained(helper_.get())));
++}
++
++HidServiceFido::~HidServiceFido() = default;
++
++base::WeakPtr<HidService> HidServiceFido::GetWeakPtr() {
++  return weak_factory_.GetWeakPtr();
++}
++
++void HidServiceFido::Connect(const std::string& device_guid,
++                              bool allow_protected_reports,
++                              bool allow_fido_reports,
++                              ConnectCallback callback) {
++  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++
++  const auto& map_entry = devices().find(device_guid);
++  if (map_entry == devices().end()) {
++    base::SequencedTaskRunner::GetCurrentDefault()->PostTask(
++        FROM_HERE, base::BindOnce(std::move(callback), nullptr));
++    return;
++  }
++  scoped_refptr<HidDeviceInfo> device_info = map_entry->second;
++
++  auto params =
++      std::make_unique<ConnectParams>(device_info, allow_protected_reports,
++                                      allow_fido_reports, std::move(callback));
++  scoped_refptr<base::SequencedTaskRunner> blocking_task_runner =
++      params->blocking_task_runner;
++  blocking_task_runner->PostTask(
++      FROM_HERE, base::BindOnce(&HidServiceFido::OpenOnBlockingThread,
++                                std::move(params)));
++}
++
++// static
++void HidServiceFido::OpenOnBlockingThread(
++    std::unique_ptr<ConnectParams> params) {
++  base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
++                                                base::BlockingType::MAY_BLOCK);
++  scoped_refptr<base::SequencedTaskRunner> task_runner = params->task_runner;
++
++  base::FilePath device_path(params->device_info->device_node());
++  base::File device_file;
++  int flags =
++      base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE;
++  device_file.Initialize(device_path, flags);
++  if (!device_file.IsValid()) {
++    base::File::Error file_error = device_file.error_details();
++
++    if (file_error == base::File::FILE_ERROR_ACCESS_DENIED) {
++      HID_LOG(EVENT)
++          << "Access denied opening device read-write, trying read-only.";
++      flags = base::File::FLAG_OPEN | base::File::FLAG_READ;
++      device_file.Initialize(device_path, flags);
++    }
++  }
++  if (!device_file.IsValid()) {
++    HID_LOG(EVENT) << "Failed to open '" << params->device_info->device_node()
++                   << "': "
++                   << base::File::ErrorToString(device_file.error_details());
++    task_runner->PostTask(FROM_HERE,
++                          base::BindOnce(std::move(params->callback), nullptr));
++    return;
++  }
++  if (!terrible_ping_kludge(device_file.GetPlatformFile(), params->device_info->device_node())) {
++    HID_LOG(EVENT) << "Failed to ping " << params->device_info->device_node();
++    task_runner->PostTask(FROM_HERE, base::BindOnce(std::move(params->callback), nullptr));
++    return;
++  }
++  params->fd.reset(device_file.TakePlatformFile());
++
++  task_runner->PostTask(FROM_HERE, base::BindOnce(&HidServiceFido::FinishOpen,
++                                                  std::move(params)));
++}
++
++// static
++void HidServiceFido::FinishOpen(std::unique_ptr<ConnectParams> params) {
++  DCHECK(params->fd.is_valid());
++
++  if (!base::SetNonBlocking(params->fd.get())) {
++    HID_PLOG(DEBUG) << "Failed to set the non-blocking flag on the device fd";
++    std::move(params->callback).Run(nullptr);
++    return;
++  }
++
++  std::move(params->callback)
++      .Run(base::MakeRefCounted<HidConnectionFido>(
++          std::move(params->device_info), std::move(params->fd),
++          std::move(params->blocking_task_runner),
++          params->allow_protected_reports, params->allow_fido_reports));
++}
++
++}  // namespace device
diff --git a/chromium-wip/patches/patch-services_device_hid_hid__service__fido.h b/chromium-wip/patches/patch-services_device_hid_hid__service__fido.h
new file mode 100644
index 0000000000..3db8e22fff
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_hid_hid__service__fido.h
@@ -0,0 +1,74 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/hid/hid_service_fido.h.orig	2025-08-12 17:48:59.526309694 +0000
++++ services/device/hid/hid_service_fido.h
+@@ -0,0 +1,65 @@
++// 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.
++
++#ifndef SERVICES_DEVICE_HID_HID_SERVICE_LINUX_H_
++#define SERVICES_DEVICE_HID_HID_SERVICE_LINUX_H_
++
++#include <memory>
++
++#include "base/compiler_specific.h"
++#include "base/files/scoped_file.h"
++#include "base/memory/weak_ptr.h"
++#include "base/task/sequenced_task_runner.h"
++#include "build/build_config.h"
++#include "build/chromeos_buildflags.h"
++#include "services/device/hid/hid_device_info.h"
++#include "services/device/hid/hid_service.h"
++
++namespace device {
++
++class HidServiceFido : public HidService {
++ public:
++  HidServiceFido();
++  HidServiceFido(HidServiceFido&) = delete;
++  HidServiceFido& operator=(HidServiceFido&) = delete;
++  ~HidServiceFido() override;
++
++  // HidService:
++  void Connect(const std::string& device_id,
++               bool allow_protected_reports,
++               bool allow_fido_reports,
++               ConnectCallback callback) override;
++  base::WeakPtr<HidService> GetWeakPtr() override;
++
++ private:
++  struct ConnectParams;
++  class BlockingTaskRunnerHelper;
++
++// These functions implement the process of locating, requesting access to and
++// opening a device. Because this operation crosses multiple threads these
++// functions are static and the necessary parameters are passed as a single
++// struct.
++#if BUILDFLAG(IS_CHROMEOS_ASH)
++  static void OnPathOpenComplete(std::unique_ptr<ConnectParams> params,
++                                 base::ScopedFD fd);
++  static void OnPathOpenError(const std::string& device_path,
++                              ConnectCallback callback,
++                              const std::string& error_name,
++                              const std::string& error_message);
++#else
++  static void OpenOnBlockingThread(std::unique_ptr<ConnectParams> params);
++#endif
++  static void FinishOpen(std::unique_ptr<ConnectParams> params);
++
++  const scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
++
++  // |helper_| lives on the sequence |blocking_task_runner_| posts to and holds
++  // a weak reference back to the service that owns it.
++  std::unique_ptr<BlockingTaskRunnerHelper, base::OnTaskRunnerDeleter> helper_;
++  base::WeakPtrFactory<HidServiceFido> weak_factory_{this};
++};
++
++}  // namespace device
++
++#endif  // SERVICES_DEVICE_HID_HID_SERVICE_LINUX_H_
diff --git a/chromium-wip/patches/patch-services_device_hid_hid__service__freebsd.cc b/chromium-wip/patches/patch-services_device_hid_hid__service__freebsd.cc
new file mode 100644
index 0000000000..3b8bdc2b41
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_hid_hid__service__freebsd.cc
@@ -0,0 +1,404 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/hid/hid_service_freebsd.cc.orig	2025-08-12 17:48:59.526443363 +0000
++++ services/device/hid/hid_service_freebsd.cc
+@@ -0,0 +1,395 @@
++// Copyright 2014 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.
++
++#include "services/device/hid/hid_service_freebsd.h"
++
++#include <dev/usb/usb_ioctl.h>
++#include <stdint.h>
++#include <sys/socket.h>
++#include <sys/un.h>
++
++#include <set>
++#include <string>
++#include <vector>
++
++#include "base/files/file_descriptor_watcher_posix.h"
++#include "base/files/file_enumerator.h"
++#include "base/files/file_util.h"
++#include "base/files/file.h"
++#include "base/location.h"
++#include "base/logging.h"
++#include "base/posix/eintr_wrapper.h"
++#include "base/stl_util.h"
++#include "base/strings/pattern.h"
++#include "base/strings/stringprintf.h"
++#include "base/strings/sys_string_conversions.h"
++#include "base/strings/string_util.h"
++#include "base/strings/string_split.h"
++#include "base/task/single_thread_task_runner.h"
++#include "base/task/thread_pool.h"
++#include "base/threading/scoped_blocking_call.h"
++#include "base/threading/thread_restrictions.h"
++#include "components/device_event_log/device_event_log.h"
++#include "services/device/hid/hid_connection_freebsd.h"
++
++const int kMaxPermissionChecks = 5;
++
++namespace device {
++
++struct HidServiceFreeBSD::ConnectParams {
++  ConnectParams(scoped_refptr<HidDeviceInfo> device_info,
++                bool allow_protected_reports,
++		bool allow_fido_reports,
++                ConnectCallback callback)
++      : device_info(std::move(device_info)),
++	allow_protected_reports(allow_protected_reports),
++	allow_fido_reports(allow_fido_reports),
++        callback(std::move(callback)),
++	task_runner(base::SequencedTaskRunner::GetCurrentDefault()),
++        blocking_task_runner(
++            base::ThreadPool::CreateSequencedTaskRunner(kBlockingTaskTraits)) {}
++  ~ConnectParams() {}
++
++  scoped_refptr<HidDeviceInfo> device_info;
++  bool allow_protected_reports;
++  bool allow_fido_reports;
++  ConnectCallback callback;
++  scoped_refptr<base::SequencedTaskRunner> task_runner;
++  scoped_refptr<base::SequencedTaskRunner> blocking_task_runner;
++  base::ScopedFD fd;
++};
++
++class HidServiceFreeBSD::BlockingTaskRunnerHelper {
++ public:
++  BlockingTaskRunnerHelper(base::WeakPtr<HidServiceFreeBSD> service)
++      : service_(std::move(service)),
++	task_runner_(base::SequencedTaskRunner::GetCurrentDefault()) {
++    DETACH_FROM_SEQUENCE(sequence_checker_);
++
++    timer_.reset(new base::RepeatingTimer());
++    devd_buffer_ = new net::IOBufferWithSize(1024);
++  }
++
++  BlockingTaskRunnerHelper(const BlockingTaskRunnerHelper&) = delete;
++  BlockingTaskRunnerHelper& operator=(const BlockingTaskRunnerHelper&) = delete;
++
++  ~BlockingTaskRunnerHelper() {
++  }
++
++  void Start() {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++
++    const base::FilePath kDevRoot("/dev");
++    const std::string kUHIDPattern("/dev/uhid*");
++
++    base::FileEnumerator enumerator(kDevRoot, false, base::FileEnumerator::FILES);
++    do {
++      const base::FilePath next_device_path(enumerator.Next());
++      const std::string next_device = next_device_path.value();
++      if (next_device.empty())
++        break;
++
++      if (base::MatchPattern(next_device, kUHIDPattern))
++        OnDeviceAdded(next_device.substr(5));
++    } while (true);
++
++    SetupDevdMonitor();
++
++    task_runner_->PostTask(
++        FROM_HERE,
++        base::BindOnce(&HidServiceFreeBSD::FirstEnumerationComplete, service_));
++  }
++
++  bool HaveReadWritePermissions(std::string device_id) {
++    std::string device_node = "/dev/" + device_id;
++    base::AssertBlockingAllowed();
++
++    base::FilePath device_path(device_node);
++    base::File device_file;
++    int flags =
++        base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE;
++    device_file.Initialize(device_path, flags);
++    if (!device_file.IsValid())
++      return false;
++
++    return true;
++  }
++
++  void OnDeviceAdded(std::string device_id) {
++    base::ScopedBlockingCall scoped_blocking_call(
++        FROM_HERE, base::BlockingType::MAY_BLOCK);
++    std::string device_node = "/dev/" + device_id;
++    uint16_t vendor_id = 0xffff;
++    uint16_t product_id = 0xffff;
++    std::string product_name = "";
++    std::string serial_number = "";
++
++    std::vector<uint8_t> report_descriptor;
++
++    base::AssertBlockingAllowed();
++
++    base::FilePath device_path(device_node);
++    base::File device_file;
++    int flags =
++        base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE;
++    device_file.Initialize(device_path, flags);
++    if (!device_file.IsValid()) {
++      HID_LOG(ERROR) << "Failed to open '" << device_node
++                     << "': "
++                     << base::File::ErrorToString(device_file.error_details());
++      return;
++    }
++
++    base::ScopedFD fd;
++    fd.reset(device_file.TakePlatformFile());
++
++    struct usb_gen_descriptor ugd;
++    ugd.ugd_data = NULL;
++    ugd.ugd_maxlen = 0xffff;
++    int result = HANDLE_EINTR(
++        ioctl(fd.get(), USB_GET_REPORT_DESC, &ugd));
++
++    if (result < 0) {
++      HID_LOG(ERROR) << "Failed to get report descriptor size";
++      return;
++    }
++
++    report_descriptor.resize(ugd.ugd_actlen);
++
++    ugd.ugd_data = report_descriptor.data();
++    ugd.ugd_maxlen = ugd.ugd_actlen;
++    result = HANDLE_EINTR(
++        ioctl(fd.get(), USB_GET_REPORT_DESC, &ugd));
++
++    if (result < 0) {
++      HID_LOG(ERROR) << "Failed to get report descriptor";
++      return;
++    }
++
++    scoped_refptr<HidDeviceInfo> device_info(new HidDeviceInfo(
++        device_id,
++        /*physical_device_id*/"",
++	vendor_id,
++	product_id,
++	product_name,
++	serial_number,
++        device::mojom::HidBusType::kHIDBusTypeUSB,
++        report_descriptor,
++	device_node));
++
++    task_runner_->PostTask(FROM_HERE, base::BindOnce(&HidServiceFreeBSD::AddDevice,
++                                                 service_, device_info));
++  }
++
++  void OnDeviceRemoved(std::string device_id) {
++    base::ScopedBlockingCall scoped_blocking_call(
++        FROM_HERE, base::BlockingType::MAY_BLOCK);
++    task_runner_->PostTask(
++        FROM_HERE, base::BindOnce(&HidServiceFreeBSD::RemoveDevice, service_,
++                                  device_id));
++  }
++
++ private:
++
++  void CheckPendingPermissionChange() {
++    base::AssertBlockingAllowed();
++    std::map<std::string, int>::iterator it;
++    for (it = permissions_checks_attempts_.begin(); it != permissions_checks_attempts_.end();) {
++      std::string device_name = it->first;
++      bool keep = true;
++      if (HaveReadWritePermissions(device_name)) {
++        OnDeviceAdded(device_name);
++        keep = false;
++      }
++      else if (it->second-- <= 0) {
++        HID_LOG(ERROR) << "Still don't have write permissions to '" << device_name
++                       << "' after " << kMaxPermissionChecks << " attempts";
++        keep = false;
++      }
++
++      if (keep)
++        ++it;
++      else
++        permissions_checks_attempts_.erase(it++);
++    }
++
++    if (permissions_checks_attempts_.empty())
++      timer_->Stop();
++  }
++
++  void SetupDevdMonitor() {
++    base::AssertBlockingAllowed();
++
++    int devd_fd = socket(AF_UNIX, SOCK_SEQPACKET, 0);
++    if (devd_fd < 0)
++      return;
++
++    struct sockaddr_un sa;
++
++    sa.sun_family = AF_UNIX;
++    strlcpy(sa.sun_path, "@VARBASE@/run/devd.seqpacket.pipe", sizeof(sa.sun_path));
++    if (connect(devd_fd, (struct sockaddr *) &sa, sizeof(sa)) < 0) {
++      close(devd_fd);
++      return;
++    } 
++
++    devd_fd_.reset(devd_fd);
++    file_watcher_ = base::FileDescriptorWatcher::WatchReadable(
++        devd_fd_.get(), base::BindRepeating(&BlockingTaskRunnerHelper::OnDevdMessageCanBeRead,
++                                            base::Unretained(this)));
++  }
++
++  void OnDevdMessageCanBeRead() {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++    ssize_t bytes_read = HANDLE_EINTR(recv(devd_fd_.get(), devd_buffer_->data(),
++                                      devd_buffer_->size() - 1, MSG_WAITALL));
++    if (bytes_read < 0) {
++      if (errno != EAGAIN) {
++        HID_LOG(ERROR) << "Read failed";
++        file_watcher_.reset();
++      }
++      return;
++    }
++
++    devd_buffer_->data()[bytes_read] = 0;
++    char *data = devd_buffer_->data();
++    // It may take some time for devd to change permissions
++    // on /dev/uhidX node. So do not fail immediately if
++    // open fail. Retry each second for kMaxPermissionChecks
++    // times before giving up entirely
++    if (base::StartsWith(data, "+uhid", base::CompareCase::SENSITIVE)) {
++      std::vector<std::string> parts = base::SplitString(
++        data, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
++      if (!parts.empty()) {
++        std::string device_name = parts[0].substr(1); // skip '+'
++        if (HaveReadWritePermissions(device_name))
++          OnDeviceAdded(parts[0].substr(1));
++        else {
++          // Do not re-add to checks
++          if (permissions_checks_attempts_.find(device_name) == permissions_checks_attempts_.end()) {
++            permissions_checks_attempts_.insert(std::pair<std::string, int>(device_name, kMaxPermissionChecks));
++            timer_->Start(FROM_HERE, base::Seconds(1),
++                          this, &BlockingTaskRunnerHelper::CheckPendingPermissionChange);
++          }
++        }
++      }
++    }
++
++    if (base::StartsWith(data, "-uhid", base::CompareCase::SENSITIVE)) {
++      std::vector<std::string> parts = base::SplitString(
++        data, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
++      if (!parts.empty()) {
++        std::string device_name = parts[0].substr(1); // skip '-'
++        auto it = permissions_checks_attempts_.find(device_name);
++        if (it != permissions_checks_attempts_.end()) {
++          permissions_checks_attempts_.erase(it);
++          if (permissions_checks_attempts_.empty())
++            timer_->Stop();
++        }
++        OnDeviceRemoved(parts[0].substr(1));
++      }
++    }
++  }
++
++  SEQUENCE_CHECKER(sequence_checker_);
++
++  // This weak pointer is only valid when checked on this task runner.
++  base::WeakPtr<HidServiceFreeBSD> service_;
++  scoped_refptr<base::SequencedTaskRunner> task_runner_;
++  std::unique_ptr<base::FileDescriptorWatcher::Controller> file_watcher_;
++  std::unique_ptr<base::RepeatingTimer> timer_;
++  base::ScopedFD devd_fd_;
++  scoped_refptr<net::IOBufferWithSize> devd_buffer_;
++  std::map<std::string, int> permissions_checks_attempts_;
++};
++
++HidServiceFreeBSD::HidServiceFreeBSD()
++    : blocking_task_runner_(
++          base::ThreadPool::CreateSequencedTaskRunner(kBlockingTaskTraits)),
++      helper_(nullptr, base::OnTaskRunnerDeleter(blocking_task_runner_)) {
++  helper_.reset(new BlockingTaskRunnerHelper(weak_factory_.GetWeakPtr()));
++  blocking_task_runner_->PostTask(
++      FROM_HERE,
++      base::BindOnce(&BlockingTaskRunnerHelper::Start, base::Unretained(helper_.get())));
++}
++
++HidServiceFreeBSD::~HidServiceFreeBSD() {
++  blocking_task_runner_->DeleteSoon(FROM_HERE, helper_.release());
++}
++
++base::WeakPtr<HidService> HidServiceFreeBSD::GetWeakPtr() {
++  return weak_factory_.GetWeakPtr();
++}
++
++// static
++void HidServiceFreeBSD::OpenOnBlockingThread(
++    std::unique_ptr<ConnectParams> params) {
++  base::ScopedBlockingCall scoped_blocking_call(
++      FROM_HERE, base::BlockingType::MAY_BLOCK);
++  scoped_refptr<base::SequencedTaskRunner> task_runner = params->task_runner;
++
++  base::FilePath device_path(params->device_info->device_node());
++  base::File device_file;
++  int flags =
++      base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE;
++  device_file.Initialize(device_path, flags);
++  if (!device_file.IsValid()) {
++    HID_LOG(EVENT) << "Failed to open '" << params->device_info->device_node()
++                   << "': "
++                   << base::File::ErrorToString(device_file.error_details());
++    task_runner->PostTask(FROM_HERE,
++		          base::BindOnce(std::move(params->callback), nullptr));
++    return;
++  }
++  params->fd.reset(device_file.TakePlatformFile());
++  task_runner->PostTask(FROM_HERE, base::BindOnce(&HidServiceFreeBSD::FinishOpen,
++			                          std::move(params)));
++}
++
++void HidServiceFreeBSD::Connect(const std::string& device_guid,
++                                bool allow_protected_reports,
++				bool allow_fido_reports,
++                                ConnectCallback callback) {
++  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++
++  const auto& map_entry = devices().find(device_guid);
++  if (map_entry == devices().end()) {
++    base::SequencedTaskRunner::GetCurrentDefault()->PostTask(
++        FROM_HERE, base::BindOnce(std::move(callback), nullptr));
++    return;
++  }
++
++  scoped_refptr<HidDeviceInfo> device_info = map_entry->second;
++
++  auto params = std::make_unique<ConnectParams>(device_info,
++                                                allow_protected_reports,
++						allow_fido_reports,
++						std::move(callback));
++  scoped_refptr<base::SequencedTaskRunner> blocking_task_runner =
++      params->blocking_task_runner;
++
++  blocking_task_runner->PostTask(
++      FROM_HERE, base::BindOnce(&HidServiceFreeBSD::OpenOnBlockingThread,
++                                std::move(params)));
++}
++
++// static
++void HidServiceFreeBSD::FinishOpen(std::unique_ptr<ConnectParams> params) {
++  DCHECK(params->fd.is_valid());
++
++  if (!base::SetNonBlocking(params->fd.get())) {
++    HID_PLOG(ERROR) << "Failed to set the non-blocking flag on the device fd";
++    std::move(params->callback).Run(nullptr);
++  }
++
++  std::move(params->callback).Run(base::MakeRefCounted<HidConnectionFreeBSD>(
++    std::move(params->device_info),
++    std::move(params->fd),
++    std::move(params->blocking_task_runner),
++    params->allow_protected_reports,
++    params->allow_fido_reports
++  ));
++}
++
++}  // namespace device
diff --git a/chromium-wip/patches/patch-services_device_hid_hid__service__freebsd.h b/chromium-wip/patches/patch-services_device_hid_hid__service__freebsd.h
new file mode 100644
index 0000000000..2f6cb35cf7
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_hid_hid__service__freebsd.h
@@ -0,0 +1,58 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/hid/hid_service_freebsd.h.orig	2025-08-12 17:48:59.526608243 +0000
++++ services/device/hid/hid_service_freebsd.h
+@@ -0,0 +1,49 @@
++// Copyright 2014 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.
++
++#ifndef DEVICE_HID_HID_SERVICE_FREEBSD_H_
++#define DEVICE_HID_HID_SERVICE_FREEBSD_H_
++
++#include <string>
++
++#include "base/memory/ref_counted.h"
++#include "base/memory/weak_ptr.h"
++#include "base/timer/timer.h"
++#include "services/device/hid/hid_service.h"
++#include "net/base/io_buffer.h"
++
++namespace device {
++
++class HidServiceFreeBSD : public HidService {
++ public:
++  HidServiceFreeBSD();
++
++  HidServiceFreeBSD(const HidServiceFreeBSD&) = delete;
++  HidServiceFreeBSD& operator=(const HidServiceFreeBSD&) = delete;
++
++  ~HidServiceFreeBSD() override;
++
++  void Connect(const std::string& device_guid,
++               bool allow_protected_reports,
++	       bool allow_fido_reports,
++               ConnectCallback connect) override;
++  base::WeakPtr<HidService> GetWeakPtr() override;
++
++ private:
++  struct ConnectParams;
++  class BlockingTaskRunnerHelper;
++
++  static void OpenOnBlockingThread(std::unique_ptr<ConnectParams> params);
++  static void FinishOpen(std::unique_ptr<ConnectParams> params);
++
++  const scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
++  // |helper_| lives on the sequence |blocking_task_runner_| posts to and holds
++  // a weak reference back to the service that owns it.
++  std::unique_ptr<BlockingTaskRunnerHelper, base::OnTaskRunnerDeleter> helper_;
++  base::WeakPtrFactory<HidServiceFreeBSD> weak_factory_{this};
++};
++
++}  // namespace device
++
++#endif  // DEVICE_HID_HID_SERVICE_FREEBSD_H_
diff --git a/chromium-wip/patches/patch-services_device_hid_hid__service__netbsd.cc b/chromium-wip/patches/patch-services_device_hid_hid__service__netbsd.cc
new file mode 100644
index 0000000000..34ba9da6bd
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_hid_hid__service__netbsd.cc
@@ -0,0 +1,36 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/hid/hid_service_netbsd.cc.orig	2025-08-12 17:48:59.526738465 +0000
++++ services/device/hid/hid_service_netbsd.cc
+@@ -0,0 +1,27 @@
++// Copyright 2022 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#include "services/device/hid/hid_service_netbsd.h"
++
++#include "base/notimplemented.h"
++#include "services/device/hid/hid_connection.h"
++
++namespace device {
++
++HidServiceNetBSD::HidServiceNetBSD() = default;
++HidServiceNetBSD::~HidServiceNetBSD() = default;
++
++void HidServiceNetBSD::Connect(const std::string& device_id,
++                                bool allow_protected_reports,
++                                bool allow_fido_reports,
++                                ConnectCallback callback) {
++  NOTIMPLEMENTED_LOG_ONCE();
++  std::move(callback).Run(nullptr);
++}
++
++base::WeakPtr<HidService> HidServiceNetBSD::GetWeakPtr() {
++  return weak_factory_.GetWeakPtr();
++}
++
++}  // namespace device
diff --git a/chromium-wip/patches/patch-services_device_hid_hid__service__netbsd.h b/chromium-wip/patches/patch-services_device_hid_hid__service__netbsd.h
new file mode 100644
index 0000000000..4734e9d70e
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_hid_hid__service__netbsd.h
@@ -0,0 +1,42 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/hid/hid_service_netbsd.h.orig	2025-08-12 17:48:59.526860882 +0000
++++ services/device/hid/hid_service_netbsd.h
+@@ -0,0 +1,33 @@
++// Copyright 2022 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#ifndef SERVICES_DEVICE_HID_HID_SERVICE_NETBSD_H_
++#define SERVICES_DEVICE_HID_HID_SERVICE_NETBSD_H_
++
++#include "services/device/hid/hid_service.h"
++
++namespace device {
++
++class HidServiceNetBSD : public HidService {
++ public:
++  HidServiceNetBSD();
++  ~HidServiceNetBSD() override;
++
++  HidServiceNetBSD(const HidServiceNetBSD&) = delete;
++  HidServiceNetBSD& operator=(const HidServiceNetBSD&) = delete;
++
++ private:
++  // HidService implementation.
++  void Connect(const std::string& device_id,
++               bool allow_protected_reports,
++               bool allow_fido_reports,
++               ConnectCallback callback) override;
++  base::WeakPtr<HidService> GetWeakPtr() override;
++
++  base::WeakPtrFactory<HidServiceNetBSD> weak_factory_{this};
++};
++
++}  // namespace device
++
++#endif  // SERVICES_DEVICE_HID_HID_SERVICE_NETBSD_H_
diff --git a/chromium-wip/patches/patch-services_device_public_cpp_device__features.cc b/chromium-wip/patches/patch-services_device_public_cpp_device__features.cc
new file mode 100644
index 0000000000..0a401ab560
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_public_cpp_device__features.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/public/cpp/device_features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/device/public/cpp/device_features.cc
+@@ -140,7 +140,7 @@ bool IsOsLevelGeolocationPermissionSuppo
+ 
+ // Controls whether Chrome will try to automatically detach kernel drivers when
+ // a USB interface is busy.
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kAutomaticUsbDetach,
+              "AutomaticUsbDetach",
+              base::FEATURE_DISABLED_BY_DEFAULT);
diff --git a/chromium-wip/patches/patch-services_device_public_cpp_device__features.h b/chromium-wip/patches/patch-services_device_public_cpp_device__features.h
new file mode 100644
index 0000000000..ea021e1dea
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_public_cpp_device__features.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/public/cpp/device_features.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/device/public/cpp/device_features.h
+@@ -53,7 +53,7 @@ extern const DEVICE_FEATURES_EXPORT
+ 
+ DEVICE_FEATURES_EXPORT bool IsOsLevelGeolocationPermissionSupportEnabled();
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ DEVICE_FEATURES_EXPORT BASE_DECLARE_FEATURE(kAutomaticUsbDetach);
+ #endif  // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
+ 
diff --git a/chromium-wip/patches/patch-services_device_public_cpp_generic__sensor_sensor__reading.h b/chromium-wip/patches/patch-services_device_public_cpp_generic__sensor_sensor__reading.h
new file mode 100644
index 0000000000..e5a0a5915d
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_public_cpp_generic__sensor_sensor__reading.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/public/cpp/generic_sensor/sensor_reading.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/device/public/cpp/generic_sensor/sensor_reading.h
+@@ -8,6 +8,8 @@
+ #include <stddef.h>
+ #include <stdint.h>
+ 
++#include <cstdint>
++
+ #include <type_traits>
+ 
+ namespace device {
diff --git a/chromium-wip/patches/patch-services_device_public_mojom_BUILD.gn b/chromium-wip/patches/patch-services_device_public_mojom_BUILD.gn
new file mode 100644
index 0000000000..c1112a3e8a
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_public_mojom_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/public/mojom/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/device/public/mojom/BUILD.gn
+@@ -107,7 +107,7 @@ mojom("device_service") {
+   enable_js_fuzzing = false
+ 
+   enabled_features = []
+-  if ((is_linux || is_chromeos) && use_udev) {
++  if ((is_linux || is_chromeos) && !is_bsd && use_udev) {
+     enabled_features += [ "enable_input_device_manager" ]
+   }
+ 
diff --git a/chromium-wip/patches/patch-services_device_serial_BUILD.gn b/chromium-wip/patches/patch-services_device_serial_BUILD.gn
new file mode 100644
index 0000000000..9907deaeb9
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_serial_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/serial/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/device/serial/BUILD.gn
+@@ -4,7 +4,7 @@
+ 
+ import("//build/config/features.gni")
+ 
+-if (is_win || ((is_linux || is_chromeos) && use_udev) || is_mac || is_android) {
++if (is_win || ((!is_bsd && is_linux || is_chromeos) && use_udev) || is_mac || is_android) {
+   config("platform_support") {
+     visibility = [ ":serial" ]
+     if (is_win) {
diff --git a/chromium-wip/patches/patch-services_device_serial_serial__device__enumerator.cc b/chromium-wip/patches/patch-services_device_serial_serial__device__enumerator.cc
new file mode 100644
index 0000000000..f07b379360
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_serial_serial__device__enumerator.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/serial/serial_device_enumerator.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/device/serial/serial_device_enumerator.cc
+@@ -12,7 +12,7 @@
+ #include "build/build_config.h"
+ #include "components/device_event_log/device_event_log.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "services/device/serial/serial_device_enumerator_linux.h"
+ #elif BUILDFLAG(IS_MAC)
+ #include "services/device/serial/serial_device_enumerator_mac.h"
+@@ -27,7 +27,7 @@ namespace device {
+ // static
+ std::unique_ptr<SerialDeviceEnumerator> SerialDeviceEnumerator::Create(
+     scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return SerialDeviceEnumeratorLinux::Create();
+ #elif BUILDFLAG(IS_MAC)
+   return std::make_unique<SerialDeviceEnumeratorMac>();
diff --git a/chromium-wip/patches/patch-services_device_serial_serial__io__handler__posix.cc b/chromium-wip/patches/patch-services_device_serial_serial__io__handler__posix.cc
new file mode 100644
index 0000000000..a8cf1bfcc9
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_serial_serial__io__handler__posix.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/serial/serial_io_handler_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/device/serial/serial_io_handler_posix.cc
+@@ -74,7 +74,7 @@ bool BitrateToSpeedConstant(int bitrate,
+     BITRATE_TO_SPEED_CASE(9600)
+     BITRATE_TO_SPEED_CASE(19200)
+     BITRATE_TO_SPEED_CASE(38400)
+-#if !BUILDFLAG(IS_MAC)
++#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD)
+     BITRATE_TO_SPEED_CASE(57600)
+     BITRATE_TO_SPEED_CASE(115200)
+     BITRATE_TO_SPEED_CASE(230400)
diff --git a/chromium-wip/patches/patch-services_device_time__zone__monitor_time__zone__monitor__linux.cc b/chromium-wip/patches/patch-services_device_time__zone__monitor_time__zone__monitor__linux.cc
new file mode 100644
index 0000000000..470b895086
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_time__zone__monitor_time__zone__monitor__linux.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/time_zone_monitor/time_zone_monitor_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/device/time_zone_monitor/time_zone_monitor_linux.cc
+@@ -131,9 +131,12 @@ class TimeZoneMonitorLinuxImpl
+     // false positives are harmless, assuming the false positive rate is
+     // reasonable.
+     const auto kFilesToWatch = std::to_array<const char*>({
+-        "/etc/localtime",
++#if BUILDFLAG(IS_BSD)
++        "@PKG_SYSCONFBASE@/localtime",
++#else
+         "/etc/timezone",
+         "/etc/TZ",
++#endif
+     });
+     for (size_t index = 0; index < std::size(kFilesToWatch); ++index) {
+       file_path_watchers_.push_back(std::make_unique<base::FilePathWatcher>());
diff --git a/chromium-wip/patches/patch-services_device_usb_BUILD.gn b/chromium-wip/patches/patch-services_device_usb_BUILD.gn
new file mode 100644
index 0000000000..cdb7b8c0bd
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_usb_BUILD.gn
@@ -0,0 +1,40 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/usb/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/device/usb/BUILD.gn
+@@ -90,7 +90,7 @@ static_library("usb") {
+     deps += [ "//third_party/re2" ]
+   }
+ 
+-  if (is_mac) {
++  if (is_mac || is_openbsd) {
+     # These sources and deps are required for libusb.
+     # TODO(crbug.com/40136337) Remove these sources.
+     sources += [
+@@ -113,6 +113,13 @@ static_library("usb") {
+     deps += [ "//third_party/libusb" ]
+   }
+ 
++  if (is_freebsd || is_netbsd) {
++    sources += [
++      "usb_service_fake.cc",
++      "usb_service_fake.h",
++    ]
++  }
++
+   if (is_linux || is_chromeos) {
+     sources += [
+       "usb_device_linux.cc",
+@@ -134,7 +141,7 @@ static_library("usb") {
+     deps += [ "//device/udev_linux" ]
+   }
+ 
+-  if (is_android || is_chromeos || is_linux) {
++  if (is_android || is_chromeos || is_linux && !is_bsd) {
+     sources += [
+       "usb_device_handle_usbfs.cc",
+       "usb_device_handle_usbfs.h",
diff --git a/chromium-wip/patches/patch-services_device_usb_usb__device__handle__usbfs.cc b/chromium-wip/patches/patch-services_device_usb_usb__device__handle__usbfs.cc
new file mode 100644
index 0000000000..764fda2aa9
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_usb_usb__device__handle__usbfs.cc
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/usb/usb_device_handle_usbfs.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/device/usb/usb_device_handle_usbfs.cc
+@@ -38,7 +38,7 @@
+ #include "chromeos/dbus/permission_broker/permission_broker_client.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "base/metrics/histogram_macros.h"
+ #include "services/device/public/cpp/device_features.h"
+ #include "services/device/usb/usb_interface_detach_allowlist.h"
+@@ -55,7 +55,7 @@ using mojom::UsbTransferType;
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Outcome of detaching a kernel driver before ClaimInterface().
+ // These values are persisted to logs. Entries should not be renumbered and
+ // numeric values should never be reused.
+@@ -297,7 +297,7 @@ bool UsbDeviceHandleUsbfs::BlockingTaskR
+   return true;
+ }
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ bool UsbDeviceHandleUsbfs::BlockingTaskRunnerHelper::DetachInterface(
+     int interface_number,
+     const CombinedInterfaceInfo& interface_info) {
+@@ -633,7 +633,7 @@ void UsbDeviceHandleUsbfs::ClaimInterfac
+     return;
+   }
+ #endif
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (base::FeatureList::IsEnabled(features::kAutomaticUsbDetach)) {
+     const mojom::UsbConfigurationInfo* config =
+         device_->GetActiveConfiguration();
+@@ -979,7 +979,7 @@ void UsbDeviceHandleUsbfs::ReleaseInterf
+     return;
+   }
+ #endif
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (base::FeatureList::IsEnabled(features::kAutomaticUsbDetach)) {
+     helper_.AsyncCall(&BlockingTaskRunnerHelper::ReattachInterface)
+         .WithArgs(interface_number)
diff --git a/chromium-wip/patches/patch-services_device_usb_usb__device__handle__usbfs.h b/chromium-wip/patches/patch-services_device_usb_usb__device__handle__usbfs.h
new file mode 100644
index 0000000000..b807ac655f
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_usb_usb__device__handle__usbfs.h
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/usb/usb_device_handle_usbfs.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/device/usb/usb_device_handle_usbfs.h
+@@ -19,7 +19,7 @@
+ #include "base/threading/sequence_bound.h"
+ #include "services/device/usb/usb_device_handle.h"
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "base/containers/flat_set.h"
+ #endif  // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
+ 
+@@ -215,7 +215,7 @@ class UsbDeviceHandleUsbfs::BlockingTask
+   bool ClearHalt(uint8_t endpoint_address);
+   void DiscardUrb(Transfer* transfer);
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Detach the interface from a kernel driver before ClaimInterface
+   virtual bool DetachInterface(int interface_number,
+                                const CombinedInterfaceInfo& interfaceInfo);
+@@ -228,7 +228,7 @@ class UsbDeviceHandleUsbfs::BlockingTask
+   // Called when |fd_| is writable without blocking.
+   void OnFileCanWriteWithoutBlocking();
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Called from |DetachInterface|.
+   std::string GetKernelDriver(int interface_number) const;
+ #endif  // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
+@@ -240,7 +240,7 @@ class UsbDeviceHandleUsbfs::BlockingTask
+   std::unique_ptr<base::FileDescriptorWatcher::Controller> watch_controller_;
+   SEQUENCE_CHECKER(sequence_checker_);
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // All interfaces that have been detached from kernel drivers
+   base::flat_set<int> detached_interfaces_;
+ #endif  // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
diff --git a/chromium-wip/patches/patch-services_device_usb_usb__service.cc b/chromium-wip/patches/patch-services_device_usb_usb__service.cc
new file mode 100644
index 0000000000..27bb16461c
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_usb_usb__service.cc
@@ -0,0 +1,42 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/usb/usb_service.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/device/usb/usb_service.cc
+@@ -20,12 +20,16 @@
+ 
+ #if BUILDFLAG(IS_ANDROID)
+ #include "services/device/usb/usb_service_android.h"
+-#elif defined(USE_UDEV)
++#elif defined(USE_UDEV) && !BUILDFLAG(IS_BSD)
+ #include "services/device/usb/usb_service_linux.h"
+ #elif BUILDFLAG(IS_MAC)
+ #include "services/device/usb/usb_service_impl.h"
+ #elif BUILDFLAG(IS_WIN)
+ #include "services/device/usb/usb_service_win.h"
++#elif BUILDFLAG(IS_OPENBSD)
++#include "services/device/usb/usb_service_impl.h"
++#elif BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_NETBSD)
++#include "services/device/usb/usb_service_fake.h"
+ #endif
+ 
+ namespace device {
+@@ -48,12 +52,14 @@ constexpr base::TaskTraits UsbService::k
+ std::unique_ptr<UsbService> UsbService::Create() {
+ #if BUILDFLAG(IS_ANDROID)
+   return base::WrapUnique(new UsbServiceAndroid());
+-#elif defined(USE_UDEV)
++#elif defined(USE_UDEV) && !BUILDFLAG(IS_BSD)
+   return base::WrapUnique(new UsbServiceLinux());
+ #elif BUILDFLAG(IS_WIN)
+   return base::WrapUnique(new UsbServiceWin());
+ #elif BUILDFLAG(IS_MAC)
+   return base::WrapUnique(new UsbServiceImpl());
++#elif BUILDFLAG(IS_BSD)
++  return base::WrapUnique(new UsbServiceImpl());
+ #else
+   return nullptr;
+ #endif
diff --git a/chromium-wip/patches/patch-services_device_usb_usb__service__fake.cc b/chromium-wip/patches/patch-services_device_usb_usb__service__fake.cc
new file mode 100644
index 0000000000..d66726fb26
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_usb_usb__service__fake.cc
@@ -0,0 +1,59 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/usb/usb_service_fake.cc.orig	2025-08-12 17:48:59.528516762 +0000
++++ services/device/usb/usb_service_fake.cc
+@@ -0,0 +1,50 @@
++// 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.
++
++#include "services/device/usb/usb_service_fake.h"
++
++#include <stdint.h>
++
++#include <list>
++#include <memory>
++#include <set>
++#include <utility>
++
++#include "base/barrier_closure.h"
++#include "base/containers/contains.h"
++#include "base/location.h"
++#include "base/notimplemented.h"
++#include "base/memory/ref_counted_memory.h"
++#include "base/memory/weak_ptr.h"
++#include "base/strings/string_number_conversions.h"
++#include "base/strings/utf_string_conversions.h"
++#include "base/task/sequenced_task_runner.h"
++#include "base/task/single_thread_task_runner.h"
++#include "base/task/thread_pool.h"
++#include "base/threading/scoped_blocking_call.h"
++#include "build/build_config.h"
++#include "components/device_event_log/device_event_log.h"
++#include "services/device/usb/usb_device_handle.h"
++#include "services/device/usb/usb_error.h"
++#include "services/device/usb/webusb_descriptors.h"
++
++namespace device {
++
++UsbServiceImpl::UsbServiceImpl()
++    : task_runner_(base::SequencedTaskRunner::GetCurrentDefault()) {
++  NOTIMPLEMENTED();
++}
++
++UsbServiceImpl::~UsbServiceImpl() {
++  NOTIMPLEMENTED();
++  NotifyWillDestroyUsbService();
++}
++
++void UsbServiceImpl::GetDevices(GetDevicesCallback callback) {
++  NOTIMPLEMENTED();
++  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++  UsbService::GetDevices(std::move(callback));
++}
++
++}  // namespace device
diff --git a/chromium-wip/patches/patch-services_device_usb_usb__service__fake.h b/chromium-wip/patches/patch-services_device_usb_usb__service__fake.h
new file mode 100644
index 0000000000..20d2aa3444
--- /dev/null
+++ b/chromium-wip/patches/patch-services_device_usb_usb__service__fake.h
@@ -0,0 +1,57 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/device/usb/usb_service_fake.h.orig	2025-08-12 17:48:59.528649920 +0000
++++ services/device/usb/usb_service_fake.h
+@@ -0,0 +1,48 @@
++// Copyright 2015 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#ifndef SERVICES_DEVICE_USB_USB_SERVICE_IMPL_H_
++#define SERVICES_DEVICE_USB_USB_SERVICE_IMPL_H_
++
++#include "services/device/usb/usb_service.h"
++
++#include <stddef.h>
++
++#include <map>
++#include <set>
++#include <string>
++#include <vector>
++
++#include "base/containers/queue.h"
++#include "base/memory/weak_ptr.h"
++#include "build/build_config.h"
++#include "services/device/usb/usb_context.h"
++#include "services/device/usb/usb_device_impl.h"
++#include "third_party/abseil-cpp/absl/types/optional.h"
++
++namespace device {
++
++class UsbDeviceImpl;
++
++class UsbServiceImpl final : public UsbService {
++ public:
++  UsbServiceImpl();
++
++  UsbServiceImpl(const UsbServiceImpl&) = delete;
++  UsbServiceImpl& operator=(const UsbServiceImpl&) = delete;
++
++  ~UsbServiceImpl() override;
++
++ private:
++  // device::UsbService implementation
++  void GetDevices(GetDevicesCallback callback) override;
++
++  void OnUsbContext(scoped_refptr<UsbContext> context);
++
++  scoped_refptr<base::SequencedTaskRunner> task_runner_;
++};
++
++}  // namespace device
++
++#endif  // SERVICES_DEVICE_USB_USB_SERVICE_IMPL_H_
diff --git a/chromium-wip/patches/patch-services_network_BUILD.gn b/chromium-wip/patches/patch-services_network_BUILD.gn
new file mode 100644
index 0000000000..d6e46bc26d
--- /dev/null
+++ b/chromium-wip/patches/patch-services_network_BUILD.gn
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/network/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/network/BUILD.gn
+@@ -423,7 +423,6 @@ if (is_linux || is_chromeos) {
+     ]
+     deps = [
+       "//base:base",
+-      "//sandbox/linux:sandbox_services",
+       "//sandbox/policy:policy",
+     ]
+     configs += [ "//build/config/compiler:wexit_time_destructors" ]
diff --git a/chromium-wip/patches/patch-services_network_network__context.cc b/chromium-wip/patches/patch-services_network_network__context.cc
new file mode 100644
index 0000000000..1379e470f3
--- /dev/null
+++ b/chromium-wip/patches/patch-services_network_network__context.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/network/network_context.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/network/network_context.cc
+@@ -628,7 +628,7 @@ NetworkContext::NetworkContextHttpAuthPr
+ NetworkContext::NetworkContextHttpAuthPreferences::
+     ~NetworkContextHttpAuthPreferences() = default;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ bool NetworkContext::NetworkContextHttpAuthPreferences::AllowGssapiLibraryLoad()
+     const {
+   if (network_service_) {
+@@ -2596,7 +2596,7 @@ void NetworkContext::OnHttpAuthDynamicPa
+       http_auth_dynamic_network_service_params->android_negotiate_account_type);
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   http_auth_merged_preferences_.set_allow_gssapi_library_load(
+       http_auth_dynamic_network_service_params->allow_gssapi_library_load);
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
diff --git a/chromium-wip/patches/patch-services_network_network__context.h b/chromium-wip/patches/patch-services_network_network__context.h
new file mode 100644
index 0000000000..163d820112
--- /dev/null
+++ b/chromium-wip/patches/patch-services_network_network__context.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/network/network_context.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/network/network_context.h
+@@ -737,7 +737,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) 
+    public:
+     explicit NetworkContextHttpAuthPreferences(NetworkService* network_service);
+     ~NetworkContextHttpAuthPreferences() override;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     bool AllowGssapiLibraryLoad() const override;
+ #endif  // BUILDFLAG(IS_LINUX)
+    private:
diff --git a/chromium-wip/patches/patch-services_network_network__sandbox__hook__linux.cc b/chromium-wip/patches/patch-services_network_network__sandbox__hook__linux.cc
new file mode 100644
index 0000000000..6fac7206a4
--- /dev/null
+++ b/chromium-wip/patches/patch-services_network_network__sandbox__hook__linux.cc
@@ -0,0 +1,43 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/network/network_sandbox_hook_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/network/network_sandbox_hook_linux.cc
+@@ -15,11 +15,14 @@
+ #include "sandbox/linux/syscall_broker/broker_file_permission.h"
+ #include "sandbox/policy/features.h"
+ 
++#if !BUILDFLAG(IS_BSD)
+ using sandbox::syscall_broker::BrokerFilePermission;
+ using sandbox::syscall_broker::MakeBrokerCommandSet;
++#endif
+ 
+ namespace network {
+ 
++#if !BUILDFLAG(IS_BSD)
+ sandbox::syscall_broker::BrokerCommandSet GetNetworkBrokerCommandSet() {
+   return MakeBrokerCommandSet({
+       sandbox::syscall_broker::COMMAND_ACCESS,
+@@ -103,9 +106,11 @@ void LoadNetworkLibraries() {
+   }
+ }
+ #endif  // BUILDFLAG(IS_CHROMEOS)
++#endif
+ 
+ bool NetworkPreSandboxHook(std::vector<std::string> network_context_parent_dirs,
+                            sandbox::policy::SandboxLinux::Options options) {
++#if !BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(IS_CHROMEOS)
+   LoadNetworkLibraries();
+ #endif
+@@ -118,6 +123,7 @@ bool NetworkPreSandboxHook(std::vector<s
+       GetNetworkBrokerCommandSet(),
+       GetNetworkFilePermissions(std::move(network_context_parent_dirs)),
+       options);
++#endif
+ 
+   return true;
+ }
diff --git a/chromium-wip/patches/patch-services_network_network__sandbox__hook__linux.h b/chromium-wip/patches/patch-services_network_network__sandbox__hook__linux.h
new file mode 100644
index 0000000000..28b406be51
--- /dev/null
+++ b/chromium-wip/patches/patch-services_network_network__sandbox__hook__linux.h
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/network/network_sandbox_hook_linux.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/network/network_sandbox_hook_linux.h
+@@ -6,7 +6,11 @@
+ #define SERVICES_NETWORK_NETWORK_SANDBOX_HOOK_LINUX_H_
+ 
+ #include "base/component_export.h"
++#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
++#include "sandbox/policy/sandbox.h"
++#else
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#endif
+ 
+ namespace network {
+ 
diff --git a/chromium-wip/patches/patch-services_network_network__service.cc b/chromium-wip/patches/patch-services_network_network__service.cc
new file mode 100644
index 0000000000..a752972b1d
--- /dev/null
+++ b/chromium-wip/patches/patch-services_network_network__service.cc
@@ -0,0 +1,40 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/network/network_service.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/network/network_service.cc
+@@ -104,11 +104,11 @@
+ #include "third_party/boringssl/src/include/openssl/cpu.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CASTOS)
+ #include "components/os_crypt/sync/key_storage_config_linux.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "services/network/network_change_notifier_passive_factory.h"
+ #endif
+ 
+@@ -1049,7 +1049,7 @@ void NetworkService::SetExplicitlyAllowe
+   net::SetExplicitlyAllowedPorts(ports);
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void NetworkService::SetGssapiLibraryLoadObserver(
+     mojo::PendingRemote<mojom::GssapiLibraryLoadObserver>
+         gssapi_library_load_observer) {
+@@ -1155,7 +1155,7 @@ NetworkService::CreateHttpAuthHandlerFac
+   );
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void NetworkService::OnBeforeGssapiLibraryLoad() {
+   if (gssapi_library_load_observer_.is_bound()) {
+     gssapi_library_load_observer_->OnBeforeGssapiLibraryLoad();
diff --git a/chromium-wip/patches/patch-services_network_network__service.h b/chromium-wip/patches/patch-services_network_network__service.h
new file mode 100644
index 0000000000..43ad549e32
--- /dev/null
+++ b/chromium-wip/patches/patch-services_network_network__service.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/network/network_service.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/network/network_service.h
+@@ -252,7 +252,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) 
+       const std::vector<ContentSettingPatternSource>& settings) override;
+ 
+   void SetExplicitlyAllowedPorts(const std::vector<uint16_t>& ports) override;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   void SetGssapiLibraryLoadObserver(
+       mojo::PendingRemote<mojom::GssapiLibraryLoadObserver>
+           gssapi_library_load_observer) override;
+@@ -295,7 +295,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) 
+   std::unique_ptr<net::HttpAuthHandlerFactory> CreateHttpAuthHandlerFactory(
+       NetworkContext* network_context);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // This is called just before a GSSAPI library may be loaded.
+   void OnBeforeGssapiLibraryLoad();
+ #endif  // BUILDFLAG(IS_LINUX)
+@@ -553,7 +553,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) 
+   // leaking stale listeners between tests.
+   std::unique_ptr<net::NetworkChangeNotifier> mock_network_change_notifier_;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   mojo::Remote<mojom::GssapiLibraryLoadObserver> gssapi_library_load_observer_;
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
diff --git a/chromium-wip/patches/patch-services_network_public_cpp_BUILD.gn b/chromium-wip/patches/patch-services_network_public_cpp_BUILD.gn
new file mode 100644
index 0000000000..a3b1a3bd33
--- /dev/null
+++ b/chromium-wip/patches/patch-services_network_public_cpp_BUILD.gn
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/network/public/cpp/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/network/public/cpp/BUILD.gn
+@@ -677,7 +677,7 @@ component("cpp_base") {
+     sources += [ "transferable_directory_fuchsia.cc" ]
+   }
+ 
+-  if (is_linux) {
++  if (is_linux && !is_bsd) {
+     sources += [
+       "network_interface_change_listener_mojom_traits.cc",
+       "network_interface_change_listener_mojom_traits.h",
+@@ -799,7 +799,7 @@ source_set("tests") {
+     "x_frame_options_parser_unittest.cc",
+   ]
+ 
+-  if (is_linux) {
++  if ((is_linux) && !is_bsd) {
+     sources += [ "network_interface_change_listener_mojom_traits_unittest.cc" ]
+   }
+ 
diff --git a/chromium-wip/patches/patch-services_network_public_cpp_features.cc b/chromium-wip/patches/patch-services_network_public_cpp_features.cc
new file mode 100644
index 0000000000..8e091e53ed
--- /dev/null
+++ b/chromium-wip/patches/patch-services_network_public_cpp_features.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/network/public/cpp/features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/network/public/cpp/features.cc
+@@ -109,7 +109,7 @@ BASE_FEATURE(kSplitAuthCacheByNetworkIso
+ BASE_FEATURE(kDnsOverHttpsUpgrade,
+              "DnsOverHttpsUpgrade",
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+              base::FEATURE_ENABLED_BY_DEFAULT
+ #else
+              base::FEATURE_DISABLED_BY_DEFAULT
+@@ -359,7 +359,7 @@ BASE_FEATURE(kAvoidResourceRequestCopies
+ BASE_FEATURE(kDocumentIsolationPolicy,
+              "DocumentIsolationPolicy",
+ #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_LINUX)
++    BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+              base::FEATURE_ENABLED_BY_DEFAULT
+ #else
+              base::FEATURE_DISABLED_BY_DEFAULT
diff --git a/chromium-wip/patches/patch-services_network_public_mojom_BUILD.gn b/chromium-wip/patches/patch-services_network_public_mojom_BUILD.gn
new file mode 100644
index 0000000000..84679c51f3
--- /dev/null
+++ b/chromium-wip/patches/patch-services_network_public_mojom_BUILD.gn
@@ -0,0 +1,31 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/network/public/mojom/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/network/public/mojom/BUILD.gn
+@@ -679,11 +679,11 @@ mojom("url_loader_base") {
+   }
+ 
+   enabled_features = []
+-  if (is_android || is_chromeos || is_linux) {
++  if (!is_bsd && (is_android || is_chromeos || is_linux)) {
+     enabled_features += [ "network_change_notifier_in_browser" ]
+   }
+ 
+-  if (is_linux) {
++  if (is_linux && !is_bsd) {
+     # TODO(crbug.com/40263697): Remove this once is_linux in the mojom IDL does
+     # not include lacros.
+     enabled_features += [ "use_network_interface_change_listener" ]
+@@ -1795,7 +1795,7 @@ mojom("mojom") {
+     }
+   }
+ 
+-  if (is_linux) {
++  if (is_linux && !is_bsd) {
+     # TODO(crbug.com/40263697): Remove this once is_linux in the mojom IDL does
+     # not include lacros.
+     enabled_features += [ "use_network_interface_change_listener" ]
diff --git a/chromium-wip/patches/patch-services_network_shared__dictionary_shared__dictionary__writer__in__memory.h b/chromium-wip/patches/patch-services_network_shared__dictionary_shared__dictionary__writer__in__memory.h
new file mode 100644
index 0000000000..2d094d5905
--- /dev/null
+++ b/chromium-wip/patches/patch-services_network_shared__dictionary_shared__dictionary__writer__in__memory.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/network/shared_dictionary/shared_dictionary_writer_in_memory.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/network/shared_dictionary/shared_dictionary_writer_in_memory.h
+@@ -9,6 +9,8 @@
+ #include <string>
+ #include <vector>
+ 
++#include <vector>
++
+ #include "base/component_export.h"
+ #include "base/functional/callback.h"
+ #include "crypto/secure_hash.h"
diff --git a/chromium-wip/patches/patch-services_on__device__model_on__device__model__service.h b/chromium-wip/patches/patch-services_on__device__model_on__device__model__service.h
new file mode 100644
index 0000000000..7a1c4ebb6d
--- /dev/null
+++ b/chromium-wip/patches/patch-services_on__device__model_on__device__model__service.h
@@ -0,0 +1,28 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/on_device_model/on_device_model_service.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/on_device_model/on_device_model_service.h
+@@ -31,6 +31,10 @@ class OnDeviceModelInternalImpl;
+ class TsHolder;
+ }
+ 
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#endif
++
+ namespace on_device_model {
+ 
+ inline constexpr base::TimeDelta kDefaultModelIdleTimeout = base::Minutes(5);
+@@ -46,7 +50,7 @@ class COMPONENT_EXPORT(ON_DEVICE_MODEL) 
+   // Must be called in the service's process after the run loop finished.
+   [[nodiscard]] static bool Shutdown();
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   static void AddSandboxLinuxOptions(
+       sandbox::policy::SandboxLinux::Options& options);
+ #endif
diff --git a/chromium-wip/patches/patch-services_on__device__model_pre__sandbox__init.cc b/chromium-wip/patches/patch-services_on__device__model_pre__sandbox__init.cc
new file mode 100644
index 0000000000..d7586f74ef
--- /dev/null
+++ b/chromium-wip/patches/patch-services_on__device__model_pre__sandbox__init.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/on_device_model/pre_sandbox_init.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/on_device_model/pre_sandbox_init.cc
+@@ -15,7 +15,7 @@
+ #include "services/on_device_model/ml/gpu_blocklist.h"  // nogncheck
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "gpu/config/gpu_info_collector.h"                    // nogncheck
+ #endif
+ 
+@@ -29,7 +29,7 @@ namespace on_device_model {
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ constexpr uint32_t kVendorIdAMD = 0x1002;
+ constexpr uint32_t kVendorIdIntel = 0x8086;
+ constexpr uint32_t kVendorIdNVIDIA = 0x10DE;
+@@ -63,7 +63,7 @@ void UpdateSandboxOptionsForGpu(
+ // enabling the sandbox.
+ BASE_FEATURE(kOnDeviceModelWarmDrivers,
+              "OnDeviceModelWarmDrivers",
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+              base::FEATURE_ENABLED_BY_DEFAULT
+ #else
+              base::FEATURE_DISABLED_BY_DEFAULT
+@@ -132,7 +132,7 @@ bool OnDeviceModelService::PreSandboxIni
+   return true;
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // static
+ void OnDeviceModelService::AddSandboxLinuxOptions(
+     sandbox::policy::SandboxLinux::Options& options) {
diff --git a/chromium-wip/patches/patch-services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc b/chromium-wip/patches/patch-services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc
new file mode 100644
index 0000000000..76b0a3c72a
--- /dev/null
+++ b/chromium-wip/patches/patch-services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc
@@ -0,0 +1,71 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc
+@@ -55,7 +55,7 @@ uint32_t CalculatePrivateFootprintKb(con
+                                      uint32_t shared_resident_kb) {
+   DCHECK(os_dump.platform_private_footprint);
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   uint64_t rss_anon_bytes = os_dump.platform_private_footprint->rss_anon_bytes;
+   uint64_t vm_swap_bytes = os_dump.platform_private_footprint->vm_swap_bytes;
+   return (rss_anon_bytes + vm_swap_bytes) / 1024;
+@@ -84,7 +84,7 @@ memory_instrumentation::mojom::OSMemDump
+   os_dump->is_peak_rss_resettable = internal_os_dump.is_peak_rss_resettable;
+   os_dump->private_footprint_kb =
+       CalculatePrivateFootprintKb(internal_os_dump, shared_resident_kb);
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   os_dump->private_footprint_swap_kb =
+       internal_os_dump.platform_private_footprint->vm_swap_bytes / 1024;
+   os_dump->mappings_count = internal_os_dump.mappings_count;
+@@ -223,7 +223,7 @@ void QueuedRequestDispatcher::SetUpAndDi
+ 
+ // On most platforms each process can dump data about their own process
+ // so ask each process to do so Linux is special see below.
+-#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD)
+     request->pending_responses.insert({client_info.pid, ResponseType::kOSDump});
+     client->RequestOSMemoryDump(
+         request->memory_map_option(), request->memory_dump_flags(),
+@@ -238,7 +238,7 @@ void QueuedRequestDispatcher::SetUpAndDi
+ 
+ // In some cases, OS stats can only be dumped from a privileged process to
+ // get around to sandboxing/selinux restrictions (see crbug.com/461788).
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   std::vector<base::ProcessId> pids;
+   mojom::ClientProcess* browser_client = nullptr;
+   base::ProcessId browser_client_pid = base::kNullProcessId;
+@@ -285,7 +285,7 @@ void QueuedRequestDispatcher::SetUpAndDi
+     const OsCallback& os_callback) {
+ // On Linux, OS stats can only be dumped from a privileged process to
+ // get around to sandboxing/selinux restrictions (see crbug.com/461788).
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   mojom::ClientProcess* browser_client = nullptr;
+   base::ProcessId browser_client_pid = 0;
+   for (const auto& client_info : clients) {
+@@ -335,7 +335,7 @@ QueuedRequestDispatcher::FinalizeVmRegio
+     // each client process provides 1 OS dump, % the case where the client is
+     // disconnected mid dump.
+     OSMemDumpMap& extra_os_dumps = response.second.os_dumps;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     for (auto& kv : extra_os_dumps) {
+       auto pid = kv.first == base::kNullProcessId ? original_pid : kv.first;
+       DCHECK(results.find(pid) == results.end());
+@@ -396,7 +396,7 @@ void QueuedRequestDispatcher::Finalize(Q
+     // crash). In the latter case (OS_LINUX) we expect the full map to come
+     // from the browser process response.
+     OSMemDumpMap& extra_os_dumps = response.second.os_dumps;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     for (const auto& kv : extra_os_dumps) {
+       auto pid = kv.first == base::kNullProcessId ? original_pid : kv.first;
+       DCHECK_EQ(pid_to_os_dump[pid], nullptr);
diff --git a/chromium-wip/patches/patch-services_resource__coordinator_public_cpp_memory__instrumentation_BUILD.gn b/chromium-wip/patches/patch-services_resource__coordinator_public_cpp_memory__instrumentation_BUILD.gn
new file mode 100644
index 0000000000..88cc6efd1d
--- /dev/null
+++ b/chromium-wip/patches/patch-services_resource__coordinator_public_cpp_memory__instrumentation_BUILD.gn
@@ -0,0 +1,24 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/resource_coordinator/public/cpp/memory_instrumentation/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/resource_coordinator/public/cpp/memory_instrumentation/BUILD.gn
+@@ -27,10 +27,14 @@ component("memory_instrumentation") {
+     sources += [ "os_metrics_win.cc" ]
+   }
+ 
+-  if (is_android || is_linux || is_chromeos) {
++  if ((is_android || is_linux || is_chromeos) && !is_bsd) {
+     sources += [ "os_metrics_linux.cc" ]
+   }
+ 
++  if (is_bsd) {
++    sources += [ "os_metrics_bsd.cc" ]
++  }
++
+   if (is_fuchsia) {
+     sources += [ "os_metrics_fuchsia.cc" ]
+   }
diff --git a/chromium-wip/patches/patch-services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics.h b/chromium-wip/patches/patch-services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics.h
new file mode 100644
index 0000000000..48c0718a85
--- /dev/null
+++ b/chromium-wip/patches/patch-services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics.h
+@@ -65,7 +65,7 @@ class COMPONENT_EXPORT(
+   static std::vector<mojom::VmRegionPtr> GetProcessMemoryMaps(
+       base::ProcessHandle);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   static void SetProcSmapsForTesting(FILE*);
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ||
+         // BUILDFLAG(IS_ANDROID)
+@@ -87,7 +87,7 @@ class COMPONENT_EXPORT(
+   GetMemoryInfo(base::ProcessHandle handle);
+ #endif  // !BUILDFLAG(IS_APPLE)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   // Provides information on the dump state of resident pages. These values are
+   // written to logs. New enum values can be added, but existing enums must
+   // never be renumbered or deleted and reused.
diff --git a/chromium-wip/patches/patch-services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics__bsd.cc b/chromium-wip/patches/patch-services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics__bsd.cc
new file mode 100644
index 0000000000..8445a4bd53
--- /dev/null
+++ b/chromium-wip/patches/patch-services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics__bsd.cc
@@ -0,0 +1,78 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_bsd.cc.orig	2025-08-12 17:48:59.531403467 +0000
++++ services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_bsd.cc
+@@ -0,0 +1,69 @@
++// Copyright 2022 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.
++
++#include "services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics.h"
++
++#include "base/notimplemented.h"
++
++#include "base/memory/page_size.h"
++#include "base/process/process.h"
++#include "base/process/process_handle.h"
++
++#include <sys/sysctl.h>
++
++#include <vector>
++
++#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_NETBSD)
++#define vm_rssize info.p_vm_rssize
++#elif BUILDFLAG(IS_FREEBSD)
++#include <sys/user.h>
++#define vm_rssize info.ki_rssize
++#endif
++
++namespace memory_instrumentation {
++
++// static
++bool OSMetrics::FillOSMemoryDump(base::ProcessId pid,
++                                 const MemDumpFlagSet& flags,
++                                 mojom::RawOSMemDump* dump) {
++  base::Process process = pid == base::kNullProcessId
++                              ? base::Process::Current()
++                              : base::Process::Open(pid);
++  const size_t kPageSize = base::GetPageSize();
++#if BUILDFLAG(IS_NETBSD)
++  struct kinfo_proc2 info;
++  size_t length = sizeof(struct kinfo_proc2);
++#else
++  struct kinfo_proc info;
++  size_t length = sizeof(struct kinfo_proc);
++#endif
++#if BUILDFLAG(IS_OPENBSD)
++  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process.Handle(),
++                static_cast<int>(length), 1 };
++#elif BUILDFLAG(IS_FREEBSD)
++  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process.Handle() };
++#elif BUILDFLAG(IS_NETBSD)
++  int mib[] = { CTL_KERN, KERN_PROC2, KERN_PROC_PID, process.Handle(),
++                sizeof(struct kinfo_proc2), 1 };
++#endif
++
++  if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0)
++    return false;
++
++  dump->resident_set_kb = (vm_rssize * kPageSize) / 1024;
++  dump->platform_private_footprint->rss_anon_bytes =
++      vm_rssize * kPageSize;
++  dump->platform_private_footprint->vm_swap_bytes = 0;
++
++  return true;
++}
++
++// static
++std::vector<mojom::VmRegionPtr> OSMetrics::GetProcessMemoryMaps(
++    base::ProcessId) {
++  NOTIMPLEMENTED();
++  return std::vector<mojom::VmRegionPtr>();
++}
++
++}  // namespace memory_instrumentation
diff --git a/chromium-wip/patches/patch-services_screen__ai_public_cpp_utilities.cc b/chromium-wip/patches/patch-services_screen__ai_public_cpp_utilities.cc
new file mode 100644
index 0000000000..5a9b6880db
--- /dev/null
+++ b/chromium-wip/patches/patch-services_screen__ai_public_cpp_utilities.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/screen_ai/public/cpp/utilities.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/screen_ai/public/cpp/utilities.cc
+@@ -21,7 +21,7 @@ namespace {
+ // The maximum image dimension which is processed without downsampling by OCR.
+ constexpr uint32_t kMaxImageDimensionForOcr = 2048;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ constexpr char kBinaryPathSwitch[] = "screen-ai-binary";
+ #endif
+ 
+@@ -42,7 +42,7 @@ constexpr char kScreenAIDlcRootPath[] =
+ #endif
+ 
+ #if BUILDFLAG(ENABLE_SCREEN_AI_BROWSERTESTS)
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ constexpr base::FilePath::CharType kScreenAIResourcePathForTests[] =
+     FILE_PATH_LITERAL("third_party/screen-ai/linux/resources");
+ #elif BUILDFLAG(IS_MAC)
+@@ -131,7 +131,7 @@ base::FilePath GetComponentBinaryPathFor
+ 
+ const char* GetBinaryPathSwitch() {
+   // This is only used on Linux and ChromeOS.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return kBinaryPathSwitch;
+ #else
+   return nullptr;
diff --git a/chromium-wip/patches/patch-services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.cc b/chromium-wip/patches/patch-services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.cc
new file mode 100644
index 0000000000..94444fad78
--- /dev/null
+++ b/chromium-wip/patches/patch-services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.cc
@@ -0,0 +1,24 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.cc
+@@ -70,6 +70,7 @@ bool ScreenAIPreSandboxHook(base::FilePa
+     }
+   }
+ 
++#if !BUILDFLAG(IS_BSD)
+   auto* instance = sandbox::policy::SandboxLinux::GetInstance();
+ 
+   std::vector<BrokerFilePermission> permissions{
+@@ -91,6 +92,7 @@ bool ScreenAIPreSandboxHook(base::FilePa
+                             sandbox::syscall_broker::COMMAND_OPEN}),
+       permissions, options);
+   instance->EngageNamespaceSandboxIfPossible();
++#endif
+ 
+   return true;
+ }
diff --git a/chromium-wip/patches/patch-services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.h b/chromium-wip/patches/patch-services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.h
new file mode 100644
index 0000000000..552b95a206
--- /dev/null
+++ b/chromium-wip/patches/patch-services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.h
+@@ -6,7 +6,13 @@
+ #define SERVICES_SCREEN_AI_SANDBOX_SCREEN_AI_SANDBOX_HOOK_LINUX_H_
+ 
+ #include "base/files/file_path.h"
++#include "build/build_config.h"
++
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#else
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#endif
+ 
+ namespace screen_ai {
+ 
diff --git a/chromium-wip/patches/patch-services_screen__ai_screen__ai__service__impl.cc b/chromium-wip/patches/patch-services_screen__ai_screen__ai__service__impl.cc
new file mode 100644
index 0000000000..658d0c8da6
--- /dev/null
+++ b/chromium-wip/patches/patch-services_screen__ai_screen__ai__service__impl.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/screen_ai/screen_ai_service_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/screen_ai/screen_ai_service_impl.cc
+@@ -38,7 +38,7 @@
+ #include "ui/accessibility/ax_tree_id.h"
+ #include "ui/gfx/geometry/rect_f.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "partition_alloc/buildflags.h"
+ 
+ #if PA_BUILDFLAG( \
+@@ -266,7 +266,7 @@ ScreenAIService::ScreenAIService(
+     : factory_receiver_(this, std::move(receiver)),
+       ocr_receiver_(this),
+       main_content_extraction_receiver_(this) {
+-#if BUILDFLAG(IS_LINUX) && \
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && \
+     PA_BUILDFLAG(          \
+         ENABLE_ALLOCATOR_SHIM_PARTITION_ALLOC_DISPATCH_WITH_ADVANCED_CHECKS_SUPPORT)
+   // TODO(crbug.com/418199684): Remove when the bug is fixed.
diff --git a/chromium-wip/patches/patch-services_service__manager_BUILD.gn b/chromium-wip/patches/patch-services_service__manager_BUILD.gn
new file mode 100644
index 0000000000..e730db3818
--- /dev/null
+++ b/chromium-wip/patches/patch-services_service__manager_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/service_manager/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/service_manager/BUILD.gn
+@@ -65,7 +65,7 @@ source_set("service_manager") {
+     ]
+   }
+ 
+-  if (is_linux || is_chromeos) {
++  if ((is_linux || is_chromeos) && !is_bsd) {
+     deps += [ "//sandbox/linux:sandbox_services" ]
+   }
+ }
diff --git a/chromium-wip/patches/patch-services_service__manager_public_cpp_service__executable_BUILD.gn b/chromium-wip/patches/patch-services_service__manager_public_cpp_service__executable_BUILD.gn
new file mode 100644
index 0000000000..98120b9784
--- /dev/null
+++ b/chromium-wip/patches/patch-services_service__manager_public_cpp_service__executable_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/service_manager/public/cpp/service_executable/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/service_manager/public/cpp/service_executable/BUILD.gn
+@@ -22,7 +22,7 @@ source_set("support") {
+     "//services/service_manager/public/mojom",
+   ]
+ 
+-  if (is_linux || is_chromeos) {
++  if ((is_linux || is_chromeos) && !is_bsd) {
+     deps += [
+       "//sandbox/linux:sandbox",
+       "//sandbox/linux:sandbox_services",
diff --git a/chromium-wip/patches/patch-services_tracing_public_cpp_stack__sampling_tracing__sampler__profiler.cc b/chromium-wip/patches/patch-services_tracing_public_cpp_stack__sampling_tracing__sampler__profiler.cc
new file mode 100644
index 0000000000..f6be62b40c
--- /dev/null
+++ b/chromium-wip/patches/patch-services_tracing_public_cpp_stack__sampling_tracing__sampler__profiler.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.cc
+@@ -38,7 +38,7 @@
+ #include "third_party/perfetto/protos/perfetto/trace/track_event/process_descriptor.pbzero.h"
+ #include "third_party/perfetto/protos/perfetto/trace/track_event/thread_descriptor.pbzero.h"
+ 
+-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)
+ #include "base/profiler/thread_delegate_posix.h"
+ #define INITIALIZE_THREAD_DELEGATE_POSIX 1
+ #else  // BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_APPLE)
diff --git a/chromium-wip/patches/patch-services_tracing_public_cpp_system__metrics__sampler.cc b/chromium-wip/patches/patch-services_tracing_public_cpp_system__metrics__sampler.cc
new file mode 100644
index 0000000000..d41771f218
--- /dev/null
+++ b/chromium-wip/patches/patch-services_tracing_public_cpp_system__metrics__sampler.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/tracing/public/cpp/system_metrics_sampler.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/tracing/public/cpp/system_metrics_sampler.cc
+@@ -166,8 +166,8 @@ void SystemMetricsSampler::ProcessSample
+     TRACE_COUNTER(TRACE_DISABLED_BY_DEFAULT("system_metrics"),
+                   "PhysicalMemoryFootprint",
+                   memory_info->physical_footprint_bytes);
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
++#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)) && defined(notyet)
+     TRACE_COUNTER(TRACE_DISABLED_BY_DEFAULT("system_metrics"), "VmSwapMemory",
+                   memory_info->vm_swap_bytes);
+     TRACE_COUNTER(TRACE_DISABLED_BY_DEFAULT("system_metrics"), "RssAnonMemory",
diff --git a/chromium-wip/patches/patch-services_tracing_public_cpp_trace__startup.cc b/chromium-wip/patches/patch-services_tracing_public_cpp_trace__startup.cc
new file mode 100644
index 0000000000..7aec7674e0
--- /dev/null
+++ b/chromium-wip/patches/patch-services_tracing_public_cpp_trace__startup.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/tracing/public/cpp/trace_startup.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/tracing/public/cpp/trace_startup.cc
+@@ -66,7 +66,7 @@ void EnableStartupTracingIfNeeded(bool w
+   // Create the PerfettoTracedProcess.
+   if (with_thread) {
+     g_tracing_with_thread = true;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     PerfettoTracedProcess::MaybeCreateInstanceWithThread(
+         /*will_trace_thread_restart=*/true);
+ #else
diff --git a/chromium-wip/patches/patch-services_video__capture_public_mojom_video__capture__service.mojom b/chromium-wip/patches/patch-services_video__capture_public_mojom_video__capture__service.mojom
new file mode 100644
index 0000000000..e6846a7347
--- /dev/null
+++ b/chromium-wip/patches/patch-services_video__capture_public_mojom_video__capture__service.mojom
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/video_capture/public/mojom/video_capture_service.mojom.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/video_capture/public/mojom/video_capture_service.mojom
+@@ -25,10 +25,10 @@ interface AcceleratorFactory {
+       pending_receiver<chromeos_camera.mojom.MjpegDecodeAccelerator> jda);
+ };
+ 
+-[EnableIf=is_fuchsia]
++[EnableIf=is_openbsd]
+ const sandbox.mojom.Sandbox kVideoCaptureSandbox
+   = sandbox.mojom.Sandbox.kVideoCapture;
+-[EnableIfNot=is_fuchsia]
++[EnableIfNot=is_openbsd]
+ const sandbox.mojom.Sandbox kVideoCaptureSandbox
+   = sandbox.mojom.Sandbox.kNoSandbox;
+ 
diff --git a/chromium-wip/patches/patch-services_video__effects_video__effects__sandbox__hook__linux.cc b/chromium-wip/patches/patch-services_video__effects_video__effects__sandbox__hook__linux.cc
new file mode 100644
index 0000000000..421ed5075e
--- /dev/null
+++ b/chromium-wip/patches/patch-services_video__effects_video__effects__sandbox__hook__linux.cc
@@ -0,0 +1,33 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/video_effects/video_effects_sandbox_hook_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/video_effects/video_effects_sandbox_hook_linux.cc
+@@ -6,7 +6,13 @@
+ 
+ #include <dlfcn.h>
+ 
++#include "build/build_config.h"
++
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#else
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#endif
+ #include "services/on_device_model/ml/chrome_ml_holder.h"
+ 
+ namespace video_effects {
+@@ -29,8 +35,10 @@ bool VideoEffectsPreSandboxHook(
+     DVLOG(1) << "Successfully opened Chrome ML shared library.";
+   }
+ 
++#if !BUILDFLAG(IS_BSD)
+   auto* instance = sandbox::policy::SandboxLinux::GetInstance();
+   instance->EngageNamespaceSandboxIfPossible();
++#endif
+   return true;
+ }
+ 
diff --git a/chromium-wip/patches/patch-services_video__effects_video__effects__sandbox__hook__linux.h b/chromium-wip/patches/patch-services_video__effects_video__effects__sandbox__hook__linux.h
new file mode 100644
index 0000000000..ddf61d345a
--- /dev/null
+++ b/chromium-wip/patches/patch-services_video__effects_video__effects__sandbox__hook__linux.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/video_effects/video_effects_sandbox_hook_linux.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/video_effects/video_effects_sandbox_hook_linux.h
+@@ -5,7 +5,13 @@
+ #ifndef SERVICES_VIDEO_EFFECTS_VIDEO_EFFECTS_SANDBOX_HOOK_LINUX_H_
+ #define SERVICES_VIDEO_EFFECTS_VIDEO_EFFECTS_SANDBOX_HOOK_LINUX_H_
+ 
++#include "build/build_config.h"
++
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#else
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#endif
+ 
+ namespace video_effects {
+ 
diff --git a/chromium-wip/patches/patch-services_viz_public_mojom_BUILD.gn b/chromium-wip/patches/patch-services_viz_public_mojom_BUILD.gn
new file mode 100644
index 0000000000..ca2e0842de
--- /dev/null
+++ b/chromium-wip/patches/patch-services_viz_public_mojom_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- services/viz/public/mojom/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ services/viz/public/mojom/BUILD.gn
+@@ -57,7 +57,7 @@ mojom("mojom") {
+ 
+   # Used in thread.mojom
+   enabled_features = []
+-  if (is_fuchsia || is_apple) {
++  if (is_fuchsia || is_apple || is_bsd) {
+     enabled_features += [ "thread_id_is_64_bit" ]
+   } else {
+     enabled_features += [ "thread_id_is_32_bit" ]
diff --git a/chromium-wip/patches/patch-skia_ext_SkMemory__new__handler.cpp b/chromium-wip/patches/patch-skia_ext_SkMemory__new__handler.cpp
new file mode 100644
index 0000000000..ebb290acc5
--- /dev/null
+++ b/chromium-wip/patches/patch-skia_ext_SkMemory__new__handler.cpp
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- skia/ext/SkMemory_new_handler.cpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ skia/ext/SkMemory_new_handler.cpp
+@@ -24,7 +24,7 @@
+ #include <windows.h>
+ #elif BUILDFLAG(IS_APPLE)
+ #include <malloc/malloc.h>
+-#else
++#elif !BUILDFLAG(IS_BSD)
+ #include <malloc.h>
+ #endif
+ 
+@@ -110,7 +110,7 @@ static void* malloc_nothrow(size_t size,
+   // TODO(b.kelemen): we should always use UncheckedMalloc but currently it
+   // doesn't work as intended everywhere.
+   void* result;
+-#if BUILDFLAG(IS_IOS)
++#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD)
+   result = malloc(size);
+ #else
+   // It's the responsibility of the caller to check the return value.
diff --git a/chromium-wip/patches/patch-skia_ext_font__utils.cc b/chromium-wip/patches/patch-skia_ext_font__utils.cc
new file mode 100644
index 0000000000..8c153c2e19
--- /dev/null
+++ b/chromium-wip/patches/patch-skia_ext_font__utils.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- skia/ext/font_utils.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ skia/ext/font_utils.cc
+@@ -21,7 +21,7 @@
+ #include "third_party/skia/include/ports/SkFontMgr_mac_ct.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "third_party/skia/include/ports/SkFontConfigInterface.h"
+ #include "third_party/skia/include/ports/SkFontMgr_FontConfigInterface.h"
+ #include "third_party/skia/include/ports/SkFontScanner_Fontations.h"
+@@ -64,7 +64,7 @@ static sk_sp<SkFontMgr> fontmgr_factory(
+   return SkFontMgr_New_Android(nullptr, SkFontScanner_Make_Fontations());
+ #elif BUILDFLAG(IS_APPLE)
+   return SkFontMgr_New_CoreText(nullptr);
+-#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   sk_sp<SkFontConfigInterface> fci(SkFontConfigInterface::RefGlobal());
+   return fci ? SkFontMgr_New_FCI(std::move(fci),
+                                  SkFontScanner_Make_Fontations())
diff --git a/chromium-wip/patches/patch-skia_ext_skcolorspace__trfn.cc b/chromium-wip/patches/patch-skia_ext_skcolorspace__trfn.cc
new file mode 100644
index 0000000000..9e73b10d44
--- /dev/null
+++ b/chromium-wip/patches/patch-skia_ext_skcolorspace__trfn.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- skia/ext/skcolorspace_trfn.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ skia/ext/skcolorspace_trfn.cc
+@@ -2,6 +2,8 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
++#include <cmath>
++
+ #include "skia/ext/skcolorspace_trfn.h"
+ 
+ #include <array>
diff --git a/chromium-wip/patches/patch-third__party_abseil-cpp_absl_base_config.h b/chromium-wip/patches/patch-third__party_abseil-cpp_absl_base_config.h
new file mode 100644
index 0000000000..43aed2ea13
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_abseil-cpp_absl_base_config.h
@@ -0,0 +1,28 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/abseil-cpp/absl/base/config.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/abseil-cpp/absl/base/config.h
+@@ -409,7 +409,8 @@ static_assert(ABSL_INTERNAL_INLINE_NAMES
+ #ifdef ABSL_HAVE_SCHED_YIELD
+ #error ABSL_HAVE_SCHED_YIELD cannot be directly set
+ #elif defined(__linux__) || defined(__ros__) || defined(__native_client__) || \
+-    defined(__VXWORKS__)
++    defined(__VXWORKS__) || defined(__OpenBSD__) || defined(__FreeBSD__) || \
++    defined(__NetBSD__)
+ #define ABSL_HAVE_SCHED_YIELD 1
+ #endif
+ 
+@@ -424,7 +425,8 @@ static_assert(ABSL_INTERNAL_INLINE_NAMES
+ // platforms.
+ #ifdef ABSL_HAVE_SEMAPHORE_H
+ #error ABSL_HAVE_SEMAPHORE_H cannot be directly set
+-#elif defined(__linux__) || defined(__ros__) || defined(__VXWORKS__)
++#elif defined(__linux__) || defined(__ros__) || defined(__VXWORKS__) || \
++    defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
+ #define ABSL_HAVE_SEMAPHORE_H 1
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-third__party_abseil-cpp_absl_base_internal_raw__logging.cc b/chromium-wip/patches/patch-third__party_abseil-cpp_absl_base_internal_raw__logging.cc
new file mode 100644
index 0000000000..65c803bf7d
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_abseil-cpp_absl_base_internal_raw__logging.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/abseil-cpp/absl/base/internal/raw_logging.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/abseil-cpp/absl/base/internal/raw_logging.cc
+@@ -44,7 +44,7 @@
+ #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
+     defined(__hexagon__) || defined(__Fuchsia__) ||                     \
+     defined(__native_client__) || defined(__OpenBSD__) ||               \
+-    defined(__EMSCRIPTEN__) || defined(__ASYLO__)
++    defined(__EMSCRIPTEN__) || defined(__ASYLO__) || defined(__NetBSD__)
+ 
+ #include <unistd.h>
+ 
diff --git a/chromium-wip/patches/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc b/chromium-wip/patches/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc
new file mode 100644
index 0000000000..304e4d3ce1
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc
@@ -0,0 +1,71 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/abseil-cpp/absl/base/internal/sysinfo.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/abseil-cpp/absl/base/internal/sysinfo.cc
+@@ -30,7 +30,7 @@
+ #include <sys/syscall.h>
+ #endif
+ 
+-#if defined(__APPLE__) || defined(__FreeBSD__)
++#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+ #include <sys/sysctl.h>
+ #endif
+ 
+@@ -198,6 +198,7 @@ static double GetNominalCPUFrequency() {
+ 
+ #else
+ 
++#if !defined(__OpenBSD__) && !defined(__FreeBSD__)
+ // Helper function for reading a long from a file. Returns true if successful
+ // and the memory location pointed to by value is set to the value read.
+ static bool ReadLongFromFile(const char *file, long *value) {
+@@ -230,6 +231,7 @@ static bool ReadLongFromFile(const char 
+   }
+   return ret;
+ }
++#endif
+ 
+ #if defined(ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY)
+ 
+@@ -329,9 +331,11 @@ static double GetNominalCPUFrequency() {
+   // a new mode (turbo mode). Essentially, those frequencies cannot
+   // always be relied upon. The same reasons apply to /proc/cpuinfo as
+   // well.
++#if !defined(__OpenBSD__) && !defined(__FreeBSD__) // pledge violation
+   if (ReadLongFromFile("/sys/devices/system/cpu/cpu0/tsc_freq_khz", &freq)) {
+     return freq * 1e3;  // Value is kHz.
+   }
++#endif
+ 
+ #if defined(ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY)
+   // On these platforms, the TSC frequency is the nominal CPU
+@@ -350,10 +354,12 @@ static double GetNominalCPUFrequency() {
+   // If CPU scaling is in effect, we want to use the *maximum*
+   // frequency, not whatever CPU speed some random processor happens
+   // to be using now.
++#if !defined(__OpenBSD__) && !defined(__FreeBSD__) // pledge violation
+   if (ReadLongFromFile("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq",
+                        &freq)) {
+     return freq * 1e3;  // Value is kHz.
+   }
++#endif
+ 
+   return 1.0;
+ #endif  // !ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY
+@@ -465,6 +471,12 @@ pid_t GetTID() {
+   return reinterpret_cast<pid_t>(thread);
+ }
+ 
++#elif defined(__OpenBSD__)
++
++pid_t GetTID() {
++  return getthrid();
++}
++
+ #elif defined(__Fuchsia__)
+ 
+ pid_t GetTID() {
diff --git a/chromium-wip/patches/patch-third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.h b/chromium-wip/patches/patch-third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.h
new file mode 100644
index 0000000000..dbed25ad64
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.h
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h
+@@ -35,7 +35,8 @@
+ #if defined(__ELF__) && !defined(__OpenBSD__) && !defined(__QNX__) && \
+     !defined(__native_client__) && !defined(__asmjs__) &&             \
+     !defined(__wasm__) && !defined(__HAIKU__) && !defined(__sun) &&   \
+-    !defined(__VXWORKS__) && !defined(__hexagon__) && !defined(__XTENSA__)
++    !defined(__VXWORKS__) && !defined(__hexagon__) && !defined(__XTENSA__) && \
++    !defined(__FreeBSD__) && !defined(__NetBSD__)
+ #define ABSL_HAVE_ELF_MEM_IMAGE 1
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-third__party_abseil-cpp_absl_time_internal_cctz_src_time__zone__format.cc b/chromium-wip/patches/patch-third__party_abseil-cpp_absl_time_internal_cctz_src_time__zone__format.cc
new file mode 100644
index 0000000000..2b7b8860ee
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_abseil-cpp_absl_time_internal_cctz_src_time__zone__format.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc
+@@ -19,7 +19,8 @@
+ #endif
+ 
+ #if defined(HAS_STRPTIME) && HAS_STRPTIME
+-#if !defined(_XOPEN_SOURCE) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
++#if !defined(_XOPEN_SOURCE) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && \
++    !defined(__NetBSD__)
+ #define _XOPEN_SOURCE 500  // Exposes definitions for SUSv2 (UNIX 98).
+ #endif
+ #endif
diff --git a/chromium-wip/patches/patch-third__party_afl_src_afl-fuzz.c b/chromium-wip/patches/patch-third__party_afl_src_afl-fuzz.c
new file mode 100644
index 0000000000..10335c142e
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_afl_src_afl-fuzz.c
@@ -0,0 +1,48 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/afl/src/afl-fuzz.c.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/afl/src/afl-fuzz.c
+@@ -58,7 +58,8 @@
+ #include <sys/ioctl.h>
+ #include <sys/file.h>
+ 
+-#if defined(__APPLE__) || defined(__FreeBSD__) || defined (__OpenBSD__)
++#if defined(__APPLE__) || defined(__FreeBSD__) || defined (__OpenBSD__) || \
++    defined (__NetBSD__)
+ #  include <sys/sysctl.h>
+ #endif /* __APPLE__ || __FreeBSD__ || __OpenBSD__ */
+ 
+@@ -3531,7 +3532,8 @@ static double get_runnable_processes(voi
+ 
+   static double res;
+ 
+-#if defined(__APPLE__) || defined(__FreeBSD__) || defined (__OpenBSD__)
++#if defined(__APPLE__) || defined(__FreeBSD__) || defined (__OpenBSD__) || \
++    defined (__NetBSD__)
+ 
+   /* I don't see any portable sysctl or so that would quickly give us the
+      number of runnable processes; the 1-minute load average can be a
+@@ -7347,7 +7349,8 @@ static void get_core_count(void) {
+ 
+   u32 cur_runnable = 0;
+ 
+-#if defined(__APPLE__) || defined(__FreeBSD__) || defined (__OpenBSD__)
++#if defined(__APPLE__) || defined(__FreeBSD__) || defined (__OpenBSD__) || \
++    defined (__NetBSD__)
+ 
+   size_t s = sizeof(cpu_core_count);
+ 
+@@ -7392,7 +7395,8 @@ static void get_core_count(void) {
+ 
+     cur_runnable = (u32)get_runnable_processes();
+ 
+-#if defined(__APPLE__) || defined(__FreeBSD__) || defined (__OpenBSD__)
++#if defined(__APPLE__) || defined(__FreeBSD__) || defined (__OpenBSD__) || \
++    defined (__NetBSD__)
+ 
+     /* Add ourselves, since the 1-minute average doesn't include that yet. */
+ 
diff --git a/chromium-wip/patches/patch-third__party_angle_BUILD.gn b/chromium-wip/patches/patch-third__party_angle_BUILD.gn
new file mode 100644
index 0000000000..286b498bb5
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_angle_BUILD.gn
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/angle/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/angle/BUILD.gn
+@@ -360,7 +360,6 @@ config("extra_warnings") {
+       "-Wtautological-type-limit-compare",
+       "-Wundefined-reinterpret-cast",
+       "-Wunneeded-internal-declaration",
+-      "-Wunused-but-set-variable",
+       "-Wsuggest-destructor-override",
+       "-Wsuggest-override",
+ 
+@@ -537,7 +536,7 @@ template("angle_common_lib") {
+       all_dependent_configs = [ ":angle_disable_pool_alloc" ]
+     }
+ 
+-    if (is_linux || is_chromeos) {
++    if ((is_linux || is_chromeos) && !is_bsd) {
+       libs = [ "dl" ]
+     }
+ 
+@@ -692,6 +691,9 @@ angle_static_library("angle_gpu_info_uti
+         "Xi",
+         "Xext",
+       ]
++      if (is_bsd) {
++        libs += [ "GL" ]
++      }
+     }
+ 
+     if (angle_use_wayland && angle_has_build) {
diff --git a/chromium-wip/patches/patch-third__party_angle_src_common_platform.h b/chromium-wip/patches/patch-third__party_angle_src_common_platform.h
new file mode 100644
index 0000000000..b297b17b9d
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_angle_src_common_platform.h
@@ -0,0 +1,30 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/angle/src/common/platform.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/angle/src/common/platform.h
+@@ -23,8 +23,19 @@
+ #elif defined(__linux__) || defined(EMSCRIPTEN)
+ #    define ANGLE_PLATFORM_LINUX 1
+ #    define ANGLE_PLATFORM_POSIX 1
+-#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) ||              \
+-    defined(__DragonFly__) || defined(__sun) || defined(__GLIBC__) || defined(__GNU__) || \
++#elif defined(__OpenBSD__)
++#    define ANGLE_PLATFORM_OPENBSD 1
++#    define ANGLE_PLATFORM_POSIX 1
++#    define ANGLE_PLATFORM_BSD 1
++#elif defined(__NetBSD__)
++#    define ANGLE_PLATFORM_NETBSD 1
++#    define ANGLE_PLATFORM_POSIX 1
++#    define ANGLE_PLATFORM_BSD 1
++#elif defined(__FreeBSD__)
++#    define ANGLE_PLATFORM_FREEBSD 1
++#    define ANGLE_PLATFORM_POSIX 1
++#    define ANGLE_PLATFORM_BSD 1
++#elif defined(__DragonFly__) || defined(__sun) || defined(__GLIBC__) || defined(__GNU__) || \
+     defined(__QNX__) || defined(__Fuchsia__) || defined(__HAIKU__)
+ #    define ANGLE_PLATFORM_POSIX 1
+ #else
diff --git a/chromium-wip/patches/patch-third__party_angle_src_common_platform__helpers.h b/chromium-wip/patches/patch-third__party_angle_src_common_platform__helpers.h
new file mode 100644
index 0000000000..2c1bbd3056
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_angle_src_common_platform__helpers.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/angle/src/common/platform_helpers.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/angle/src/common/platform_helpers.h
+@@ -62,7 +62,7 @@ inline constexpr bool IsIOS()
+ 
+ inline constexpr bool IsLinux()
+ {
+-#if defined(ANGLE_PLATFORM_LINUX)
++#if defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD)
+     return true;
+ #else
+     return false;
diff --git a/chromium-wip/patches/patch-third__party_angle_src_common_system__utils.cpp b/chromium-wip/patches/patch-third__party_angle_src_common_system__utils.cpp
new file mode 100644
index 0000000000..d9bfbfc2bb
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_angle_src_common_system__utils.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/angle/src/common/system_utils.cpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/angle/src/common/system_utils.cpp
+@@ -25,7 +25,7 @@ namespace angle
+ {
+ std::string GetExecutableName()
+ {
+-#if defined(ANGLE_PLATFORM_ANDROID) && __ANDROID_API__ >= 21
++#if (defined(ANGLE_PLATFORM_ANDROID) && __ANDROID_API__ >= 21) || defined(ANGLE_PLATFORM_BSD)
+     // Support for "getprogname" function in bionic was introduced in L (API level 21)
+     const char *executableName = getprogname();
+     return (executableName) ? std::string(executableName) : "ANGLE";
diff --git a/chromium-wip/patches/patch-third__party_angle_src_common_system__utils__linux.cpp b/chromium-wip/patches/patch-third__party_angle_src_common_system__utils__linux.cpp
new file mode 100644
index 0000000000..ad6461e400
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_angle_src_common_system__utils__linux.cpp
@@ -0,0 +1,47 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/angle/src/common/system_utils_linux.cpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/angle/src/common/system_utils_linux.cpp
+@@ -15,10 +15,17 @@
+ #include <sys/types.h>
+ #include <unistd.h>
+ 
++#if ANGLE_PLATFORM_OPENBSD
++#include <pthread_np.h>
++#elif ANGLE_PLATFORM_NETBSD
++#include <pthread.h>
++#endif
++
+ #include <array>
+ 
+ namespace angle
+ {
++#if ANGLE_PLATFORM_LINUX
+ std::string GetExecutablePath()
+ {
+     // We cannot use lstat to get the size of /proc/self/exe as it always returns 0
+@@ -34,6 +41,7 @@ std::string GetExecutablePath()
+     path[result] = '\0';
+     return path;
+ }
++#endif
+ 
+ std::string GetExecutableDirectory()
+ {
+@@ -59,6 +67,12 @@ void SetCurrentThreadName(const char *na
+     // There's a 15-character (16 including '\0') limit.  If the name is too big (and ERANGE is
+     // returned), name will be ignored.
+     ASSERT(strlen(name) < 16);
++#if ANGLE_PLATFORM_OPENBSD
++    pthread_set_name_np(pthread_self(), name);
++#elif ANGLE_PLATFORM_NETBSD
++    pthread_setname_np(pthread_self(), "%s", (void *)name);
++#else
+     pthread_setname_np(pthread_self(), name);
++#endif
+ }
+ }  // namespace angle
diff --git a/chromium-wip/patches/patch-third__party_angle_src_gpu__info__util_SystemInfo__internal.h b/chromium-wip/patches/patch-third__party_angle_src_gpu__info__util_SystemInfo__internal.h
new file mode 100644
index 0000000000..86ceb6f5e8
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_angle_src_gpu__info__util_SystemInfo__internal.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/angle/src/gpu_info_util/SystemInfo_internal.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/angle/src/gpu_info_util/SystemInfo_internal.h
+@@ -15,6 +15,13 @@
+ namespace angle
+ {
+ 
++#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
++bool CollectMesaCardInfo(std::vector<GPUDeviceInfo> *devices);                
++#if defined(__FreeBSD__)
++bool GetPCIDevicesFreeBSD(std::vector<GPUDeviceInfo> *devices);
++#endif
++#endif
++
+ // Defined in SystemInfo_libpci when GPU_INFO_USE_LIBPCI is defined.
+ bool GetPCIDevicesWithLibPCI(std::vector<GPUDeviceInfo> *devices);
+ // Defined in SystemInfo_x11 when GPU_INFO_USE_X11 is defined.
diff --git a/chromium-wip/patches/patch-third__party_angle_src_gpu__info__util_SystemInfo__libpci.cpp b/chromium-wip/patches/patch-third__party_angle_src_gpu__info__util_SystemInfo__libpci.cpp
new file mode 100644
index 0000000000..03847cfb1b
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_angle_src_gpu__info__util_SystemInfo__libpci.cpp
@@ -0,0 +1,96 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/angle/src/gpu_info_util/SystemInfo_libpci.cpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/angle/src/gpu_info_util/SystemInfo_libpci.cpp
+@@ -12,6 +12,11 @@
+ #include <pci/pci.h>
+ #include <unistd.h>
+ 
++#if defined(__FreeBSD__)
++#include <fcntl.h>
++#include <sys/pciio.h>
++#endif
++
+ #include "common/angleutils.h"
+ #include "common/debug.h"
+ 
+@@ -86,6 +91,75 @@ struct LibPCI : private angle::NonCopyab
+ 
+ }  // anonymous namespace
+ 
++#if defined(__FreeBSD__)
++// Adds an entry per PCI GPU found and fills the device and vendor ID.
++bool GetPCIDevicesFreeBSD(std::vector<GPUDeviceInfo> *devices)
++{
++    int fd;
++    struct pci_conf_io conf;
++    struct pci_conf *matches;
++    uint32_t offset = 0;
++
++    fd = open("/dev/pci", O_RDONLY);
++    if (fd < 0)
++        return false;
++
++    matches = new struct pci_conf[32];
++    conf.generation = 0;
++    do {
++        conf.pat_buf_len = 0;
++        conf.num_patterns = 0;
++        conf.patterns = NULL;
++        conf.match_buf_len = 32 * sizeof(struct pci_conf);
++        conf.num_matches = 32;
++        conf.matches = matches;
++        conf.offset = offset;
++        conf.status = PCI_GETCONF_ERROR;
++        if (ioctl(fd, PCIOCGETCONF, &conf) < 0) {
++            if (errno == ENODEV)
++                break;
++        }
++        /* PCI_GETCONF_LIST_CHANGED would require us to start over. */
++        if (conf.status == PCI_GETCONF_ERROR || conf.status == PCI_GETCONF_LIST_CHANGED) {
++            break;
++        }
++
++        for (unsigned int i = 0; i < conf.num_matches; i++) {
++            uint16_t device_class = (matches[i].pc_class << 8) |  matches[i].pc_subclass;
++
++            // Skip non-GPU devices
++            switch (device_class)
++            {
++                case PCI_CLASS_DISPLAY_VGA:
++                case PCI_CLASS_DISPLAY_XGA:
++                case PCI_CLASS_DISPLAY_3D:
++                    break;
++                default:
++                    continue;
++            }
++
++            // Skip unknown devices
++            if (matches[i].pc_vendor == 0 || matches[i].pc_device == 0) {
++                continue;
++            }
++
++            GPUDeviceInfo info;
++            info.vendorId = matches[i].pc_vendor;
++            info.deviceId = matches[i].pc_device;
++
++            devices->push_back(info);
++        }
++        offset += conf.num_matches;
++    } while (conf.status == PCI_GETCONF_MORE_DEVS);
++
++    delete[] matches;
++
++    close(fd);
++
++    return true;
++}
++#endif
++
+ // Adds an entry per PCI GPU found and fills the device and vendor ID.
+ bool GetPCIDevicesWithLibPCI(std::vector<GPUDeviceInfo> *devices)
+ {
diff --git a/chromium-wip/patches/patch-third__party_angle_src_gpu__info__util_SystemInfo__linux.cpp b/chromium-wip/patches/patch-third__party_angle_src_gpu__info__util_SystemInfo__linux.cpp
new file mode 100644
index 0000000000..693232b538
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_angle_src_gpu__info__util_SystemInfo__linux.cpp
@@ -0,0 +1,41 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/angle/src/gpu_info_util/SystemInfo_linux.cpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/angle/src/gpu_info_util/SystemInfo_linux.cpp
+@@ -71,6 +71,24 @@ bool GetPCIDevicesWithLibPCI(std::vector
+ 
+ bool GetSystemInfo(SystemInfo *info)
+ {
++#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
++    if (!CollectMesaCardInfo(&(info->gpus)))
++    {
++#if defined(__FreeBSD__)
++        if (!GetPCIDevicesFreeBSD(&(info->gpus)))
++        {
++#endif
++#if defined(ANGLE_USE_VULKAN_SYSTEM_INFO)
++            // Try vulkan backend to get GPU info
++            return GetSystemInfoVulkan(info);
++#else
++            return false;
++#endif
++#if defined(__FreeBSD__)
++        }
++#endif
++    }
++#else
+     if (!GetPCIDevicesWithLibPCI(&(info->gpus)))
+     {
+ #if defined(ANGLE_USE_VULKAN_SYSTEM_INFO)
+@@ -85,6 +103,7 @@ bool GetSystemInfo(SystemInfo *info)
+     {
+         return false;
+     }
++#endif
+ 
+     GetDualGPUInfo(info);
+ 
diff --git a/chromium-wip/patches/patch-third__party_angle_src_gpu__info__util_SystemInfo__x11.cpp b/chromium-wip/patches/patch-third__party_angle_src_gpu__info__util_SystemInfo__x11.cpp
new file mode 100644
index 0000000000..ced73ff4d1
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_angle_src_gpu__info__util_SystemInfo__x11.cpp
@@ -0,0 +1,67 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/angle/src/gpu_info_util/SystemInfo_x11.cpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/angle/src/gpu_info_util/SystemInfo_x11.cpp
+@@ -8,6 +8,10 @@
+ 
+ #include "gpu_info_util/SystemInfo_internal.h"
+ 
++#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
++#include <GL/glx.h>
++#include <GL/glxext.h>
++#endif
+ #include <X11/Xlib.h>
+ 
+ #include "common/debug.h"
+@@ -18,9 +22,47 @@
+ #    error SystemInfo_x11.cpp compiled without GPU_INFO_USE_X11
+ #endif
+ 
++#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
++#define GLX_RENDERER_VENDOR_ID_MESA	0x8183
++#define GLX_RENDERER_DEVICE_ID_MESA	0x8184
++#endif
++
+ namespace angle
+ {
+ 
++#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
++bool CollectMesaCardInfo(std::vector<GPUDeviceInfo> *devices)
++{
++    unsigned int vid[3], did[3];
++
++    Display *display = XOpenDisplay(NULL);
++    if (!display) {
++        return false;
++    }
++
++    PFNGLXQUERYRENDERERINTEGERMESAPROC queryInteger =
++        (PFNGLXQUERYRENDERERINTEGERMESAPROC) glXGetProcAddressARB((const GLubyte *)
++        "glXQueryRendererIntegerMESA");
++
++    if (!queryInteger)
++        return false;
++
++    bool vendor_ret =
++        queryInteger(display, 0, 0, GLX_RENDERER_VENDOR_ID_MESA, vid);
++    bool device_ret =
++        queryInteger(display, 0, 0, GLX_RENDERER_DEVICE_ID_MESA, did);
++
++    if (vendor_ret && device_ret) {
++        GPUDeviceInfo info;
++        info.vendorId = vid[0];
++        info.deviceId = did[0];
++        devices->push_back(info);
++    }
++
++    return true;
++}
++#endif
++
+ bool GetNvidiaDriverVersionWithXNVCtrl(std::string *version)
+ {
+     *version = "";
diff --git a/chromium-wip/patches/patch-third__party_angle_src_libANGLE_Display.cpp b/chromium-wip/patches/patch-third__party_angle_src_libANGLE_Display.cpp
new file mode 100644
index 0000000000..79ab2df727
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_angle_src_libANGLE_Display.cpp
@@ -0,0 +1,62 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/angle/src/libANGLE/Display.cpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/angle/src/libANGLE/Display.cpp
+@@ -58,7 +58,7 @@
+ #        include "libANGLE/renderer/gl/wgl/DisplayWGL.h"
+ #    elif ANGLE_ENABLE_CGL
+ #        include "libANGLE/renderer/gl/cgl/DisplayCGL.h"
+-#    elif defined(ANGLE_PLATFORM_LINUX)
++#    elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD)
+ #        include "libANGLE/renderer/gl/egl/DisplayEGL.h"
+ #        if defined(ANGLE_USE_X11)
+ #            include "libANGLE/renderer/gl/glx/DisplayGLX_api.h"
+@@ -422,7 +422,7 @@ rx::DisplayImpl *CreateDisplayFromAttrib
+             impl = new rx::DisplayCGL(state);
+             break;
+ 
+-#    elif defined(ANGLE_PLATFORM_LINUX)
++#    elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD)
+ #        if defined(ANGLE_USE_GBM) || defined(ANGLE_USE_WAYLAND)
+             if (platformType == 0)
+             {
+@@ -473,7 +473,7 @@ rx::DisplayImpl *CreateDisplayFromAttrib
+ #if defined(ANGLE_ENABLE_OPENGL)
+ #    if defined(ANGLE_PLATFORM_WINDOWS)
+             impl = new rx::DisplayWGL(state);
+-#    elif defined(ANGLE_PLATFORM_LINUX)
++#    elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD)
+ #        if defined(ANGLE_USE_GBM) || defined(ANGLE_USE_WAYLAND)
+             if (platformType == 0)
+             {
+@@ -529,7 +529,7 @@ rx::DisplayImpl *CreateDisplayFromAttrib
+                 impl = rx::CreateVulkanWin32Display(state);
+             }
+             break;
+-#    elif defined(ANGLE_PLATFORM_LINUX)
++#    elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD)
+ #        if defined(ANGLE_USE_GBM)
+             if (platformType == EGL_PLATFORM_GBM_KHR && rx::IsVulkanGbmDisplayAvailable())
+             {
+@@ -2146,7 +2146,7 @@ static ClientExtensions GenerateClientEx
+     extensions.platformWaylandEXT = true;
+ #endif
+ 
+-#if defined(ANGLE_PLATFORM_LINUX) && (defined(ANGLE_ENABLE_OPENGL) || defined(ANGLE_ENABLE_VULKAN))
++#if (defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD)) && (defined(ANGLE_ENABLE_OPENGL) || defined(ANGLE_ENABLE_VULKAN))
+     extensions.platformSurfacelessMESA = true;
+ #endif
+ 
+@@ -2193,7 +2193,7 @@ static ClientExtensions GenerateClientEx
+     extensions.x11Visual = true;
+ #endif
+ 
+-#if defined(ANGLE_PLATFORM_LINUX)
++#if defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD)
+     extensions.platformANGLEDeviceTypeEGLANGLE = true;
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-third__party_angle_src_libANGLE_renderer_gl_glx_FunctionsGLX.cpp b/chromium-wip/patches/patch-third__party_angle_src_libANGLE_renderer_gl_glx_FunctionsGLX.cpp
new file mode 100644
index 0000000000..f7ea973460
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_angle_src_libANGLE_renderer_gl_glx_FunctionsGLX.cpp
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/angle/src/libANGLE/renderer/gl/glx/FunctionsGLX.cpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/angle/src/libANGLE/renderer/gl/glx/FunctionsGLX.cpp
+@@ -144,10 +144,10 @@ bool FunctionsGLX::initialize(Display *x
+     // which a GLXWindow was ever created.
+     if (!sLibHandle)
+     {
+-        sLibHandle = dlopen("libGL.so.1", RTLD_NOW);
++        sLibHandle = dlopen("libGL.so", RTLD_NOW);
+         if (!sLibHandle)
+         {
+-            *errorString = std::string("Could not dlopen libGL.so.1: ") + dlerror();
++            *errorString = std::string("Could not dlopen libGL.so: ") + dlerror();
+             return false;
+         }
+     }
diff --git a/chromium-wip/patches/patch-third__party_angle_src_libANGLE_renderer_vulkan_DisplayVk__api.h b/chromium-wip/patches/patch-third__party_angle_src_libANGLE_renderer_vulkan_DisplayVk__api.h
new file mode 100644
index 0000000000..6d9e9af0b4
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_angle_src_libANGLE_renderer_vulkan_DisplayVk__api.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/angle/src/libANGLE/renderer/vulkan/DisplayVk_api.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/angle/src/libANGLE/renderer/vulkan/DisplayVk_api.h
+@@ -23,7 +23,7 @@ bool IsVulkanWin32DisplayAvailable();
+ DisplayImpl *CreateVulkanWin32Display(const egl::DisplayState &state);
+ #endif  // defined(ANGLE_PLATFORM_WINDOWS)
+ 
+-#if defined(ANGLE_PLATFORM_LINUX)
++#if defined(ANGLE_PLATFORM_POSIX)
+ bool IsVulkanWaylandDisplayAvailable();
+ DisplayImpl *CreateVulkanWaylandDisplay(const egl::DisplayState &state);
+ 
diff --git a/chromium-wip/patches/patch-third__party_angle_util_BUILD.gn b/chromium-wip/patches/patch-third__party_angle_util_BUILD.gn
new file mode 100644
index 0000000000..52eec519fe
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_angle_util_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/angle/util/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/angle/util/BUILD.gn
+@@ -332,7 +332,7 @@ foreach(is_shared_library,
+     ]
+     libs = []
+ 
+-    if (is_linux || is_chromeos) {
++    if ((is_linux || is_chromeos) && !is_bsd) {
+       libs += [
+         "rt",
+         "dl",
diff --git a/chromium-wip/patches/patch-third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc b/chromium-wip/patches/patch-third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc
new file mode 100644
index 0000000000..6886ca99eb
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/common/renderer_preferences/renderer_preferences_mojom_traits.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/common/renderer_preferences/renderer_preferences_mojom_traits.cc
+@@ -77,7 +77,7 @@ bool StructTraits<blink::mojom::Renderer
+ 
+   out->send_subresource_notification = data.send_subresource_notification();
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (!data.ReadSystemFontFamilyName(&out->system_font_family_name))
+     return false;
+ #endif
diff --git a/chromium-wip/patches/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences.h b/chromium-wip/patches/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences.h
new file mode 100644
index 0000000000..300e455fe1
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/public/common/renderer_preferences/renderer_preferences.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/public/common/renderer_preferences/renderer_preferences.h
+@@ -65,7 +65,7 @@ struct BLINK_COMMON_EXPORT RendererPrefe
+   UserAgentOverride user_agent_override;
+   std::string accept_languages;
+   bool send_subresource_notification{false};
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   std::string system_font_family_name;
+ #endif
+ #if BUILDFLAG(IS_WIN)
diff --git a/chromium-wip/patches/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h b/chromium-wip/patches/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h
new file mode 100644
index 0000000000..9f4092b22e
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h
+@@ -180,7 +180,7 @@ struct BLINK_COMMON_EXPORT
+     return data.send_subresource_notification;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   static const std::string& system_font_family_name(
+       const ::blink::RendererPreferences& data) {
+     return data.system_font_family_name;
diff --git a/chromium-wip/patches/patch-third__party_blink_public_platform_platform.h b/chromium-wip/patches/patch-third__party_blink_public_platform_platform.h
new file mode 100644
index 0000000000..d193387a99
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_public_platform_platform.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/public/platform/platform.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/public/platform/platform.h
+@@ -373,7 +373,7 @@ class BLINK_PLATFORM_EXPORT Platform {
+     return nullptr;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // This is called after the thread is created, so the embedder
+   // can initiate an IPC to change its thread type (on Linux we can't
+   // increase the nice value, so we need to ask the browser process). This
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_bindings_scripts_bind__gen_style__format.py b/chromium-wip/patches/patch-third__party_blink_renderer_bindings_scripts_bind__gen_style__format.py
new file mode 100644
index 0000000000..665f868288
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_bindings_scripts_bind__gen_style__format.py
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py
+@@ -30,7 +30,7 @@ def init(root_src_dir, enable_style_form
+ 
+     # Determine //buildtools/<platform>/ directory
+     new_path_platform_suffix = ""
+-    if sys.platform.startswith("linux"):
++    if sys.platform.startswith(("linux","openbsd","freebsd","netbsd")):
+         platform = "linux64"
+         exe_suffix = ""
+     elif sys.platform.startswith("darwin"):
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_build_scripts_gperf.py b/chromium-wip/patches/patch-third__party_blink_renderer_build_scripts_gperf.py
new file mode 100644
index 0000000000..82e5d9a34d
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_build_scripts_gperf.py
@@ -0,0 +1,36 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/build/scripts/gperf.py.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/build/scripts/gperf.py
+@@ -28,27 +28,6 @@ def generate_gperf(gperf_path, gperf_inp
+             stdout=subprocess.PIPE,
+             universal_newlines=True)
+         gperf_output = gperf.communicate(gperf_input)[0]
+-        # Massage gperf output to be more palatable for modern compilers.
+-        # TODO(thakis): Upstream these to gperf so we don't need massaging.
+-        # `register` is deprecated in C++11 and removed in C++17, so remove
+-        # it from gperf's output.
+-        # https://savannah.gnu.org/bugs/index.php?53028
+-        gperf_output = re.sub(r'\bregister ', '', gperf_output)
+-        # -Wimplicit-fallthrough needs an explicit fallthrough statement,
+-        # so replace gperf 3.1's /*FALLTHROUGH*/ comment with the statement.
+-        # https://savannah.gnu.org/bugs/index.php?53029 (fixed in 3.2)
+-        if re.search(
+-                r'/\* C\+\+ code produced by gperf version 3\.[01](\.\d+)? \*/',
+-                gperf_output):
+-            gperf_output = gperf_output.replace('/*FALLTHROUGH*/',
+-                                                '  [[fallthrough]];')
+-        # -Wpointer-to-int-cast warns about casting pointers to smaller ints
+-        # Replace {(int)(long)&(foo), bar} with
+-        # {static_cast<int>(reinterpret_cast<uintptr_t>(&(foo)), bar}
+-        gperf_output = re.sub(
+-            r'\(int\)\(long\)(.*?),',
+-            r'static_cast<int>(reinterpret_cast<uintptr_t>(\1)),',
+-            gperf_output)
+         script = 'third_party/blink/renderer/build/scripts/gperf.py'
+         return '// Generated by %s\n' % script + gperf_output
+     except OSError:
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_build_scripts_run__with__pythonpath.py b/chromium-wip/patches/patch-third__party_blink_renderer_build_scripts_run__with__pythonpath.py
new file mode 100644
index 0000000000..d92e53e091
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_build_scripts_run__with__pythonpath.py
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/build/scripts/run_with_pythonpath.py.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/build/scripts/run_with_pythonpath.py
+@@ -22,6 +22,7 @@ def main():
+         existing_pp = (
+             os.pathsep + env['PYTHONPATH']) if 'PYTHONPATH' in env else ''
+         env['PYTHONPATH'] = os.pathsep.join(python_paths) + existing_pp
++    env['LD_LIBRARY_PATH'] = "@WRKSRC@/out/Release"
+     sys.exit(subprocess.call([sys.executable] + args, env=env))
+ 
+ 
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_controller_blink__initializer.cc b/chromium-wip/patches/patch-third__party_blink_renderer_controller_blink__initializer.cc
new file mode 100644
index 0000000000..76218357ce
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_controller_blink__initializer.cc
@@ -0,0 +1,41 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/controller/blink_initializer.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/controller/blink_initializer.cc
+@@ -82,12 +82,12 @@
+ #include "third_party/blink/renderer/controller/private_memory_footprint_provider.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "third_party/blink/renderer/controller/memory_usage_monitor_posix.h"
+ #endif
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "third_party/blink/renderer/controller/highest_pmf_reporter.h"
+ #include "third_party/blink/renderer/controller/user_level_memory_pressure_signal_generator.h"
+ #endif
+@@ -255,7 +255,7 @@ void BlinkInitializer::RegisterInterface
+       main_thread_task_runner);
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   binders.Add<mojom::blink::MemoryUsageMonitorLinux>(
+       ConvertToBaseRepeatingCallback(
+           CrossThreadBindRepeating(&MemoryUsageMonitorPosix::Bind)),
+@@ -303,7 +303,7 @@ void BlinkInitializer::RegisterMemoryWat
+   MemorySaverController::Initialize();
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   // Start reporting the highest private memory footprint after the first
+   // navigation.
+   HighestPmfReporter::Initialize(main_thread_task_runner);
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.cc b/chromium-wip/patches/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.cc
new file mode 100644
index 0000000000..0843dfb462
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.cc
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/controller/memory_usage_monitor_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/controller/memory_usage_monitor_posix.cc
+@@ -132,15 +132,17 @@ void MemoryUsageMonitorPosix::ResetFileD
+ 
+ void MemoryUsageMonitorPosix::SetProcFiles(base::File statm_file,
+                                            base::File status_file) {
++#if !BUILDFLAG(IS_BSD)
+   DCHECK(statm_file.IsValid());
+   DCHECK(status_file.IsValid());
+   DCHECK_EQ(-1, statm_fd_.get());
+   DCHECK_EQ(-1, status_fd_.get());
+   statm_fd_.reset(statm_file.TakePlatformFile());
+   status_fd_.reset(status_file.TakePlatformFile());
++#endif
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // static
+ void MemoryUsageMonitorPosix::Bind(
+     mojo::PendingReceiver<mojom::blink::MemoryUsageMonitorLinux> receiver) {
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.h b/chromium-wip/patches/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.h
new file mode 100644
index 0000000000..41651fa8f4
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.h
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/controller/memory_usage_monitor_posix.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/controller/memory_usage_monitor_posix.h
+@@ -13,7 +13,7 @@
+ #include "third_party/blink/renderer/controller/controller_export.h"
+ #include "third_party/blink/renderer/controller/memory_usage_monitor.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "third_party/blink/public/mojom/memory_usage_monitor_linux.mojom-blink.h"
+ #endif
+ 
+@@ -22,7 +22,7 @@ namespace blink {
+ // MemoryUsageMonitor implementation for Android and Linux.
+ class CONTROLLER_EXPORT MemoryUsageMonitorPosix
+     : public MemoryUsageMonitor
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     ,
+       public mojom::blink::MemoryUsageMonitorLinux
+ #endif
+@@ -30,7 +30,7 @@ class CONTROLLER_EXPORT MemoryUsageMonit
+  public:
+   MemoryUsageMonitorPosix() = default;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   static void Bind(
+       mojo::PendingReceiver<mojom::blink::MemoryUsageMonitorLinux> receiver);
+ #endif
+@@ -48,7 +48,7 @@ class CONTROLLER_EXPORT MemoryUsageMonit
+                                               uint64_t* vm_size,
+                                               uint64_t* vm_hwm_size);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // mojom::MemoryUsageMonitorLinux implementations:
+   void SetProcFiles(base::File statm_file, base::File status_file) override;
+ #endif
+@@ -66,7 +66,7 @@ class CONTROLLER_EXPORT MemoryUsageMonit
+   base::ScopedFD statm_fd_;
+   base::ScopedFD status_fd_;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   mojo::Receiver<mojom::blink::MemoryUsageMonitorLinux> receiver_{this};
+ #endif
+ };
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_core_editing_editing__behavior.cc b/chromium-wip/patches/patch-third__party_blink_renderer_core_editing_editing__behavior.cc
new file mode 100644
index 0000000000..b727e86ed5
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_core_editing_editing__behavior.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/core/editing/editing_behavior.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/core/editing/editing_behavior.cc
+@@ -304,7 +304,7 @@ bool EditingBehavior::ShouldInsertCharac
+   // unexpected behaviour
+   if (ch < ' ')
+     return false;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // According to XKB map no keyboard combinations with ctrl key are mapped to
+   // printable characters, however we need the filter as the DomKey/text could
+   // contain printable characters.
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_core_execution__context_navigator__base.cc b/chromium-wip/patches/patch-third__party_blink_renderer_core_execution__context_navigator__base.cc
new file mode 100644
index 0000000000..60ab008517
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_core_execution__context_navigator__base.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/core/execution_context/navigator_base.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/core/execution_context/navigator_base.cc
+@@ -31,7 +31,7 @@ String GetReducedNavigatorPlatform() {
+   return "Win32";
+ #elif BUILDFLAG(IS_FUCHSIA)
+   return "";
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return "Linux x86_64";
+ #elif BUILDFLAG(IS_IOS)
+   return "iPhone";
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_core_exported_web__view__impl.cc b/chromium-wip/patches/patch-third__party_blink_renderer_core_exported_web__view__impl.cc
new file mode 100644
index 0000000000..203746cd75
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_core_exported_web__view__impl.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/core/exported/web_view_impl.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/core/exported/web_view_impl.cc
+@@ -421,7 +421,7 @@ void RecordPrerenderActivationSignalDela
+ #if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_WIN)
+ SkFontHinting RendererPreferencesToSkiaHinting(
+     const blink::RendererPreferences& prefs) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (!prefs.should_antialias_text) {
+     // When anti-aliasing is off, GTK maps all non-zero hinting settings to
+     // 'Normal' hinting so we do the same. Otherwise, folks who have 'Slight'
+@@ -3444,7 +3444,7 @@ void WebViewImpl::UpdateFontRenderingFro
+       gfx::FontRenderParams::SUBPIXEL_RENDERING_NONE);
+   WebFontRenderStyle::SetSubpixelPositioning(
+       renderer_preferences_.use_subpixel_positioning);
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (!renderer_preferences_.system_font_family_name.empty()) {
+     WebFontRenderStyle::SetSystemFontFamily(blink::WebString::FromUTF8(
+         renderer_preferences_.system_font_family_name));
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_core_frame_web__frame__test.cc b/chromium-wip/patches/patch-third__party_blink_renderer_core_frame_web__frame__test.cc
new file mode 100644
index 0000000000..6d3a88745d
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_core_frame_web__frame__test.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/core/frame/web_frame_test.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/core/frame/web_frame_test.cc
+@@ -6473,7 +6473,7 @@ TEST_F(WebFrameTest, DISABLED_PositionFo
+ }
+ 
+ #if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD)
+ // TODO(crbug.com/1090246): Fix these tests on Fuchsia and re-enable.
+ // TODO(crbug.com/1317375): Build these tests on all platforms.
+ #define MAYBE_SelectRangeStaysHorizontallyAlignedWhenMoved \
+@@ -6882,7 +6882,7 @@ TEST_F(CompositedSelectionBoundsTest, La
+ TEST_F(CompositedSelectionBoundsTest, LargeSelectionNoScroll) {
+   RunTest("composited_selection_bounds_large_selection_noscroll.html");
+ }
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #if !BUILDFLAG(IS_ANDROID)
+ TEST_F(CompositedSelectionBoundsTest, Input) {
+   web_view_helper_.GetWebView()->GetSettings()->SetDefaultFontSize(16);
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc b/chromium-wip/patches/patch-third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc
new file mode 100644
index 0000000000..16d06bf1cf
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc
+@@ -51,7 +51,7 @@ constexpr base::TimeDelta kEncodeRowSlac
+ 
+ /* The value is based on user statistics on Nov 2017. */
+ #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-     BUILDFLAG(IS_WIN))
++     BUILDFLAG(IS_WIN)) || BUILDFLAG(IS_BSD)
+ const double kIdleTaskStartTimeoutDelayMs = 1000.0;
+ #else
+ const double kIdleTaskStartTimeoutDelayMs = 4000.0;  // For ChromeOS, Mobile
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc b/chromium-wip/patches/patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc
new file mode 100644
index 0000000000..0a3c22775d
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/core/inspector/inspector_memory_agent.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/core/inspector/inspector_memory_agent.cc
+@@ -192,7 +192,7 @@ InspectorMemoryAgent::GetSamplingProfile
+ 
+ Vector<String> InspectorMemoryAgent::Symbolize(
+     const std::vector<const void*>& addresses) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // TODO(alph): Move symbolization to the client.
+   Vector<const void*> addresses_to_symbolize;
+   for (const void* address : addresses) {
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_core_layout_layout__view.cc b/chromium-wip/patches/patch-third__party_blink_renderer_core_layout_layout__view.cc
new file mode 100644
index 0000000000..eb044871e5
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_core_layout_layout__view.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/core/layout/layout_view.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/core/layout/layout_view.cc
+@@ -75,7 +75,7 @@
+ #include "ui/display/screen_info.h"
+ #include "ui/gfx/geometry/quad_f.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "third_party/blink/renderer/platform/fonts/font_cache.h"
+ #endif
+ 
+@@ -790,7 +790,7 @@ void LayoutView::LayoutRoot() {
+     intrinsic_logical_widths_ = LogicalWidth();
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // The font code in FontPlatformData does not have a direct connection to the
+   // document, the frame or anything from which we could retrieve the device
+   // scale factor. After using zoom for DSF, the GraphicsContext does only ever
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_core_loader_mixed__content__checker.cc b/chromium-wip/patches/patch-third__party_blink_renderer_core_loader_mixed__content__checker.cc
new file mode 100644
index 0000000000..ac0c3e1759
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_core_loader_mixed__content__checker.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/core/loader/mixed_content_checker.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/core/loader/mixed_content_checker.cc
+@@ -510,7 +510,7 @@ bool MixedContentChecker::ShouldBlockFet
+   switch (context_type) {
+     case mojom::blink::MixedContentContextType::kOptionallyBlockable:
+ 
+-#if (BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX)) && \
++#if (BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && \
+     BUILDFLAG(ENABLE_CAST_RECEIVER)
+       // Fuchsia WebEngine can be configured to allow loading Mixed Content from
+       // an insecure IP address. This is a workaround to revert Fuchsia Cast
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_core_origin__trials_origin__trial__context.cc b/chromium-wip/patches/patch-third__party_blink_renderer_core_origin__trials_origin__trial__context.cc
new file mode 100644
index 0000000000..c0ebe7990c
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_core_origin__trials_origin__trial__context.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/core/origin_trials/origin_trial_context.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/core/origin_trials/origin_trial_context.cc
+@@ -568,7 +568,7 @@ bool OriginTrialContext::CanEnableTrialF
+   }
+ 
+   if (trial_name == "TranslationAPI") {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     return base::FeatureList::IsEnabled(features::kTranslationAPI);
+ #else
+     return false;
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_core_page_context__menu__controller.cc b/chromium-wip/patches/patch-third__party_blink_renderer_core_page_context__menu__controller.cc
new file mode 100644
index 0000000000..ef653cf763
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_core_page_context__menu__controller.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/core/page/context_menu_controller.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/core/page/context_menu_controller.cc
+@@ -654,7 +654,7 @@ bool ContextMenuController::ShowContextM
+     if (potential_image_node != nullptr &&
+         IsA<HTMLCanvasElement>(potential_image_node)) {
+       data.media_type = mojom::blink::ContextMenuDataMediaType::kCanvas;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       // TODO(crbug.com/40902474): Support reading from the WebGPU front buffer
+       // on Linux and remove the below code, which results in "Copy Image" and
+       // "Save Image To" being grayed out in the context menu.
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_core_paint_paint__layer.cc b/chromium-wip/patches/patch-third__party_blink_renderer_core_paint_paint__layer.cc
new file mode 100644
index 0000000000..4025c44b13
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_core_paint_paint__layer.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/core/paint/paint_layer.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/core/paint/paint_layer.cc
+@@ -125,7 +125,7 @@ namespace blink {
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ struct SameSizeAsPaintLayer : GarbageCollected<PaintLayer>, DisplayItemClient {
+   // The bit fields may fit into the machine word of DisplayItemClient which
+   // has only 8-bit data.
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc b/chromium-wip/patches/patch-third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc
new file mode 100644
index 0000000000..68eefe1408
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc
+@@ -146,7 +146,7 @@ bool ScrollbarThemeAura::SupportsDragSna
+ // Disable snapback on desktop Linux to better integrate with the desktop
+ // behavior. Typically, Linux apps do not implement scrollbar snapback (this
+ // is true for at least GTK and QT apps).
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return false;
+ #else
+   return true;
+@@ -423,7 +423,7 @@ ScrollbarPart ScrollbarThemeAura::PartsT
+ 
+ bool ScrollbarThemeAura::ShouldCenterOnThumb(const Scrollbar& scrollbar,
+                                              const WebMouseEvent& event) const {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (event.button == WebPointerProperties::Button::kMiddle)
+     return true;
+ #endif
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_core_xml_xslt__processor.h b/chromium-wip/patches/patch-third__party_blink_renderer_core_xml_xslt__processor.h
new file mode 100644
index 0000000000..439098f5cd
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_core_xml_xslt__processor.h
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/core/xml/xslt_processor.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/core/xml/xslt_processor.h
+@@ -77,7 +77,11 @@ class XSLTProcessor final : public Scrip
+ 
+   void reset();
+ 
++#if (LIBXML_VERSION >= 21200)
+   static void ParseErrorFunc(void* user_data, const xmlError*);
++#else
++  static void ParseErrorFunc(void* user_data, xmlError*);
++#endif
+   static void GenericErrorFunc(void* user_data, const char* msg, ...);
+ 
+   // Only for libXSLT callbacks
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_core_xml_xslt__processor__libxslt.cc b/chromium-wip/patches/patch-third__party_blink_renderer_core_xml_xslt__processor__libxslt.cc
new file mode 100644
index 0000000000..7085544786
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_core_xml_xslt__processor__libxslt.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+@@ -68,7 +68,11 @@ void XSLTProcessor::GenericErrorFunc(voi
+   // It would be nice to do something with this error message.
+ }
+ 
++#if (LIBXML_VERSION >= 21200)
+ void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
++#else
++void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
++#endif
+   FrameConsole* console = static_cast<FrameConsole*>(user_data);
+   if (!console)
+     return;
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_modules_media_audio_audio__device__factory.cc b/chromium-wip/patches/patch-third__party_blink_renderer_modules_media_audio_audio__device__factory.cc
new file mode 100644
index 0000000000..80645b15e1
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_modules_media_audio_audio__device__factory.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/modules/media/audio/audio_device_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/modules/media/audio/audio_device_factory.cc
+@@ -33,7 +33,7 @@ namespace {
+ // Set when the default factory is overridden.
+ AudioDeviceFactory* g_factory_override = nullptr;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Due to driver deadlock issues on Windows (http://crbug/422522) there is a
+ // chance device authorization response is never received from the browser side.
+ // In this case we will time out, to avoid renderer hang forever waiting for
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc b/chromium-wip/patches/patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc
new file mode 100644
index 0000000000..813398baa1
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager_test.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager_test.cc
+@@ -857,7 +857,7 @@ TEST_F(AudioRendererMixerManagerTest, Mi
+             mixer->get_output_params_for_testing().sample_rate());
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   // Use 10 ms buffer (441 frames per buffer).
+   EXPECT_EQ(output_sample_rate / 100,
+             mixer->get_output_params_for_testing().frames_per_buffer());
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_modules_peerconnection_rtc__data__channel.cc b/chromium-wip/patches/patch-third__party_blink_renderer_modules_peerconnection_rtc__data__channel.cc
new file mode 100644
index 0000000000..c468ee4bbc
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_modules_peerconnection_rtc__data__channel.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/modules/peerconnection/rtc_data_channel.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/modules/peerconnection/rtc_data_channel.cc
+@@ -542,6 +542,7 @@ void RTCDataChannel::send(Blob* data, Ex
+   pending_messages_.push_back(message);
+ }
+ 
++#undef close
+ void RTCDataChannel::close() {
+   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+   if (state_ == webrtc::DataChannelInterface::kClosing ||
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc b/chromium-wip/patches/patch-third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc
new file mode 100644
index 0000000000..4e615464e6
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/modules/peerconnection/webrtc_audio_renderer_test.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/modules/peerconnection/webrtc_audio_renderer_test.cc
+@@ -382,7 +382,7 @@ TEST_F(WebRtcAudioRendererTest, DISABLED
+   SetupRenderer(kDefaultOutputDeviceId);
+   renderer_proxy_->Start();
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   static const int kExpectedBufferSize = kHardwareSampleRate / 100;
+ #elif BUILDFLAG(IS_ANDROID)
+   static const int kExpectedBufferSize = 2 * kHardwareSampleRate / 100;
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_modules_webaudio_audio__worklet__thread__test.cc b/chromium-wip/patches/patch-third__party_blink_renderer_modules_webaudio_audio__worklet__thread__test.cc
new file mode 100644
index 0000000000..b3adb64c7d
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_modules_webaudio_audio__worklet__thread__test.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/modules/webaudio/audio_worklet_thread_test.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/modules/webaudio/audio_worklet_thread_test.cc
+@@ -465,7 +465,7 @@ class AudioWorkletThreadPriorityTest
+ 
+     // TODO(crbug.com/1022888): The worklet thread priority is always NORMAL
+     // on OS_LINUX and OS_CHROMEOS regardless of the thread priority setting.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     if (expected_priority == base::ThreadPriorityForTest::kRealtimeAudio ||
+         expected_priority == base::ThreadPriorityForTest::kDisplay) {
+       EXPECT_EQ(actual_priority, base::ThreadPriorityForTest::kNormal);
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc b/chromium-wip/patches/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc
new file mode 100644
index 0000000000..11b91f1272
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
+@@ -6520,7 +6520,7 @@ void WebGLRenderingContextBase::TexImage
+   // unmultiply has been requested or we need to never premultiply for Image
+   // creation from a VideoFrame.
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // TODO(crbug.com/1175907): Only TexImage2D seems to work with the GPU path on
+   // Android M -- appears to work fine on R, but to avoid regressions in <video>
+   // limit to TexImage2D only for now. Fails conformance test on Nexus 5X:
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_modules_webgpu_gpu__canvas__context.cc b/chromium-wip/patches/patch-third__party_blink_renderer_modules_webgpu_gpu__canvas__context.cc
new file mode 100644
index 0000000000..d16632c143
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_modules_webgpu_gpu__canvas__context.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/modules/webgpu/gpu_canvas_context.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/modules/webgpu/gpu_canvas_context.cc
+@@ -224,7 +224,7 @@ CanvasResourceProvider* GPUCanvasContext
+ 
+   scoped_refptr<WebGPUMailboxTexture> front_buffer_texture;
+   if (source_buffer == kFrontBuffer) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // By returning false here the canvas will show up as black in the scenarios
+     // that copy the front buffer, such as printing.
+     // TODO(crbug.com/40902474): Support concurrent SharedImage reads via Dawn
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_modules_webgpu_gpu__queue.cc b/chromium-wip/patches/patch-third__party_blink_renderer_modules_webgpu_gpu__queue.cc
new file mode 100644
index 0000000000..a08c8420a0
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_modules_webgpu_gpu__queue.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/modules/webgpu/gpu_queue.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/modules/webgpu/gpu_queue.cc
+@@ -850,7 +850,7 @@ bool GPUQueue::CopyFromCanvasSourceImage
+ // on linux platform.
+ // TODO(crbug.com/1424119): using a webgpu mailbox texture on the OpenGLES
+ // backend is failing for unknown reasons.
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   bool forceReadback = true;
+ #elif BUILDFLAG(IS_ANDROID)
+   // TODO(crbug.com/dawn/1969): Some Android devices don't fail to copy from
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_platform_BUILD.gn b/chromium-wip/patches/patch-third__party_blink_renderer_platform_BUILD.gn
new file mode 100644
index 0000000000..42a56acca1
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_platform_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/platform/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/platform/BUILD.gn
+@@ -2057,7 +2057,7 @@ static_library("test_support") {
+   ]
+ 
+   # fuzzed_data_provider may not work with a custom toolchain.
+-  if (custom_toolchain == "" && is_clang) {
++  if ((custom_toolchain == "" && is_clang) && !is_bsd) {
+     sources += [
+       "testing/fuzzed_data_provider.cc",
+       "testing/fuzzed_data_provider.h",
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_platform_fonts_font__cache.cc b/chromium-wip/patches/patch-third__party_blink_renderer_platform_fonts_font__cache.cc
new file mode 100644
index 0000000000..1044d3c51b
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_platform_fonts_font__cache.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/platform/fonts/font_cache.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/platform/fonts/font_cache.cc
+@@ -82,7 +82,7 @@ extern const char kNotoColorEmojiCompat[
+ 
+ SkFontMgr* FontCache::static_font_manager_ = nullptr;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ float FontCache::device_scale_factor_ = 1.0;
+ #endif
+ 
+@@ -136,7 +136,7 @@ const FontPlatformData* FontCache::Syste
+     const FontDescription& font_description) {
+   const AtomicString& family = FontCache::SystemFontFamily();
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || \
+-    BUILDFLAG(IS_IOS)
++    BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD)
+   if (family.empty() || family == font_family_names::kSystemUi)
+     return nullptr;
+ #else
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_platform_fonts_font__cache.h b/chromium-wip/patches/patch-third__party_blink_renderer_platform_fonts_font__cache.h
new file mode 100644
index 0000000000..09b345eea9
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_platform_fonts_font__cache.h
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/platform/fonts/font_cache.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/platform/fonts/font_cache.h
+@@ -55,7 +55,7 @@
+ #include "third_party/skia/include/core/SkFontMgr.h"
+ #include "third_party/skia/include/core/SkRefCnt.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "ui/gfx/font_fallback_linux.h"
+ #endif
+ 
+@@ -171,7 +171,7 @@ class PLATFORM_EXPORT FontCache final {
+ 
+   static void MaybePreloadSystemFonts();
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // These are needed for calling QueryRenderStyleForStrike, since
+   // gfx::GetFontRenderParams makes distinctions based on DSF.
+   static float DeviceScaleFactor() { return device_scale_factor_; }
+@@ -247,7 +247,7 @@ class PLATFORM_EXPORT FontCache final {
+       const char* locale_family_name);
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   static bool GetFontForCharacter(UChar32,
+                                   const char* preferred_locale,
+                                   gfx::FallbackFontData*);
+@@ -320,7 +320,7 @@ class PLATFORM_EXPORT FontCache final {
+                                    const FontFaceCreationParams&,
+                                    std::string& name);
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   static AtomicString GetFamilyNameForCharacter(SkFontMgr*,
+                                                 UChar32,
+                                                 const FontDescription&,
+@@ -357,7 +357,7 @@ class PLATFORM_EXPORT FontCache final {
+   bool is_test_font_mgr_ = false;
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   static float device_scale_factor_;
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_platform_fonts_font__description.cc b/chromium-wip/patches/patch-third__party_blink_renderer_platform_fonts_font__description.cc
new file mode 100644
index 0000000000..47520be68d
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_platform_fonts_font__description.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/platform/fonts/font_description.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/platform/fonts/font_description.cc
+@@ -42,7 +42,7 @@
+ #include "third_party/blink/renderer/platform/wtf/text/string_hash.h"
+ #include "third_party/blink/renderer/platform/wtf/text/string_hasher.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ #include "third_party/blink/renderer/platform/fonts/font_cache.h"
+ #endif
+ 
+@@ -297,7 +297,7 @@ FontCacheKey FontDescription::CacheKey(
+       static_cast<unsigned>(fields_.orientation_) << 1 |            // bit 2-3
+       static_cast<unsigned>(fields_.subpixel_text_position_);       // bit 1
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   float device_scale_factor_for_key = FontCache::DeviceScaleFactor();
+ #else
+   float device_scale_factor_for_key = 1.0f;
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_platform_fonts_font__metrics.cc b/chromium-wip/patches/patch-third__party_blink_renderer_platform_fonts_font__metrics.cc
new file mode 100644
index 0000000000..1192c9e826
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_platform_fonts_font__metrics.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/platform/fonts/font_metrics.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/platform/fonts/font_metrics.cc
+@@ -39,7 +39,7 @@
+ namespace blink {
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ // This is the largest VDMX table which we'll try to load and parse.
+ static const size_t kMaxVDMXTableSize = 1024 * 1024;  // 1 MB
+ #endif
+@@ -67,7 +67,7 @@ void FontMetrics::AscentDescentWithHacks
+   bool is_vdmx_valid = false;
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   // Manually digging up VDMX metrics is only applicable when bytecode hinting
+   // using FreeType.  With DirectWrite or CoreText, no bytecode hinting is ever
+   // done.  This code should be pushed into FreeType (hinted font metrics).
+@@ -111,7 +111,7 @@ void FontMetrics::AscentDescentWithHacks
+     descent = SkScalarRoundToScalar(metrics.fDescent);
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+     // When subpixel positioning is enabled, if the descent is rounded down,
+     // the descent part of the glyph may be truncated when displayed in a
+     // 'overflow: hidden' container.  To avoid that, borrow 1 unit from the
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_platform_fonts_font__unique__name__lookup.cc b/chromium-wip/patches/patch-third__party_blink_renderer_platform_fonts_font__unique__name__lookup.cc
new file mode 100644
index 0000000000..bf78531fce
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_platform_fonts_font__unique__name__lookup.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/platform/fonts/font_unique_name_lookup.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/platform/fonts/font_unique_name_lookup.cc
+@@ -9,7 +9,7 @@
+ #if BUILDFLAG(IS_ANDROID)
+ #include "third_party/blink/public/mojom/font_unique_name_lookup/font_unique_name_lookup.mojom-blink.h"
+ #include "third_party/blink/renderer/platform/fonts/android/font_unique_name_lookup_android.h"
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "third_party/blink/renderer/platform/fonts/linux/font_unique_name_lookup_linux.h"
+ #elif BUILDFLAG(IS_WIN)
+ #include "third_party/blink/renderer/platform/fonts/win/font_unique_name_lookup_win.h"
+@@ -24,7 +24,7 @@ std::unique_ptr<FontUniqueNameLookup>
+ FontUniqueNameLookup::GetPlatformUniqueNameLookup() {
+ #if BUILDFLAG(IS_ANDROID)
+   return std::make_unique<FontUniqueNameLookupAndroid>();
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return std::make_unique<FontUniqueNameLookupLinux>();
+ #elif BUILDFLAG(IS_WIN)
+   return std::make_unique<FontUniqueNameLookupWin>();
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_platform_fonts_skia_font__cache__skia.cc b/chromium-wip/patches/patch-third__party_blink_renderer_platform_fonts_skia_font__cache__skia.cc
new file mode 100644
index 0000000000..84ae29c2f9
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_platform_fonts_skia_font__cache__skia.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc
+@@ -65,7 +65,7 @@ AtomicString ToAtomicString(const SkStri
+   return AtomicString::FromUTF8(std::string_view(str.begin(), str.end()));
+ }
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // This function is called on android or when we are emulating android fonts on
+ // linux and the embedder has overriden the default fontManager with
+ // WebFontRendering::setSkiaFontMgr.
+@@ -246,7 +246,7 @@ const FontPlatformData* FontCache::Creat
+   std::string name;
+ 
+   sk_sp<SkTypeface> typeface;
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   bool noto_color_emoji_from_gmscore = false;
+ #if BUILDFLAG(IS_ANDROID)
+   // Use the unique local matching pathway for fetching Noto Color Emoji Compat
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_platform_graphics_begin__frame__provider.cc b/chromium-wip/patches/patch-third__party_blink_renderer_platform_graphics_begin__frame__provider.cc
new file mode 100644
index 0000000000..82dd657fb4
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_platform_graphics_begin__frame__provider.cc
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/platform/graphics/begin_frame_provider.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/platform/graphics/begin_frame_provider.cc
+@@ -70,8 +70,12 @@ void BeginFrameProvider::CreateComposito
+ 
+   // Once we are using RAF, this thread is driving user interactive display
+   // updates. Update priority accordingly.
++  // pledge(2)
++  // stop this baloney
++#if !defined(OS_OPENBSD)
+   base::PlatformThread::SetCurrentThreadType(
+       base::ThreadType::kDisplayCritical);
++#endif
+ 
+   mojo::Remote<mojom::blink::EmbeddedFrameSinkProvider> provider;
+   Platform::Current()->GetBrowserInterfaceBroker()->GetInterface(
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_platform_graphics_gpu_image__layer__bridge.cc b/chromium-wip/patches/patch-third__party_blink_renderer_platform_graphics_gpu_image__layer__bridge.cc
new file mode 100644
index 0000000000..32a9587192
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_platform_graphics_gpu_image__layer__bridge.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/platform/graphics/gpu/image_layer_bridge.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/platform/graphics/gpu/image_layer_bridge.cc
+@@ -47,7 +47,7 @@ scoped_refptr<StaticBitmapImage> MakeAcc
+ 
+   const auto paint_image = source->PaintImageForCurrentFrame();
+   const auto image_info = paint_image.GetSkImageInfo();
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // TODO(b/330865436): On Linux, CanvasResourceProvider doesn't always check
+   // for SCANOUT support correctly on X11 and it's never supported in
+   // practice. Therefore, don't include it until this flow is reworked.
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_platform_graphics_video__frame__submitter.cc b/chromium-wip/patches/patch-third__party_blink_renderer_platform_graphics_video__frame__submitter.cc
new file mode 100644
index 0000000000..b677e051c5
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_platform_graphics_video__frame__submitter.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/platform/graphics/video_frame_submitter.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/platform/graphics/video_frame_submitter.cc
+@@ -389,7 +389,7 @@ void VideoFrameSubmitter::OnBeginFrame(
+     auto& details = timing_details.find(frame_token)->value;
+     auto& feedback = details.presentation_feedback;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // TODO: On Linux failure flag is unreliable, and perfectly rendered frames
+     // are reported as failures all the time.
+     bool presentation_failure = false;
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_platform_instrumentation_partition__alloc__memory__dump__provider.cc b/chromium-wip/patches/patch-third__party_blink_renderer_platform_instrumentation_partition__alloc__memory__dump__provider.cc
new file mode 100644
index 0000000000..e6cdb628b1
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_platform_instrumentation_partition__alloc__memory__dump__provider.cc
@@ -0,0 +1,34 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/platform/instrumentation/partition_alloc_memory_dump_provider.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/platform/instrumentation/partition_alloc_memory_dump_provider.cc
+@@ -14,7 +14,9 @@
+ 
+ namespace blink {
+ 
++#if !BUILDFLAG(IS_BSD)
+ const char kPartitionAllocDumpName[] = "partition_alloc";
++#endif
+ 
+ PartitionAllocMemoryDumpProvider* PartitionAllocMemoryDumpProvider::Instance() {
+   DEFINE_STATIC_LOCAL(PartitionAllocMemoryDumpProvider, instance, ());
+@@ -24,6 +26,7 @@ PartitionAllocMemoryDumpProvider* Partit
+ bool PartitionAllocMemoryDumpProvider::OnMemoryDump(
+     const base::trace_event::MemoryDumpArgs& args,
+     base::trace_event::ProcessMemoryDump* memory_dump) {
++#if !BUILDFLAG(IS_BSD)
+   using base::trace_event::MemoryDumpLevelOfDetail;
+ 
+   MemoryDumpLevelOfDetail level_of_detail = args.level_of_detail;
+@@ -49,6 +52,7 @@ bool PartitionAllocMemoryDumpProvider::O
+       "size", "bytes", partition_stats_dumper.total_active_bytes());
+   memory_dump->AddOwnershipEdge(allocated_objects_dump->guid(),
+                                 partitions_dump->guid());
++#endif
+ 
+   return true;
+ }
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_platform_peerconnection_rtc__video__encoder__factory.cc b/chromium-wip/patches/patch-third__party_blink_renderer_platform_peerconnection_rtc__video__encoder__factory.cc
new file mode 100644
index 0000000000..888c0d7f15
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_platform_peerconnection_rtc__video__encoder__factory.cc
@@ -0,0 +1,23 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/platform/peerconnection/rtc_video_encoder_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/platform/peerconnection/rtc_video_encoder_factory.cc
+@@ -324,12 +324,12 @@ SupportedFormats GetSupportedFormatsInte
+       supported_formats.profiles.push_back(profile.profile);
+       supported_formats.sdp_formats.push_back(std::move(*format));
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(IS_WIN)
+       const bool kShouldAddH264Cbp =
+           base::FeatureList::IsEnabled(kMediaFoundationH264CbpEncoding) &&
+           profile.profile == media::VideoCodecProfile::H264PROFILE_BASELINE;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       const bool kShouldAddH264Cbp =
+           profile.profile == media::VideoCodecProfile::H264PROFILE_BASELINE;
+ #endif
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_platform_runtime__enabled__features.json5 b/chromium-wip/patches/patch-third__party_blink_renderer_platform_runtime__enabled__features.json5
new file mode 100644
index 0000000000..5ad9440ce5
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_platform_runtime__enabled__features.json5
@@ -0,0 +1,80 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/platform/runtime_enabled_features.json5.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/platform/runtime_enabled_features.json5
+@@ -506,7 +506,7 @@
+       name: "AppTitle",
+       status: "experimental",
+       origin_trial_feature_name: "AppTitle",
+-      origin_trial_os: ["win", "mac", "linux", "chromeos"],
++      origin_trial_os: ["win", "mac", "linux", "chromeos", "openbsd", "freebsd", "netbsd"],
+       base_feature: "WebAppEnableAppTitle",
+     },
+     {
+@@ -1878,7 +1878,7 @@
+       name: "DocumentIsolationPolicy",
+       status: "experimental",
+       origin_trial_feature_name: "DocumentIsolationPolicy",
+-      origin_trial_os: ["win", "mac", "linux", "chromeos"],
++      origin_trial_os: ["win", "mac", "linux", "chromeos", "openbsd", "freebsd", "netbsd"],
+       base_feature: "none",
+     },
+     {
+@@ -2145,7 +2145,7 @@
+       base_feature: "none",
+       public: true,
+       origin_trial_feature_name: "FedCmMultipleIdentityProviders",
+-      origin_trial_os: ["win", "mac", "linux", "chromeos"],
++      origin_trial_os: ["win", "mac", "linux", "chromeos", "openbsd", "freebsd", "netbsd"],
+       origin_trial_allows_third_party: true,
+     },
+     {
+@@ -3672,7 +3672,7 @@
+       // Tracking bug for the implementation: https://crbug.com/1462930
+       name: "PermissionElement",
+       origin_trial_feature_name: "PermissionElement",
+-      origin_trial_os: ["win", "mac", "linux", "fuchsia", "chromeos", "android"],
++      origin_trial_os: ["win", "mac", "linux", "fuchsia", "chromeos", "android", "openbsd", "freebsd", "netbsd"],
+       status: "experimental",
+       public: true,
+       base_feature_status: "enabled",
+@@ -3836,7 +3836,7 @@
+     {
+       name: "PrivateNetworkAccessPermissionPrompt",
+       origin_trial_feature_name: "PrivateNetworkAccessPermissionPrompt",
+-      origin_trial_os: ["win", "mac", "linux", "fuchsia", "chromeos"],
++      origin_trial_os: ["win", "mac", "linux", "fuchsia", "chromeos", "openbsd", "freebsd", "netbsd"],
+       status: "stable",
+       public: true,
+       base_feature: "none",
+@@ -5185,7 +5185,7 @@
+       name: "UnrestrictedSharedArrayBuffer",
+       base_feature: "none",
+       origin_trial_feature_name: "UnrestrictedSharedArrayBuffer",
+-      origin_trial_os: ["win", "mac", "linux", "fuchsia", "chromeos"],
++      origin_trial_os: ["win", "mac", "linux", "fuchsia", "chromeos", "openbsd", "freebsd", "netbsd"],
+     },
+     // Enables using policy-controlled feature "usb-unrestricted" to allow
+     // isolated context to access protected USB interface classes and to
+@@ -5378,7 +5378,7 @@
+     {
+       name: "WebAppScopeExtensions",
+       origin_trial_feature_name: "WebAppScopeExtensions",
+-      origin_trial_os: ["win", "mac", "linux", "chromeos"],
++      origin_trial_os: ["win", "mac", "linux", "chromeos", "openbsd", "freebsd", "netbsd"],
+       status: "experimental",
+       base_feature: "none",
+     },
+@@ -5650,7 +5650,7 @@
+     {
+       name: "WebIdentityDigitalCredentials",
+       origin_trial_feature_name: "WebIdentityDigitalCredentials",
+-      origin_trial_os: ["android", "win", "mac", "linux", "chromeos"],
++      origin_trial_os: ["android", "win", "mac", "linux", "chromeos", "openbsd", "freebsd", "netbsd"],
+       origin_trial_allows_third_party: true,
+       implied_by: ["WebIdentityDigitalCredentialsCreation"],
+       public: true,
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_platform_scheduler_common_thread.cc b/chromium-wip/patches/patch-third__party_blink_renderer_platform_scheduler_common_thread.cc
new file mode 100644
index 0000000000..2dcf12500b
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_platform_scheduler_common_thread.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/platform/scheduler/common/thread.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/platform/scheduler/common/thread.cc
+@@ -95,7 +95,7 @@ void Thread::CreateAndSetCompositorThrea
+           // the program's lifetime once assigned.
+           base::Unretained(compositor_thread.get())));
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_OPENBSD)
+   compositor_thread->GetTaskRunner()->PostTaskAndReplyWithResult(
+       FROM_HERE, base::BindOnce(&base::PlatformThread::CurrentId),
+       base::BindOnce([](base::PlatformThreadId compositor_thread_id) {
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_platform_widget_compositing_blink__categorized__worker__pool__delegate.cc b/chromium-wip/patches/patch-third__party_blink_renderer_platform_widget_compositing_blink__categorized__worker__pool__delegate.cc
new file mode 100644
index 0000000000..7cb5c108cc
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_platform_widget_compositing_blink__categorized__worker__pool__delegate.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/platform/widget/compositing/blink_categorized_worker_pool_delegate.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/platform/widget/compositing/blink_categorized_worker_pool_delegate.cc
+@@ -27,7 +27,7 @@ BlinkCategorizedWorkerPoolDelegate& Blin
+ 
+ void BlinkCategorizedWorkerPoolDelegate::NotifyThreadWillRun(
+     base::PlatformThreadId tid) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   scoped_refptr<base::TaskRunner> task_runner =
+       Thread::MainThread()->GetTaskRunner(MainThreadTaskRunnerRestricted());
+   task_runner->PostTask(FROM_HERE, base::BindOnce(
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_platform_wtf_container__annotations.h b/chromium-wip/patches/patch-third__party_blink_renderer_platform_wtf_container__annotations.h
new file mode 100644
index 0000000000..a674cc50ae
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_platform_wtf_container__annotations.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/platform/wtf/container_annotations.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/platform/wtf/container_annotations.h
+@@ -11,7 +11,7 @@
+ // TODO(ochang): Remove the ARCH_CPU_X86_64 condition to enable this for X86
+ // once the crashes there have been fixed: http://crbug.com/461406
+ #if defined(ADDRESS_SANITIZER) &&                      \
+-    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \
++    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \
+     defined(ARCH_CPU_X86_64)
+ 
+ // Annotations require buffers to begin on an 8-byte boundary. See
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_platform_wtf_math__extras.h b/chromium-wip/patches/patch-third__party_blink_renderer_platform_wtf_math__extras.h
new file mode 100644
index 0000000000..d25b01232a
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_platform_wtf_math__extras.h
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/platform/wtf/math_extras.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/platform/wtf/math_extras.h
+@@ -128,6 +128,10 @@ constexpr float Grad2turn(float g) {
+   return g * (1.0f / 400.0f);
+ }
+ 
++#if defined(OS_FREEBSD)
++#pragma clang diagnostic push
++#pragma clang diagnostic ignored "-Winvalid-constexpr"
++#endif
+ constexpr double RoundHalfTowardsPositiveInfinity(double value) {
+   return std::floor(value + 0.5);
+ }
+@@ -135,6 +139,9 @@ constexpr double RoundHalfTowardsPositiv
+ constexpr float RoundHalfTowardsPositiveInfinity(float value) {
+   return std::floor(value + 0.5f);
+ }
++#if defined(OS_FREEBSD)
++#pragma clang diagnostic pop
++#endif
+ 
+ // ClampTo() is implemented by templated helper classes (to allow for partial
+ // template specialization) as well as several helper functions.
diff --git a/chromium-wip/patches/patch-third__party_blink_renderer_platform_wtf_stack__util.cc b/chromium-wip/patches/patch-third__party_blink_renderer_platform_wtf_stack__util.cc
new file mode 100644
index 0000000000..6b2e0a9a5c
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_blink_renderer_platform_wtf_stack__util.cc
@@ -0,0 +1,82 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/blink/renderer/platform/wtf/stack_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/blink/renderer/platform/wtf/stack_util.cc
+@@ -27,6 +27,13 @@ extern "C" void* __libc_stack_end;  // N
+ #include <sanitizer/asan_interface.h>
+ #endif
+ 
++#if BUILDFLAG(IS_BSD)
++#include <sys/signal.h>
++#if !BUILDFLAG(IS_NETBSD)
++#include <pthread_np.h>
++#endif
++#endif
++
+ namespace WTF {
+ 
+ size_t GetUnderestimatedStackSize() {
+@@ -39,7 +46,8 @@ size_t GetUnderestimatedStackSize() {
+ // correctly for the main thread.
+ 
+ #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_FUCHSIA) || \
++    BUILDFLAG(IS_NETBSD)
+   // pthread_getattr_np() can fail if the thread is not invoked by
+   // pthread_create() (e.g., the main thread of blink_unittests).
+   // If so, a conservative size estimate is returned.
+@@ -60,7 +68,7 @@ size_t GetUnderestimatedStackSize() {
+     pthread_attr_destroy(&attr);
+     return size;
+   }
+-#if BUILDFLAG(IS_FREEBSD)
++#if BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_NETBSD)
+   pthread_attr_destroy(&attr);
+ #endif
+ 
+@@ -71,6 +79,8 @@ size_t GetUnderestimatedStackSize() {
+   //    low as 512k.
+   //
+   return 512 * 1024;
++#elif BUILDFLAG(IS_OPENBSD)
++  return 512 * 1024;
+ #elif BUILDFLAG(IS_APPLE)
+   // pthread_get_stacksize_np() returns too low a value for the main thread on
+   // OSX 10.9,
+@@ -112,7 +122,7 @@ thread_local void* thread_stack_start = 
+ 
+ void* GetStackStartImpl() {
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_NETBSD)
+   pthread_attr_t attr;
+   int error;
+ #if BUILDFLAG(IS_FREEBSD)
+@@ -129,7 +139,7 @@ void* GetStackStartImpl() {
+     pthread_attr_destroy(&attr);
+     return reinterpret_cast<uint8_t*>(base) + size;
+   }
+-#if BUILDFLAG(IS_FREEBSD)
++#if BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_NETBSD)
+   pthread_attr_destroy(&attr);
+ #endif
+ #if defined(__GLIBC__)
+@@ -161,6 +171,13 @@ void* GetStackStartImpl() {
+   ::GetCurrentThreadStackLimits(&lowLimit, &highLimit);
+   return reinterpret_cast<void*>(highLimit);
+ #endif
++#elif BUILDFLAG(IS_OPENBSD)
++  stack_t ss;
++  void *base;
++  int error = pthread_stackseg_np(pthread_self(), &ss);
++  CHECK(!error);
++  base = (void*)((size_t) ss.ss_sp - ss.ss_size);
++  return reinterpret_cast<uint8_t*>(base) + ss.ss_size;
+ #else
+ #error Unsupported getStackStart on this platform.
+ #endif
diff --git a/chromium-wip/patches/patch-third__party_brotli_common_platform.h b/chromium-wip/patches/patch-third__party_brotli_common_platform.h
new file mode 100644
index 0000000000..57bf9411a8
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_brotli_common_platform.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/brotli/common/platform.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/brotli/common/platform.h
+@@ -28,7 +28,7 @@
+ #include <brotli/port.h>
+ #include <brotli/types.h>
+ 
+-#if defined(OS_LINUX) || defined(OS_CYGWIN) || defined(__EMSCRIPTEN__)
++#if defined(OS_LINUX) || defined(OS_CYGWIN) || defined(__EMSCRIPTEN__) || defined(OS_BSD)
+ #include <endian.h>
+ #elif defined(OS_FREEBSD)
+ #include <machine/endian.h>
diff --git a/chromium-wip/patches/patch-third__party_cpuinfo_cpuinfo.gni b/chromium-wip/patches/patch-third__party_cpuinfo_cpuinfo.gni
new file mode 100644
index 0000000000..e3b08ce0be
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_cpuinfo_cpuinfo.gni
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/cpuinfo/cpuinfo.gni.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/cpuinfo/cpuinfo.gni
+@@ -7,7 +7,7 @@ use_cpuinfo =
+     current_cpu != "ppc64" && current_cpu != "ppc64le" &&
+     current_cpu != "s390" && current_cpu != "s390x" &&
+     # cpuinfo is not supported on fuchsia.
+-    !is_fuchsia &&
++    !is_fuchsia && !is_bsd &&
+     # There's a few arm architectures that are not supported by cpuinfo,
+     # especially amongst ChromeOS devices.
+     # See //third_party/cpuinfo/src/src/arm/linux/cp.h.
diff --git a/chromium-wip/patches/patch-third__party_crashpad_crashpad_build_crashpad__buildconfig.gni b/chromium-wip/patches/patch-third__party_crashpad_crashpad_build_crashpad__buildconfig.gni
new file mode 100644
index 0000000000..d68083d974
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_crashpad_crashpad_build_crashpad__buildconfig.gni
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/crashpad/crashpad/build/crashpad_buildconfig.gni.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/crashpad/crashpad/build/crashpad_buildconfig.gni
+@@ -67,7 +67,7 @@ if (crashpad_is_in_chromium) {
+   crashpad_is_tvos = is_ios && target_platform == "tvos"
+   crashpad_is_apple = is_apple
+   crashpad_is_win = is_win
+-  crashpad_is_linux = is_linux || is_chromeos
++  crashpad_is_linux = (is_linux || is_chromeos) && !is_bsd
+   crashpad_is_android = is_android
+   crashpad_is_fuchsia = is_fuchsia
+ 
diff --git a/chromium-wip/patches/patch-third__party_crashpad_crashpad_client_BUILD.gn b/chromium-wip/patches/patch-third__party_crashpad_crashpad_client_BUILD.gn
new file mode 100644
index 0000000000..775a327c22
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_crashpad_crashpad_client_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/crashpad/crashpad/client/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/crashpad/crashpad/client/BUILD.gn
+@@ -148,6 +148,13 @@ static_library("common") {
+   if (crashpad_is_win) {
+     sources += [ "crash_report_database_win.cc" ]
+   }
++
++  if (crashpad_is_posix) {
++    sources += [
++      "crashpad_client_posix.cc",
++    ]
++  }
++
+   if (crashpad_is_linux || crashpad_is_android || crashpad_is_fuchsia) {
+     sources += [
+       "crash_report_database_generic.cc",
diff --git a/chromium-wip/patches/patch-third__party_crashpad_crashpad_client_crashpad__client__posix.cc b/chromium-wip/patches/patch-third__party_crashpad_crashpad_client_crashpad__client__posix.cc
new file mode 100644
index 0000000000..63b2b35248
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_crashpad_crashpad_client_crashpad__client__posix.cc
@@ -0,0 +1,49 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/crashpad/crashpad/client/crashpad_client_posix.cc.orig	2025-08-12 17:48:59.547489535 +0000
++++ third_party/crashpad/crashpad/client/crashpad_client_posix.cc
+@@ -0,0 +1,40 @@
++// Copyright 2017 The Crashpad Authors. All rights reserved.
++//
++// Licensed under the Apache License, Version 2.0 (the "License");
++// you may not use this file except in compliance with the License.
++// You may obtain a copy of the License at
++//
++//     http://www.apache.org/licenses/LICENSE-2.0
++//
++// Unless required by applicable law or agreed to in writing, software
++// distributed under the License is distributed on an "AS IS" BASIS,
++// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++// See the License for the specific language governing permissions and
++// limitations under the License.
++
++#include "client/crashpad_client.h"
++
++#include "base/logging.h"
++#include "base/notreached.h"
++
++namespace crashpad {
++
++CrashpadClient::CrashpadClient() {}
++
++CrashpadClient::~CrashpadClient() {}
++
++bool CrashpadClient::StartHandler(
++    const base::FilePath& handler,
++    const base::FilePath& database,
++    const base::FilePath& metrics_dir,
++    const std::string& url,
++    const std::map<std::string, std::string>& annotations,
++    const std::vector<std::string>& arguments,
++    bool restartable,
++    bool asynchronous_start,   
++    const std::vector<base::FilePath>& attachments) {
++  NOTREACHED();  // TODO(scottmg): https://crashpad.chromium.org/bug/196
++  return false;
++}
++
++}  // namespace crashpad
diff --git a/chromium-wip/patches/patch-third__party_crashpad_crashpad_minidump_minidump__misc__info__writer.cc b/chromium-wip/patches/patch-third__party_crashpad_crashpad_minidump_minidump__misc__info__writer.cc
new file mode 100644
index 0000000000..e35f1d47bb
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_crashpad_crashpad_minidump_minidump__misc__info__writer.cc
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
+@@ -159,6 +159,12 @@ std::string MinidumpMiscInfoDebugBuildSt
+   static constexpr char kOS[] = "win";
+ #elif BUILDFLAG(IS_FUCHSIA)
+   static constexpr char kOS[] = "fuchsia";
++#elif defined(OS_OPENBSD)
++  static constexpr char kOS[] = "openbsd";
++#elif defined(OS_FREEBSD)
++  static constexpr char kOS[] = "freebsd";
++#elif defined(OS_NETBSD)
++  static constexpr char kOS[] = "netbsd";
+ #else
+ #error define kOS for this operating system
+ #endif
diff --git a/chromium-wip/patches/patch-third__party_crashpad_crashpad_util_misc_address__types.h b/chromium-wip/patches/patch-third__party_crashpad_crashpad_util_misc_address__types.h
new file mode 100644
index 0000000000..cd89222a4b
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_crashpad_crashpad_util_misc_address__types.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/crashpad/crashpad/util/misc/address_types.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/crashpad/crashpad/util/misc/address_types.h
+@@ -25,7 +25,7 @@
+ #include <mach/mach_types.h>
+ #elif BUILDFLAG(IS_WIN)
+ #include "util/win/address_types.h"
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ #include "util/linux/address_types.h"
+ #elif BUILDFLAG(IS_FUCHSIA)
+ #include <zircon/types.h>
+@@ -55,7 +55,7 @@ using VMSize = mach_vm_size_t;
+ using VMAddress = WinVMAddress;
+ using VMSize = WinVMSize;
+ 
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ 
+ using VMAddress = LinuxVMAddress;
+ using VMSize = LinuxVMSize;
diff --git a/chromium-wip/patches/patch-third__party_crashpad_crashpad_util_misc_capture__context.h b/chromium-wip/patches/patch-third__party_crashpad_crashpad_util_misc_capture__context.h
new file mode 100644
index 0000000000..6a9261e491
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_crashpad_crashpad_util_misc_capture__context.h
@@ -0,0 +1,31 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/crashpad/crashpad/util/misc/capture_context.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/crashpad/crashpad/util/misc/capture_context.h
+@@ -21,8 +21,11 @@
+ #include <mach/mach.h>
+ #elif BUILDFLAG(IS_WIN)
+ #include <windows.h>
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
++      BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_NETBSD)
+ #include <ucontext.h>
++#elif BUILDFLAG(IS_OPENBSD)
++#include <sys/signal.h>
+ #endif  // BUILDFLAG(IS_APPLE)
+ 
+ namespace crashpad {
+@@ -35,7 +38,8 @@ using NativeCPUContext = arm_unified_thr
+ #endif
+ #elif BUILDFLAG(IS_WIN)
+ using NativeCPUContext = CONTEXT;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
++      BUILDFLAG(IS_BSD)
+ using NativeCPUContext = ucontext_t;
+ #endif  // BUILDFLAG(IS_APPLE)
+ 
diff --git a/chromium-wip/patches/patch-third__party_crashpad_crashpad_util_misc_metrics.cc b/chromium-wip/patches/patch-third__party_crashpad_crashpad_util_misc_metrics.cc
new file mode 100644
index 0000000000..1b0ccbf534
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_crashpad_crashpad_util_misc_metrics.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/crashpad/crashpad/util/misc/metrics.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/crashpad/crashpad/util/misc/metrics.cc
+@@ -25,7 +25,7 @@
+ #define METRICS_OS_NAME "Win"
+ #elif BUILDFLAG(IS_ANDROID)
+ #define METRICS_OS_NAME "Android"
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #define METRICS_OS_NAME "Linux"
+ #elif BUILDFLAG(IS_FUCHSIA)
+ #define METRICS_OS_NAME "Fuchsia"
diff --git a/chromium-wip/patches/patch-third__party_crashpad_crashpad_util_misc_uuid.cc b/chromium-wip/patches/patch-third__party_crashpad_crashpad_util_misc_uuid.cc
new file mode 100644
index 0000000000..d12333643f
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_crashpad_crashpad_util_misc_uuid.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/crashpad/crashpad/util/misc/uuid.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/crashpad/crashpad/util/misc/uuid.cc
+@@ -110,7 +110,7 @@ bool UUID::InitializeWithNew() {
+   InitializeFromBytes(uuid);
+   return true;
+ #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   // Linux, Android, and Fuchsia do not provide a UUID generator in a
+   // widely-available system library. On Linux and Android, uuid_generate()
+   // from libuuid is not available everywhere.
diff --git a/chromium-wip/patches/patch-third__party_crashpad_crashpad_util_posix_close__multiple.cc b/chromium-wip/patches/patch-third__party_crashpad_crashpad_util_posix_close__multiple.cc
new file mode 100644
index 0000000000..de7384cbd2
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_crashpad_crashpad_util_posix_close__multiple.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/crashpad/crashpad/util/posix/close_multiple.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/crashpad/crashpad/util/posix/close_multiple.cc
+@@ -73,7 +73,7 @@ void CloseNowOrOnExec(int fd, bool ebadf
+ // This is an advantage over looping over all possible file descriptors, because
+ // no attempt needs to be made to close file descriptors that are not open.
+ bool CloseMultipleNowOrOnExecUsingFDDir(int min_fd, int preserve_fd) {
+-#if BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
+   static constexpr char kFDDir[] = "/dev/fd";
+ #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
+   static constexpr char kFDDir[] = "/proc/self/fd";
diff --git a/chromium-wip/patches/patch-third__party_crashpad_crashpad_util_posix_drop__privileges.cc b/chromium-wip/patches/patch-third__party_crashpad_crashpad_util_posix_drop__privileges.cc
new file mode 100644
index 0000000000..6107e3f25c
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_crashpad_crashpad_util_posix_drop__privileges.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/crashpad/crashpad/util/posix/drop_privileges.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/crashpad/crashpad/util/posix/drop_privileges.cc
+@@ -25,7 +25,7 @@ void DropPrivileges() {
+   gid_t gid = getgid();
+   uid_t uid = getuid();
+ 
+-#if BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
+   // Based on the POSIX.1-2008 2013 edition documentation for setreuid() and
+   // setregid(), setreuid() and setregid() alone should be sufficient to drop
+   // privileges. The standard specifies that the saved ID should be set to the
diff --git a/chromium-wip/patches/patch-third__party_crashpad_crashpad_util_posix_signals.cc b/chromium-wip/patches/patch-third__party_crashpad_crashpad_util_posix_signals.cc
new file mode 100644
index 0000000000..f272d0aefc
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_crashpad_crashpad_util_posix_signals.cc
@@ -0,0 +1,39 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/crashpad/crashpad/util/posix/signals.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/crashpad/crashpad/util/posix/signals.cc
+@@ -51,7 +51,7 @@ constexpr int kCrashSignals[] = {
+ #if defined(SIGEMT)
+     SIGEMT,
+ #endif  // defined(SIGEMT)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     SIGXCPU,
+     SIGXFSZ,
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+@@ -91,7 +91,7 @@ constexpr int kTerminateSignals[] = {
+     SIGXCPU,
+     SIGXFSZ,
+ #endif  // BUILDFLAG(IS_APPLE)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     SIGIO,
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ };
+@@ -251,8 +251,12 @@ bool Signals::WillSignalReraiseAutonomou
+          // remains. See 10.12.3 xnu-3789.41.3/bsd/kern/kern_sig.c
+          // psignal_internal().
+          (code > 0 &&
++#if defined(SI_ASYNCIO)
+           code != SI_ASYNCIO &&
++#endif
++#if defined(SI_MESGQ)
+           code != SI_MESGQ &&
++#endif
+           code != SI_QUEUE &&
+           code != SI_TIMER &&
+           code != SI_USER &&
diff --git a/chromium-wip/patches/patch-third__party_crashpad_crashpad_util_posix_symbolic__constants__posix.cc b/chromium-wip/patches/patch-third__party_crashpad_crashpad_util_posix_symbolic__constants__posix.cc
new file mode 100644
index 0000000000..69c835687c
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_crashpad_crashpad_util_posix_symbolic__constants__posix.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/crashpad/crashpad/util/posix/symbolic_constants_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/crashpad/crashpad/util/posix/symbolic_constants_posix.cc
+@@ -68,7 +68,7 @@ constexpr const char* kSignalNames[] = {
+     "INFO",
+     "USR1",
+     "USR2",
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ #if defined(ARCH_CPU_MIPS_FAMILY)
+     "HUP",
+     "INT",
+@@ -139,7 +139,7 @@ constexpr const char* kSignalNames[] = {
+ #endif  // defined(ARCH_CPU_MIPS_FAMILY)
+ #endif
+ };
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ // NSIG is 64 to account for real-time signals.
+ static_assert(std::size(kSignalNames) == 32, "kSignalNames length");
+ #else
diff --git a/chromium-wip/patches/patch-third__party_crc32c_BUILD.gn b/chromium-wip/patches/patch-third__party_crc32c_BUILD.gn
new file mode 100644
index 0000000000..cb7527e9e6
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_crc32c_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/crc32c/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/crc32c/BUILD.gn
+@@ -46,7 +46,7 @@ config("crc32c_config") {
+   }
+ 
+   # Android added <sys/auxv.h> in API level 18.
+-  if (is_linux || is_chromeos || is_android) {
++  if (is_linux || is_chromeos || is_android && !is_bsd) {
+     defines += [
+       "HAVE_STRONG_GETAUXVAL=1",
+       "HAVE_WEAK_GETAUXVAL=1",
diff --git a/chromium-wip/patches/patch-third__party_dawn_include_dawn_native_VulkanBackend.h b/chromium-wip/patches/patch-third__party_dawn_include_dawn_native_VulkanBackend.h
new file mode 100644
index 0000000000..36ee8edfd8
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_dawn_include_dawn_native_VulkanBackend.h
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/dawn/include/dawn/native/VulkanBackend.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/dawn/include/dawn/native/VulkanBackend.h
+@@ -83,7 +83,8 @@ struct ExternalImageExportInfoVk : Exter
+ };
+ 
+ // Can't use DAWN_PLATFORM_IS(LINUX) since header included in both Dawn and Chrome
+-#if defined(__linux__) || defined(__Fuchsia__)
++#if defined(__linux__) || defined(__Fuchsia__) || defined(__OpenBSD__) || defined(__FreeBSD__) || \
++    defined(__NetBSD__)
+ 
+ // Common properties of external images represented by FDs. On successful import the file
+ // descriptor's ownership is transferred to the Dawn implementation and they shouldn't be
diff --git a/chromium-wip/patches/patch-third__party_dawn_src_dawn_common_Platform.h b/chromium-wip/patches/patch-third__party_dawn_src_dawn_common_Platform.h
new file mode 100644
index 0000000000..d4a67b55ca
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_dawn_src_dawn_common_Platform.h
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/dawn/src/dawn/common/Platform.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/dawn/src/dawn/common/Platform.h
+@@ -60,6 +60,11 @@
+ #error "Unsupported Windows platform."
+ #endif
+ 
++#elif defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
++#define DAWN_PLATFORM_IS_LINUX 1
++#define DAWN_PLATFORM_IS_BSD 1
++#define DAWN_PLATFORM_IS_POSIX 1
++
+ #elif defined(__linux__)
+ #define DAWN_PLATFORM_IS_LINUX 1
+ #define DAWN_PLATFORM_IS_POSIX 1
diff --git a/chromium-wip/patches/patch-third__party_dawn_src_dawn_native_vulkan_BackendVk.cpp b/chromium-wip/patches/patch-third__party_dawn_src_dawn_native_vulkan_BackendVk.cpp
new file mode 100644
index 0000000000..e63976a9a9
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_dawn_src_dawn_native_vulkan_BackendVk.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp
+@@ -56,7 +56,7 @@ constexpr char kSwiftshaderLibName[] = "
+ #endif
+ 
+ #if DAWN_PLATFORM_IS(LINUX)
+-#if DAWN_PLATFORM_IS(ANDROID)
++#if DAWN_PLATFORM_IS(ANDROID) || DAWN_PLATFORM_IS(BSD)
+ constexpr char kVulkanLibName[] = "libvulkan.so";
+ #else
+ constexpr char kVulkanLibName[] = "libvulkan.so.1";
diff --git a/chromium-wip/patches/patch-third__party_ffmpeg_BUILD.gn b/chromium-wip/patches/patch-third__party_ffmpeg_BUILD.gn
new file mode 100644
index 0000000000..12af1696ba
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_ffmpeg_BUILD.gn
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/ffmpeg/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/ffmpeg/BUILD.gn
+@@ -355,7 +355,6 @@ target(link_target_type, "ffmpeg_interna
+       libs += [
+         "m",
+         "z",
+-        "rt",
+       ]
+     }
+     if (is_component_ffmpeg) {
diff --git a/chromium-wip/patches/patch-third__party_ffmpeg_libavcodec_x86_cabac.h b/chromium-wip/patches/patch-third__party_ffmpeg_libavcodec_x86_cabac.h
new file mode 100644
index 0000000000..a71d17a24e
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_ffmpeg_libavcodec_x86_cabac.h
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/ffmpeg/libavcodec/x86/cabac.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/ffmpeg/libavcodec/x86/cabac.h
+@@ -31,7 +31,8 @@
+ 
+ #if   (defined(__i386) && defined(__clang__) && (__clang_major__<2 || (__clang_major__==2 && __clang_minor__<10)))\
+    || (                  !defined(__clang__) && defined(__llvm__) && __GNUC__==4 && __GNUC_MINOR__==2 && __GNUC_PATCHLEVEL__<=1)\
+-   || (defined(__INTEL_COMPILER) && defined(_MSC_VER))
++   || (defined(__INTEL_COMPILER) && defined(_MSC_VER)) \
++   || ((defined(__FreeBSD__) || defined(__OpenBSD__)) && defined(__i386))
+ #       define BROKEN_COMPILER 1
+ #else
+ #       define BROKEN_COMPILER 0
diff --git a/chromium-wip/patches/patch-third__party_ffmpeg_libavutil_cpu.c b/chromium-wip/patches/patch-third__party_ffmpeg_libavutil_cpu.c
new file mode 100644
index 0000000000..9c62442fb6
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_ffmpeg_libavutil_cpu.c
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/ffmpeg/libavutil/cpu.c.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/ffmpeg/libavutil/cpu.c
+@@ -38,10 +38,7 @@
+ #if HAVE_GETPROCESSAFFINITYMASK || HAVE_WINRT
+ #include <windows.h>
+ #endif
+-#if HAVE_SYSCTL
+-#if HAVE_SYS_PARAM_H
+-#include <sys/param.h>
+-#endif
++#if HAVE_SYSCTL && !defined(__OpenBSD__)
+ #include <sys/types.h>
+ #include <sys/sysctl.h>
+ #endif
diff --git a/chromium-wip/patches/patch-third__party_ffmpeg_libavutil_mem.c b/chromium-wip/patches/patch-third__party_ffmpeg_libavutil_mem.c
new file mode 100644
index 0000000000..0b5d1380e7
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_ffmpeg_libavutil_mem.c
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/ffmpeg/libavutil/mem.c.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/ffmpeg/libavutil/mem.c
+@@ -33,9 +33,6 @@
+ #include <stdlib.h>
+ #include <stdatomic.h>
+ #include <string.h>
+-#if HAVE_MALLOC_H
+-#include <malloc.h>
+-#endif
+ 
+ #include "attributes.h"
+ #include "avassert.h"
diff --git a/chromium-wip/patches/patch-third__party_ffmpeg_libavutil_random__seed.c b/chromium-wip/patches/patch-third__party_ffmpeg_libavutil_random__seed.c
new file mode 100644
index 0000000000..fcf72eeb32
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_ffmpeg_libavutil_random__seed.c
@@ -0,0 +1,31 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/ffmpeg/libavutil/random_seed.c.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/ffmpeg/libavutil/random_seed.c
+@@ -20,6 +20,10 @@
+ 
+ #include "config.h"
+ 
++#if defined(__NetBSD__)
++#define _NETBSD_SOURCE 1
++#endif
++
+ #if HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
+@@ -35,6 +39,11 @@
+ #elif CONFIG_OPENSSL
+ #include <openssl/rand.h>
+ #endif
++#if HAVE_ARC4RANDOM_BUF
++#undef __BSD_VISIBLE
++#define __BSD_VISIBLE 1
++#include <stdlib.h>
++#endif
+ #include <fcntl.h>
+ #include <math.h>
+ #include <time.h>
diff --git a/chromium-wip/patches/patch-third__party_ffmpeg_libavutil_x86_x86inc.asm b/chromium-wip/patches/patch-third__party_ffmpeg_libavutil_x86_x86inc.asm
new file mode 100644
index 0000000000..3381d977e6
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_ffmpeg_libavutil_x86_x86inc.asm
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/ffmpeg/libavutil/x86/x86inc.asm.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/ffmpeg/libavutil/x86/x86inc.asm
+@@ -46,6 +46,12 @@
+     %endif
+ %endif
+ 
++%if ARCH_X86_64
++    %define _CET_ENDBR endbr64
++%else
++    %define _CET_ENDBR
++%endif
++
+ %define WIN64  0
+ %define UNIX64 0
+ %if ARCH_X86_64
+@@ -861,6 +867,7 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, 
+     %endif
+     align function_align
+     %2:
++    _CET_ENDBR
+     RESET_MM_PERMUTATION        ; needed for x86-64, also makes disassembly somewhat nicer
+     %xdefine rstk rsp           ; copy of the original stack pointer, used when greater alignment than the known stack alignment is required
+     %assign stack_offset 0      ; stack pointer offset relative to the return address
diff --git a/chromium-wip/patches/patch-third__party_fontconfig_include_meson-config.h b/chromium-wip/patches/patch-third__party_fontconfig_include_meson-config.h
new file mode 100644
index 0000000000..31a2619a95
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_fontconfig_include_meson-config.h
@@ -0,0 +1,50 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/fontconfig/include/meson-config.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/fontconfig/include/meson-config.h
+@@ -17,7 +17,7 @@
+ 
+ #define FC_CACHEDIR "/var/cache/fontconfig"
+ 
+-#define FC_DEFAULT_FONTS "\t<dir>/usr/share/fonts</dir>\n\t<dir>/usr/local/share/fonts</dir>\n"
++#define FC_DEFAULT_FONTS "\t<dir>/usr/X11R6/lib/X11/fonts</dir>\n"
+ 
+ #define FC_FONTPATH ""
+ 
+@@ -92,10 +92,13 @@
+ 
+ #define HAVE_RANDOM 1
+ 
+-#define HAVE_RANDOM_R 1
++/* #undef HAVE_RANDOM_R */
+ 
+ #define HAVE_RAND_R 1
+ 
++/* Define to 1 if you have the `arc4_random' function. */
++#define HAVE_ARC4RANDOM 1
++
+ #define HAVE_READLINK 1
+ 
+ #define HAVE_STDATOMIC_PRIMITIVES 1
+@@ -122,7 +125,7 @@
+ 
+ #define HAVE_SYS_PARAM_H 1
+ 
+-#define HAVE_SYS_STATFS_H 1
++/* #undef HAVE_SYS_STATFS_H */
+ 
+ #define HAVE_SYS_STATVFS_H 1
+ 
+@@ -130,7 +133,7 @@
+ 
+ #define HAVE_SYS_TYPES_H 1
+ 
+-#define HAVE_SYS_VFS_H 1
++/* #undef HAVE_SYS_VFS_H */
+ 
+ #define HAVE_TIME_H 1
+ 
diff --git a/chromium-wip/patches/patch-third__party_fontconfig_src_src_fccompat.c b/chromium-wip/patches/patch-third__party_fontconfig_src_src_fccompat.c
new file mode 100644
index 0000000000..6cb8d0f896
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_fontconfig_src_src_fccompat.c
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/fontconfig/src/src/fccompat.c.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/fontconfig/src/src/fccompat.c
+@@ -175,7 +175,9 @@ FcRandom (void)
+ {
+     int32_t result;
+ 
+-#if HAVE_RANDOM_R
++#if HAVE_ARC4RANDOM
++    result = arc4random() & 0x7fffffff;
++#elif HAVE_RANDOM_R
+     static struct random_data fcrandbuf;
+     static char               statebuf[256];
+     static FcBool             initialized = FcFalse;
diff --git a/chromium-wip/patches/patch-third__party_ipcz_src_BUILD.gn b/chromium-wip/patches/patch-third__party_ipcz_src_BUILD.gn
new file mode 100644
index 0000000000..f71cc791a0
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_ipcz_src_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/ipcz/src/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/ipcz/src/BUILD.gn
+@@ -7,7 +7,7 @@ import("//build_overrides/ipcz.gni")
+ import("//testing/libfuzzer/fuzzer_test.gni")
+ import("//testing/test.gni")
+ 
+-enable_multiprocess_tests = is_linux
++enable_multiprocess_tests = is_linux && !is_bsd
+ 
+ buildflag_header("test_buildflags") {
+   header = "test_buildflags.h"
diff --git a/chromium-wip/patches/patch-third__party_ipcz_src_reference__drivers_random.cc b/chromium-wip/patches/patch-third__party_ipcz_src_reference__drivers_random.cc
new file mode 100644
index 0000000000..4a38c474b1
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_ipcz_src_reference__drivers_random.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/ipcz/src/reference_drivers/random.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/ipcz/src/reference_drivers/random.cc
+@@ -55,7 +55,7 @@ decltype(&ProcessPrng) GetProcessPrng() 
+ }
+ #endif
+ 
+-#if defined(OS_POSIX) && !BUILDFLAG(IS_MAC)
++#if defined(OS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD)
+ void RandomBytesFromDevUrandom(absl::Span<uint8_t> destination) {
+   static int urandom_fd = [] {
+     for (;;) {
+@@ -99,7 +99,7 @@ void RandomBytes(absl::Span<uint8_t> des
+       return;
+     }
+   }
+-#elif BUILDFLAG(IS_MAC)
++#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   const bool ok = getentropy(destination.data(), destination.size()) == 0;
+   ABSL_ASSERT(ok);
+ #elif BUILDFLAG(IS_IOS)
diff --git a/chromium-wip/patches/patch-third__party_ipcz_src_standalone_base_logging.cc b/chromium-wip/patches/patch-third__party_ipcz_src_standalone_base_logging.cc
new file mode 100644
index 0000000000..f5553f2fcd
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_ipcz_src_standalone_base_logging.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/ipcz/src/standalone/base/logging.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/ipcz/src/standalone/base/logging.cc
+@@ -55,6 +55,9 @@ LogMessage::LogMessage(const char* file,
+ #elif BUILDFLAG(IS_ANDROID)
+   stream_ << getpid() << ":" << gettid() << ":";
+   const char* trimmed_file = strrchr(file, '/') + 1;
++#elif BUILDFLAG(IS_BSD)
++  stream_ << getpid() << ":" << pthread_self() << ":";
++  const char* trimmed_file = strrchr(file, '/') + 1;
+ #elif BUILDFLAG(IS_WIN)
+   const char* trimmed_file = file;
+   stream_ << (::GetCurrentProcessId()) << ":" << ::GetCurrentThreadId() << ":";
diff --git a/chromium-wip/patches/patch-third__party_leveldatabase_env__chromium.cc b/chromium-wip/patches/patch-third__party_leveldatabase_env__chromium.cc
new file mode 100644
index 0000000000..09932e1127
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_leveldatabase_env__chromium.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/leveldatabase/env_chromium.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/leveldatabase/env_chromium.cc
+@@ -330,7 +330,8 @@ ChromiumWritableFile::ChromiumWritableFi
+ 
+ Status ChromiumWritableFile::SyncParent() {
+   TRACE_EVENT0("leveldb", "SyncParent");
+-#if defined(OS_POSIX) || defined(OS_FUCHSIA)
++// pledge violation (directory passed as fd)
++#if (defined(OS_POSIX) || defined(OS_FUCHSIA)) && !defined(OS_OPENBSD)
+   FilePath path = FilePath::FromUTF8Unsafe(parent_dir_);
+   FileErrorOr<base::File> result = filesystem_->OpenFile(
+       path, base::File::FLAG_OPEN | base::File::FLAG_READ);
diff --git a/chromium-wip/patches/patch-third__party_libaom_source_libaom_aom__ports_aarch64__cpudetect.c b/chromium-wip/patches/patch-third__party_libaom_source_libaom_aom__ports_aarch64__cpudetect.c
new file mode 100644
index 0000000000..d6a843bacd
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_libaom_source_libaom_aom__ports_aarch64__cpudetect.c
@@ -0,0 +1,56 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/libaom/source/libaom/aom_ports/aarch64_cpudetect.c.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/libaom/source/libaom/aom_ports/aarch64_cpudetect.c
+@@ -127,10 +127,46 @@ static int arm_get_cpu_caps(void) {
+   return flags;
+ }
+ 
+-#elif defined(__linux__)  // end defined(AOM_USE_ANDROID_CPU_FEATURES)
++#elif defined(__OpenBSD__)
++#include <sys/sysctl.h>
++#include <machine/cpu.h>
++#include <machine/armreg.h>
++
++static int arm_get_cpu_caps(void) {
++  int flags = 0;
++  int isar0_mib[] = { CTL_MACHDEP, CPU_ID_AA64ISAR0 };
++  uint64_t cpu_id = 0;
++  size_t len = sizeof(cpu_id);
++
++  flags |= HAS_NEON;  // Neon is mandatory in Armv8.0-A.
++
++  if (sysctl(isar0_mib, 2, &cpu_id, &len, NULL, 0) < 0)
++    return flags;
++
++  if (ID_AA64ISAR0_CRC32(cpu_id) >= ID_AA64ISAR0_CRC32_BASE)
++    flags |= HAS_ARM_CRC32;
++
++  return flags;
++}
++
++#elif defined(__linux__) || defined(__FreeBSD__)  // end defined(AOM_USE_ANDROID_CPU_FEATURES)
+ 
+ #include <sys/auxv.h>
+ 
++#if defined(__FreeBSD__)
++static unsigned long getauxval(unsigned long type)
++{
++    /* Only AT_HWCAP* return unsigned long */
++    if (type != AT_HWCAP && type != AT_HWCAP2) {
++        return 0;
++    }
++
++    unsigned long ret = 0;
++    elf_aux_info(type, &ret, sizeof(ret));
++    return ret;
++}
++#endif
++
+ // Define hwcap values ourselves: building with an old auxv header where these
+ // hwcap values are not defined should not prevent features from being enabled.
+ #define AOM_AARCH64_HWCAP_CRC32 (1 << 7)
diff --git a/chromium-wip/patches/patch-third__party_libc++_src_include_____locale__dir_locale__base__api.h b/chromium-wip/patches/patch-third__party_libc++_src_include_____locale__dir_locale__base__api.h
new file mode 100644
index 0000000000..729d09dc51
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_libc++_src_include_____locale__dir_locale__base__api.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/libc++/src/include/__locale_dir/locale_base_api.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/libc++/src/include/__locale_dir/locale_base_api.h
+@@ -115,7 +115,7 @@
+ 
+ #  if defined(__APPLE__)
+ #    include <__locale_dir/support/apple.h>
+-#  elif defined(__FreeBSD__)
++#  elif defined(__FreeBSD__) || defined(__NetBSD__)
+ #    include <__locale_dir/support/freebsd.h>
+ #  elif defined(_LIBCPP_MSVCRT_LIKE)
+ #    include <__locale_dir/support/windows.h>
diff --git a/chromium-wip/patches/patch-third__party_libc++_src_include_____locale__dir_support_bsd__like.h b/chromium-wip/patches/patch-third__party_libc++_src_include_____locale__dir_support_bsd__like.h
new file mode 100644
index 0000000000..939bf55796
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_libc++_src_include_____locale__dir_support_bsd__like.h
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/libc++/src/include/__locale_dir/support/bsd_like.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/libc++/src/include/__locale_dir/support/bsd_like.h
+@@ -24,7 +24,11 @@
+ #  include <wctype.h>
+ #endif
+ 
++#if defined(__NetBSD__)
++#include <locale.h>
++#else
+ #include <xlocale.h>
++#endif
+ 
+ #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+ #  pragma GCC system_header
diff --git a/chromium-wip/patches/patch-third__party_libc++_src_src_chrono.cpp b/chromium-wip/patches/patch-third__party_libc++_src_src_chrono.cpp
new file mode 100644
index 0000000000..6227c6a793
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_libc++_src_src_chrono.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/libc++/src/src/chrono.cpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/libc++/src/src/chrono.cpp
+@@ -38,7 +38,7 @@
+ // OpenBSD and GPU do not have a fully conformant suite of POSIX timers, but
+ // it does have clock_gettime and CLOCK_MONOTONIC which is all we need.
+ #if defined(__APPLE__) || defined(__gnu_hurd__) || defined(__OpenBSD__) || defined(__AMDGPU__) ||                      \
+-    defined(__NVPTX__) || (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0)
++    defined(__NVPTX__) || (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0) || defined(__FreeBSD__) || defined(__NetBSD__)
+ #  define _LIBCPP_HAS_CLOCK_GETTIME
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-third__party_libc++_src_src_filesystem_filesystem__clock.cpp b/chromium-wip/patches/patch-third__party_libc++_src_src_filesystem_filesystem__clock.cpp
new file mode 100644
index 0000000000..f5038803b6
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_libc++_src_src_filesystem_filesystem__clock.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/libc++/src/src/filesystem/filesystem_clock.cpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/libc++/src/src/filesystem/filesystem_clock.cpp
+@@ -37,7 +37,7 @@
+ #endif
+ 
+ #if defined(__APPLE__) || defined(__gnu_hurd__) || defined(__AMDGPU__) || defined(__NVPTX__) ||                        \
+-    (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0)
++    (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
+ #  define _LIBCPP_HAS_CLOCK_GETTIME
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-third__party_libc++abi_src_src_cxa__guard__impl.h b/chromium-wip/patches/patch-third__party_libc++abi_src_src_cxa__guard__impl.h
new file mode 100644
index 0000000000..c7489f4b80
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_libc++abi_src_src_cxa__guard__impl.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/libc++abi/src/src/cxa_guard_impl.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/libc++abi/src/src/cxa_guard_impl.h
+@@ -425,6 +425,17 @@ void PlatformFutexWake(int* addr) {
+   __tsan_release(addr);
+   futex(reinterpret_cast<volatile uint32_t*>(addr), WAKE, INT_MAX, NULL, NULL);
+ }
++/*#elif defined(__NetBSD__)
++void PlatformFutexWait(int* addr, int expect) {
++  constexpr int WAIT = 0;
++  syscall(SYS___futex, addr, WAIT, expect, NULL, NULL, 0, 0);
++  __tsan_acquire(addr);
++}
++void PlatformFutexWake(int* addr) {
++  constexpr int WAKE = 1;
++  __tsan_release(addr);
++  syscall(SYS___futex, addr, WAKE, INT_MAX, NULL, NULL, 0, 0);
++}*/
+ #elif defined(SYS_futex)
+ void PlatformFutexWait(int* addr, int expect) {
+   constexpr int WAIT = 0;
diff --git a/chromium-wip/patches/patch-third__party_libdrm_src_xf86drmMode.c b/chromium-wip/patches/patch-third__party_libdrm_src_xf86drmMode.c
new file mode 100644
index 0000000000..a7d874704e
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_libdrm_src_xf86drmMode.c
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/libdrm/src/xf86drmMode.c.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/libdrm/src/xf86drmMode.c
+@@ -976,7 +976,7 @@ drm_public int drmCheckModesettingSuppor
+ 	}
+ #elif defined(__DragonFly__)
+ 	return 0;
+-#elif defined(__OpenBSD__)
++#elif defined(__OpenBSD__) || defined(__NetBSD__)
+ 	int	fd;
+ 	struct drm_mode_card_res res;
+ 	drmModeResPtr r = 0;
+@@ -1129,7 +1129,11 @@ drm_public int drmModePageFlipTarget(int
+ 
+ drm_public int drmModeSetPlane(int fd, uint32_t plane_id, uint32_t crtc_id,
+ 		    uint32_t fb_id, uint32_t flags,
++#if defined(__NetBSD__)
++			uint32_t crtc_x, uint32_t crtc_y,
++#else
+ 		    int32_t crtc_x, int32_t crtc_y,
++#endif
+ 		    uint32_t crtc_w, uint32_t crtc_h,
+ 		    uint32_t src_x, uint32_t src_y,
+ 		    uint32_t src_w, uint32_t src_h)
diff --git a/chromium-wip/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_memory_singleton.h b/chromium-wip/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_memory_singleton.h
new file mode 100644
index 0000000000..7299d6a629
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_memory_singleton.h
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/libphonenumber/dist/cpp/src/phonenumbers/base/memory/singleton.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/libphonenumber/dist/cpp/src/phonenumbers/base/memory/singleton.h
+@@ -22,7 +22,8 @@
+ #elif (__cplusplus >= 201103L) && defined(I18N_PHONENUMBERS_USE_STDMUTEX)
+ // C++11 Lock implementation based on std::mutex.
+ #include "phonenumbers/base/memory/singleton_stdmutex.h"
+-#elif defined(__linux__) || defined(__APPLE__) || defined(I18N_PHONENUMBERS_HAVE_POSIX_THREAD)
++#elif defined(__linux__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) || \
++    defined(__NetBSD__) || defined(I18N_PHONENUMBERS_HAVE_POSIX_THREAD)
+ #include "phonenumbers/base/memory/singleton_posix.h"
+ #elif defined(WIN32)
+ #include "phonenumbers/base/memory/singleton_win32.h"
diff --git a/chromium-wip/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_synchronization_lock.h b/chromium-wip/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_synchronization_lock.h
new file mode 100644
index 0000000000..7c42c53b4f
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_synchronization_lock.h
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/libphonenumber/dist/cpp/src/phonenumbers/base/synchronization/lock.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/libphonenumber/dist/cpp/src/phonenumbers/base/synchronization/lock.h
+@@ -22,7 +22,8 @@
+ #elif (__cplusplus >= 201103L) && defined(I18N_PHONENUMBERS_USE_STDMUTEX)
+ // C++11 Lock implementation based on std::mutex.
+ #include "phonenumbers/base/synchronization/lock_stdmutex.h"
+-#elif defined(__linux__) || defined(__APPLE__) || defined(I18N_PHONENUMBERS_HAVE_POSIX_THREAD)
++#elif defined(__linux__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) || \
++  defined(__NetBSD__) || defined(I18N_PHONENUMBERS_HAVE_POSIX_THREAD)
+ #include "phonenumbers/base/synchronization/lock_posix.h"
+ #elif defined(WIN32)
+ #include "phonenumbers/base/synchronization/lock_win32.h"
diff --git a/chromium-wip/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_thread__checker.h b/chromium-wip/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_thread__checker.h
new file mode 100644
index 0000000000..09547ada5c
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_thread__checker.h
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/libphonenumber/dist/cpp/src/phonenumbers/base/thread_checker.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/libphonenumber/dist/cpp/src/phonenumbers/base/thread_checker.h
+@@ -22,8 +22,8 @@
+ // Note that I18N_PHONENUMBERS_NO_THREAD_SAFETY must be defined only to let the
+ // user of the library know that it can't be used in a thread-safe manner when
+ // it is not depending on Boost.
+-#if !defined(__linux__) && !defined(__APPLE__) && !defined(I18N_PHONENUMBERS_HAVE_POSIX_THREAD) && \
+-    !defined(I18N_PHONENUMBERS_NO_THREAD_SAFETY) && \
++#if !defined(__linux__) && !defined(__APPLE__) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(I18N_PHONENUMBERS_HAVE_POSIX_THREAD) && \
++    !defined(__NetBSD__) && !defined(I18N_PHONENUMBERS_NO_THREAD_SAFETY) && \
+ 	!((__cplusplus >= 201103L) && defined(I18N_PHONENUMBERS_USE_STDMUTEX)) && \
+ 	!defined(WIN32)
+ #error Building without Boost, please provide \
+@@ -33,7 +33,8 @@
+ #endif
+ 
+ #if !defined(NDEBUG) && !defined(I18N_PHONENUMBERS_USE_BOOST) && \
+-    (defined(__linux__) || defined(__APPLE__) || defined(I18N_PHONENUMBERS_HAVE_POSIX_THREAD))
++    (defined(__linux__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) || \
++    defined(__NetBSD__) || defined(I18N_PHONENUMBERS_HAVE_POSIX_THREAD))
+ 
+ #include <pthread.h>
+ 
diff --git a/chromium-wip/patches/patch-third__party_libsync_src_include_sync_sync.h b/chromium-wip/patches/patch-third__party_libsync_src_include_sync_sync.h
new file mode 100644
index 0000000000..fcad28c095
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_libsync_src_include_sync_sync.h
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/libsync/src/include/sync/sync.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/libsync/src/include/sync/sync.h
+@@ -22,7 +22,9 @@
+ #include <sys/cdefs.h>
+ #include <stdint.h>
+ 
++#if !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__NetBSD__)
+ #include <linux/types.h>
++#endif
+ 
+ __BEGIN_DECLS
+ 
diff --git a/chromium-wip/patches/patch-third__party_libsync_src_sync.c b/chromium-wip/patches/patch-third__party_libsync_src_sync.c
new file mode 100644
index 0000000000..f7c01af6ad
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_libsync_src_sync.c
@@ -0,0 +1,31 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/libsync/src/sync.c.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/libsync/src/sync.c
+@@ -17,8 +17,8 @@
+  */
+ 
+ #include <fcntl.h>
+-#include <malloc.h>
+ #include <stdint.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <errno.h>
+ #include <poll.h>
+@@ -29,6 +29,12 @@
+ 
+ #include <sync/sync.h>
+ 
++#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
++typedef __uint8_t __u8;
++typedef __uint32_t __u32;
++typedef __int32_t __s32;
++#define ETIME ETIMEDOUT
++#endif
+ 
+ struct sw_sync_create_fence_data {
+   __u32 value;
diff --git a/chromium-wip/patches/patch-third__party_libusb_BUILD.gn b/chromium-wip/patches/patch-third__party_libusb_BUILD.gn
new file mode 100644
index 0000000000..7b7cff3065
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_libusb_BUILD.gn
@@ -0,0 +1,58 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/libusb/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/libusb/BUILD.gn
+@@ -3,7 +3,7 @@
+ # found in the LICENSE file.
+ 
+ # libusb is only used by //services/device/usb on macOS.
+-assert(is_mac)
++assert(is_mac || is_bsd)
+ 
+ import("//build/config/chromeos/ui_mode.gni")
+ import("//build/config/features.gni")
+@@ -103,7 +103,7 @@ static_library("libusb") {
+     ]
+   }
+ 
+-  if (is_linux || is_chromeos) {
++  if ((is_linux || is_chromeos) && !is_bsd) {
+     sources += [
+       "src/libusb/os/linux_usbfs.c",
+       "src/libusb/os/linux_usbfs.h",
+@@ -114,11 +114,21 @@ static_library("libusb") {
+     ]
+   }
+ 
++  if (is_openbsd) {
++    sources += [
++      "src/libusb/os/openbsd_usb.c",
++    ]
++    defines += [
++      "OS_OPENBSD=1",
++      "_GNU_SOURCE=1",
++    ]
++  }
++
+   if (is_chromeos_ash) {
+     defines += [ "USBI_TIMERFD_AVAILABLE" ]
+   }
+ 
+-  if (use_udev) {
++  if (use_udev && !is_bsd) {
+     sources += [ "src/libusb/os/linux_udev.cc" ]
+     defines += [
+       "HAVE_LIBUDEV=1",
+@@ -127,7 +137,7 @@ static_library("libusb") {
+     deps += [ "//build/linux/libudev" ]
+   }
+ 
+-  if ((is_linux || is_chromeos) && !use_udev) {
++  if ((is_linux || is_chromeos) && !use_udev && !is_bsd) {
+     sources += [ "src/libusb/os/linux_netlink.c" ]
+     defines += [ "HAVE_LINUX_NETLINK_H" ]
+   }
diff --git a/chromium-wip/patches/patch-third__party_libusb_src_libusb_core.c b/chromium-wip/patches/patch-third__party_libusb_src_libusb_core.c
new file mode 100644
index 0000000000..bfba3c0fcf
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_libusb_src_libusb_core.c
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/libusb/src/libusb/core.c.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/libusb/src/libusb/core.c
+@@ -448,7 +448,7 @@ libusb_free_device_list(list, 1);
+  * which grows when required. it can be freed once discovery has completed,
+  * eliminating the need for a list node in the libusb_device structure
+  * itself. */
+-#define DISCOVERED_DEVICES_SIZE_STEP 8
++#define DISCOVERED_DEVICES_SIZE_STEP 16
+ 
+ static struct discovered_devs *discovered_devs_alloc(void)
+ {
diff --git a/chromium-wip/patches/patch-third__party_libusb_src_libusb_os_threads__posix.c b/chromium-wip/patches/patch-third__party_libusb_src_libusb_os_threads__posix.c
new file mode 100644
index 0000000000..945e36f5d2
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_libusb_src_libusb_os_threads__posix.c
@@ -0,0 +1,30 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/libusb/src/libusb/os/threads_posix.c.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/libusb/src/libusb/os/threads_posix.c
+@@ -19,9 +19,11 @@
+  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+  */
+ 
+-#if defined(__linux__) || defined(__OpenBSD__)
++#if defined(__linux__)
+ # include <unistd.h>
+ # include <sys/syscall.h>
++#elif defined(__OpenBSD__)
++# include <unistd.h>
+ #elif defined(__APPLE__)
+ # include <mach/mach.h>
+ #elif defined(__CYGWIN__)
+@@ -65,7 +67,7 @@ int usbi_get_tid(void)
+ #elif defined(__OpenBSD__)
+ 	/* The following only works with OpenBSD > 5.1 as it requires
+ 	   real thread support. For 5.1 and earlier, -1 is returned. */
+-	ret = syscall(SYS_getthrid);
++	ret = getthrid();
+ #elif defined(__APPLE__)
+ 	ret = mach_thread_self();
+ 	mach_port_deallocate(mach_task_self(), ret);
diff --git a/chromium-wip/patches/patch-third__party_libvpx_source_libvpx_vpx__ports_aarch64__cpudetect.c b/chromium-wip/patches/patch-third__party_libvpx_source_libvpx_vpx__ports_aarch64__cpudetect.c
new file mode 100644
index 0000000000..af69a7aec5
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_libvpx_source_libvpx_vpx__ports_aarch64__cpudetect.c
@@ -0,0 +1,34 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/libvpx/source/libvpx/vpx_ports/aarch64_cpudetect.c.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/libvpx/source/libvpx/vpx_ports/aarch64_cpudetect.c
+@@ -120,10 +120,24 @@ static int arm_get_cpu_caps(void) {
+   return flags;
+ }
+ 
+-#elif defined(__linux__)  // end defined(VPX_USE_ANDROID_CPU_FEATURES)
++#elif defined(__linux__) || defined(__FreeBSD__)  // end defined(VPX_USE_ANDROID_CPU_FEATURES)
+ 
+ #include <sys/auxv.h>
+ 
++#if defined(__FreeBSD__)
++static unsigned long getauxval(unsigned long type)
++{
++    /* Only AT_HWCAP* return unsigned long */
++    if (type != AT_HWCAP && type != AT_HWCAP2) {
++        return 0;
++    }
++
++    unsigned long ret = 0;
++    elf_aux_info(type, &ret, sizeof(ret));
++    return ret;
++}
++#endif
++
+ // Define hwcap values ourselves: building with an old auxv header where these
+ // hwcap values are not defined should not prevent features from being enabled.
+ #define VPX_AARCH64_HWCAP_ASIMDDP (1 << 20)
diff --git a/chromium-wip/patches/patch-third__party_lzma__sdk_C_CpuArch.c b/chromium-wip/patches/patch-third__party_lzma__sdk_C_CpuArch.c
new file mode 100644
index 0000000000..d02570a152
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_lzma__sdk_C_CpuArch.c
@@ -0,0 +1,43 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/lzma_sdk/C/CpuArch.c.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/lzma_sdk/C/CpuArch.c
+@@ -854,6 +854,34 @@ BoolInt CPU_IsSupported_SHA1(void) { ret
+ BoolInt CPU_IsSupported_SHA2(void) { return APPLE_CRYPTO_SUPPORT_VAL; }
+ BoolInt CPU_IsSupported_AES (void) { return APPLE_CRYPTO_SUPPORT_VAL; }
+ 
++#elif defined(__OpenBSD__)
++
++#include <sys/param.h>
++#include <sys/sysctl.h>
++#include <machine/cpu.h>
++#include <machine/armreg.h>
++
++BoolInt CPU_IsSupported_NEON() { return 1; }
++
++#define MY_HWCAP_CHECK_FUNC_2(name1, name2) \
++  BoolInt CPU_IsSupported_ ## name1() { \
++    int isar0_mib[] = { CTL_MACHDEP, CPU_ID_AA64ISAR0 }; \
++    size_t len = sizeof(uint64_t); \
++    uint64_t cpu_id = 0; \
++    if (sysctl(isar0_mib, 2, &cpu_id, &len, NULL, 0) < 0) \
++      return 0; \
++    if (ID_AA64ISAR0_ ## name2(cpu_id) >= ID_AA64ISAR0_## name2 ##_BASE) \
++      return 1; \
++    return 0; \
++  }
++
++#define MY_HWCAP_CHECK_FUNC(name) \
++  MY_HWCAP_CHECK_FUNC_2(name, name)
++
++MY_HWCAP_CHECK_FUNC (CRC32)
++MY_HWCAP_CHECK_FUNC (SHA1)
++MY_HWCAP_CHECK_FUNC (SHA2)
++MY_HWCAP_CHECK_FUNC (AES)
+ 
+ #else // __APPLE__
+ 
diff --git a/chromium-wip/patches/patch-third__party_material__color__utilities_src_cpp_palettes_tones.cc b/chromium-wip/patches/patch-third__party_material__color__utilities_src_cpp_palettes_tones.cc
new file mode 100644
index 0000000000..b7dc4ea6fc
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_material__color__utilities_src_cpp_palettes_tones.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/material_color_utilities/src/cpp/palettes/tones.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/material_color_utilities/src/cpp/palettes/tones.cc
+@@ -14,6 +14,8 @@
+  * limitations under the License.
+  */
+ 
++#include <cmath>
++
+ #include "cpp/palettes/tones.h"
+ 
+ #include <cmath>
diff --git a/chromium-wip/patches/patch-third__party_nasm_BUILD.gn b/chromium-wip/patches/patch-third__party_nasm_BUILD.gn
new file mode 100644
index 0000000000..14653171a8
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_nasm_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/nasm/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/nasm/BUILD.gn
+@@ -63,6 +63,13 @@ config("nasm_config") {
+ 
+   defines = [ "HAVE_CONFIG_H" ]
+ 
++  _string_h_lines =
++        read_file("/usr/include/string.h", "list lines")
++  _mempcpy = filter_include(_string_h_lines, [ "*mempcpy*" ])
++  if (_mempcpy != []) {
++    defines += [ "HAVE_MEMPCPY=1" ]
++  }
++
+   if (is_clang) {
+     cflags = [
+       # The inline functions in NASM's headers flag this.
diff --git a/chromium-wip/patches/patch-third__party_nasm_config_config-linux.h b/chromium-wip/patches/patch-third__party_nasm_config_config-linux.h
new file mode 100644
index 0000000000..d0eca9fb8e
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_nasm_config_config-linux.h
@@ -0,0 +1,78 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/nasm/config/config-linux.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/nasm/config/config-linux.h
+@@ -209,7 +209,7 @@
+ #define HAVE_DECL_STRSEP 1
+ 
+ /* Define to 1 if you have the <endian.h> header file. */
+-#define HAVE_ENDIAN_H 1
++/* #undef HAVE_ENDIAN_H */
+ 
+ /* Define to 1 if you have the 'faccessat' function. */
+ #define HAVE_FACCESSAT 1
+@@ -351,13 +351,13 @@
+ #define HAVE_ISASCII 1
+ 
+ /* Define to 1 if you have the 'iscntrl' function. */
+-/* #undef HAVE_ISCNTRL */
++#define HAVE_ISCNTRL 1
+ 
+ /* Define to 1 if you have the <machine/endian.h> header file. */
+-/* #undef HAVE_MACHINE_ENDIAN_H */
++#define HAVE_MACHINE_ENDIAN_H 1
+ 
+ /* Define to 1 if you have the 'mempcpy' function. */
+-#define HAVE_MEMPCPY 1
++/* #undef HAVE_MEMPCPY */
+ 
+ /* Define to 1 if you have the 'mempset' function. */
+ /* #undef HAVE_MEMPSET */
+@@ -384,7 +384,7 @@
+ #define HAVE_STDARG_H 1
+ 
+ /* Define to 1 if stdbool.h conforms to C99. */
+-/* #undef HAVE_STDBOOL_H */
++#define HAVE_STDBOOL_H 1
+ 
+ /* Define to 1 if your compiler supports C99 extern inline */
+ #define HAVE_STDC_INLINE 1
+@@ -414,7 +414,7 @@
+ #define HAVE_STRING_H 1
+ 
+ /* Define to 1 if you have the 'strlcpy' function. */
+-/* #undef HAVE_STRLCPY */ // Shouldn\'t work with -std=c11, but configure still detects it.
++#define HAVE_STRLCPY 1
+ 
+ /* Define to 1 if you have the 'strncasecmp' function. */
+ #define HAVE_STRNCASECMP 1
+@@ -441,7 +441,7 @@
+ #define HAVE_SYSCONF 1
+ 
+ /* Define to 1 if you have the <sys/endian.h> header file. */
+-/* #undef HAVE_SYS_ENDIAN_H */
++#define HAVE_SYS_ENDIAN_H 1
+ 
+ /* Define to 1 if you have the <sys/mman.h> header file. */
+ #define HAVE_SYS_MMAN_H 1
+@@ -522,13 +522,13 @@
+ /* #undef HAVE__STATI64 */
+ 
+ /* Define to 1 if you have the `__bswap_16' intrinsic function. */
+-#define HAVE___BSWAP_16 1
++/* #undef HAVE___BSWAP_16 */
+ 
+ /* Define to 1 if you have the `__bswap_32' intrinsic function. */
+-#define HAVE___BSWAP_32 1
++/* #undef HAVE___BSWAP_32 */
+ 
+ /* Define to 1 if you have the `__bswap_64' intrinsic function. */
+-#define HAVE___BSWAP_64 1
++/* #undef HAVE___BSWAP_64 */
+ 
+ /* Define to 1 if you have the `__builtin_bswap16' intrinsic function. */
+ #define HAVE___BUILTIN_BSWAP16 1
diff --git a/chromium-wip/patches/patch-third__party_node_check__version.py b/chromium-wip/patches/patch-third__party_node_check__version.py
new file mode 100644
index 0000000000..82c34c4236
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_node_check__version.py
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/node/check_version.py.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/node/check_version.py
+@@ -17,11 +17,6 @@ def main(argv):
+   parser.add_argument('--out_file', required=True)
+   args = parser.parse_args(argv)
+ 
+-  node.RunNode([
+-      os.path.join(_HERE_PATH, 'check_version.js'),
+-      '--expected_version_file', args.expected_version_file,
+-  ])
+-
+   # If the above script succeeded, write a dummy output file, since Ninja
+   # requires every target to have an output.
+   with open(args.out_file, "w") as file:
diff --git a/chromium-wip/patches/patch-third__party_node_node.gni b/chromium-wip/patches/patch-third__party_node_node.gni
new file mode 100644
index 0000000000..cdb3b4a3cc
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_node_node.gni
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/node/node.gni.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/node/node.gni
+@@ -22,7 +22,7 @@ template("node") {
+ 
+     # When use_remoteexec=true, node actions may run on remote
+     # Linux worker. So it should include linux node binary in inputs.
+-    if (is_linux || is_chromeos || use_remoteexec) {
++    if ((is_linux || is_chromeos || use_remoteexec) && !is_bsd) {
+       inputs += [ "//third_party/node/linux/node-linux-x64/bin/node" ]
+     }
+     if (is_win && host_os == "win") {
diff --git a/chromium-wip/patches/patch-third__party_node_node.py b/chromium-wip/patches/patch-third__party_node_node.py
new file mode 100644
index 0000000000..ba5dc04f30
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_node_node.py
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/node/node.py.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/node/node.py
+@@ -20,6 +20,9 @@ def GetBinaryPath():
+   return os_path.join(os_path.dirname(__file__), *{
+     'Darwin': (darwin_path, darwin_name, 'bin', 'node'),
+     'Linux': ('linux', 'node-linux-x64', 'bin', 'node'),
++    'OpenBSD': ('openbsd', 'node-openbsd', 'bin', 'node'),
++    'FreeBSD': ('freebsd', 'node-freebsd', 'bin', 'node'),
++    'NetBSD': ('netbsd', 'node-netbsd', 'bin', 'node'),
+     'Windows': ('win', 'node.exe'),
+   }[platform.system()])
+ 
diff --git a/chromium-wip/patches/patch-third__party_pdfium_core_fxge_cfx__fontmapper.cpp b/chromium-wip/patches/patch-third__party_pdfium_core_fxge_cfx__fontmapper.cpp
new file mode 100644
index 0000000000..335852f103
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_pdfium_core_fxge_cfx__fontmapper.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/pdfium/core/fxge/cfx_fontmapper.cpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/pdfium/core/fxge/cfx_fontmapper.cpp
+@@ -157,7 +157,7 @@ constexpr AltFontFamily kAltFontFamilies
+     {"ForteMT", "Forte"},
+ };
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || defined(OS_ASMJS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || defined(OS_ASMJS) || BUILDFLAG(IS_BSD)
+ const char kNarrowFamily[] = "LiberationSansNarrow";
+ #elif BUILDFLAG(IS_ANDROID)
+ const char kNarrowFamily[] = "RobotoCondensed";
diff --git a/chromium-wip/patches/patch-third__party_pdfium_core_fxge_linux_fx__linux__impl.cpp b/chromium-wip/patches/patch-third__party_pdfium_core_fxge_linux_fx__linux__impl.cpp
new file mode 100644
index 0000000000..2104ad546b
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_pdfium_core_fxge_linux_fx__linux__impl.cpp
@@ -0,0 +1,31 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/pdfium/core/fxge/linux/fx_linux_impl.cpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/pdfium/core/fxge/linux/fx_linux_impl.cpp
+@@ -19,7 +19,7 @@
+ #include "core/fxge/fx_font.h"
+ #include "core/fxge/systemfontinfo_iface.h"
+ 
+-#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !defined(OS_ASMJS)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !defined(OS_ASMJS) && !BUILDFLAG(IS_BSD)
+ #error "Included on the wrong platform"
+ #endif
+ 
+@@ -179,10 +179,9 @@ class CLinuxPlatform : public CFX_GEModu
+   std::unique_ptr<SystemFontInfoIface> CreateDefaultSystemFontInfo() override {
+     auto pInfo = std::make_unique<CFX_LinuxFontInfo>();
+     if (!pInfo->ParseFontCfg(CFX_GEModule::Get()->GetUserFontPaths())) {
+-      pInfo->AddPath("/usr/share/fonts");
+-      pInfo->AddPath("/usr/share/X11/fonts/Type1");
+-      pInfo->AddPath("/usr/share/X11/fonts/TTF");
+-      pInfo->AddPath("/usr/local/share/fonts");
++      pInfo->AddPath("@X11BASE@/lib/X11/fonts/Type1");
++      pInfo->AddPath("@X11BASE@/lib/X11/fonts/TTF");
++      pInfo->AddPath("@PREFIX@/share/fonts");
+     }
+     return pInfo;
+   }
diff --git a/chromium-wip/patches/patch-third__party_pdfium_fxjs_fx__date__helpers.cpp b/chromium-wip/patches/patch-third__party_pdfium_fxjs_fx__date__helpers.cpp
new file mode 100644
index 0000000000..594a177be9
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_pdfium_fxjs_fx__date__helpers.cpp
@@ -0,0 +1,28 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/pdfium/fxjs/fx_date_helpers.cpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/pdfium/fxjs/fx_date_helpers.cpp
+@@ -41,6 +41,11 @@ double GetLocalTZA() {
+   }
+   time_t t = 0;
+   FXSYS_time(&t);
++#ifdef __FreeBSD__
++  struct tm lt;
++  localtime_r(&t, &lt);
++  return (double)(-(lt.tm_gmtoff * 1000));
++#else
+   FXSYS_localtime(&t);
+ #if BUILDFLAG(IS_WIN)
+   // In gcc 'timezone' is a global variable declared in time.h. In VC++, that
+@@ -49,6 +54,7 @@ double GetLocalTZA() {
+   _get_timezone(&timezone);
+ #endif
+   return (double)(-(timezone * 1000));
++#endif // __FreeBSD__
+ }
+ 
+ int GetDaylightSavingTA(double d) {
diff --git a/chromium-wip/patches/patch-third__party_pdfium_pdfium.gni b/chromium-wip/patches/patch-third__party_pdfium_pdfium.gni
new file mode 100644
index 0000000000..3d44ee5fa4
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_pdfium_pdfium.gni
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/pdfium/pdfium.gni.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/pdfium/pdfium.gni
+@@ -42,7 +42,7 @@ declare_args() {
+   # PDFium will use PartitionAlloc partitions to separate strings, scalars,
+   # etc. from other allocations. However, the use of PartitionAlloc for new or
+   # malloc is controlled by args in build_overrides/partition_alloc.gni.
+-  pdf_use_partition_alloc = pdf_use_partition_alloc_override
++  pdf_use_partition_alloc = pdf_use_partition_alloc_override && use_partition_alloc_as_malloc
+ 
+   # Build PDFium to use Skia (experimental) for all PDFium graphics.
+   # If enabled, coexists in build with AGG graphics and the default
diff --git a/chromium-wip/patches/patch-third__party_pdfium_xfa_fxfa_parser_cxfa__timezoneprovider.cpp b/chromium-wip/patches/patch-third__party_pdfium_xfa_fxfa_parser_cxfa__timezoneprovider.cpp
new file mode 100644
index 0000000000..b8c304b8f0
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_pdfium_xfa_fxfa_parser_cxfa__timezoneprovider.cpp
@@ -0,0 +1,47 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/pdfium/xfa/fxfa/parser/cxfa_timezoneprovider.cpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/pdfium/xfa/fxfa/parser/cxfa_timezoneprovider.cpp
+@@ -6,12 +6,16 @@
+ 
+ #include "xfa/fxfa/parser/cxfa_timezoneprovider.h"
+ 
++#include <stdint.h>
+ #include <stdlib.h>
+ #include <time.h>
+ 
+ #include "build/build_config.h"
+ 
+ static bool g_bProviderTimeZoneSet = false;
++#if defined(OS_FREEBSD)
++static long g_lTimeZoneOffset = 0;
++#endif
+ 
+ #if BUILDFLAG(IS_WIN)
+ #define TIMEZONE _timezone
+@@ -24,9 +28,21 @@ static bool g_bProviderTimeZoneSet = fal
+ CXFA_TimeZoneProvider::CXFA_TimeZoneProvider() {
+   if (!g_bProviderTimeZoneSet) {
+     g_bProviderTimeZoneSet = true;
++#if defined(OS_FREEBSD)
++    time_t now = time(nullptr);
++    struct tm tm = {};
++
++    localtime_r(&now, &tm);
++    g_lTimeZoneOffset = tm.tm_gmtoff;
++#else
+     TZSET();
++#endif
+   }
++#if defined(OS_FREEBSD)
++  tz_minutes_ = static_cast<int8_t>((abs(g_lTimeZoneOffset) % 3600) / 60);
++#else
+   tz_minutes_ = TIMEZONE / -60;
++#endif
+ }
+ 
+ CXFA_TimeZoneProvider::~CXFA_TimeZoneProvider() = default;
diff --git a/chromium-wip/patches/patch-third__party_perfetto_include_perfetto_base_build__config.h b/chromium-wip/patches/patch-third__party_perfetto_include_perfetto_base_build__config.h
new file mode 100644
index 0000000000..a569be65fa
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_perfetto_include_perfetto_base_build__config.h
@@ -0,0 +1,76 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/perfetto/include/perfetto/base/build_config.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/perfetto/include/perfetto/base/build_config.h
+@@ -27,6 +27,7 @@
+ #if defined(__ANDROID__)
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_ANDROID() 1
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX() 0
++#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_BSD() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX_BUT_NOT_QNX() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WIN() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_APPLE() 0
+@@ -41,6 +42,7 @@
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_ANDROID() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_APPLE() 1
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX() 0
++#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_BSD() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX_BUT_NOT_QNX() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WIN() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WASM() 0
+@@ -62,9 +64,10 @@
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_IOS() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_APPLE_TVOS() 0
+ #endif
+-#elif defined(__linux__)
++#elif defined(__linux__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_ANDROID() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX() 1
++#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_BSD() 1
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX_BUT_NOT_QNX() 1
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WIN() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_APPLE() 0
+@@ -78,6 +81,7 @@
+ #elif defined(__QNXNTO__)
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_ANDROID() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX() 1
++#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_BSD() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX_BUT_NOT_QNX() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WIN() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_APPLE() 0
+@@ -91,6 +95,7 @@
+ #elif defined(_WIN32)
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_ANDROID() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX() 0
++#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_BSD() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX_BUT_NOT_QNX() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WIN() 1
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_APPLE() 0
+@@ -104,6 +109,7 @@
+ #elif defined(__EMSCRIPTEN__)
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_ANDROID() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX() 0
++#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_BSD() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX_BUT_NOT_QNX() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WIN() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_APPLE() 0
+@@ -120,6 +126,7 @@
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_MAC() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_IOS() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX() 0
++#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_BSD() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX_BUT_NOT_QNX() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WIN() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WASM() 0
+@@ -130,6 +137,7 @@
+ #elif defined(__native_client__)
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_ANDROID() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX() 0
++#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_BSD() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX_BUT_NOT_QNX() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WIN() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_APPLE() 0
diff --git a/chromium-wip/patches/patch-third__party_perfetto_include_perfetto_base_thread__utils.h b/chromium-wip/patches/patch-third__party_perfetto_include_perfetto_base_thread__utils.h
new file mode 100644
index 0000000000..5491d7349b
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_perfetto_include_perfetto_base_thread__utils.h
@@ -0,0 +1,28 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/perfetto/include/perfetto/base/thread_utils.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/perfetto/include/perfetto/base/thread_utils.h
+@@ -37,6 +37,7 @@ __declspec(dllimport) unsigned long __st
+ #include <sys/syscall.h>
+ #include <sys/types.h>
+ #include <unistd.h>
++#include <pthread.h>
+ #else
+ #include <pthread.h>
+ #endif
+@@ -50,6 +51,11 @@ using PlatformThreadId = pid_t;
+ inline PlatformThreadId GetThreadId() {
+   return gettid();
+ }
++#elif PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)
++using PlatformThreadId = uint64_t;
++inline PlatformThreadId GetThreadId() {
++  return reinterpret_cast<uint64_t>(pthread_self());
++}
+ #elif PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX)
+ using PlatformThreadId = pid_t;
+ inline PlatformThreadId GetThreadId() {
diff --git a/chromium-wip/patches/patch-third__party_perfetto_include_perfetto_base_time.h b/chromium-wip/patches/patch-third__party_perfetto_include_perfetto_base_time.h
new file mode 100644
index 0000000000..28a3a4860b
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_perfetto_include_perfetto_base_time.h
@@ -0,0 +1,40 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/perfetto/include/perfetto/base/time.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/perfetto/include/perfetto/base/time.h
+@@ -227,6 +227,9 @@ inline TimeNanos GetTimeInternalNs(clock
+ // Return ns from boot. Conversely to GetWallTimeNs, this clock counts also time
+ // during suspend (when supported).
+ inline TimeNanos GetBootTimeNs() {
++#if defined(__FreeBSD__) || defined(__NetBSD__)
++  return GetTimeInternalNs(kWallTimeClockSource);
++#else
+   // Determine if CLOCK_BOOTTIME is available on the first call.
+   static const clockid_t kBootTimeClockSource = [] {
+     struct timespec ts = {};
+@@ -234,6 +237,7 @@ inline TimeNanos GetBootTimeNs() {
+     return res == 0 ? CLOCK_BOOTTIME : kWallTimeClockSource;
+   }();
+   return GetTimeInternalNs(kBootTimeClockSource);
++#endif
+ }
+ 
+ inline TimeNanos GetWallTimeNs() {
+@@ -241,7 +245,13 @@ inline TimeNanos GetWallTimeNs() {
+ }
+ 
+ inline TimeNanos GetWallTimeRawNs() {
++#if defined(__OpenBSD__) || defined(__NetBSD__)
++  return GetTimeInternalNs(CLOCK_MONOTONIC);
++#elif defined(__FreeBSD__)
++  return GetTimeInternalNs(CLOCK_MONOTONIC_FAST);
++#else
+   return GetTimeInternalNs(CLOCK_MONOTONIC_RAW);
++#endif
+ }
+ 
+ inline TimeNanos GetThreadCPUTimeNs() {
diff --git a/chromium-wip/patches/patch-third__party_perfetto_include_perfetto_ext_base_event__fd.h b/chromium-wip/patches/patch-third__party_perfetto_include_perfetto_ext_base_event__fd.h
new file mode 100644
index 0000000000..81e2cb69a3
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_perfetto_include_perfetto_ext_base_event__fd.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/perfetto/include/perfetto/ext/base/event_fd.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/perfetto/include/perfetto/ext/base/event_fd.h
+@@ -58,6 +58,8 @@ class EventFd {
+   // On Mac and other non-Linux UNIX platforms a pipe-based fallback is used.
+   // The write end of the wakeup pipe.
+   ScopedFile write_fd_;
++#else
++  ScopedFile write_fd_;
+ #endif
+ };
+ 
diff --git a/chromium-wip/patches/patch-third__party_perfetto_include_perfetto_ext_base_thread__utils.h b/chromium-wip/patches/patch-third__party_perfetto_include_perfetto_ext_base_thread__utils.h
new file mode 100644
index 0000000000..f337d4ce47
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_perfetto_include_perfetto_ext_base_thread__utils.h
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/perfetto/include/perfetto/ext/base/thread_utils.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/perfetto/include/perfetto/ext/base/thread_utils.h
+@@ -41,9 +41,10 @@
+ namespace perfetto {
+ namespace base {
+ 
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) ||   \
++#if (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) ||   \
+     PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \
+-    PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE)
++    PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE)) && \
++    !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)
+ // Sets the "comm" of the calling thread to the first 15 chars of the given
+ // string.
+ inline bool MaybeSetThreadName(const std::string& name) {
diff --git a/chromium-wip/patches/patch-third__party_perfetto_include_perfetto_tracing_internal_track__event__legacy.h b/chromium-wip/patches/patch-third__party_perfetto_include_perfetto_tracing_internal_track__event__legacy.h
new file mode 100644
index 0000000000..baf4c20985
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_perfetto_include_perfetto_tracing_internal_track__event__legacy.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/perfetto/include/perfetto/tracing/internal/track_event_legacy.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/perfetto/include/perfetto/tracing/internal/track_event_legacy.h
+@@ -249,7 +249,7 @@ class PERFETTO_EXPORT_COMPONENT LegacyTr
+ // are different. E.g. on Mac size_t is considered a different type from
+ // uint64_t even though it has the same size and signedness.
+ // Below we add overloads for those types that are known to cause ambiguity.
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE)
++#if PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) || defined(__OpenBSD__)
+   explicit LegacyTraceId(size_t raw_id) : raw_id_(raw_id) {}
+   explicit LegacyTraceId(intptr_t raw_id)
+       : raw_id_(static_cast<uint64_t>(raw_id)) {}
diff --git a/chromium-wip/patches/patch-third__party_perfetto_protos_perfetto_trace_ftrace_v4l2.proto b/chromium-wip/patches/patch-third__party_perfetto_protos_perfetto_trace_ftrace_v4l2.proto
new file mode 100644
index 0000000000..a9a5cd8685
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_perfetto_protos_perfetto_trace_ftrace_v4l2.proto
@@ -0,0 +1,62 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/perfetto/protos/perfetto/trace/ftrace/v4l2.proto.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/perfetto/protos/perfetto/trace/ftrace/v4l2.proto
+@@ -10,7 +10,7 @@ message V4l2QbufFtraceEvent {
+   optional uint32 field = 2;
+   optional uint32 flags = 3;
+   optional uint32 index = 4;
+-  optional int32 minor = 5;
++  optional int32 gminor = 5;
+   optional uint32 sequence = 6;
+   optional uint32 timecode_flags = 7;
+   optional uint32 timecode_frames = 8;
+@@ -30,7 +30,7 @@ message V4l2DqbufFtraceEvent {
+   optional uint32 field = 2;
+   optional uint32 flags = 3;
+   optional uint32 index = 4;
+-  optional int32 minor = 5;
++  optional int32 gminor = 5;
+   optional uint32 sequence = 6;
+   optional uint32 timecode_flags = 7;
+   optional uint32 timecode_frames = 8;
+@@ -48,7 +48,7 @@ message V4l2DqbufFtraceEvent {
+ message Vb2V4l2BufQueueFtraceEvent {
+   optional uint32 field = 1;
+   optional uint32 flags = 2;
+-  optional int32 minor = 3;
++  optional int32 gminor = 3;
+   optional uint32 sequence = 4;
+   optional uint32 timecode_flags = 5;
+   optional uint32 timecode_frames = 6;
+@@ -65,7 +65,7 @@ message Vb2V4l2BufQueueFtraceEvent {
+ message Vb2V4l2BufDoneFtraceEvent {
+   optional uint32 field = 1;
+   optional uint32 flags = 2;
+-  optional int32 minor = 3;
++  optional int32 gminor = 3;
+   optional uint32 sequence = 4;
+   optional uint32 timecode_flags = 5;
+   optional uint32 timecode_frames = 6;
+@@ -82,7 +82,7 @@ message Vb2V4l2BufDoneFtraceEvent {
+ message Vb2V4l2QbufFtraceEvent {
+   optional uint32 field = 1;
+   optional uint32 flags = 2;
+-  optional int32 minor = 3;
++  optional int32 gminor = 3;
+   optional uint32 sequence = 4;
+   optional uint32 timecode_flags = 5;
+   optional uint32 timecode_frames = 6;
+@@ -99,7 +99,7 @@ message Vb2V4l2QbufFtraceEvent {
+ message Vb2V4l2DqbufFtraceEvent {
+   optional uint32 field = 1;
+   optional uint32 flags = 2;
+-  optional int32 minor = 3;
++  optional int32 gminor = 3;
+   optional uint32 sequence = 4;
+   optional uint32 timecode_flags = 5;
+   optional uint32 timecode_frames = 6;
diff --git a/chromium-wip/patches/patch-third__party_perfetto_src_base_clock__snapshots.cc b/chromium-wip/patches/patch-third__party_perfetto_src_base_clock__snapshots.cc
new file mode 100644
index 0000000000..d54fe0b6b2
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_perfetto_src_base_clock__snapshots.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/perfetto/src/base/clock_snapshots.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/perfetto/src/base/clock_snapshots.cc
+@@ -27,6 +27,7 @@ ClockSnapshotVector CaptureClockSnapshot
+ #if !PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) && \
+     !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) &&   \
+     !PERFETTO_BUILDFLAG(PERFETTO_OS_NACL) &&  \
++    !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD) &&  \
+     !PERFETTO_BUILDFLAG(PERFETTO_OS_QNX)
+   struct {
+     clockid_t id;
diff --git a/chromium-wip/patches/patch-third__party_perfetto_src_base_event__fd.cc b/chromium-wip/patches/patch-third__party_perfetto_src_base_event__fd.cc
new file mode 100644
index 0000000000..31326079a0
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_perfetto_src_base_event__fd.cc
@@ -0,0 +1,28 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/perfetto/src/base/event_fd.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/perfetto/src/base/event_fd.cc
+@@ -24,7 +24,8 @@
+ #include <synchapi.h>
+ #elif PERFETTO_BUILDFLAG(PERFETTO_OS_QNX)
+ #include <unistd.h>
+-#elif PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
++#elif (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) && \
++    !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)) || \
+     PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
+ #include <sys/eventfd.h>
+ #include <unistd.h>
+@@ -59,7 +60,8 @@ void EventFd::Clear() {
+     PERFETTO_DFATAL("EventFd::Clear()");
+ }
+ 
+-#elif PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX) || \
++#elif (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX) && \
++    !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)) || \
+     PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
+ 
+ EventFd::EventFd() {
diff --git a/chromium-wip/patches/patch-third__party_perfetto_src_base_periodic__task.cc b/chromium-wip/patches/patch-third__party_perfetto_src_base_periodic__task.cc
new file mode 100644
index 0000000000..78ba0d86eb
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_perfetto_src_base_periodic__task.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/perfetto/src/base/periodic_task.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/perfetto/src/base/periodic_task.cc
+@@ -24,7 +24,7 @@
+ #include "perfetto/base/time.h"
+ #include "perfetto/ext/base/file_utils.h"
+ 
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX) || \
++#if (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX) && !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)) || \
+     (PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) && __ANDROID_API__ >= 19)
+ #include <sys/timerfd.h>
+ #endif
+@@ -44,7 +44,7 @@ uint32_t GetNextDelayMs(const TimeMillis
+ }
+ 
+ ScopedPlatformHandle CreateTimerFd(const PeriodicTask::Args& args) {
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX) || \
++#if (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX) && !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)) || \
+     (PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) && __ANDROID_API__ >= 19)
+   ScopedPlatformHandle tfd(
+       timerfd_create(CLOCK_BOOTTIME, TFD_CLOEXEC | TFD_NONBLOCK));
diff --git a/chromium-wip/patches/patch-third__party_perfetto_src_base_string__utils.cc b/chromium-wip/patches/patch-third__party_perfetto_src_base_string__utils.cc
new file mode 100644
index 0000000000..b9b9f4d2ff
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_perfetto_src_base_string__utils.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/perfetto/src/base/string_utils.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/perfetto/src/base/string_utils.cc
+@@ -39,7 +39,8 @@ namespace base {
+ // Locale-independent as possible version of strtod.
+ double StrToD(const char* nptr, char** endptr) {
+ #if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) ||           \
+-    PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX) || \
++    (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX) && \
++    !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)) || \
+     PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE)
+   static auto c_locale = newlocale(LC_ALL, "C", nullptr);
+   return strtod_l(nptr, endptr, c_locale);
diff --git a/chromium-wip/patches/patch-third__party_perfetto_src_base_subprocess__posix.cc b/chromium-wip/patches/patch-third__party_perfetto_src_base_subprocess__posix.cc
new file mode 100644
index 0000000000..1e583aa5c4
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_perfetto_src_base_subprocess__posix.cc
@@ -0,0 +1,28 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/perfetto/src/base/subprocess_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/perfetto/src/base/subprocess_posix.cc
+@@ -35,7 +35,8 @@
+ #include <thread>
+ #include <tuple>
+ 
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX) || \
++#if (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX) && \
++    !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)) || \
+     PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
+ #include <sys/prctl.h>
+ #endif
+@@ -64,7 +65,8 @@ struct ChildProcessArgs {
+ // Don't add any dynamic allocation in this function. This will be invoked
+ // under a fork(), potentially in a state where the allocator lock is held.
+ void __attribute__((noreturn)) ChildProcess(ChildProcessArgs* args) {
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX) || \
++#if (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX) && \
++    !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)) || \
+     PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
+   // In no case we want a child process to outlive its parent process. This is
+   // relevant for tests, so that a test failure/crash doesn't leave child
diff --git a/chromium-wip/patches/patch-third__party_perfetto_src_base_test_vm__test__utils.cc b/chromium-wip/patches/patch-third__party_perfetto_src_base_test_vm__test__utils.cc
new file mode 100644
index 0000000000..c2d0cf19e3
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_perfetto_src_base_test_vm__test__utils.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/perfetto/src/base/test/vm_test_utils.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/perfetto/src/base/test/vm_test_utils.cc
+@@ -93,7 +93,7 @@ bool IsMapped(void* start, size_t size) 
+   // Fuchsia doesn't yet support paging (b/119503290).
+   ignore_result(page_size);
+   return true;
+-#elif PERFETTO_BUILDFLAG(PERFETTO_OS_NACL)
++#elif PERFETTO_BUILDFLAG(PERFETTO_OS_NACL) || PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)
+   // mincore isn't available on NaCL.
+   ignore_result(page_size);
+   return true;
diff --git a/chromium-wip/patches/patch-third__party_perfetto_src_base_thread__task__runner.cc b/chromium-wip/patches/patch-third__party_perfetto_src_base_thread__task__runner.cc
new file mode 100644
index 0000000000..cb259e07fd
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_perfetto_src_base_thread__task__runner.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/perfetto/src/base/thread_task_runner.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/perfetto/src/base/thread_task_runner.cc
+@@ -27,7 +27,8 @@
+ #include "perfetto/ext/base/thread_utils.h"
+ #include "perfetto/ext/base/unix_task_runner.h"
+ 
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX) || \
++#if (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX) && \
++    !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)) || \
+     PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
+ #include <sys/prctl.h>
+ #endif
diff --git a/chromium-wip/patches/patch-third__party_perfetto_src_base_unix__socket.cc b/chromium-wip/patches/patch-third__party_perfetto_src_base_unix__socket.cc
new file mode 100644
index 0000000000..8215d67610
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_perfetto_src_base_unix__socket.cc
@@ -0,0 +1,46 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/perfetto/src/base/unix_socket.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/perfetto/src/base/unix_socket.cc
+@@ -45,7 +45,7 @@
+ #include <unistd.h>
+ #endif
+ 
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE)
++#if PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) || defined(__FreeBSD__) || defined(__NetBSD__)
+ #include <sys/ucred.h>
+ #endif
+ 
+@@ -1031,15 +1031,27 @@ void UnixSocket::ReadPeerCredentialsPosi
+   int res = getpeereid(fd, &peer_uid_, nullptr);
+   PERFETTO_CHECK(res == 0);
+   // There is no pid when obtaining peer credentials for QNX
+-#elif PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
++#elif !defined(__FreeBSD__) && !defined(__NetBSD__) && PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
+     PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
++#if PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)
++  struct sockpeercred user_cred;
++#else
+   struct ucred user_cred;
++#endif
+   socklen_t len = sizeof(user_cred);
+   int fd = sock_raw_.fd();
+   int res = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &user_cred, &len);
+   PERFETTO_CHECK(res == 0);
+   peer_uid_ = user_cred.uid;
+   peer_pid_ = user_cred.pid;
++#elif defined(__NetBSD__)
++  struct unpcbid user_cred;
++  socklen_t len = sizeof(user_cred);
++  int fd = sock_raw_.fd();
++  int res = getsockopt(fd, 0, LOCAL_PEEREID, &user_cred, &len);
++  PERFETTO_CHECK(res == 0);
++  peer_uid_ = user_cred.unp_euid;
++  peer_pid_ = user_cred.unp_pid;
+ #elif PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE)
+   struct xucred user_cred;
+   socklen_t len = sizeof(user_cred);
diff --git a/chromium-wip/patches/patch-third__party_perfetto_src_base_utils.cc b/chromium-wip/patches/patch-third__party_perfetto_src_base_utils.cc
new file mode 100644
index 0000000000..4f36109ff6
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_perfetto_src_base_utils.cc
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/perfetto/src/base/utils.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/perfetto/src/base/utils.cc
+@@ -38,7 +38,8 @@
+ #include <mach/vm_page_size.h>
+ #endif
+ 
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX) || \
++#if (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX) && \
++    !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)) || \
+     PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
+ #include <sys/prctl.h>
+ 
+@@ -279,14 +280,22 @@ void Daemonize(std::function<int()> pare
+ 
+ std::string GetCurExecutablePath() {
+   std::string self_path;
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) ||   \
++#if (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) ||   \
+     PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \
+-    PERFETTO_BUILDFLAG(PERFETTO_OS_FUCHSIA)
++    PERFETTO_BUILDFLAG(PERFETTO_OS_FUCHSIA)) && \
++    !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)
+   char buf[PATH_MAX];
+   ssize_t size = readlink("/proc/self/exe", buf, sizeof(buf));
+   PERFETTO_CHECK(size != -1);
+   // readlink does not null terminate.
+   self_path = std::string(buf, static_cast<size_t>(size));
++#elif PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)
++  char *buf;
++  const char *cpath = "@PREFIX@/lib/chromium/chrome";
++  if ((buf = getenv("CHROME_EXE_PATH")) != NULL)
++    self_path = std::string(buf);
++  else
++    self_path = std::string(cpath);
+ #elif PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE)
+   uint32_t size = 0;
+   PERFETTO_CHECK(_NSGetExecutablePath(nullptr, &size));
+@@ -338,7 +347,8 @@ void AlignedFree(void* ptr) {
+ }
+ 
+ bool IsSyncMemoryTaggingEnabled() {
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX) || \
++#if (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX) && \
++    !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)) || \
+     PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
+   // Compute only once per lifetime of the process.
+   static bool cached_value = [] {
diff --git a/chromium-wip/patches/patch-third__party_perfetto_src_trace__processor_importers_ftrace_v4l2__tracker.cc b/chromium-wip/patches/patch-third__party_perfetto_src_trace__processor_importers_ftrace_v4l2__tracker.cc
new file mode 100644
index 0000000000..51024acf21
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_perfetto_src_trace__processor_importers_ftrace_v4l2__tracker.cc
@@ -0,0 +1,62 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/perfetto/src/trace_processor/importers/ftrace/v4l2_tracker.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/perfetto/src/trace_processor/importers/ftrace/v4l2_tracker.cc
+@@ -62,7 +62,7 @@ void V4l2Tracker::ParseV4l2Event(uint64_
+     case FtraceEvent::kV4l2QbufFieldNumber: {
+       V4l2QbufFtraceEvent::Decoder pb_evt(bytes);
+       BufferEvent evt;
+-      evt.device_minor = pb_evt.minor();
++      evt.device_minor = pb_evt.gminor();
+       evt.index = pb_evt.index();
+       evt.type = pb_evt.type();
+       evt.bytesused = pb_evt.bytesused();
+@@ -103,7 +103,7 @@ void V4l2Tracker::ParseV4l2Event(uint64_
+     case FtraceEvent::kV4l2DqbufFieldNumber: {
+       V4l2DqbufFtraceEvent::Decoder pb_evt(bytes);
+       BufferEvent evt;
+-      evt.device_minor = pb_evt.minor();
++      evt.device_minor = pb_evt.gminor();
+       evt.index = pb_evt.index();
+       evt.type = pb_evt.type();
+       evt.bytesused = pb_evt.bytesused();
+@@ -149,7 +149,7 @@ void V4l2Tracker::ParseV4l2Event(uint64_
+     case FtraceEvent::kVb2V4l2BufQueueFieldNumber: {
+       Vb2V4l2BufQueueFtraceEvent::Decoder pb_evt(bytes);
+       BufferEvent evt;
+-      evt.device_minor = pb_evt.minor();
++      evt.device_minor = pb_evt.gminor();
+       evt.index = std::nullopt;
+       evt.type = std::nullopt;
+       evt.bytesused = std::nullopt;
+@@ -180,7 +180,7 @@ void V4l2Tracker::ParseV4l2Event(uint64_
+     case FtraceEvent::kVb2V4l2BufDoneFieldNumber: {
+       Vb2V4l2BufDoneFtraceEvent::Decoder pb_evt(bytes);
+       BufferEvent evt;
+-      evt.device_minor = pb_evt.minor();
++      evt.device_minor = pb_evt.gminor();
+       evt.index = std::nullopt;
+       evt.type = std::nullopt;
+       evt.bytesused = std::nullopt;
+@@ -211,7 +211,7 @@ void V4l2Tracker::ParseV4l2Event(uint64_
+     case FtraceEvent::kVb2V4l2QbufFieldNumber: {
+       Vb2V4l2QbufFtraceEvent::Decoder pb_evt(bytes);
+       BufferEvent evt;
+-      evt.device_minor = pb_evt.minor();
++      evt.device_minor = pb_evt.gminor();
+       evt.index = std::nullopt;
+       evt.type = std::nullopt;
+       evt.bytesused = std::nullopt;
+@@ -242,7 +242,7 @@ void V4l2Tracker::ParseV4l2Event(uint64_
+     case FtraceEvent::kVb2V4l2DqbufFieldNumber: {
+       Vb2V4l2DqbufFtraceEvent::Decoder pb_evt(bytes);
+       BufferEvent evt;
+-      evt.device_minor = pb_evt.minor();
++      evt.device_minor = pb_evt.gminor();
+       evt.index = std::nullopt;
+       evt.type = std::nullopt;
+       evt.bytesused = std::nullopt;
diff --git a/chromium-wip/patches/patch-third__party_perfetto_src_tracing_ipc_memfd.cc b/chromium-wip/patches/patch-third__party_perfetto_src_tracing_ipc_memfd.cc
new file mode 100644
index 0000000000..12519a79a5
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_perfetto_src_tracing_ipc_memfd.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/perfetto/src/tracing/ipc/memfd.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/perfetto/src/tracing/ipc/memfd.cc
+@@ -20,7 +20,8 @@
+ 
+ #define PERFETTO_MEMFD_ENABLED()             \
+   PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \
+-      PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX)
++  (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX) && \
++  !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD))
+ 
+ #if PERFETTO_MEMFD_ENABLED()
+ 
diff --git a/chromium-wip/patches/patch-third__party_perfetto_src_tracing_platform__posix.cc b/chromium-wip/patches/patch-third__party_perfetto_src_tracing_platform__posix.cc
new file mode 100644
index 0000000000..2f699f75e9
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_perfetto_src_tracing_platform__posix.cc
@@ -0,0 +1,25 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/perfetto/src/tracing/platform_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/perfetto/src/tracing/platform_posix.cc
+@@ -110,12 +110,13 @@ std::unique_ptr<base::TaskRunner> Platfo
+ }
+ 
+ std::string PlatformPosix::GetCurrentProcessName() {
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
+-    PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
++#if (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
++    PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)) && \
++    !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)
+   std::string cmdline;
+   base::ReadFile("/proc/self/cmdline", &cmdline);
+   return cmdline.substr(0, cmdline.find('\0'));
+-#elif PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE)
++#elif PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) || PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)
+   return std::string(getprogname());
+ #else
+   return "unknown_producer";
diff --git a/chromium-wip/patches/patch-third__party_perfetto_src_tracing_track.cc b/chromium-wip/patches/patch-third__party_perfetto_src_tracing_track.cc
new file mode 100644
index 0000000000..ede41be4f2
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_perfetto_src_tracing_track.cc
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/perfetto/src/tracing/track.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/perfetto/src/tracing/track.cc
+@@ -60,8 +60,9 @@ protos::gen::TrackDescriptor ProcessTrac
+   auto desc = Track::Serialize();
+   auto pd = desc.mutable_process();
+   pd->set_pid(static_cast<int32_t>(pid));
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
+-    PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
++#if (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
++    PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)) && \
++    !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)
+   std::string cmdline;
+   if (base::ReadFile("/proc/self/cmdline", &cmdline)) {
+     // Since cmdline is a zero-terminated list of arguments, this ends up
+@@ -170,7 +171,7 @@ namespace internal {
+ namespace {
+ 
+ uint64_t GetProcessStartTime() {
+-#if !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN)
++#if !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) && !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)
+   std::string stat;
+   if (!base::ReadFile("/proc/self/stat", &stat))
+     return 0u;
diff --git a/chromium-wip/patches/patch-third__party_protobuf_src_google_protobuf_stubs_platform__macros.h b/chromium-wip/patches/patch-third__party_protobuf_src_google_protobuf_stubs_platform__macros.h
new file mode 100644
index 0000000000..1e47217e39
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_protobuf_src_google_protobuf_stubs_platform__macros.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/protobuf/src/google/protobuf/stubs/platform_macros.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/protobuf/src/google/protobuf/stubs/platform_macros.h
+@@ -99,7 +99,7 @@ GOOGLE_PROTOBUF_PLATFORM_ERROR
+ 
+ #undef GOOGLE_PROTOBUF_PLATFORM_ERROR
+ 
+-#if defined(GOOGLE_PROTOBUF_OS_ANDROID) || defined(GOOGLE_PROTOBUF_OS_IPHONE)
++#if defined(GOOGLE_PROTOBUF_OS_ANDROID) || defined(GOOGLE_PROTOBUF_OS_IPHONE) || defined(__OpenBSD__)
+ // Android ndk does not support the __thread keyword very well yet. Here
+ // we use pthread_key_create()/pthread_getspecific()/... methods for
+ // TLS support on android.
diff --git a/chromium-wip/patches/patch-third__party_skia_src_gpu_ganesh_GrAutoLocaleSetter.h b/chromium-wip/patches/patch-third__party_skia_src_gpu_ganesh_GrAutoLocaleSetter.h
new file mode 100644
index 0000000000..4b1869f373
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_skia_src_gpu_ganesh_GrAutoLocaleSetter.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/skia/src/gpu/ganesh/GrAutoLocaleSetter.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/skia/src/gpu/ganesh/GrAutoLocaleSetter.h
+@@ -27,7 +27,7 @@
+ #define HAVE_XLOCALE 0
+ #endif
+ 
+-#if defined(SK_BUILD_FOR_ANDROID) || defined(__UCLIBC__) || defined(_NEWLIB_VERSION)
++#if defined(SK_BUILD_FOR_ANDROID) || defined(__UCLIBC__) || defined(_NEWLIB_VERSION) || defined(__NetBSD__)
+ #define HAVE_LOCALE_T 0
+ #else
+ #define HAVE_LOCALE_T 1
diff --git a/chromium-wip/patches/patch-third__party_skia_src_ports_SkMemory__malloc.cpp b/chromium-wip/patches/patch-third__party_skia_src_ports_SkMemory__malloc.cpp
new file mode 100644
index 0000000000..91230414da
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_skia_src_ports_SkMemory__malloc.cpp
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/skia/src/ports/SkMemory_malloc.cpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/skia/src/ports/SkMemory_malloc.cpp
+@@ -15,7 +15,8 @@
+ 
+ #if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS)
+ #include <malloc/malloc.h>
+-#elif defined(SK_BUILD_FOR_ANDROID) || defined(SK_BUILD_FOR_UNIX)
++#elif defined(SK_BUILD_FOR_ANDROID) || defined(SK_BUILD_FOR_UNIX) && !defined(__OpenBSD__) && \
++    !defined(__NetBSD__)
+ #include <malloc.h>
+ #elif defined(SK_BUILD_FOR_WIN)
+ #include <malloc.h>
+@@ -126,7 +127,7 @@ size_t sk_malloc_size(void* addr, size_t
+     #elif defined(SK_BUILD_FOR_ANDROID) && __ANDROID_API__ >= 17
+         completeSize = malloc_usable_size(addr);
+         SkASSERT(completeSize >= size);
+-    #elif defined(SK_BUILD_FOR_UNIX)
++    #elif defined(SK_BUILD_FOR_UNIX) && !defined(__OpenBSD__) && !defined(__NetBSD__)
+         completeSize = malloc_usable_size(addr);
+         SkASSERT(completeSize >= size);
+     #elif defined(SK_BUILD_FOR_WIN)
diff --git a/chromium-wip/patches/patch-third__party_skia_src_ports_SkOSFile__posix.cpp b/chromium-wip/patches/patch-third__party_skia_src_ports_SkOSFile__posix.cpp
new file mode 100644
index 0000000000..768e5bd090
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_skia_src_ports_SkOSFile__posix.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/skia/src/ports/SkOSFile_posix.cpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/skia/src/ports/SkOSFile_posix.cpp
+@@ -25,7 +25,7 @@
+ #endif
+ 
+ void sk_fsync(FILE* f) {
+-#if !defined(SK_BUILD_FOR_ANDROID) && !defined(__UCLIBC__) && !defined(_NEWLIB_VERSION)
++#if !defined(SK_BUILD_FOR_ANDROID) && !defined(__UCLIBC__) && !defined(_NEWLIB_VERSION) && !defined(__OpenBSD__)
+     int fd = fileno(f);
+     fsync(fd);
+ #endif
diff --git a/chromium-wip/patches/patch-third__party_speech-dispatcher_libspeechd__version.h b/chromium-wip/patches/patch-third__party_speech-dispatcher_libspeechd__version.h
new file mode 100644
index 0000000000..7974439233
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_speech-dispatcher_libspeechd__version.h
@@ -0,0 +1,38 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/speech-dispatcher/libspeechd_version.h.orig	2025-08-12 17:48:59.557975319 +0000
++++ third_party/speech-dispatcher/libspeechd_version.h
+@@ -0,0 +1,29 @@
++/*
++ * libspeechd_version.h - Shared library for easy access to Speech Dispatcher functions (header)
++ *
++ * Copyright (C) 2001, 2002, 2003, 2004 Brailcom, o.p.s.
++ *
++ * This is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU Lesser General Public License as published by
++ * the Free Software Foundation; either version 2.1, or (at your option)
++ * any later version.
++ *
++ * This software is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
++ *
++ * Id: patch-third_party_speech-dispatcher_libspeechd_version_h,v 1.4 2024/03/22 13:10:56 robert
++ */
++
++#ifndef _LIBSPEECHD_VERSION_H
++#define _LIBSPEECHD_VERSION_H
++
++#define LIBSPEECHD_MAJOR_VERSION 0
++#define LIBSPEECHD_MINOR_VERSION 11
++#define LIBSPEECHD_MICRO_VERSION 5
++
++#endif /* ifndef _LIBSPEECHD_VERSION_H */
diff --git a/chromium-wip/patches/patch-third__party_speech-dispatcher_speechd__types.h b/chromium-wip/patches/patch-third__party_speech-dispatcher_speechd__types.h
new file mode 100644
index 0000000000..568da0984e
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_speech-dispatcher_speechd__types.h
@@ -0,0 +1,148 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/speech-dispatcher/speechd_types.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/speech-dispatcher/speechd_types.h
+@@ -119,4 +119,139 @@ typedef struct {
+ 	SPDVoice voice;
+ } SPDMsgSettings;
+ 
++/* TEMP_FAILURE_RETRY seems to be available only on Linux. For systems that
++ * don't have this macro we provide our own version. This code was taken from
++ * file "/usr/include/unistd.h" from Debian package "libc6-dev"
++ * version 2.3.2.ds1-20. */
++#ifndef TEMP_FAILURE_RETRY
++#define TEMP_FAILURE_RETRY(expression) \
++	(__extension__ \
++	 ({ long int __result; \
++		do __result = (long int) (expression); \
++		while (__result == -1L && errno == EINTR); \
++		__result; }))
++#endif
++
++#endif /* not ifndef SPEECHD_TYPES */
++
++/*
++ * speechd_types.h - types for Speech Dispatcher
++ *
++ * Copyright (C) 2001, 2002, 2003 Brailcom, o.p.s.
++ *
++ * This is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU Lesser General Public License as published by
++ * the Free Software Foundation; either version 2.1, or (at your option)
++ * any later version.
++ *
++ * This software is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
++ */
++
++#ifndef SPEECHD_TYPES_H
++#define SPEECHD_TYPES_H
++
++typedef enum {
++	SPD_PUNCT_ALL = 0,
++	SPD_PUNCT_NONE = 1,
++	SPD_PUNCT_SOME = 2,
++	SPD_PUNCT_MOST = 3
++} SPDPunctuation;
++
++typedef enum {
++	SPD_CAP_NONE = 0,
++	SPD_CAP_SPELL = 1,
++	SPD_CAP_ICON = 2
++} SPDCapitalLetters;
++
++typedef enum {
++	SPD_SPELL_OFF = 0,
++	SPD_SPELL_ON = 1
++} SPDSpelling;
++
++typedef enum {
++	SPD_MALE1 = 1,
++	SPD_MALE2 = 2,
++	SPD_MALE3 = 3,
++	SPD_FEMALE1 = 4,
++	SPD_FEMALE2 = 5,
++	SPD_FEMALE3 = 6,
++	SPD_CHILD_MALE = 7,
++	SPD_CHILD_FEMALE = 8,
++	SPD_UNSPECIFIED = -1
++} SPDVoiceType;
++
++typedef struct {
++	char *name;		/* Name of the voice (id) */
++	char *language;		/* 2/3-letter ISO language code,
++				 * possibly followed by 2/3-letter ISO region code,
++				 * e.g. en-US */
++	char *variant;		/* a not-well defined string describing dialect etc. */
++} SPDVoice;
++
++typedef enum {
++	SPD_DATA_TEXT = 0,
++	SPD_DATA_SSML = 1
++} SPDDataMode;
++
++typedef enum {
++	SPD_IMPORTANT = 1,
++	SPD_MESSAGE = 2,
++	SPD_TEXT = 3,
++	SPD_NOTIFICATION = 4,
++	SPD_PROGRESS = 5
++} SPDPriority;
++
++typedef enum {
++	SPD_BEGIN = 1,
++	SPD_END = 2,
++	SPD_INDEX_MARKS = 4,
++	SPD_CANCEL = 8,
++	SPD_PAUSE = 16,
++	SPD_RESUME = 32,
++
++	SPD_ALL = 0x3f
++} SPDNotification;
++
++typedef enum {
++	SPD_EVENT_BEGIN,
++	SPD_EVENT_END,
++	SPD_EVENT_INDEX_MARK,
++	SPD_EVENT_CANCEL,
++	SPD_EVENT_PAUSE,
++	SPD_EVENT_RESUME
++} SPDNotificationType;
++
++typedef enum {
++	SORT_BY_TIME = 0,
++	SORT_BY_ALPHABET = 1
++} ESort;
++
++typedef enum {
++	SPD_MSGTYPE_TEXT = 0,
++	SPD_MSGTYPE_SOUND_ICON = 1,
++	SPD_MSGTYPE_CHAR = 2,
++	SPD_MSGTYPE_KEY = 3,
++	SPD_MSGTYPE_SPELL = 99
++} SPDMessageType;
++
++typedef struct {
++	signed int rate;
++	signed int pitch;
++	signed int pitch_range;
++	signed int volume;
++
++	SPDPunctuation punctuation_mode;
++	SPDSpelling spelling_mode;
++	SPDCapitalLetters cap_let_recogn;
++
++	SPDVoiceType voice_type;
++	SPDVoice voice;
++} SPDMsgSettings;
++
+ #endif /* not ifndef SPEECHD_TYPES */
diff --git a/chromium-wip/patches/patch-third__party_sqlite_BUILD.gn b/chromium-wip/patches/patch-third__party_sqlite_BUILD.gn
new file mode 100644
index 0000000000..f7de5a14aa
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_sqlite_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/sqlite/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/sqlite/BUILD.gn
+@@ -155,7 +155,7 @@ config("sqlite_warnings") {
+       ]
+     }
+   }
+-  if (is_linux || is_chromeos) {
++  if ((is_linux || is_chromeos) && !is_bsd) {
+     cflags += [
+       # SQLite doesn't believe in compiler warnings, preferring testing.
+       # http://www.sqlite.org/faq.html#q17
diff --git a/chromium-wip/patches/patch-third__party_sqlite_src_amalgamation__dev_sqlite3.c b/chromium-wip/patches/patch-third__party_sqlite_src_amalgamation__dev_sqlite3.c
new file mode 100644
index 0000000000..fada5b7181
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_sqlite_src_amalgamation__dev_sqlite3.c
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/sqlite/src/amalgamation_dev/sqlite3.c.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/sqlite/src/amalgamation_dev/sqlite3.c
+@@ -14552,7 +14552,7 @@ struct fts5_api {
+ ** But _XOPEN_SOURCE define causes problems for Mac OS X, so omit
+ ** it.
+ */
+-#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__)
++#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__) && !defined(__FreeBSD__)
+ #  define _XOPEN_SOURCE 600
+ #endif
+ 
+@@ -21107,6 +21107,9 @@ SQLITE_PRIVATE int sqlite3HeapNearlyFull
+ ** The alloca() routine never returns NULL.  This will cause code paths
+ ** that deal with sqlite3StackAlloc() failures to be unreachable.
+ */
++#if defined(__NetBSD__)
++# undef SQLITE_USE_ALLOCA
++#endif
+ #ifdef SQLITE_USE_ALLOCA
+ # define sqlite3StackAllocRaw(D,N)   alloca(N)
+ # define sqlite3StackAllocRawNN(D,N) alloca(N)
diff --git a/chromium-wip/patches/patch-third__party_sqlite_src_amalgamation_sqlite3.c b/chromium-wip/patches/patch-third__party_sqlite_src_amalgamation_sqlite3.c
new file mode 100644
index 0000000000..7086c428df
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_sqlite_src_amalgamation_sqlite3.c
@@ -0,0 +1,47 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/sqlite/src/amalgamation/sqlite3.c.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/sqlite/src/amalgamation/sqlite3.c
+@@ -14552,7 +14552,7 @@ struct fts5_api {
+ ** But _XOPEN_SOURCE define causes problems for Mac OS X, so omit
+ ** it.
+ */
+-#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__)
++#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__) && !defined(__FreeBSD__)
+ #  define _XOPEN_SOURCE 600
+ #endif
+ 
+@@ -21094,6 +21094,9 @@ SQLITE_PRIVATE int sqlite3HeapNearlyFull
+ ** The alloca() routine never returns NULL.  This will cause code paths
+ ** that deal with sqlite3StackAlloc() failures to be unreachable.
+ */
++#if defined(__NetBSD__)
++# undef SQLITE_USE_ALLOCA
++#endif
+ #ifdef SQLITE_USE_ALLOCA
+ # define sqlite3StackAllocRaw(D,N)   alloca(N)
+ # define sqlite3StackAllocRawNN(D,N) alloca(N)
+@@ -45644,6 +45647,11 @@ static int unixRandomness(sqlite3_vfs *N
+   memset(zBuf, 0, nBuf);
+   randomnessPid = osGetpid(0);
+ #if !defined(SQLITE_TEST) && !defined(SQLITE_OMIT_RANDOMNESS)
++#if defined(__OpenBSD__)
++  {
++    arc4random_buf(zBuf, nBuf);
++  }
++#else
+   {
+     int fd, got;
+     fd = robust_open("/dev/urandom", O_RDONLY, 0);
+@@ -45660,6 +45668,7 @@ static int unixRandomness(sqlite3_vfs *N
+     }
+   }
+ #endif
++#endif
+   return nBuf;
+ }
+ 
diff --git a/chromium-wip/patches/patch-third__party_swiftshader_src_Reactor_Debug.cpp b/chromium-wip/patches/patch-third__party_swiftshader_src_Reactor_Debug.cpp
new file mode 100644
index 0000000000..8a1614fc5e
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_swiftshader_src_Reactor_Debug.cpp
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/swiftshader/src/Reactor/Debug.cpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/swiftshader/src/Reactor/Debug.cpp
+@@ -46,7 +46,8 @@ namespace {
+ 
+ bool IsUnderDebugger()
+ {
+-#if defined(PTRACE) && !defined(__APPLE__) && !defined(__MACH__)
++#if defined(PTRACE) && !defined(__APPLE__) && !defined(__MACH__) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && \
++	!defined(__NetBSD__)
+ 	static bool checked = false;
+ 	static bool res = false;
+ 
diff --git a/chromium-wip/patches/patch-third__party_swiftshader_src_System_Configurator.cpp b/chromium-wip/patches/patch-third__party_swiftshader_src_System_Configurator.cpp
new file mode 100644
index 0000000000..85947ae7fa
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_swiftshader_src_System_Configurator.cpp
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/swiftshader/src/System/Configurator.cpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/swiftshader/src/System/Configurator.cpp
+@@ -38,6 +38,9 @@ namespace sw {
+ 
+ Configurator::Configurator(const std::string &filePath)
+ {
++#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
++	return;
++#endif
+ 	std::fstream file(filePath, std::ios::in);
+ 	if(file.fail())
+ 	{
diff --git a/chromium-wip/patches/patch-third__party_swiftshader_src_System_Linux_MemFd.cpp b/chromium-wip/patches/patch-third__party_swiftshader_src_System_Linux_MemFd.cpp
new file mode 100644
index 0000000000..9a67e71fe3
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_swiftshader_src_System_Linux_MemFd.cpp
@@ -0,0 +1,43 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/swiftshader/src/System/Linux/MemFd.cpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/swiftshader/src/System/Linux/MemFd.cpp
+@@ -25,6 +25,7 @@
+ #	define MFD_CLOEXEC 0x0001U
+ #endif
+ 
++#if !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__NetBSD__)
+ #if __aarch64__
+ #	define __NR_memfd_create 279
+ #elif __arm__
+@@ -36,6 +37,7 @@
+ #elif __x86_64__
+ #	define __NR_memfd_create 319
+ #endif /* __NR_memfd_create__ */
++#endif
+ 
+ LinuxMemFd::~LinuxMemFd()
+ {
+@@ -63,13 +65,17 @@ bool LinuxMemFd::allocate(const char *na
+ {
+ 	close();
+ 
+-#ifndef __NR_memfd_create
++#if !defined(__NR_memfd_create) || defined(__OpenBSD__)
+ 	TRACE("memfd_create() not supported on this system!");
+ 	return false;
+ #else
+ 	// In the event of no system call this returns -1 with errno set
+ 	// as ENOSYS.
++#if defined(__FreeBSD__) ||  defined(__NetBSD__)
++	fd_ = memfd_create(name, MFD_CLOEXEC);
++#else
+ 	fd_ = syscall(__NR_memfd_create, name, MFD_CLOEXEC);
++#endif
+ 	if(fd_ < 0)
+ 	{
+ 		TRACE("memfd_create() returned %d: %s", errno, strerror(errno));
diff --git a/chromium-wip/patches/patch-third__party_swiftshader_src_Vulkan_VkSemaphoreExternalLinux.hpp b/chromium-wip/patches/patch-third__party_swiftshader_src_Vulkan_VkSemaphoreExternalLinux.hpp
new file mode 100644
index 0000000000..056b2e4acd
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_swiftshader_src_Vulkan_VkSemaphoreExternalLinux.hpp
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/swiftshader/src/Vulkan/VkSemaphoreExternalLinux.hpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/swiftshader/src/Vulkan/VkSemaphoreExternalLinux.hpp
+@@ -49,13 +49,17 @@ public:
+ 	{
+ 		pthread_mutexattr_t mattr;
+ 		pthread_mutexattr_init(&mattr);
++#if 0
+ 		pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED);
++#endif
+ 		pthread_mutex_init(&mutex, &mattr);
+ 		pthread_mutexattr_destroy(&mattr);
+ 
+ 		pthread_condattr_t cattr;
+ 		pthread_condattr_init(&cattr);
++#if 0
+ 		pthread_condattr_setpshared(&cattr, PTHREAD_PROCESS_SHARED);
++#endif
+ 		pthread_cond_init(&cond, &cattr);
+ 		pthread_condattr_destroy(&cattr);
+ 	}
diff --git a/chromium-wip/patches/patch-third__party_swiftshader_src_WSI_libXCB.cpp b/chromium-wip/patches/patch-third__party_swiftshader_src_WSI_libXCB.cpp
new file mode 100644
index 0000000000..cb9613fd06
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_swiftshader_src_WSI_libXCB.cpp
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/swiftshader/src/WSI/libXCB.cpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/swiftshader/src/WSI/libXCB.cpp
+@@ -57,7 +57,7 @@ LibXcbExports *LibXCB::loadExports()
+ 		}
+ 		else
+ 		{
+-			libxcb = loadLibrary("libxcb.so.1");
++			libxcb = loadLibrary("libxcb.so");
+ 		}
+ 
+ 		if(getProcAddress(RTLD_DEFAULT, "xcb_shm_query_version"))  // Search the global scope for pre-loaded XCB library.
+@@ -66,7 +66,7 @@ LibXcbExports *LibXCB::loadExports()
+ 		}
+ 		else
+ 		{
+-			libshm = loadLibrary("libxcb-shm.so.0");
++			libshm = loadLibrary("libxcb-shm.so");
+ 		}
+ 
+ 		return LibXcbExports(libxcb, libshm);
diff --git a/chromium-wip/patches/patch-third__party_swiftshader_third__party_llvm-10.0_configs_linux_include_llvm_Config_config.h b/chromium-wip/patches/patch-third__party_swiftshader_third__party_llvm-10.0_configs_linux_include_llvm_Config_config.h
new file mode 100644
index 0000000000..28712f80b9
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_swiftshader_third__party_llvm-10.0_configs_linux_include_llvm_Config_config.h
@@ -0,0 +1,180 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/swiftshader/third_party/llvm-10.0/configs/linux/include/llvm/Config/config.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/swiftshader/third_party/llvm-10.0/configs/linux/include/llvm/Config/config.h
+@@ -29,7 +29,7 @@
+ 
+ /* Define to 1 if you have the declaration of `arc4random', and to 0 if you
+    don't. */
+-#define HAVE_DECL_ARC4RANDOM 0
++#define HAVE_DECL_ARC4RANDOM 1
+ 
+ /* Define to 1 if you have the declaration of `FE_ALL_EXCEPT', and to 0 if you
+    don't. */
+@@ -53,7 +53,7 @@
+ #define HAVE_DLOPEN 1
+ 
+ /* Define if dladdr() is available on this platform. */
+-/* #undef HAVE_DLADDR */
++#define HAVE_DLADDR 1
+ 
+ /* Define to 1 if you have the <errno.h> header file. */
+ #define HAVE_ERRNO_H 1
+@@ -92,7 +92,7 @@
+ #define HAVE_ISATTY 1
+ 
+ /* Define to 1 if you have the `edit' library (-ledit). */
+-/* #undef HAVE_LIBEDIT */
++#define HAVE_LIBEDIT 1
+ 
+ /* Define to 1 if you have the `pfm' library (-lpfm). */
+ /* #undef HAVE_LIBPFM */
+@@ -110,13 +110,13 @@
+ /* #undef HAVE_PTHREAD_SETNAME_NP */
+ 
+ /* Define to 1 if you have the `z' library (-lz). */
+-/* #undef HAVE_LIBZ */
++#define HAVE_LIBZ 1
+ 
+ /* Define to 1 if you have the <link.h> header file. */
+-#define HAVE_LINK_H 1
++/* #undef HAVE_LINK_H */
+ 
+ /* Define to 1 if you have the `lseek64' function. */
+-#define HAVE_LSEEK64 1
++/* #undef HAVE_LSEEK64 */
+ 
+ /* Define to 1 if you have the <mach/mach.h> header file. */
+ /* #undef HAVE_MACH_MACH_H */
+@@ -125,7 +125,7 @@
+ /* #undef HAVE_MALLCTL */
+ 
+ /* Define to 1 if you have the `mallinfo' function. */
+-#define HAVE_MALLINFO 1
++/* #undef HAVE_MALLINFO */
+ 
+ /* Define to 1 if you have the <malloc/malloc.h> header file. */
+ /* #undef HAVE_MALLOC_MALLOC_H */
+@@ -134,10 +134,10 @@
+ /* #undef HAVE_MALLOC_ZONE_STATISTICS */
+ 
+ /* Define to 1 if you have the `posix_fallocate' function. */
+-#define HAVE_POSIX_FALLOCATE 1
++/* #undef HAVE_POSIX_FALLOCATE */
+ 
+ /* Define to 1 if you have the `posix_spawn' function. */
+-/* #undef HAVE_POSIX_SPAWN */
++#define HAVE_POSIX_SPAWN 1
+ 
+ /* Define to 1 if you have the `pread' function. */
+ #define HAVE_PREAD 1
+@@ -161,10 +161,10 @@
+ #define HAVE_SETENV 1
+ 
+ /* Define to 1 if you have the `sched_getaffinity' function. */
+-#define HAVE_SCHED_GETAFFINITY 1
++/* #undef HAVE_SCHED_GETAFFINITY */
+ 
+ /* Define to 1 if you have the `CPU_COUNT' macro. */
+-#define HAVE_CPU_COUNT 1
++/* #undef HAVE_CPU_COUNT */
+ 
+ /* Define to 1 if you have the `setrlimit' function. */
+ #define HAVE_SETRLIMIT 1
+@@ -182,7 +182,7 @@
+ #define HAVE_STRERROR_R 1
+ 
+ /* Define to 1 if you have the `sysconf' function. */
+-#define HAVE_SYSCONF 1
++/* #undef HAVE_SYSCONF */
+ 
+ /* Define to 1 if you have the <sys/ioctl.h> header file. */
+ #define HAVE_SYS_IOCTL_H 1
+@@ -209,7 +209,7 @@
+ #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1
+ 
+ /* Define to 1 if you have the <sys/types.h> header file. */
+-#define HAVE_SYS_TYPES_H 1
++/* #undef HAVE_SYS_TYPES_H */
+ 
+ /* Define if the setupterm() function is supported this platform. */
+ /* #undef HAVE_TERMINFO */
+@@ -218,16 +218,16 @@
+ /* #undef HAVE_LIBXAR */
+ 
+ /* Define to 1 if you have the <termios.h> header file. */
+-/* #undef HAVE_TERMIOS_H */
++#define HAVE_TERMIOS_H 1
+ 
+ /* Define to 1 if you have the <unistd.h> header file. */
+ #define HAVE_UNISTD_H 1
+ 
+ /* Define to 1 if you have the <valgrind/valgrind.h> header file. */
+-/* #undef HAVE_VALGRIND_VALGRIND_H */
++/* #define HAVE_VALGRIND_VALGRIND_H 1 */
+ 
+ /* Define to 1 if you have the <zlib.h> header file. */
+-/* #undef HAVE_ZLIB_H */
++#define HAVE_ZLIB_H 1
+ 
+ /* Have host's _alloca */
+ /* #undef HAVE__ALLOCA */
+@@ -292,30 +292,8 @@
+ /* Linker version detected at compile time. */
+ /* #undef HOST_LINK_VERSION */
+ 
+-/* Target triple LLVM will generate code for by default */
+-/* Doesn't use `cmakedefine` because it is allowed to be empty. */
+-#if defined(__x86_64__)
+-#define LLVM_DEFAULT_TARGET_TRIPLE "x86_64-unknown-linux-gnu"
+-#elif defined(__i386__)
+-#define LLVM_DEFAULT_TARGET_TRIPLE "i686-pc-linux-gnu"
+-#elif defined(__arm__)
+-#define LLVM_DEFAULT_TARGET_TRIPLE "armv7-linux-gnueabihf"
+-#elif defined(__aarch64__)
+-#define LLVM_DEFAULT_TARGET_TRIPLE "aarch64-linux-gnu"
+-#elif defined(__mips__)
+-#define LLVM_DEFAULT_TARGET_TRIPLE "mipsel-linux-gnu"
+-#elif defined(__mips64)
+-#define LLVM_DEFAULT_TARGET_TRIPLE "mips64el-linux-gnuabi64"
+-#elif defined(__powerpc64__)
+-#define LLVM_DEFAULT_TARGET_TRIPLE "powerpc64le-unknown-linux-gnu"
+-#elif defined(__riscv) && __riscv_xlen == 64
+-#define LLVM_DEFAULT_TARGET_TRIPLE "riscv64-unknown-linux-gnu"
+-#else
+-#error "unknown architecture"
+-#endif
+-
+ /* Define if zlib compression is available */
+-#define LLVM_ENABLE_ZLIB 0
++/* #define LLVM_ENABLE_ZLIB 1 */
+ 
+ /* Define if overriding target triple is enabled */
+ /* #undef LLVM_TARGET_TRIPLE_ENV */
+@@ -339,10 +317,10 @@
+ #define PACKAGE_NAME "LLVM"
+ 
+ /* Define to the full name and version of this package. */
+-#define PACKAGE_STRING "LLVM 10.0.0"
++#define PACKAGE_STRING "LLVM 11.1.0"
+ 
+ /* Define to the version of this package. */
+-#define PACKAGE_VERSION "10.0.0"
++#define PACKAGE_VERSION "11.1.0"
+ 
+ /* Define to the vendor of this package. */
+ /* #undef PACKAGE_VENDOR */
+@@ -362,9 +340,6 @@
+ /* Whether GlobalISel rule coverage is being collected */
+ #define LLVM_GISEL_COV_ENABLED 0
+ 
+-/* Define if we have z3 and want to build it */
+-#define LLVM_WITH_Z3 1
+-
+ /* Define to the default GlobalISel coverage file prefix */
+ /* #undef LLVM_GISEL_COV_PREFIX */
+ 
diff --git a/chromium-wip/patches/patch-third__party_swiftshader_third__party_llvm-subzero_build_Linux_include_llvm_Config_config.h b/chromium-wip/patches/patch-third__party_swiftshader_third__party_llvm-subzero_build_Linux_include_llvm_Config_config.h
new file mode 100644
index 0000000000..3caca20eb6
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_swiftshader_third__party_llvm-subzero_build_Linux_include_llvm_Config_config.h
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h
+@@ -5,8 +5,6 @@
+ #include "llvm/Config/llvm-config.h"
+ 
+ /* For detecting __GLIBC__ usage */
+-#include <features.h>
+-
+ /* Bug report URL. */
+ #define BUG_REPORT_URL "http://llvm.org/bugs/";
+ 
+@@ -27,7 +25,7 @@
+ 
+ /* Define to 1 if you have the declaration of `arc4random', and to 0 if you
+    don't. */
+-#define HAVE_DECL_ARC4RANDOM 0
++#define HAVE_DECL_ARC4RANDOM 1
+ 
+ /* Define to 1 if you have the declaration of `FE_ALL_EXCEPT', and to 0 if you
+    don't. */
+@@ -124,7 +122,7 @@
+ #define HAVE_LINK_H 1
+ 
+ /* Define to 1 if you have the `lseek64' function. */
+-#define HAVE_LSEEK64 1
++/* #define HAVE_LSEEK64 */
+ 
+ /* Define to 1 if you have the <mach/mach.h> header file. */
+ /* #undef HAVE_MACH_MACH_H */
+@@ -133,7 +131,7 @@
+ /* #undef HAVE_MALLCTL */
+ 
+ /* Define to 1 if you have the `mallinfo' function. */
+-#define HAVE_MALLINFO 1
++/* #define HAVE_MALLINFO */
+ 
+ /* Some projects using SwiftShader bypass cmake (eg Chromium via gn) */
+ /* so we need to check glibc version for the new API to be safe */
+@@ -163,7 +161,7 @@
+ /* #undef HAVE_NDIR_H */
+ 
+ /* Define to 1 if you have the `posix_fallocate' function. */
+-#define HAVE_POSIX_FALLOCATE 1
++/* #define HAVE_POSIX_FALLOCATE */
+ 
+ /* Define to 1 if you have the `posix_spawn' function. */
+ #define HAVE_POSIX_SPAWN 1
diff --git a/chromium-wip/patches/patch-third__party_swiftshader_third__party_marl_src_memory.cpp b/chromium-wip/patches/patch-third__party_swiftshader_third__party_marl_src_memory.cpp
new file mode 100644
index 0000000000..7400208961
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_swiftshader_third__party_marl_src_memory.cpp
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/swiftshader/third_party/marl/src/memory.cpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/swiftshader/third_party/marl/src/memory.cpp
+@@ -19,7 +19,8 @@
+ 
+ #include <cstring>
+ 
+-#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || defined(__EMSCRIPTEN__)
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || defined(__EMSCRIPTEN__) || defined(__OpenBSD__) || \
++      defined(__NetBSD__)
+ #include <sys/mman.h>
+ #include <unistd.h>
+ namespace {
diff --git a/chromium-wip/patches/patch-third__party_swiftshader_third__party_marl_src_thread.cpp b/chromium-wip/patches/patch-third__party_swiftshader_third__party_marl_src_thread.cpp
new file mode 100644
index 0000000000..69e7c5c91a
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_swiftshader_third__party_marl_src_thread.cpp
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/swiftshader/third_party/marl/src/thread.cpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/swiftshader/third_party/marl/src/thread.cpp
+@@ -46,6 +46,9 @@
+ #include <unistd.h>
+ #include <thread>
+ #endif
++#if defined(__NetBSD__)
++#include <stdarg.h>
++#endif
+ 
+ namespace {
+ 
+@@ -444,7 +447,9 @@ void Thread::setName(const char* fmt, ..
+   pthread_setname_np(name);
+ #elif defined(__FreeBSD__)
+   pthread_set_name_np(pthread_self(), name);
+-#elif !defined(__Fuchsia__) && !defined(__EMSCRIPTEN__)
++#elif defined(__NetBSD__)
++  pthread_setname_np(pthread_self(), "%s", (void *)name);
++#elif !defined(__Fuchsia__) && !defined(__EMSCRIPTEN__) && !defined(__OpenBSD__) && !defined(__FreeBSD__)
+   pthread_setname_np(pthread_self(), name);
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-third__party_test__fonts_fontconfig_BUILD.gn b/chromium-wip/patches/patch-third__party_test__fonts_fontconfig_BUILD.gn
new file mode 100644
index 0000000000..ec054e219d
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_test__fonts_fontconfig_BUILD.gn
@@ -0,0 +1,34 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/test_fonts/fontconfig/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/test_fonts/fontconfig/BUILD.gn
+@@ -26,7 +26,11 @@ if (is_linux || is_chromeos) {
+ 
+   copy("fonts_conf") {
+     sources = [ "fonts.conf" ]
+-    outputs = [ "$root_out_dir/etc/fonts/{{source_file_part}}" ]
++    if (is_freebsd) {
++      outputs = [ "$root_out_dir/usr/local/etc/fonts/{{source_file_part}}" ]
++    } else {
++      outputs = [ "$root_out_dir/etc/fonts/{{source_file_part}}" ]
++    }
+   }
+ 
+   if (current_toolchain == host_toolchain) {
+@@ -47,7 +51,11 @@ if (is_linux || is_chromeos) {
+         "//third_party/test_fonts",
+       ]
+       args = []
+-      inputs = [ "$root_out_dir/etc/fonts/fonts.conf" ]
++      if (is_freebsd) {
++        inputs = [ "$root_out_dir/usr/local/etc/fonts/fonts.conf" ]
++      } else {
++        inputs = [ "$root_out_dir/etc/fonts/fonts.conf" ]
++      }
+       outputs = [
+         "$root_out_dir/fontconfig_caches/fb5c91b2895aa445d23aebf7f9e2189c-le64.cache-9",
+         "$root_out_dir/fontconfig_caches/CACHEDIR.TAG",
diff --git a/chromium-wip/patches/patch-third__party_test__fonts_fontconfig_fontconfig__util__linux.cc b/chromium-wip/patches/patch-third__party_test__fonts_fontconfig_fontconfig__util__linux.cc
new file mode 100644
index 0000000000..91b4240f84
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_test__fonts_fontconfig_fontconfig__util__linux.cc
@@ -0,0 +1,33 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/test_fonts/fontconfig/fontconfig_util_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/test_fonts/fontconfig/fontconfig_util_linux.cc
+@@ -2,6 +2,8 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
++#include "build/build_config.h"
++
+ #include "third_party/test_fonts/fontconfig/fontconfig_util_linux.h"
+ 
+ #include <fontconfig/fontconfig.h>
+@@ -16,11 +18,15 @@
+ namespace test_fonts {
+ 
+ std::string GetSysrootDir() {
++#if BUILDFLAG(IS_BSD)
++  return std::string(".");
++#else
+   char buf[PATH_MAX + 1];
+   auto count = readlink("/proc/self/exe", buf, PATH_MAX);
+   assert(count > 0);
+   buf[count] = '\0';
+   return dirname(buf);
++#endif
+ }
+ 
+ void SetUpFontconfig() {
diff --git a/chromium-wip/patches/patch-third__party_test__fonts_fontconfig_generate__fontconfig__caches.cc b/chromium-wip/patches/patch-third__party_test__fonts_fontconfig_generate__fontconfig__caches.cc
new file mode 100644
index 0000000000..465d651169
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_test__fonts_fontconfig_generate__fontconfig__caches.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc
+@@ -28,7 +28,7 @@ int main() {
+   // fontconfig cache.
+   //     $ echo -n /test_fonts | md5sum
+   //     fb5c91b2895aa445d23aebf7f9e2189c  -
+-  static const char kCacheKey[] = "fb5c91b2895aa445d23aebf7f9e2189c";
++  static const char kCacheKey[] = "cd4b5bc7-6cfc-41dc-8982-f2db624179ba";
+ 
+   // fontconfig writes the mtime of the test_fonts directory into the cache. It
+   // presumably checks this later to ensure that the cache is still up to date.
+@@ -56,7 +56,7 @@ int main() {
+   FcFini();
+ 
+   // Check existence of intended fontconfig cache file.
+-  auto cache = fontconfig_caches + "/" + kCacheKey + "-le64.cache-9";
++  auto cache = fontconfig_caches + "/" + kCacheKey + "-x86_64.cache-" + FC_CACHE_VERSION;
+   bool cache_exists = access(cache.c_str(), F_OK) == 0;
+   return !cache_exists;
+ }
diff --git a/chromium-wip/patches/patch-third__party_tflite_features.gni b/chromium-wip/patches/patch-third__party_tflite_features.gni
new file mode 100644
index 0000000000..7937374278
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_tflite_features.gni
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/tflite/features.gni.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/tflite/features.gni
+@@ -8,7 +8,7 @@ import("//services/on_device_model/on_de
+ 
+ declare_args() {
+   # This enables building TFLite with XNNPACK.
+-  build_tflite_with_xnnpack = current_cpu != "arm" && !is_fuchsia
++  build_tflite_with_xnnpack = current_cpu != "arm" && !is_fuchsia && !is_bsd
+ 
+   # Turns on TFLITE_WITH_RUY, using ruy as the gemm backend instead of gemmlowp.
+   build_tflite_with_ruy = true
diff --git a/chromium-wip/patches/patch-third__party_unrar_src_crypt.cpp b/chromium-wip/patches/patch-third__party_unrar_src_crypt.cpp
new file mode 100644
index 0000000000..27e2ab5b2d
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_unrar_src_crypt.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/unrar/src/crypt.cpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/unrar/src/crypt.cpp
+@@ -116,6 +116,8 @@ void GetRnd(byte *RndBuf,size_t BufSize)
+     Success=CryptGenRandom(hProvider, (DWORD)BufSize, RndBuf) != FALSE;
+     CryptReleaseContext(hProvider, 0);
+   }
++#elif defined(__OpenBSD__)
++  arc4random_buf(RndBuf, BufSize);
+ #elif defined(_UNIX)
+   FILE *rndf = fopen("/dev/urandom", "r");
+   if (rndf!=NULL)
diff --git a/chromium-wip/patches/patch-third__party_vulkan-validation-layers_src_layers_external_vma_vk__mem__alloc.h b/chromium-wip/patches/patch-third__party_vulkan-validation-layers_src_layers_external_vma_vk__mem__alloc.h
new file mode 100644
index 0000000000..389b9485e6
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_vulkan-validation-layers_src_layers_external_vma_vk__mem__alloc.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h
+@@ -2971,7 +2971,7 @@ static void* vma_aligned_alloc(size_t al
+ 
+     return memalign(alignment, size);
+ }
+-#elif defined(__APPLE__) || defined(__ANDROID__) || (defined(__linux__) && defined(__GLIBCXX__) && !defined(_GLIBCXX_HAVE_ALIGNED_ALLOC))
++#elif defined(__APPLE__) || defined(__ANDROID__) || (defined(__linux__) && defined(__GLIBCXX__) && !defined(_GLIBCXX_HAVE_ALIGNED_ALLOC)) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
+ #include <cstdlib>
+ 
+ #if defined(__APPLE__)
diff --git a/chromium-wip/patches/patch-third__party_vulkan-validation-layers_src_layers_vulkan_generated_vk__function__pointers.cpp b/chromium-wip/patches/patch-third__party_vulkan-validation-layers_src_layers_vulkan_generated_vk__function__pointers.cpp
new file mode 100644
index 0000000000..62ce82551e
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_vulkan-validation-layers_src_layers_vulkan_generated_vk__function__pointers.cpp
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/vulkan-validation-layers/src/layers/vulkan/generated/vk_function_pointers.cpp.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/vulkan-validation-layers/src/layers/vulkan/generated/vk_function_pointers.cpp
+@@ -53,7 +53,8 @@ static void *get_proc_address(dl_handle 
+     assert(name);
+     return (void *)GetProcAddress(library, name);
+ }
+-#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__QNX__) || defined(__GNU__)
++#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__QNX__) || \
++         defined(__GNU__) ||  defined(__NetBSD__)
+ 
+ #include <dlfcn.h>
+ 
diff --git a/chromium-wip/patches/patch-third__party_vulkan__memory__allocator_include_vk__mem__alloc.h b/chromium-wip/patches/patch-third__party_vulkan__memory__allocator_include_vk__mem__alloc.h
new file mode 100644
index 0000000000..544e7e3c86
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_vulkan__memory__allocator_include_vk__mem__alloc.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/vulkan_memory_allocator/include/vk_mem_alloc.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/vulkan_memory_allocator/include/vk_mem_alloc.h
+@@ -2760,7 +2760,7 @@ void* vma_aligned_alloc(size_t alignment
+ 
+     return memalign(alignment, size);
+ }
+-#elif defined(__APPLE__) || defined(__ANDROID__) || (defined(__linux__) && defined(__GLIBCXX__) && !defined(_GLIBCXX_HAVE_ALIGNED_ALLOC))
++#elif defined(__APPLE__) || defined(__ANDROID__) || (defined(__linux__) && defined(__GLIBCXX__) && !defined(_GLIBCXX_HAVE_ALIGNED_ALLOC)) || defined(__OpenBSD__) || defined(__FreeBSD__)
+ #include <cstdlib>
+ 
+ #if defined(__APPLE__)
diff --git a/chromium-wip/patches/patch-third__party_wayland_BUILD.gn b/chromium-wip/patches/patch-third__party_wayland_BUILD.gn
new file mode 100644
index 0000000000..2dcc2e088e
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_wayland_BUILD.gn
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/wayland/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/wayland/BUILD.gn
+@@ -24,6 +24,11 @@ if (!use_system_libwayland) {
+       "src/src",
+     ]
+ 
++    if (is_bsd) {
++      include_dirs += [ "/usr/local/include/libepoll-shim" ]
++      libs = [ "epoll-shim" ]
++    }   
++
+     # Client/Server headers are automatically generated. Though, we still need
+     # to pass the path where these headers are located.
+     include_dirs += [ "$root_gen_dir/third_party/wayland/src/protocol" ]
diff --git a/chromium-wip/patches/patch-third__party_wayland_include_config.h b/chromium-wip/patches/patch-third__party_wayland_include_config.h
new file mode 100644
index 0000000000..9bd94d0e7c
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_wayland_include_config.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/wayland/include/config.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/wayland/include/config.h
+@@ -9,7 +9,14 @@
+ 
+ #define HAVE_BROKEN_MSG_CMSG_CLOEXEC 0
+ 
++#if defined(__FreeBSD__)
++#include <osreldate.h>
++#if defined(__FreeBSD_version) && __FreeBSD_version < 1300048
++#undef HAVE_MEMFD_CREATE
++#else
+ #define HAVE_MEMFD_CREATE
++#endif
++#endif
+ 
+ #define HAVE_MKOSTEMP
+ 
+@@ -25,7 +32,11 @@
+ 
+ #undef HAVE_SYS_PROCCTL_H
+ 
++#if defined(__FreeBSD__)
++#define HAVE_SYS_UCRED_H
++#else
+ #undef HAVE_SYS_UCRED_H
++#endif
+ 
+ #define HAVE_XUCRED_CR_PID 0
+ 
diff --git a/chromium-wip/patches/patch-third__party_webrtc_BUILD.gn b/chromium-wip/patches/patch-third__party_webrtc_BUILD.gn
new file mode 100644
index 0000000000..f2c5afeca8
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_webrtc_BUILD.gn
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/webrtc/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/webrtc/BUILD.gn
+@@ -219,6 +219,9 @@ config("common_inherited_config") {
+   if (is_linux || is_chromeos) {
+     defines += [ "WEBRTC_LINUX" ]
+   }
++  if (is_bsd) {
++    defines += [ "WEBRTC_BSD" ]
++  }
+   if (is_mac) {
+     defines += [ "WEBRTC_MAC" ]
+   }
diff --git a/chromium-wip/patches/patch-third__party_webrtc_modules_audio__device_BUILD.gn b/chromium-wip/patches/patch-third__party_webrtc_modules_audio__device_BUILD.gn
new file mode 100644
index 0000000000..ce4667f01a
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_webrtc_modules_audio__device_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/webrtc/modules/audio_device/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/webrtc/modules/audio_device/BUILD.gn
+@@ -335,7 +335,7 @@ rtc_library("audio_device_impl") {
+     if (rtc_use_dummy_audio_file_devices) {
+       defines += [ "WEBRTC_DUMMY_FILE_DEVICES" ]
+     } else {
+-      if (is_linux || is_chromeos) {
++      if ((is_linux || is_chromeos) && !is_bsd) {
+         sources += [
+           "linux/alsasymboltable_linux.cc",
+           "linux/alsasymboltable_linux.h",
diff --git a/chromium-wip/patches/patch-third__party_webrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc b/chromium-wip/patches/patch-third__party_webrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc
new file mode 100644
index 0000000000..5ce38a1f1c
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_webrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/webrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/webrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc
+@@ -15,7 +15,9 @@
+ #include <EGL/eglplatform.h>
+ #include <GL/gl.h>
+ #include <GL/glext.h>
++#if !defined(WEBRTC_BSD)
+ #include <asm/ioctl.h>
++#endif
+ #include <dlfcn.h>
+ #include <fcntl.h>
+ #include <gbm.h>
diff --git a/chromium-wip/patches/patch-third__party_webrtc_modules_desktop__capture_linux_x11_x__server__pixel__buffer.cc b/chromium-wip/patches/patch-third__party_webrtc_modules_desktop__capture_linux_x11_x__server__pixel__buffer.cc
new file mode 100644
index 0000000000..cca70879b2
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_webrtc_modules_desktop__capture_linux_x11_x__server__pixel__buffer.cc
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/webrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/webrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc
+@@ -212,6 +212,12 @@ bool XServerPixelBuffer::Init(XAtomCache
+ void XServerPixelBuffer::InitShm(const XWindowAttributes& attributes) {
+   Visual* default_visual = attributes.visual;
+   int default_depth = attributes.depth;
++#if defined(__OpenBSD__)
++// pledge(2)
++  RTC_LOG(LS_WARNING) << "Unable to use shmget(2) while using pledge(2). "
++                         "Performance may be degraded.";
++  return;
++#endif
+ 
+   int major, minor;
+   Bool have_pixmaps;
diff --git a/chromium-wip/patches/patch-third__party_webrtc_rtc__base_byte__order.h b/chromium-wip/patches/patch-third__party_webrtc_rtc__base_byte__order.h
new file mode 100644
index 0000000000..b3be3600c8
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_webrtc_rtc__base_byte__order.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/webrtc/rtc_base/byte_order.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/webrtc/rtc_base/byte_order.h
+@@ -90,6 +90,8 @@
+ #error WEBRTC_ARCH_BIG_ENDIAN or WEBRTC_ARCH_LITTLE_ENDIAN must be defined.
+ #endif  // defined(WEBRTC_ARCH_LITTLE_ENDIAN)
+ 
++#elif defined(WEBRTC_BSD)
++#include <sys/endian.h>
+ #elif defined(WEBRTC_POSIX)
+ #include <endian.h>
+ #else
diff --git a/chromium-wip/patches/patch-third__party_webrtc_rtc__base_cpu__info.cc b/chromium-wip/patches/patch-third__party_webrtc_rtc__base_cpu__info.cc
new file mode 100644
index 0000000000..a66a8d912a
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_webrtc_rtc__base_cpu__info.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/webrtc/rtc_base/cpu_info.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/webrtc/rtc_base/cpu_info.cc
+@@ -22,7 +22,9 @@
+ #elif defined(WEBRTC_FUCHSIA)
+ #include <zircon/syscalls.h>
+ #elif defined(WEBRTC_LINUX)
++#if !defined(WEBRTC_BSD)
+ #include <features.h>
++#endif
+ #include <stdlib.h>
+ #include <string.h>  // IWYU pragma: keep
+ #include <unistd.h>
diff --git a/chromium-wip/patches/patch-third__party_webrtc_rtc__base_ip__address.cc b/chromium-wip/patches/patch-third__party_webrtc_rtc__base_ip__address.cc
new file mode 100644
index 0000000000..77eebb525a
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_webrtc_rtc__base_ip__address.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/webrtc/rtc_base/ip_address.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/webrtc/rtc_base/ip_address.cc
+@@ -14,7 +14,8 @@
+ #include <cstring>
+ #include <string>
+ #if defined(WEBRTC_POSIX)
+-#ifdef OPENBSD
++#if defined(WEBRTC_BSD)
++#include <sys/types.h>
+ #include <netinet/in_systm.h>
+ #endif
+ #ifndef __native_client__
diff --git a/chromium-wip/patches/patch-third__party_webrtc_rtc__base_net__helpers.cc b/chromium-wip/patches/patch-third__party_webrtc_rtc__base_net__helpers.cc
new file mode 100644
index 0000000000..bade64249f
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_webrtc_rtc__base_net__helpers.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/webrtc/rtc_base/net_helpers.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/webrtc/rtc_base/net_helpers.cc
+@@ -21,6 +21,7 @@
+ #endif
+ #if defined(WEBRTC_POSIX) && !defined(__native_client__)
+ #include <arpa/inet.h>
++#include <sys/socket.h>
+ #endif  // defined(WEBRTC_POSIX) && !defined(__native_client__)
+ 
+ namespace webrtc {
diff --git a/chromium-wip/patches/patch-third__party_webrtc_rtc__base_network.cc b/chromium-wip/patches/patch-third__party_webrtc_rtc__base_network.cc
new file mode 100644
index 0000000000..5276a9eedb
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_webrtc_rtc__base_network.cc
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/webrtc/rtc_base/network.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/webrtc/rtc_base/network.cc
+@@ -305,7 +305,12 @@ AdapterType GetAdapterTypeFromName(absl:
+   }
+ #endif
+ 
++#if defined(WEBRTC_BSD)
++  // Treat all other network interface names as ethernet on BSD
++  return webrtc::ADAPTER_TYPE_ETHERNET;
++#else
+   return ADAPTER_TYPE_UNKNOWN;
++#endif
+ }
+ 
+ NetworkManager::EnumerationPermission NetworkManager::enumeration_permission()
diff --git a/chromium-wip/patches/patch-third__party_webrtc_rtc__base_physical__socket__server.cc b/chromium-wip/patches/patch-third__party_webrtc_rtc__base_physical__socket__server.cc
new file mode 100644
index 0000000000..e25856cef9
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_webrtc_rtc__base_physical__socket__server.cc
@@ -0,0 +1,120 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/webrtc/rtc_base/physical_socket_server.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/webrtc/rtc_base/physical_socket_server.cc
+@@ -65,7 +65,7 @@
+ #include "rtc_base/synchronization/mutex.h"
+ #include "rtc_base/time_utils.h"
+ 
+-#if defined(WEBRTC_LINUX)
++#if defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD)
+ #include <linux/sockios.h>
+ #endif
+ 
+@@ -85,7 +85,7 @@ typedef void* SockOptArg;
+ 
+ #endif  // WEBRTC_POSIX
+ 
+-#if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(__native_client__)
++#if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(__native_client__) && !defined(WEBRTC_BSD)
+ 
+ int64_t GetSocketRecvTimestamp(int socket) {
+   struct timeval tv_ioctl;
+@@ -340,7 +340,7 @@ int PhysicalSocket::GetOption(Option opt
+     return -1;
+   }
+   if (opt == OPT_DONTFRAGMENT) {
+-#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
++#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_BSD)
+     *value = (*value != IP_PMTUDISC_DONT) ? 1 : 0;
+ #endif
+   } else if (opt == OPT_DSCP) {
+@@ -369,7 +369,7 @@ int PhysicalSocket::SetOption(Option opt
+   if (TranslateOption(opt, &slevel, &sopt) == -1)
+     return -1;
+   if (opt == OPT_DONTFRAGMENT) {
+-#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
++#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_BSD)
+     value = (value) ? IP_PMTUDISC_DO : IP_PMTUDISC_DONT;
+ #endif
+   } else if (opt == OPT_DSCP) {
+@@ -400,7 +400,7 @@ int PhysicalSocket::SetOption(Option opt
+ int PhysicalSocket::Send(const void* pv, size_t cb) {
+   int sent = DoSend(
+       s_, reinterpret_cast<const char*>(pv), static_cast<int>(cb),
+-#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
++#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_BSD)
+       // Suppress SIGPIPE. Without this, attempting to send on a socket whose
+       // other end is closed will result in a SIGPIPE signal being raised to
+       // our process, which by default will terminate the process, which we
+@@ -429,7 +429,7 @@ int PhysicalSocket::SendTo(const void* b
+   size_t len = addr.ToSockAddrStorage(&saddr);
+   int sent =
+       DoSendTo(s_, static_cast<const char*>(buffer), static_cast<int>(length),
+-#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
++#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_BSD)
+                // Suppress SIGPIPE. See above for explanation.
+                MSG_NOSIGNAL,
+ #else
+@@ -707,7 +707,7 @@ int PhysicalSocket::TranslateOption(Opti
+       *slevel = IPPROTO_IP;
+       *sopt = IP_DONTFRAGMENT;
+       break;
+-#elif defined(WEBRTC_MAC) || defined(BSD) || defined(__native_client__)
++#elif defined(WEBRTC_MAC) || defined(WEBRTC_BSD) || defined(__native_client__)
+       RTC_LOG(LS_WARNING) << "Socket::OPT_DONTFRAGMENT not supported.";
+       return -1;
+ #elif defined(WEBRTC_POSIX)
+@@ -756,7 +756,7 @@ int PhysicalSocket::TranslateOption(Opti
+       return -1;
+ #endif
+     case OPT_RECV_ECN:
+-#if defined(WEBRTC_POSIX)
++#if defined(WEBRTC_POSIX) && defined(IP_RECVTOS) 
+       if (family_ == AF_INET6) {
+         *slevel = IPPROTO_IPV6;
+         *sopt = IPV6_RECVTCLASS;
+@@ -776,10 +776,19 @@ int PhysicalSocket::TranslateOption(Opti
+       *sopt = SO_KEEPALIVE;
+       break;
+     case OPT_TCP_KEEPCNT:
++#if !defined(TCP_KEEPCNT)
++      RTC_LOG(LS_WARNING) << "Socket::OPT_TCP_KEEPCNT not supported.";
++      return -1;
++#else
+       *slevel = IPPROTO_TCP;
+       *sopt = TCP_KEEPCNT;
+       break;
++#endif
+     case OPT_TCP_KEEPIDLE:
++#if !defined(TCP_KEEPALIVE)
++      RTC_LOG(LS_WARNING) << "Socket::OPT_TCP_KEEPALIVE not supported.";
++      return -1;
++#else
+       *slevel = IPPROTO_TCP;
+ #if !defined(WEBRTC_MAC)
+       *sopt = TCP_KEEPIDLE;
+@@ -787,12 +796,18 @@ int PhysicalSocket::TranslateOption(Opti
+       *sopt = TCP_KEEPALIVE;
+ #endif
+       break;
++#endif
+     case OPT_TCP_KEEPINTVL:
++#if !defined(TCP_KEEPALIVE)
++      RTC_LOG(LS_WARNING) << "Socket::OPT_TCP_KEEPINTVL not supported.";
++      return -1;
++#else
+       *slevel = IPPROTO_TCP;
+       *sopt = TCP_KEEPINTVL;
+       break;
++#endif
+     case OPT_TCP_USER_TIMEOUT:
+-#if defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID)
++#if (defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID)) && defined(TCP_USER_TIMEOUT)
+       *slevel = IPPROTO_TCP;
+       *sopt = TCP_USER_TIMEOUT;
+       break;
diff --git a/chromium-wip/patches/patch-third__party_webrtc_rtc__base_physical__socket__server.h b/chromium-wip/patches/patch-third__party_webrtc_rtc__base_physical__socket__server.h
new file mode 100644
index 0000000000..f40198404f
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_webrtc_rtc__base_physical__socket__server.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/webrtc/rtc_base/physical_socket_server.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/webrtc/rtc_base/physical_socket_server.h
+@@ -22,7 +22,7 @@
+ #include "rtc_base/third_party/sigslot/sigslot.h"
+ 
+ #if defined(WEBRTC_POSIX)
+-#if defined(WEBRTC_LINUX)
++#if defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD)
+ // On Linux, use epoll.
+ #include <sys/epoll.h>
+ 
diff --git a/chromium-wip/patches/patch-third__party_webrtc_rtc__base_platform__thread__types.cc b/chromium-wip/patches/patch-third__party_webrtc_rtc__base_platform__thread__types.cc
new file mode 100644
index 0000000000..bb08ad9987
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_webrtc_rtc__base_platform__thread__types.cc
@@ -0,0 +1,43 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/webrtc/rtc_base/platform_thread_types.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/webrtc/rtc_base/platform_thread_types.cc
+@@ -12,7 +12,9 @@
+ 
+ // IWYU pragma: begin_keep
+ #if defined(WEBRTC_LINUX)
++#if !defined(WEBRTC_BSD)
+ #include <sys/prctl.h>
++#endif
+ #include <sys/syscall.h>
+ #endif
+ 
+@@ -46,6 +48,8 @@ PlatformThreadId CurrentThreadId() {
+   return gettid();
+ #elif defined(WEBRTC_FUCHSIA)
+   return zx_thread_self();
++#elif defined(WEBRTC_BSD)
++  return reinterpret_cast<uint64_t>(pthread_self());
+ #elif defined(WEBRTC_LINUX)
+   return syscall(__NR_gettid);
+ #elif defined(__EMSCRIPTEN__)
+@@ -76,6 +80,7 @@ bool IsThreadRefEqual(const PlatformThre
+ }
+ 
+ void SetCurrentThreadName(const char* name) {
++#if !defined(WEBRTC_BSD)
+ #if defined(WEBRTC_WIN)
+   // The SetThreadDescription API works even if no debugger is attached.
+   // The names set with this API also show up in ETW traces. Very handy.
+@@ -123,6 +128,7 @@ void SetCurrentThreadName(const char* na
+                                               name, strlen(name));
+   RTC_DCHECK_EQ(status, ZX_OK);
+ #endif
++#endif
+ }
+ 
+ }  // namespace webrtc
diff --git a/chromium-wip/patches/patch-third__party_webrtc_rtc__base_third__party_sigslot_sigslot.h b/chromium-wip/patches/patch-third__party_webrtc_rtc__base_third__party_sigslot_sigslot.h
new file mode 100644
index 0000000000..4c2aa79e5e
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_webrtc_rtc__base_third__party_sigslot_sigslot.h
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/webrtc/rtc_base/third_party/sigslot/sigslot.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/webrtc/rtc_base/third_party/sigslot/sigslot.h
+@@ -178,6 +178,10 @@ class multi_threaded_local {
+ #endif  // _SIGSLOT_HAS_WIN32_THREADS
+ 
+ #ifdef _SIGSLOT_HAS_POSIX_THREADS
++#if defined(OS_FREEBSD)
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wthread-safety-analysis"
++#endif
+ // The multi threading policies only get compiled in if they are enabled.
+ class multi_threaded_global {
+  public:
+@@ -201,6 +205,9 @@ class multi_threaded_local {
+  private:
+   pthread_mutex_t m_mutex;
+ };
++#if defined(OS_FREEBSD)
++#pragma GCC diagnostic pop
++#endif
+ #endif  // _SIGSLOT_HAS_POSIX_THREADS
+ 
+ template <class mt_policy>
diff --git a/chromium-wip/patches/patch-third__party_widevine_cdm_widevine.gni b/chromium-wip/patches/patch-third__party_widevine_cdm_widevine.gni
new file mode 100644
index 0000000000..89a02ee78d
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_widevine_cdm_widevine.gni
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/widevine/cdm/widevine.gni.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/widevine/cdm/widevine.gni
+@@ -28,6 +28,9 @@ library_widevine_cdm_available =
+     (is_chromeos &&
+      (target_cpu == "x64" || target_cpu == "arm" || target_cpu == "arm64")) ||
+     (target_os == "linux" && target_cpu == "x64") ||
++    (target_os == "openbsd" && target_cpu == "x64") ||
++    (target_os == "freebsd" && target_cpu == "x64") ||
++    (target_os == "netbsd" && target_cpu == "x64") ||
+     (target_os == "mac" && (target_cpu == "x64" || target_cpu == "arm64")) ||
+     (target_os == "win" &&
+      (target_cpu == "x86" || target_cpu == "x64" || target_cpu == "arm64"))
diff --git a/chromium-wip/patches/patch-third__party_zlib_BUILD.gn b/chromium-wip/patches/patch-third__party_zlib_BUILD.gn
new file mode 100644
index 0000000000..e718b0e204
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_zlib_BUILD.gn
@@ -0,0 +1,37 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/zlib/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/zlib/BUILD.gn
+@@ -128,7 +128,7 @@ if (use_arm_neon_optimizations) {
+     defines = [ "CRC32_ARMV8_CRC32" ]
+     if (is_android) {
+       defines += [ "ARMV8_OS_ANDROID" ]
+-    } else if (is_linux || is_chromeos) {
++    } else if ((is_linux || is_chromeos) && !is_bsd) {
+       defines += [ "ARMV8_OS_LINUX" ]
+     } else if (is_mac) {
+       defines += [ "ARMV8_OS_MACOS" ]
+@@ -138,6 +138,10 @@ if (use_arm_neon_optimizations) {
+       defines += [ "ARMV8_OS_FUCHSIA" ]
+     } else if (is_win) {
+       defines += [ "ARMV8_OS_WINDOWS" ]
++    } else if (is_openbsd) {
++      defines += [ "ARMV8_OS_OPENBSD" ]
++    } else if (is_freebsd) {
++      defines += [ "ARMV8_OS_FREEBSD" ]
+     } else {
+       assert(false, "Unsupported ARM OS")
+     }
+@@ -419,7 +423,7 @@ static_library("minizip") {
+     ]
+   }
+ 
+-  if (is_apple || is_android || is_nacl) {
++  if (is_apple || is_android || is_nacl || is_bsd) {
+     # Mac, Android and the BSDs don't have fopen64, ftello64, or fseeko64. We
+     # use fopen, ftell, and fseek instead on these systems.
+     defines = [ "USE_FILE32API" ]
diff --git a/chromium-wip/patches/patch-third__party_zlib_cpu__features.c b/chromium-wip/patches/patch-third__party_zlib_cpu__features.c
new file mode 100644
index 0000000000..a1ece7a845
--- /dev/null
+++ b/chromium-wip/patches/patch-third__party_zlib_cpu__features.c
@@ -0,0 +1,57 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- third_party/zlib/cpu_features.c.orig	2025-07-29 22:51:44.000000000 +0000
++++ third_party/zlib/cpu_features.c
+@@ -39,7 +39,8 @@ int ZLIB_INTERNAL riscv_cpu_enable_vclmu
+ #ifndef CPU_NO_SIMD
+ 
+ #if defined(ARMV8_OS_ANDROID) || defined(ARMV8_OS_LINUX) || \
+-    defined(ARMV8_OS_FUCHSIA) || defined(ARMV8_OS_IOS)
++    defined(ARMV8_OS_FUCHSIA) || defined(ARMV8_OS_IOS) || \
++    defined(ARMV8_OS_OPENBSD) || defined(ARMV8_OS_FREEBSD)
+ #include <pthread.h>
+ #endif
+ 
+@@ -56,6 +57,10 @@ int ZLIB_INTERNAL riscv_cpu_enable_vclmu
+ #include <windows.h>
+ #elif defined(ARMV8_OS_IOS)
+ #include <sys/sysctl.h>
++#elif defined(ARMV8_OS_OPENBSD)
++#include <sys/sysctl.h>
++#include <machine/cpu.h>
++#include <machine/armreg.h>
+ #elif !defined(_MSC_VER)
+ #include <pthread.h>
+ #else
+@@ -69,7 +74,8 @@ static void _cpu_check_features(void);
+ #if defined(ARMV8_OS_ANDROID) || defined(ARMV8_OS_LINUX) || \
+     defined(ARMV8_OS_MACOS) || defined(ARMV8_OS_FUCHSIA) || \
+     defined(X86_NOT_WINDOWS) || defined(ARMV8_OS_IOS) || \
+-    defined(RISCV_RVV)
++    defined(RISCV_RVV) || defined(ARMV8_OS_OPENBSD) || \
++    defined(ARMV8_OS_FREEBSD)
+ #if !defined(ARMV8_OS_MACOS)
+ // _cpu_check_features() doesn't need to do anything on mac/arm since all
+ // features are known at build time, so don't call it.
+@@ -122,6 +128,17 @@ static void _cpu_check_features(void)
+     unsigned long features = getauxval(AT_HWCAP2);
+     arm_cpu_enable_crc32 = !!(features & HWCAP2_CRC32);
+     arm_cpu_enable_pmull = !!(features & HWCAP2_PMULL);
++#elif defined(ARMV8_OS_OPENBSD)
++    int isar0_mib[] = { CTL_MACHDEP, CPU_ID_AA64ISAR0 };
++    uint64_t cpu_id = 0;
++    size_t len = sizeof(cpu_id);
++    if (sysctl(isar0_mib, 2, &cpu_id, &len, NULL, 0) < 0)
++        return;
++    if (ID_AA64ISAR0_AES(cpu_id) >= ID_AA64ISAR0_AES_PMULL)
++        arm_cpu_enable_pmull = 1;
++
++    if (ID_AA64ISAR0_CRC32(cpu_id) >= ID_AA64ISAR0_CRC32_BASE)
++        arm_cpu_enable_crc32 = 1;
+ #elif defined(ARMV8_OS_FUCHSIA)
+     uint32_t features;
+     zx_status_t rc = zx_system_get_features(ZX_FEATURE_KIND_CPU, &features);
diff --git a/chromium-wip/patches/patch-tools_code__cache__generator_BUILD.gn b/chromium-wip/patches/patch-tools_code__cache__generator_BUILD.gn
new file mode 100644
index 0000000000..61fefdc9e4
--- /dev/null
+++ b/chromium-wip/patches/patch-tools_code__cache__generator_BUILD.gn
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- tools/code_cache_generator/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ tools/code_cache_generator/BUILD.gn
+@@ -15,8 +15,34 @@ if (is_android) {
+   import("//build/config/android/rules.gni")
+ }
+ 
+-executable("code_cache_generator") {
++group("code_cache_generator") {
++    deps = [ ":code_cache_generator_executable" ]
++    if (target_os == "netbsd") {
++      deps+= [ ":run_paxctl_code_cache_generator" ]
++    }
++}
++
++action("run_paxctl_code_cache_generator") {
++  deps = [ ":code_cache_generator_executable" ]
++
++  script = "//v8/tools/run-paxctl.py"
++  stamp = "$target_gen_dir/paxctl_stamp"
++  outputs = [ stamp ]
++
++  sources = []
++  data = []
++
++  args = [
++    rebase_path(stamp, root_build_dir),
++    "/usr/sbin/paxctl", "+m",
++    "./" + rebase_path(get_label_info(":code_cache_generator_executable", "root_out_dir") + "/code_cache_generator",
++    root_build_dir),
++  ]
++}
++
++executable("code_cache_generator_executable") {
+   sources = [ "code_cache_generator.cc" ]
++  output_name = "code_cache_generator"
+ 
+   deps = [
+     "//gin:gin",
diff --git a/chromium-wip/patches/patch-tools_generate__shim__headers_generate__shim__headers.py b/chromium-wip/patches/patch-tools_generate__shim__headers_generate__shim__headers.py
new file mode 100644
index 0000000000..876c5e0012
--- /dev/null
+++ b/chromium-wip/patches/patch-tools_generate__shim__headers_generate__shim__headers.py
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- tools/generate_shim_headers/generate_shim_headers.py.orig	2025-07-29 22:51:44.000000000 +0000
++++ tools/generate_shim_headers/generate_shim_headers.py
+@@ -18,7 +18,7 @@ import sys
+ 
+ 
+ SHIM_TEMPLATE = """
+-#if defined(OFFICIAL_BUILD)
++#if defined(GOOGLE_CHROME_BUILD)
+ #error shim headers must not be used in official builds!
+ #endif
+ """
+@@ -65,6 +65,9 @@ def GeneratorMain(argv):
+       if options.outputs:
+         yield os.path.join(target_directory, header_filename)
+       if options.generate:
++        source_file = os.path.join(root, header_filename)
++        if os.path.exists(source_file):
++          os.unlink(source_file)
+         header_path = os.path.join(target_directory, header_filename)
+         header_dir = os.path.dirname(header_path)
+         if not os.path.exists(header_dir):
diff --git a/chromium-wip/patches/patch-tools_generate__stubs_rules.gni b/chromium-wip/patches/patch-tools_generate__stubs_rules.gni
new file mode 100644
index 0000000000..5ca9632c05
--- /dev/null
+++ b/chromium-wip/patches/patch-tools_generate__stubs_rules.gni
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- tools/generate_stubs/rules.gni.orig	2025-07-29 22:51:44.000000000 +0000
++++ tools/generate_stubs/rules.gni
+@@ -110,7 +110,6 @@ template("generate_stubs") {
+       "${target_gen_dir}/${invoker.output_name}.cc",
+       "${target_gen_dir}/${invoker.output_name}.h",
+     ]
+-    libs = [ "dl" ]
+     include_dirs = [ target_gen_dir ]
+     if (defined(invoker.configs)) {
+       configs += invoker.configs
diff --git a/chromium-wip/patches/patch-tools_gn_build_build__linux.ninja.template b/chromium-wip/patches/patch-tools_gn_build_build__linux.ninja.template
new file mode 100644
index 0000000000..f031da949a
--- /dev/null
+++ b/chromium-wip/patches/patch-tools_gn_build_build__linux.ninja.template
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- tools/gn/build/build_linux.ninja.template.orig	2025-07-29 22:51:44.000000000 +0000
++++ tools/gn/build/build_linux.ninja.template
+@@ -5,7 +5,7 @@ rule cxx
+   deps = gcc
+ 
+ rule alink_thin
+-  command = $ar rcsT $out $in
++  command = $ar rcs $out $in
+   description = AR $out
+ 
+ rule link
diff --git a/chromium-wip/patches/patch-tools_gn_build_gen.py b/chromium-wip/patches/patch-tools_gn_build_gen.py
new file mode 100644
index 0000000000..7df68a51d2
--- /dev/null
+++ b/chromium-wip/patches/patch-tools_gn_build_gen.py
@@ -0,0 +1,40 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- tools/gn/build/gen.py.orig	2025-07-29 22:51:44.000000000 +0000
++++ tools/gn/build/gen.py
+@@ -94,6 +94,12 @@ class Platform(object):
+   def is_solaris(self):
+     return self._platform == 'solaris'
+ 
++  def is_openbsd(self):
++    return self._platform == 'openbsd'
++
++  def is_freebsd(self):
++    return self._platform == 'freebsd'
++
+   def is_posix(self):
+     return self._platform in ['linux', 'freebsd', 'darwin', 'aix', 'openbsd', 'haiku', 'solaris', 'msys', 'netbsd', 'serenity']
+ 
+@@ -308,7 +314,7 @@ def WriteGenericNinja(path, static_libra
+       'linux': 'build_linux.ninja.template',
+       'freebsd': 'build_linux.ninja.template',
+       'aix': 'build_aix.ninja.template',
+-      'openbsd': 'build_openbsd.ninja.template',
++      'openbsd': 'build_linux.ninja.template',
+       'haiku': 'build_haiku.ninja.template',
+       'solaris': 'build_linux.ninja.template',
+       'netbsd': 'build_linux.ninja.template',
+@@ -553,6 +559,9 @@ def WriteGNNinja(path, platform, host, o
+     if platform.is_posix() and not platform.is_haiku():
+       ldflags.append('-pthread')
+ 
++    if platform.is_openbsd():
++      libs.append('-lkvm')
++
+     if platform.is_mingw() or platform.is_msys():
+       cflags.extend(['-DUNICODE',
+                      '-DNOMINMAX',
diff --git a/chromium-wip/patches/patch-tools_gn_src_base_files_file__posix.cc b/chromium-wip/patches/patch-tools_gn_src_base_files_file__posix.cc
new file mode 100644
index 0000000000..219577aeaa
--- /dev/null
+++ b/chromium-wip/patches/patch-tools_gn_src_base_files_file__posix.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- tools/gn/src/base/files/file_posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ tools/gn/src/base/files/file_posix.cc
+@@ -359,7 +359,7 @@ void File::DoInitialize(const FilePath& 
+ bool File::Flush() {
+   DCHECK(IsValid());
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   return !HANDLE_EINTR(fdatasync(file_.get()));
+ #else
+   return !HANDLE_EINTR(fsync(file_.get()));
diff --git a/chromium-wip/patches/patch-tools_gn_src_gn_version.h b/chromium-wip/patches/patch-tools_gn_src_gn_version.h
new file mode 100644
index 0000000000..44db5baec9
--- /dev/null
+++ b/chromium-wip/patches/patch-tools_gn_src_gn_version.h
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- tools/gn/src/gn/version.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ tools/gn/src/gn/version.h
+@@ -22,9 +22,9 @@ class Version {
+ 
+   static std::optional<Version> FromString(std::string s);
+ 
+-  int major() const { return major_; }
+-  int minor() const { return minor_; }
+-  int patch() const { return patch_; }
++  int gmajor() const { return major_; }
++  int gminor() const { return minor_; }
++  int gpatch() const { return patch_; }
+ 
+   bool operator==(const Version& other) const;
+   bool operator<(const Version& other) const;
diff --git a/chromium-wip/patches/patch-tools_gn_src_util_exe__path.cc b/chromium-wip/patches/patch-tools_gn_src_util_exe__path.cc
new file mode 100644
index 0000000000..4f4b9037d1
--- /dev/null
+++ b/chromium-wip/patches/patch-tools_gn_src_util_exe__path.cc
@@ -0,0 +1,96 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- tools/gn/src/util/exe_path.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ tools/gn/src/util/exe_path.cc
+@@ -15,7 +15,7 @@
+ #include <windows.h>
+ 
+ #include "base/win/win_util.h"
+-#elif defined(OS_FREEBSD) || defined(OS_NETBSD)
++#elif defined(OS_FREEBSD) || defined(OS_NETBSD) || defined(OS_OPENBSD)
+ #include <limits.h>
+ #include <sys/sysctl.h>
+ #include <sys/types.h>
+@@ -26,6 +26,10 @@
+ #include <stdlib.h>
+ #endif
+ 
++#if defined(OS_OPENBSD)
++#include <kvm.h>
++#endif
++
+ #if defined(OS_MACOSX)
+ 
+ base::FilePath GetExePath() {
+@@ -104,6 +108,67 @@ base::FilePath GetExePath() {
+   return base::FilePath(raw);
+ }
+ 
++#elif defined(OS_OPENBSD)
++
++base::FilePath GetExePath() {
++  struct kinfo_file *files;
++  kvm_t *kd = NULL;
++  char errbuf[_POSIX2_LINE_MAX];
++  char **retvalargs;
++#define MAXTOKENS 2
++  char *tokens[MAXTOKENS];
++  static char retval[PATH_MAX];
++  int cnt;
++  size_t len;
++  struct stat sb;
++  pid_t cpid = getpid();
++
++  int mib[] = { CTL_KERN, KERN_PROC_ARGS, cpid, KERN_PROC_ARGV };
++
++  if (sysctl(mib, 4, NULL, &len, NULL, 0) != -1) {
++    retvalargs = static_cast<char**>(malloc(len));
++    if (!retvalargs)
++      goto out;
++
++    if (sysctl(mib, 4, retvalargs, &len, NULL, 0) < 0)
++      goto out;
++
++    char *cr = strdup(retvalargs[0]);
++    free(retvalargs);
++
++    *tokens = strtok(cr, ":");
++    if (tokens[0] == NULL)
++      goto out;
++
++    if (realpath(tokens[0], retval) == NULL)
++      goto out;
++
++    if (stat(retval, &sb) < 0)
++      goto out;
++
++    if ((kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, errbuf)) == NULL)
++      goto out;
++
++    if ((files = kvm_getfiles(kd, KERN_FILE_BYPID, cpid,
++                              sizeof(struct kinfo_file), &cnt)) == NULL) {
++      kvm_close(kd); 
++      goto out;
++    }
++
++    for (int i = 0; i < cnt; i++) {
++      if (files[i].fd_fd == KERN_FILE_TEXT &&
++          files[i].va_fsid == static_cast<uint32_t>(sb.st_dev) &&
++          files[i].va_fileid == sb.st_ino) {
++        kvm_close(kd);
++        return base::FilePath(retval);
++      }
++    }
++  }
++
++out:
++  return base::FilePath();
++}
++
+ #elif defined(OS_ZOS)
+ 
+ base::FilePath GetExePath() {
diff --git a/chromium-wip/patches/patch-tools_grit_grit_node_base.py b/chromium-wip/patches/patch-tools_grit_grit_node_base.py
new file mode 100644
index 0000000000..ed7c2910a5
--- /dev/null
+++ b/chromium-wip/patches/patch-tools_grit_grit_node_base.py
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- tools/grit/grit/node/base.py.orig	2025-07-29 22:51:44.000000000 +0000
++++ tools/grit/grit/node/base.py
+@@ -497,7 +497,8 @@ class Node:
+         value = defs
+ 
+       elif name == 'is_linux':
+-        value = target_platform == 'linux'
++        value = (target_platform == 'linux'
++                 or 'bsd' in target_platform)
+       elif name == 'is_chromeos':
+         value = target_platform == 'chromeos'
+       elif name == 'is_macosx':
diff --git a/chromium-wip/patches/patch-tools_json__schema__compiler_cpp__bundle__generator.py b/chromium-wip/patches/patch-tools_json__schema__compiler_cpp__bundle__generator.py
new file mode 100644
index 0000000000..258edea0a3
--- /dev/null
+++ b/chromium-wip/patches/patch-tools_json__schema__compiler_cpp__bundle__generator.py
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- tools/json_schema_compiler/cpp_bundle_generator.py.orig	2025-07-29 22:51:44.000000000 +0000
++++ tools/json_schema_compiler/cpp_bundle_generator.py
+@@ -140,7 +140,7 @@ class CppBundleGenerator(object):
+       elif platform == Platforms.FUCHSIA:
+         ifdefs.append('BUILDFLAG(IS_FUCHSIA)')
+       elif platform == Platforms.LINUX:
+-        ifdefs.append('BUILDFLAG(IS_LINUX)')
++        ifdefs.append('BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)')
+       elif platform == Platforms.MAC:
+         ifdefs.append('BUILDFLAG(IS_MAC)')
+       elif platform == Platforms.WIN:
diff --git a/chromium-wip/patches/patch-tools_json__schema__compiler_feature__compiler.py b/chromium-wip/patches/patch-tools_json__schema__compiler_feature__compiler.py
new file mode 100644
index 0000000000..f9f2d7327d
--- /dev/null
+++ b/chromium-wip/patches/patch-tools_json__schema__compiler_feature__compiler.py
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- tools/json_schema_compiler/feature_compiler.py.orig	2025-07-29 22:51:44.000000000 +0000
++++ tools/json_schema_compiler/feature_compiler.py
+@@ -290,6 +290,9 @@ FEATURE_GRAMMAR = ({
+                 'linux': 'Feature::LINUX_PLATFORM',
+                 'mac': 'Feature::MACOSX_PLATFORM',
+                 'win': 'Feature::WIN_PLATFORM',
++                'openbsd': 'Feature::LINUX_PLATFORM',
++                'freebsd': 'Feature::LINUX_PLATFORM',
++                'netbsd': 'Feature::LINUX_PLATFORM',
+             }
+         }
+     },
diff --git a/chromium-wip/patches/patch-tools_memory_partition__allocator_inspect__utils.h b/chromium-wip/patches/patch-tools_memory_partition__allocator_inspect__utils.h
new file mode 100644
index 0000000000..e77258b523
--- /dev/null
+++ b/chromium-wip/patches/patch-tools_memory_partition__allocator_inspect__utils.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- tools/memory/partition_allocator/inspect_utils.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ tools/memory/partition_allocator/inspect_utils.h
+@@ -61,7 +61,7 @@ class RemoteProcessMemoryReader {
+   const pid_t pid_;
+   bool is_valid_;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   base::ScopedFD mem_fd_;
+ #elif BUILDFLAG(IS_MAC)
+   task_t task_;
diff --git a/chromium-wip/patches/patch-tools_perf_chrome__telemetry__build_BUILD.gn b/chromium-wip/patches/patch-tools_perf_chrome__telemetry__build_BUILD.gn
new file mode 100644
index 0000000000..23f3f2c9b3
--- /dev/null
+++ b/chromium-wip/patches/patch-tools_perf_chrome__telemetry__build_BUILD.gn
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- tools/perf/chrome_telemetry_build/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ tools/perf/chrome_telemetry_build/BUILD.gn
+@@ -56,7 +56,7 @@ group("telemetry_chrome_test") {
+     data_deps += [ "//chrome:reorder_imports" ]
+   }
+ 
+-  if (is_linux || is_chromeos) {
++  if ((is_linux || is_chromeos) && !is_bsd) {
+     data_deps += [ "//third_party/breakpad:dump_syms" ]
+ 
+     # CrOS currently has issues with the locally compiled version of
+@@ -210,7 +210,7 @@ group("telemetry_chrome_test_without_chr
+   ]
+ 
+   # Cr-Fuchsia doesn't support breakpad.
+-  if (!is_win && !is_fuchsia) {
++  if (!is_win && !is_fuchsia && !is_bsd) {
+     data_deps += [
+       # This is defined for Windows, but is unused by Telemetry on
+       # Windows, and including it can have issues when cross-compiling
diff --git a/chromium-wip/patches/patch-tools_protoc__wrapper_protoc__wrapper.py b/chromium-wip/patches/patch-tools_protoc__wrapper_protoc__wrapper.py
new file mode 100644
index 0000000000..240bfa8a7b
--- /dev/null
+++ b/chromium-wip/patches/patch-tools_protoc__wrapper_protoc__wrapper.py
@@ -0,0 +1,30 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- tools/protoc_wrapper/protoc_wrapper.py.orig	2025-07-29 22:51:44.000000000 +0000
++++ tools/protoc_wrapper/protoc_wrapper.py
+@@ -226,15 +226,19 @@ def main(argv):
+     if not options.exclude_imports:
+       protoc_cmd += ["--include_imports"]
+ 
++  nenv = os.environ.copy()
++#  nenv["PATH"] = "${WRKOBJDIR}/bin:" + nenv["PATH"]
++  nenv["LD_LIBRARY_PATH"] = "@WRKSRC@/out/Release"
++
+   dependency_file_data = None
+   if options.descriptor_set_out and options.descriptor_set_dependency_file:
+     protoc_cmd += ['--dependency_out', options.descriptor_set_dependency_file]
+-    ret = subprocess.call(protoc_cmd)
++    ret = subprocess.call(protoc_cmd, env=nenv)
+ 
+     with open(options.descriptor_set_dependency_file, 'rb') as f:
+       dependency_file_data = f.read().decode('utf-8')
+ 
+-  ret = subprocess.call(protoc_cmd)
++  ret = subprocess.call(protoc_cmd, env=nenv)
+   if ret != 0:
+     if ret <= -100:
+       # Windows error codes such as 0xC0000005 and 0xC0000409 are much easier to
diff --git a/chromium-wip/patches/patch-tools_v8__context__snapshot_BUILD.gn b/chromium-wip/patches/patch-tools_v8__context__snapshot_BUILD.gn
new file mode 100644
index 0000000000..a8bd67a3ce
--- /dev/null
+++ b/chromium-wip/patches/patch-tools_v8__context__snapshot_BUILD.gn
@@ -0,0 +1,43 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- tools/v8_context_snapshot/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ tools/v8_context_snapshot/BUILD.gn
+@@ -36,6 +36,24 @@ buildflag_header("buildflags") {
+   ]
+ }
+ 
++action("run_paxctl_v8_context_snapshot_generator") {
++  deps = [ ":v8_context_snapshot_generator($v8_snapshot_toolchain)" ]
++
++  script = "//v8/tools/run-paxctl.py"
++  stamp = "$target_gen_dir/paxctl_stamp"
++  outputs = [ stamp ]
++
++  sources = []
++  data = []
++
++  args = [
++    rebase_path(stamp, root_build_dir),
++    "/usr/sbin/paxctl", "+m",
++    "./" + rebase_path(get_label_info(":v8_context_snapshot_generator", "root_out_dir") + "/v8_context_snapshot_generator",
++    root_build_dir),
++  ]
++}
++
+ if (use_v8_context_snapshot) {
+   action("generate_v8_context_snapshot") {
+     script = "//build/gn_run_binary.py"
+@@ -63,6 +81,9 @@ if (use_v8_context_snapshot) {
+       ":v8_context_snapshot_generator($v8_snapshot_toolchain)",
+       "//v8:run_mksnapshot_default",
+     ]
++      if (target_os == "netbsd") {
++        deps += [ ":run_paxctl_v8_context_snapshot_generator" ]
++      }
+ 
+     # TODO(sky): figure out why this doesn't work on android cross compile.
+     # In the case of compiling for the snapshot `shlib_extension` is ".so"
diff --git a/chromium-wip/patches/patch-tools_variations_fieldtrial__to__struct.py b/chromium-wip/patches/patch-tools_variations_fieldtrial__to__struct.py
new file mode 100644
index 0000000000..fe30b404cc
--- /dev/null
+++ b/chromium-wip/patches/patch-tools_variations_fieldtrial__to__struct.py
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- tools/variations/fieldtrial_to_struct.py.orig	2025-07-29 22:51:44.000000000 +0000
++++ tools/variations/fieldtrial_to_struct.py
+@@ -41,6 +41,9 @@ _platforms = [
+     'linux',
+     'mac',
+     'windows',
++    'openbsd',
++    'freebsd',
++    'netbsd',
+ ]
+ 
+ _form_factors = [
diff --git a/chromium-wip/patches/patch-ui_accessibility_accessibility__features.cc b/chromium-wip/patches/patch-ui_accessibility_accessibility__features.cc
new file mode 100644
index 0000000000..4fe5559206
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_accessibility_accessibility__features.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/accessibility/accessibility_features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/accessibility/accessibility_features.cc
+@@ -496,7 +496,7 @@ bool IsScreenAITestModeEnabled() {
+   return base::FeatureList::IsEnabled(::features::kScreenAITestMode);
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kScreenAIPartitionAllocAdvancedChecksEnabled,
+              "ScreenAIPartitionAllocAdvancedChecksEnabled",
+              base::FEATURE_DISABLED_BY_DEFAULT);
+@@ -538,7 +538,7 @@ bool IsBlockRootWindowAccessibleNameChan
+ }
+ #endif  // BUILDFLAG(IS_MAC)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kWasmTtsComponentUpdaterEnabled,
+              "WasmTtsComponentUpdaterEnabled",
+              base::FEATURE_ENABLED_BY_DEFAULT);
diff --git a/chromium-wip/patches/patch-ui_accessibility_accessibility__features.h b/chromium-wip/patches/patch-ui_accessibility_accessibility__features.h
new file mode 100644
index 0000000000..435e9f7e91
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_accessibility_accessibility__features.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/accessibility/accessibility_features.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/accessibility/accessibility_features.h
+@@ -330,7 +330,7 @@ AX_BASE_EXPORT bool IsScreenAIOCREnabled
+ AX_BASE_EXPORT BASE_DECLARE_FEATURE(kScreenAITestMode);
+ AX_BASE_EXPORT bool IsScreenAITestModeEnabled();
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Enables advanced partition allocation checks in ScreenAI service.
+ // TODO(crbug.com/418199684): Remove when the bug is fixed.
+ AX_BASE_EXPORT BASE_DECLARE_FEATURE(
+@@ -357,7 +357,7 @@ AX_BASE_EXPORT BASE_DECLARE_FEATURE(kBlo
+ AX_BASE_EXPORT bool IsBlockRootWindowAccessibleNameChangeEventEnabled();
+ #endif  // BUILDFLAG(IS_MAC)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Enable the component updater to download the wasm tts engine component.
+ AX_BASE_EXPORT BASE_DECLARE_FEATURE(kWasmTtsComponentUpdaterEnabled);
+ AX_BASE_EXPORT bool IsWasmTtsComponentUpdaterEnabled();
diff --git a/chromium-wip/patches/patch-ui_accessibility_ax__node.cc b/chromium-wip/patches/patch-ui_accessibility_ax__node.cc
new file mode 100644
index 0000000000..71769a1d21
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_accessibility_ax__node.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/accessibility/ax_node.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/accessibility/ax_node.cc
+@@ -1555,7 +1555,7 @@ AXNode::GetExtraMacNodes() const {
+   return &table_info->extra_mac_nodes;
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ AXNode* AXNode::GetExtraAnnouncementNode(
+     ax::mojom::AriaNotificationPriority priority_property) const {
+   if (!tree_->extra_announcement_nodes()) {
+@@ -1583,7 +1583,7 @@ bool AXNode::IsGenerated() const {
+       GetRole() == ax::mojom::Role::kColumn ||
+       GetRole() == ax::mojom::Role::kTableHeaderContainer;
+   DCHECK_EQ(is_generated_node, is_extra_mac_node_role);
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   //  On Linux, generated nodes are always children of the root.
+   if (GetParent() && GetParent()->GetManager()) {
+     DCHECK(GetParent()->GetManager()->IsRoot());
diff --git a/chromium-wip/patches/patch-ui_accessibility_ax__node.h b/chromium-wip/patches/patch-ui_accessibility_ax__node.h
new file mode 100644
index 0000000000..b174369e87
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_accessibility_ax__node.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/accessibility/ax_node.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/accessibility/ax_node.h
+@@ -587,7 +587,7 @@ class AX_EXPORT AXNode final {
+   const std::vector<raw_ptr<AXNode, VectorExperimental>>* GetExtraMacNodes()
+       const;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   AXNode* GetExtraAnnouncementNode(
+       ax::mojom::AriaNotificationPriority priority_property) const;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
diff --git a/chromium-wip/patches/patch-ui_accessibility_ax__tree.cc b/chromium-wip/patches/patch-ui_accessibility_ax__tree.cc
new file mode 100644
index 0000000000..0e5cacdea1
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_accessibility_ax__tree.cc
@@ -0,0 +1,62 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/accessibility/ax_tree.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/accessibility/ax_tree.cc
+@@ -724,7 +724,7 @@ struct AXTreeUpdateState {
+   // (crrev.com/c/2892259).
+   const raw_ref<const AXTreeUpdate> pending_tree_update;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   bool should_clear_extra_announcement_nodes = false;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
+ 
+@@ -882,7 +882,7 @@ bool AXTree::ComputeNodeIsIgnoredChanged
+   return old_node_is_ignored != new_node_is_ignored;
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ ExtraAnnouncementNodes::ExtraAnnouncementNodes(AXNode* root) {
+   assertive_node_ = CreateNode("assertive", root);
+   polite_node_ = CreateNode("polite", root);
+@@ -975,7 +975,7 @@ AXNode* AXTree::GetFromId(AXNodeID id) c
+ 
+ void AXTree::Destroy() {
+   base::ElapsedThreadTimer timer;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   ClearExtraAnnouncementNodes();
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
+ 
+@@ -1633,7 +1633,7 @@ bool AXTree::Unserialize(const AXTreeUpd
+   observers_.Notify(&AXTreeObserver::OnAtomicUpdateFinished, this,
+                     root_->id() != old_root_id, changes);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   if (update_state.should_clear_extra_announcement_nodes) {
+     ClearExtraAnnouncementNodes();
+   }
+@@ -2210,7 +2210,7 @@ void AXTree::NotifyNodeAttributesWillCha
+                     new_data);
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ void AXTree::ClearExtraAnnouncementNodes() {
+   if (!extra_announcement_nodes_) {
+     return;
+@@ -2603,7 +2603,7 @@ bool AXTree::CreateNewChildVector(
+     AXTreeUpdateState* update_state) {
+   DCHECK(GetTreeUpdateInProgressState());
+   bool success = true;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   // If the root node has children added, clear the extra announcement nodes,
+   // which should always have their indices as the last two children of the root
+   // node. They will be recreated if needed, and given the correct indices.
diff --git a/chromium-wip/patches/patch-ui_accessibility_ax__tree.h b/chromium-wip/patches/patch-ui_accessibility_ax__tree.h
new file mode 100644
index 0000000000..2dd5c5c812
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_accessibility_ax__tree.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/accessibility/ax_tree.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/accessibility/ax_tree.h
+@@ -63,7 +63,7 @@ enum class AXTreeUnserializeError {
+ };
+ // LINT.ThenChange(/tools/metrics/histograms/metadata/accessibility/enums.xml:AccessibilityTreeUnserializeError)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ // To support AriaNotify on older versions of ATK, we need to use the ATK
+ // signal "Text::text-insert". This signal requires a node that is a
+ // text type, and it needs to have aria-live properties set in order for
+@@ -288,7 +288,7 @@ class AX_EXPORT AXTree {
+ 
+   void NotifyChildTreeConnectionChanged(AXNode* node, AXTree* child_tree);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   void ClearExtraAnnouncementNodes();
+   void CreateExtraAnnouncementNodes();
+   ExtraAnnouncementNodes* extra_announcement_nodes() const {
+@@ -550,7 +550,7 @@ class AX_EXPORT AXTree {
+ 
+   std::unique_ptr<AXEvent> event_data_;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<ExtraAnnouncementNodes> extra_announcement_nodes_ = nullptr;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
+ };
diff --git a/chromium-wip/patches/patch-ui_aura_client_drag__drop__client.h b/chromium-wip/patches/patch-ui_aura_client_drag__drop__client.h
new file mode 100644
index 0000000000..ace8fc5d83
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_aura_client_drag__drop__client.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/aura/client/drag_drop_client.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/aura/client/drag_drop_client.h
+@@ -44,7 +44,7 @@ class AURA_EXPORT DragDropClient {
+       int allowed_operations,
+       ui::mojom::DragEventSource source) = 0;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Updates the drag image. An empty |image| may be used to hide a previously
+   // set non-empty drag image, and a non-empty |image| shows the drag image
+   // again if it was previously hidden.
diff --git a/chromium-wip/patches/patch-ui_aura_screen__ozone.cc b/chromium-wip/patches/patch-ui_aura_screen__ozone.cc
new file mode 100644
index 0000000000..f785de55d2
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_aura_screen__ozone.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/aura/screen_ozone.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/aura/screen_ozone.cc
+@@ -107,7 +107,7 @@ display::Display ScreenOzone::GetPrimary
+   return platform_screen_->GetPrimaryDisplay();
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ ScreenOzone::ScreenSaverSuspenderOzone::ScreenSaverSuspenderOzone(
+     std::unique_ptr<ui::PlatformScreen::PlatformScreenSaverSuspender> suspender)
+     : suspender_(std::move(suspender)) {}
diff --git a/chromium-wip/patches/patch-ui_aura_screen__ozone.h b/chromium-wip/patches/patch-ui_aura_screen__ozone.h
new file mode 100644
index 0000000000..83a148dc5c
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_aura_screen__ozone.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/aura/screen_ozone.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/aura/screen_ozone.h
+@@ -44,7 +44,7 @@ class AURA_EXPORT ScreenOzone : public d
+   display::Display GetDisplayMatching(
+       const gfx::Rect& match_rect) const override;
+   display::Display GetPrimaryDisplay() const override;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<display::Screen::ScreenSaverSuspender> SuspendScreenSaver()
+       override;
+ #endif  // BUILDFLAG(IS_LINUX)
+@@ -68,7 +68,7 @@ class AURA_EXPORT ScreenOzone : public d
+   ui::PlatformScreen* platform_screen() { return platform_screen_.get(); }
+ 
+  private:
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   class ScreenSaverSuspenderOzone
+       : public display::Screen::ScreenSaverSuspender {
+    public:
diff --git a/chromium-wip/patches/patch-ui_base_accelerators_accelerator.cc b/chromium-wip/patches/patch-ui_base_accelerators_accelerator.cc
new file mode 100644
index 0000000000..1c24ee8395
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_accelerators_accelerator.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/accelerators/accelerator.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/accelerators/accelerator.cc
+@@ -335,7 +335,7 @@ std::vector<std::u16string> Accelerator:
+     modifiers.push_back(l10n_util::GetStringUTF16(IDS_APP_SEARCH_KEY));
+ #elif BUILDFLAG(IS_WIN)
+     modifiers.push_back(l10n_util::GetStringUTF16(IDS_APP_WINDOWS_KEY));
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     modifiers.push_back(l10n_util::GetStringUTF16(IDS_APP_SUPER_KEY));
+ #else
+     NOTREACHED();
diff --git a/chromium-wip/patches/patch-ui_base_accelerators_command.cc b/chromium-wip/patches/patch-ui_base_accelerators_command.cc
new file mode 100644
index 0000000000..dbfe288858
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_accelerators_command.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/accelerators/command.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/accelerators/command.cc
+@@ -81,7 +81,7 @@ std::string Command::CommandPlatform() {
+   return ui::kKeybindingPlatformMac;
+ #elif BUILDFLAG(IS_CHROMEOS)
+   return ui::kKeybindingPlatformChromeOs;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return ui::kKeybindingPlatformLinux;
+ #elif BUILDFLAG(IS_FUCHSIA)
+   // TODO(crbug.com/40220501): Change this once we decide what string should be
diff --git a/chromium-wip/patches/patch-ui_base_accelerators_global__accelerator__listener_global__accelerator__listener__ozone.cc b/chromium-wip/patches/patch-ui_base_accelerators_global__accelerator__listener_global__accelerator__listener__ozone.cc
new file mode 100644
index 0000000000..945794014a
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_accelerators_global__accelerator__listener_global__accelerator__listener__ozone.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc
+@@ -12,7 +12,7 @@
+ #include "ui/base/accelerators/accelerator.h"
+ #include "ui/ozone/public/ozone_platform.h"
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DBUS)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DBUS)
+ #include "base/environment.h"
+ #include "base/feature_list.h"
+ #include "build/branding_buildflags.h"
+@@ -22,7 +22,7 @@
+ using content::BrowserThread;
+ 
+ namespace {
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DBUS)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DBUS)
+ BASE_FEATURE(kGlobalShortcutsPortal,
+              "GlobalShortcutsPortal",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+@@ -74,7 +74,7 @@ GlobalAcceleratorListener* GlobalAcceler
+     return instance->get();
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DBUS)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DBUS)
+   if (base::FeatureList::IsEnabled(kGlobalShortcutsPortal)) {
+     static GlobalAcceleratorListenerLinux* const linux_instance =
+         new GlobalAcceleratorListenerLinux(nullptr, GetSessionName());
diff --git a/chromium-wip/patches/patch-ui_base_clipboard_clipboard__constants.h b/chromium-wip/patches/patch-ui_base_clipboard_clipboard__constants.h
new file mode 100644
index 0000000000..22f9d9c0e9
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_clipboard_clipboard__constants.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/clipboard/clipboard_constants.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/clipboard/clipboard_constants.h
+@@ -44,7 +44,7 @@ inline constexpr char kMimeTypeWindowDra
+ 
+ // ----- LINUX & CHROMEOS & FUCHSIA MIME TYPES -----
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ inline constexpr char kMimeTypeLinuxUtf8String[] = "UTF8_STRING";
+ inline constexpr char kMimeTypeLinuxString[] = "STRING";
+ inline constexpr char kMimeTypeLinuxText[] = "TEXT";
+@@ -52,7 +52,7 @@ inline constexpr char kMimeTypeLinuxText
+         // BUILDFLAG(IS_FUCHSIA)
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || \
+-    BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ inline constexpr char kMimeTypeSourceUrl[] = "chromium/x-source-url";
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ||
+         // BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID)
diff --git a/chromium-wip/patches/patch-ui_base_clipboard_clipboard__non__backed.cc b/chromium-wip/patches/patch-ui_base_clipboard_clipboard__non__backed.cc
new file mode 100644
index 0000000000..88a30a2fd0
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_clipboard_clipboard__non__backed.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/clipboard/clipboard_non_backed.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/clipboard/clipboard_non_backed.cc
+@@ -461,7 +461,7 @@ ClipboardNonBacked::ClipboardNonBacked()
+   // so create internal clipboards for platform supported clipboard buffers.
+   constexpr ClipboardBuffer kClipboardBuffers[] = {
+     ClipboardBuffer::kCopyPaste,
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+     ClipboardBuffer::kSelection,
+ #endif
+ #if BUILDFLAG(IS_MAC)
diff --git a/chromium-wip/patches/patch-ui_base_cursor_cursor__factory.cc b/chromium-wip/patches/patch-ui_base_cursor_cursor__factory.cc
new file mode 100644
index 0000000000..f01f205523
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_cursor_cursor__factory.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/cursor/cursor_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/cursor/cursor_factory.cc
+@@ -97,7 +97,7 @@ void CursorFactory::ObserveThemeChanges(
+   NOTIMPLEMENTED();
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ 
+ // Returns a cursor name compatible with either X11 or the FreeDesktop.org
+ // cursor spec ([1] and [2]), followed by fallbacks that can work as
diff --git a/chromium-wip/patches/patch-ui_base_cursor_cursor__factory.h b/chromium-wip/patches/patch-ui_base_cursor_cursor__factory.h
new file mode 100644
index 0000000000..4d088f642a
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_cursor_cursor__factory.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/cursor/cursor_factory.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/cursor/cursor_factory.h
+@@ -93,7 +93,7 @@ class COMPONENT_EXPORT(UI_BASE_CURSOR) C
+   base::ObserverList<CursorFactoryObserver>::Unchecked observers_;
+ };
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(UI_BASE_CURSOR)
+ std::vector<std::string> CursorNamesFromType(mojom::CursorType type);
+ #endif
diff --git a/chromium-wip/patches/patch-ui_base_dragdrop_os__exchange__data__provider__factory.cc b/chromium-wip/patches/patch-ui_base_dragdrop_os__exchange__data__provider__factory.cc
new file mode 100644
index 0000000000..735f5ac586
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_dragdrop_os__exchange__data__provider__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/dragdrop/os_exchange_data_provider_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/dragdrop/os_exchange_data_provider_factory.cc
+@@ -7,7 +7,7 @@
+ #include "base/notreached.h"
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ #include "ui/base/dragdrop/os_exchange_data_provider_factory_ozone.h"
+ #include "ui/base/dragdrop/os_exchange_data_provider_non_backed.h"
+ #elif BUILDFLAG(IS_APPLE)
+@@ -21,7 +21,7 @@ namespace ui {
+ // static
+ std::unique_ptr<OSExchangeDataProvider>
+ OSExchangeDataProviderFactory::CreateProvider() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // The instance can be nullptr in tests that do not instantiate the platform,
+   // or on platforms that do not implement specific drag'n'drop.  For them,
+   // falling back to the Aura provider should be fine.
diff --git a/chromium-wip/patches/patch-ui_base_dragdrop_os__exchange__data__provider__non__backed.cc b/chromium-wip/patches/patch-ui_base_dragdrop_os__exchange__data__provider__non__backed.cc
new file mode 100644
index 0000000000..0dba1543c0
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_dragdrop_os__exchange__data__provider__non__backed.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/dragdrop/os_exchange_data_provider_non_backed.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/dragdrop/os_exchange_data_provider_non_backed.cc
+@@ -101,7 +101,7 @@ void OSExchangeDataProviderNonBacked::Se
+ 
+ std::optional<std::u16string> OSExchangeDataProviderNonBacked::GetString()
+     const {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (HasFile()) {
+     // Various Linux file managers both pass a list of file:// URIs and set the
+     // string representation to the URI. We explicitly don't want to return use
diff --git a/chromium-wip/patches/patch-ui_base_ime_dummy__text__input__client.cc b/chromium-wip/patches/patch-ui_base_ime_dummy__text__input__client.cc
new file mode 100644
index 0000000000..7fb52b8bf4
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_ime_dummy__text__input__client.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/ime/dummy_text_input_client.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/ime/dummy_text_input_client.cc
+@@ -175,7 +175,7 @@ bool DummyTextInputClient::ShouldDoLearn
+   return false;
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ bool DummyTextInputClient::SetCompositionFromExistingText(
+     const gfx::Range& range,
+     const std::vector<ui::ImeTextSpan>& ui_ime_text_spans) {
diff --git a/chromium-wip/patches/patch-ui_base_ime_dummy__text__input__client.h b/chromium-wip/patches/patch-ui_base_ime_dummy__text__input__client.h
new file mode 100644
index 0000000000..ae4d2f1b77
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_ime_dummy__text__input__client.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/ime/dummy_text_input_client.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/ime/dummy_text_input_client.h
+@@ -73,7 +73,7 @@ class DummyTextInputClient : public Text
+   ukm::SourceId GetClientSourceForMetrics() const override;
+   bool ShouldDoLearning() override;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   bool SetCompositionFromExistingText(
+       const gfx::Range& range,
+       const std::vector<ui::ImeTextSpan>& ui_ime_text_spans) override;
diff --git a/chromium-wip/patches/patch-ui_base_ime_fake__text__input__client.cc b/chromium-wip/patches/patch-ui_base_ime_fake__text__input__client.cc
new file mode 100644
index 0000000000..1b72dc460d
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_ime_fake__text__input__client.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/ime/fake_text_input_client.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/ime/fake_text_input_client.cc
+@@ -227,7 +227,7 @@ bool FakeTextInputClient::ShouldDoLearni
+   return should_do_learning_;
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ bool FakeTextInputClient::SetCompositionFromExistingText(
+     const gfx::Range& range,
+     const std::vector<ui::ImeTextSpan>& ui_ime_text_spans) {
diff --git a/chromium-wip/patches/patch-ui_base_ime_fake__text__input__client.h b/chromium-wip/patches/patch-ui_base_ime_fake__text__input__client.h
new file mode 100644
index 0000000000..4dd6fec2c9
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_ime_fake__text__input__client.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/ime/fake_text_input_client.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/ime/fake_text_input_client.h
+@@ -107,7 +107,7 @@ class FakeTextInputClient : public TextI
+   void SetTextEditCommandForNextKeyEvent(TextEditCommand command) override;
+   ukm::SourceId GetClientSourceForMetrics() const override;
+   bool ShouldDoLearning() override;
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   bool SetCompositionFromExistingText(
+       const gfx::Range& range,
+       const std::vector<ui::ImeTextSpan>& ui_ime_text_spans) override;
diff --git a/chromium-wip/patches/patch-ui_base_ime_init_input__method__initializer.cc b/chromium-wip/patches/patch-ui_base_ime_init_input__method__initializer.cc
new file mode 100644
index 0000000000..6ea684dd62
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_ime_init_input__method__initializer.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/ime/init/input_method_initializer.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/ime/init/input_method_initializer.cc
+@@ -9,7 +9,7 @@
+ #include "base/trace_event/trace_event.h"
+ #include "build/build_config.h"
+ 
+-#if defined(USE_AURA) && BUILDFLAG(IS_LINUX)
++#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD))
+ #include "ui/base/ime/linux/fake_input_method_context.h"
+ #include "ui/base/ime/linux/linux_input_method_context_factory.h"
+ #elif BUILDFLAG(IS_WIN)
+@@ -33,7 +33,7 @@ void ShutdownInputMethod() {
+ }
+ 
+ void InitializeInputMethodForTesting() {
+-#if defined(USE_AURA) && BUILDFLAG(IS_LINUX)
++#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD))
+   GetInputMethodContextFactoryForTest() =
+       base::BindRepeating([](LinuxInputMethodContextDelegate* delegate)
+                               -> std::unique_ptr<LinuxInputMethodContext> {
+@@ -45,7 +45,7 @@ void InitializeInputMethodForTesting() {
+ }
+ 
+ void ShutdownInputMethodForTesting() {
+-#if defined(USE_AURA) && BUILDFLAG(IS_LINUX)
++#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD))
+   // The function owns the factory (as a static variable that's returned by
+   // reference), so setting this to an empty factory will free the old one.
+   GetInputMethodContextFactoryForTest() = LinuxInputMethodContextFactory();
diff --git a/chromium-wip/patches/patch-ui_base_ime_linux_linux__input__method__context__factory.cc b/chromium-wip/patches/patch-ui_base_ime_linux_linux__input__method__context__factory.cc
new file mode 100644
index 0000000000..4c35b110a8
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_ime_linux_linux__input__method__context__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/ime/linux/linux_input_method_context_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/ime/linux/linux_input_method_context_factory.cc
+@@ -9,7 +9,7 @@
+ #include "build/build_config.h"
+ #include "ui/base/ime/linux/fake_input_method_context.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/linux/linux_ui.h"
+ #include "ui/linux/linux_ui_delegate.h"
+ #endif
+@@ -32,7 +32,7 @@ std::unique_ptr<LinuxInputMethodContext>
+   if (auto factory = GetInputMethodContextFactoryForTest())
+     return factory.Run(delegate);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Give the toolkit a chance to create the context.
+   if (auto* linux_ui = LinuxUi::instance()) {
+     if (auto context = linux_ui->CreateInputMethodContext(delegate))
diff --git a/chromium-wip/patches/patch-ui_base_ime_text__input__client.h b/chromium-wip/patches/patch-ui_base_ime_text__input__client.h
new file mode 100644
index 0000000000..c60c3a10ee
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_ime_text__input__client.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/ime/text_input_client.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/ime/text_input_client.h
+@@ -337,7 +337,7 @@ class COMPONENT_EXPORT(UI_BASE_IME) Text
+   // fields that are considered 'private' (e.g. in incognito tabs).
+   virtual bool ShouldDoLearning() = 0;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Start composition over a given UTF-16 code range from existing text. This
+   // should only be used for composition scenario when IME wants to start
+   // composition on existing text. Returns whether the operation was successful.
diff --git a/chromium-wip/patches/patch-ui_base_resource_resource__bundle.cc b/chromium-wip/patches/patch-ui_base_resource_resource__bundle.cc
new file mode 100644
index 0000000000..1cc095b9db
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_resource_resource__bundle.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/resource/resource_bundle.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/resource/resource_bundle.cc
+@@ -1004,7 +1004,7 @@ void ResourceBundle::ReloadFonts() {
+ }
+ 
+ ResourceScaleFactor ResourceBundle::GetMaxResourceScaleFactor() const {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return max_scale_factor_;
+ #else
+   return GetMaxSupportedResourceScaleFactor();
diff --git a/chromium-wip/patches/patch-ui_base_test_skia__gold__pixel__diff.cc b/chromium-wip/patches/patch-ui_base_test_skia__gold__pixel__diff.cc
new file mode 100644
index 0000000000..b6dbf88ebc
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_test_skia__gold__pixel__diff.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/test/skia_gold_pixel_diff.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/test/skia_gold_pixel_diff.cc
+@@ -117,7 +117,7 @@ const char* GetPlatformName() {
+   return "windows";
+ #elif BUILDFLAG(IS_APPLE)
+   return "macOS";
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return "linux";
+ #elif BUILDFLAG(IS_CHROMEOS)
+   return "ash";
diff --git a/chromium-wip/patches/patch-ui_base_test_ui__controls.h b/chromium-wip/patches/patch-ui_base_test_ui__controls.h
new file mode 100644
index 0000000000..932bf94407
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_test_ui__controls.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/test/ui_controls.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/test/ui_controls.h
+@@ -191,7 +191,7 @@ bool SendTouchEventsNotifyWhenDone(int a
+                                    base::OnceClosure task);
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Forces the platform implementation to use screen coordinates, even if they're
+ // not really available, the next time that ui_controls::SendMouseMove() or
+ // ui_controls::SendMouseMoveNotifyWhenDone() is called, or some other method
diff --git a/chromium-wip/patches/patch-ui_base_ui__base__features.cc b/chromium-wip/patches/patch-ui_base_ui__base__features.cc
new file mode 100644
index 0000000000..dbe3b630e7
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_ui__base__features.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/ui_base_features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/ui_base_features.cc
+@@ -119,7 +119,7 @@ BASE_FEATURE(kWaylandLinuxDrmSyncobj,
+ // Controls whether support for Wayland's per-surface scaling is enabled.
+ BASE_FEATURE(kWaylandPerSurfaceScale,
+              "WaylandPerSurfaceScale",
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+              base::FEATURE_ENABLED_BY_DEFAULT
+ #else
+              base::FEATURE_DISABLED_BY_DEFAULT
+@@ -143,7 +143,7 @@ BASE_FEATURE(kWaylandSessionManagement,
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ #endif  // BUILDFLAG(IS_OZONE)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // If this feature is enabled, users not specify --ozone-platform-hint switch
+ // will get --ozone-platform-hint=auto treatment. https://crbug.com/40250220.
+ COMPONENT_EXPORT(UI_BASE_FEATURES)
+@@ -231,7 +231,7 @@ BASE_FEATURE(kUiCompositorUsesLayerLists
+ // native apps on Windows.
+ BASE_FEATURE(kExperimentalFlingAnimation,
+              "ExperimentalFlingAnimation",
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+              base::FEATURE_ENABLED_BY_DEFAULT
+ #else
+              base::FEATURE_DISABLED_BY_DEFAULT
+@@ -323,7 +323,7 @@ bool IsForcedColorsEnabled() {
+ BASE_FEATURE(kEyeDropper,
+              "EyeDropper",
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+              base::FEATURE_ENABLED_BY_DEFAULT
+ #else
+              base::FEATURE_DISABLED_BY_DEFAULT
diff --git a/chromium-wip/patches/patch-ui_base_ui__base__features.h b/chromium-wip/patches/patch-ui_base_ui__base__features.h
new file mode 100644
index 0000000000..4028e4ad19
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_ui__base__features.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/ui_base_features.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/ui_base_features.h
+@@ -129,7 +129,7 @@ COMPONENT_EXPORT(UI_BASE_FEATURES)
+ BASE_DECLARE_FEATURE(kWaylandSessionManagement);
+ #endif  // BUILDFLAG(IS_OZONE)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(UI_BASE_FEATURES)
+ BASE_DECLARE_FEATURE(kOverrideDefaultOzonePlatformHintToAuto);
+ #endif  // BUILDFLAG(IS_LINUX)
diff --git a/chromium-wip/patches/patch-ui_base_ui__base__switches.cc b/chromium-wip/patches/patch-ui_base_ui__base__switches.cc
new file mode 100644
index 0000000000..f852674786
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_ui__base__switches.cc
@@ -0,0 +1,24 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/ui_base_switches.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/ui_base_switches.cc
+@@ -24,13 +24,13 @@ const char kDisableModalAnimations[] = "
+ const char kShowMacOverlayBorders[] = "show-mac-overlay-borders";
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Specifies system font family name. Improves determenism when rendering
+ // pages in headless mode.
+ const char kSystemFontFamily[] = "system-font-family";
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Specify the toolkit used to construct the Linux GUI.
+ const char kUiToolkitFlag[] = "ui-toolkit";
+ // Specify the GTK version to be loaded.
diff --git a/chromium-wip/patches/patch-ui_base_ui__base__switches.h b/chromium-wip/patches/patch-ui_base_ui__base__switches.h
new file mode 100644
index 0000000000..52a51f76c9
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_ui__base__switches.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/ui_base_switches.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/ui_base_switches.h
+@@ -22,11 +22,11 @@ COMPONENT_EXPORT(UI_BASE) extern const c
+ COMPONENT_EXPORT(UI_BASE) extern const char kShowMacOverlayBorders[];
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(UI_BASE) extern const char kSystemFontFamily[];
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(UI_BASE) extern const char kUiToolkitFlag[];
+ COMPONENT_EXPORT(UI_BASE) extern const char kGtkVersionFlag[];
+ COMPONENT_EXPORT(UI_BASE) extern const char kQtVersionFlag[];
diff --git a/chromium-wip/patches/patch-ui_base_webui_web__ui__util.cc b/chromium-wip/patches/patch-ui_base_webui_web__ui__util.cc
new file mode 100644
index 0000000000..eaf428e1e9
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_webui_web__ui__util.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/webui/web_ui_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/webui/web_ui_util.cc
+@@ -42,7 +42,7 @@ namespace {
+ constexpr float kMaxScaleFactor = 1000.0f;
+ 
+ std::string GetFontFamilyMd() {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return "Roboto, " + GetFontFamily();
+ #else
+   return GetFontFamily();
+@@ -217,7 +217,7 @@ void AppendWebUiCssTextDefaults(std::str
+ std::string GetFontFamily() {
+   std::string font_family = l10n_util::GetStringUTF8(IDS_WEB_FONT_FAMILY);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   std::string font_name = ui::ResourceBundle::GetSharedInstance()
+                               .GetFont(ui::ResourceBundle::BaseFont)
+                               .GetFontName();
diff --git a/chromium-wip/patches/patch-ui_base_x_x11__cursor__factory.cc b/chromium-wip/patches/patch-ui_base_x_x11__cursor__factory.cc
new file mode 100644
index 0000000000..bd25362883
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_x_x11__cursor__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/x/x11_cursor_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/x/x11_cursor_factory.cc
+@@ -13,7 +13,7 @@
+ #include "ui/gfx/geometry/point.h"
+ #include "ui/gfx/x/connection.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/linux/linux_ui.h"
+ #endif
+ 
+@@ -70,7 +70,7 @@ scoped_refptr<PlatformCursor> X11CursorF
+ }
+ 
+ void X11CursorFactory::ObserveThemeChanges() {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   auto* linux_ui = LinuxUi::instance();
+   DCHECK(linux_ui);
+   cursor_theme_observation_.Observe(linux_ui);
diff --git a/chromium-wip/patches/patch-ui_base_x_x11__cursor__factory.h b/chromium-wip/patches/patch-ui_base_x_x11__cursor__factory.h
new file mode 100644
index 0000000000..99b45d03ef
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_x_x11__cursor__factory.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/x/x11_cursor_factory.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/x/x11_cursor_factory.h
+@@ -20,7 +20,7 @@ namespace ui {
+ class X11Cursor;
+ class XCursorLoader;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ class LinuxUi;
+ #endif
+ 
+@@ -62,7 +62,7 @@ class COMPONENT_EXPORT(UI_BASE_X) X11Cur
+   // initializing `cursor_loader_` will modify `default_cursors_`.
+   std::unique_ptr<XCursorLoader> cursor_loader_;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   base::ScopedObservation<LinuxUi, CursorThemeManagerObserver>
+       cursor_theme_observation_{this};
+ #endif
diff --git a/chromium-wip/patches/patch-ui_base_x_x11__cursor__loader.cc b/chromium-wip/patches/patch-ui_base_x_x11__cursor__loader.cc
new file mode 100644
index 0000000000..b05e0f8ca8
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_x_x11__cursor__loader.cc
@@ -0,0 +1,47 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/x/x11_cursor_loader.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/x/x11_cursor_loader.cc
+@@ -42,7 +42,7 @@
+ #include "ui/gfx/x/connection.h"
+ #include "ui/gfx/x/xproto.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/linux/linux_ui.h"
+ #endif
+ 
+@@ -84,7 +84,11 @@ std::string CursorPathFromLibXcursor() {
+     void operator()(void* ptr) const { dlclose(ptr); }
+   };
+ 
++#if BUILDFLAG(IS_BSD)
++  std::unique_ptr<void, DlCloser> lib(dlopen("libXcursor.so", RTLD_LAZY));
++#else
+   std::unique_ptr<void, DlCloser> lib(dlopen("libXcursor.so.1", RTLD_LAZY));
++#endif
+   if (!lib)
+     return "";
+ 
+@@ -229,7 +233,7 @@ scoped_refptr<base::RefCountedMemory> Re
+     const std::string& rm_xcursor_theme) {
+   constexpr const char kDefaultTheme[] = "default";
+   std::string themes[] = {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // The toolkit theme has the highest priority.
+     LinuxUi::instance() ? LinuxUi::instance()->GetCursorThemeName()
+                         : std::string(),
+@@ -419,7 +423,7 @@ uint32_t XCursorLoader::GetPreferredCurs
+     return size;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Let the toolkit have the next say.
+   auto* linux_ui = LinuxUi::instance();
+   size = linux_ui ? linux_ui->GetCursorThemeSize() : 0;
diff --git a/chromium-wip/patches/patch-ui_base_x_x11__display__manager.cc b/chromium-wip/patches/patch-ui_base_x_x11__display__manager.cc
new file mode 100644
index 0000000000..59b0b60511
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_x_x11__display__manager.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/x/x11_display_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/x/x11_display_manager.cc
+@@ -16,7 +16,7 @@
+ #include "ui/gfx/x/randr.h"
+ #include "ui/gfx/x/xproto.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/linux/linux_ui.h"
+ #endif
+ 
+@@ -92,7 +92,7 @@ void XDisplayManager::FetchDisplayList()
+           ? display::Display::GetForcedDeviceScaleFactor()
+           : 1.0f};
+   const auto* display_config = &empty_display_config;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (const auto* linux_ui = ui::LinuxUi::instance()) {
+     display_config = &linux_ui->display_config();
+   }
diff --git a/chromium-wip/patches/patch-ui_base_x_x11__shm__image__pool.cc b/chromium-wip/patches/patch-ui_base_x_x11__shm__image__pool.cc
new file mode 100644
index 0000000000..54cc0c23a3
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_base_x_x11__shm__image__pool.cc
@@ -0,0 +1,77 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/base/x/x11_shm_image_pool.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/base/x/x11_shm_image_pool.cc
+@@ -16,6 +16,7 @@
+ #include "base/functional/callback.h"
+ #include "base/location.h"
+ #include "base/strings/string_util.h"
++#include "base/system/sys_info.h"
+ #include "build/build_config.h"
+ #include "net/base/url_util.h"
+ #include "ui/events/platform/platform_event_dispatcher.h"
+@@ -44,10 +45,14 @@ constexpr float kShmResizeShrinkThreshol
+     1.0f / (kShmResizeThreshold * kShmResizeThreshold);
+ 
+ std::size_t MaxShmSegmentSizeImpl() {
++#if BUILDFLAG(IS_BSD)
++  return base::SysInfo::MaxSharedMemorySize();
++#else
+   struct shminfo info;
+   if (shmctl(0, IPC_INFO, reinterpret_cast<struct shmid_ds*>(&info)) == -1)
+     return 0;
+   return info.shmmax;
++#endif
+ }
+ 
+ std::size_t MaxShmSegmentSize() {
+@@ -56,14 +61,19 @@ std::size_t MaxShmSegmentSize() {
+ }
+ 
+ #if !BUILDFLAG(IS_CHROMEOS)
++#if !BUILDFLAG(IS_BSD)
+ bool IsRemoteHost(const std::string& name) {
+   if (name.empty())
+     return false;
+ 
+   return !net::HostStringIsLocalhost(name);
+ }
++#endif
+ 
+ bool ShouldUseMitShm(x11::Connection* connection) {
++#if BUILDFLAG(IS_BSD)
++  return false;
++#else
+   // MIT-SHM may be available on remote connetions, but it will be unusable.  Do
+   // a best-effort check to see if the host is remote to disable the SHM
+   // codepath.  It may be possible in contrived cases for there to be a
+@@ -92,6 +102,7 @@ bool ShouldUseMitShm(x11::Connection* co
+     return false;
+ 
+   return true;
++#endif
+ }
+ #endif  // !BUILDFLAG(IS_CHROMEOS)
+ 
+@@ -182,7 +193,7 @@ bool XShmImagePool::Resize(const gfx::Si
+         shmctl(state.shmid, IPC_RMID, nullptr);
+         return false;
+       }
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       // On Linux, a shmid can still be attached after IPC_RMID if otherwise
+       // kept alive.  Detach before XShmAttach to prevent a memory leak in case
+       // the process dies.
+@@ -201,7 +212,7 @@ bool XShmImagePool::Resize(const gfx::Si
+         return false;
+       state.shmseg = shmseg;
+       state.shmem_attached_to_server = true;
+-#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD)
+       // The Linux-specific shmctl behavior above may not be portable, so we're
+       // forced to do IPC_RMID after the server has attached to the segment.
+       shmctl(state.shmid, IPC_RMID, nullptr);
diff --git a/chromium-wip/patches/patch-ui_color_color__id.h b/chromium-wip/patches/patch-ui_color_color__id.h
new file mode 100644
index 0000000000..2677d476d6
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_color_color__id.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/color/color_id.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/color/color_id.h
+@@ -647,7 +647,7 @@
+   E_CPONLY(kColorCrosSysPositive) \
+   E_CPONLY(kColorCrosSysComplementVariant) \
+   E_CPONLY(kColorCrosSysInputFieldOnBase)
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #define PLATFORM_SPECIFIC_COLOR_IDS \
+   E_CPONLY(kColorNativeBoxFrameBorder)\
+   E_CPONLY(kColorNativeHeaderButtonBorderActive) \
diff --git a/chromium-wip/patches/patch-ui_color_color__provider__utils.cc b/chromium-wip/patches/patch-ui_color_color__provider__utils.cc
new file mode 100644
index 0000000000..8eb2b9ed17
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_color_color__provider__utils.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/color/color_provider_utils.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/color/color_provider_utils.cc
+@@ -194,7 +194,7 @@ std::string_view SystemThemeName(ui::Sys
+   switch (system_theme) {
+     case ui::SystemTheme::kDefault:
+       return "kDefault";
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     case ui::SystemTheme::kGtk:
+       return "kGtk";
+     case ui::SystemTheme::kQt:
diff --git a/chromium-wip/patches/patch-ui_color_system__theme.h b/chromium-wip/patches/patch-ui_color_system__theme.h
new file mode 100644
index 0000000000..45468c65d9
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_color_system__theme.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/color/system_theme.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/color/system_theme.h
+@@ -15,7 +15,7 @@ namespace ui {
+ enum class SystemTheme {
+   // Classic theme, used in the default or users' chosen theme.
+   kDefault = 0,
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   kGtk = 1,
+   kQt = 2,
+   kMaxValue = kQt,
diff --git a/chromium-wip/patches/patch-ui_compositor_compositor.cc b/chromium-wip/patches/patch-ui_compositor_compositor.cc
new file mode 100644
index 0000000000..c10db91cba
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_compositor_compositor.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/compositor/compositor.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/compositor/compositor.cc
+@@ -979,7 +979,7 @@ void Compositor::OnResume() {
+     obs.ResetIfActive();
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+ void Compositor::OnCompleteSwapWithNewSize(const gfx::Size& size) {
+   observer_list_.Notify(
+       &CompositorObserver::OnCompositingCompleteSwapWithNewSize, this, size);
diff --git a/chromium-wip/patches/patch-ui_compositor_compositor.h b/chromium-wip/patches/patch-ui_compositor_compositor.h
new file mode 100644
index 0000000000..f2b191cbda
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_compositor_compositor.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/compositor/compositor.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/compositor/compositor.h
+@@ -462,7 +462,7 @@ class COMPOSITOR_EXPORT Compositor : pub
+   // base::PowerSuspendObserver:
+   void OnResume() override;
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+   void OnCompleteSwapWithNewSize(const gfx::Size& size);
+ #endif  // BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
+ 
diff --git a/chromium-wip/patches/patch-ui_compositor_compositor__observer.h b/chromium-wip/patches/patch-ui_compositor_compositor__observer.h
new file mode 100644
index 0000000000..394d00a817
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_compositor_compositor__observer.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/compositor/compositor_observer.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/compositor/compositor_observer.h
+@@ -56,7 +56,7 @@ class COMPOSITOR_EXPORT CompositorObserv
+   // Called when a child of the compositor is resizing.
+   virtual void OnCompositingChildResizing(Compositor* compositor) {}
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+   // Called when a swap with new size is completed.
+   virtual void OnCompositingCompleteSwapWithNewSize(ui::Compositor* compositor,
+                                                     const gfx::Size& size) {}
diff --git a/chromium-wip/patches/patch-ui_display_screen.cc b/chromium-wip/patches/patch-ui_display_screen.cc
new file mode 100644
index 0000000000..e20ce5770d
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_display_screen.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/display/screen.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/display/screen.cc
+@@ -82,7 +82,7 @@ void Screen::SetDisplayForNewWindows(int
+   display_id_for_new_windows_ = display_id;
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ Screen::ScreenSaverSuspender::~ScreenSaverSuspender() = default;
+ 
+ std::unique_ptr<Screen::ScreenSaverSuspender> Screen::SuspendScreenSaver() {
diff --git a/chromium-wip/patches/patch-ui_display_screen.h b/chromium-wip/patches/patch-ui_display_screen.h
new file mode 100644
index 0000000000..fb9049d5bf
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_display_screen.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/display/screen.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/display/screen.h
+@@ -140,7 +140,7 @@ class DISPLAY_EXPORT Screen {
+   // (both of which may or may not be `nearest_id`).
+   display::ScreenInfos GetScreenInfosNearestDisplay(int64_t nearest_id) const;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Object which suspends the platform-specific screensaver for the duration of
+   // its existence.
+   class ScreenSaverSuspender {
+@@ -246,7 +246,7 @@ class DISPLAY_EXPORT Screen {
+   int64_t display_id_for_new_windows_;
+   int64_t scoped_display_id_for_new_windows_ = display::kInvalidDisplayId;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   uint32_t screen_saver_suspension_count_ = 0;
+ #endif  // BUILDFLAG(IS_LINUX)
+ };
diff --git a/chromium-wip/patches/patch-ui_events_event.cc b/chromium-wip/patches/patch-ui_events_event.cc
new file mode 100644
index 0000000000..1ba0642775
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_events_event.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/events/event.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/events/event.cc
+@@ -375,7 +375,7 @@ std::string LocatedEvent::ToString() con
+ MouseEvent::MouseEvent(const PlatformEvent& native_event)
+     : LocatedEvent(native_event),
+       changed_button_flags_(GetChangedMouseButtonFlagsFromNative(native_event)),
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       movement_(GetMouseMovementFromNative(native_event)),
+ #endif
+       pointer_details_(GetMousePointerDetailsFromNative(native_event)) {
+@@ -631,7 +631,7 @@ std::unique_ptr<Event> MouseWheelEvent::
+   return std::make_unique<MouseWheelEvent>(*this);
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // This value matches Windows, Fuchsia WHEEL_DELTA, and (roughly) Firefox on
+ // Linux.
+ // static
+@@ -894,7 +894,7 @@ void KeyEvent::InitializeNative() {
+     SetFlags(flags() | EF_IS_REPEAT);
+   }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   NormalizeFlags();
+ #elif BUILDFLAG(IS_WIN)
+   // Only Windows has native character events.
diff --git a/chromium-wip/patches/patch-ui_events_event__switches.cc b/chromium-wip/patches/patch-ui_events_event__switches.cc
new file mode 100644
index 0000000000..b610513010
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_events_event__switches.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/events/event_switches.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/events/event_switches.cc
+@@ -21,7 +21,7 @@ const char kCompensateForUnstablePinchZo
+ // value is a floating point number that is interpreted as a distance in pixels.
+ const char kTouchSlopDistance[] = "touch-slop-distance";
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Tells chrome to interpret events from these devices as touch events. Only
+ // available with XInput 2 (i.e. X server 1.8 or above). The id's of the
+ // devices can be retrieved from 'xinput list'.
diff --git a/chromium-wip/patches/patch-ui_events_event__switches.h b/chromium-wip/patches/patch-ui_events_event__switches.h
new file mode 100644
index 0000000000..11b3ed2c8b
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_events_event__switches.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/events/event_switches.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/events/event_switches.h
+@@ -13,7 +13,7 @@ namespace switches {
+ EVENTS_BASE_EXPORT extern const char kCompensateForUnstablePinchZoom[];
+ EVENTS_BASE_EXPORT extern const char kTouchSlopDistance[];
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ EVENTS_BASE_EXPORT extern const char kTouchDevices[];
+ EVENTS_BASE_EXPORT extern const char kPenDevices[];
+ #endif
diff --git a/chromium-wip/patches/patch-ui_events_keycodes_dom_keycode__converter.cc b/chromium-wip/patches/patch-ui_events_keycodes_dom_keycode__converter.cc
new file mode 100644
index 0000000000..7b370cf8ff
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_events_keycodes_dom_keycode__converter.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/events/keycodes/dom/keycode_converter.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/events/keycodes/dom/keycode_converter.cc
+@@ -18,7 +18,7 @@
+ #include "ui/events/keycodes/dom/dom_code.h"
+ #include "ui/events/keycodes/dom/dom_key.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD)
+ #include <linux/input.h>
+ #endif
+ 
+@@ -31,7 +31,7 @@ namespace {
+ #if BUILDFLAG(IS_WIN)
+ #define DOM_CODE(usb, evdev, xkb, win, mac, code, id) \
+   { usb, win, code }
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #define DOM_CODE(usb, evdev, xkb, win, mac, code, id) \
+   { usb, xkb, code }
+ #elif BUILDFLAG(IS_APPLE)
+@@ -70,7 +70,7 @@ struct DomKeyMapEntry {
+ #undef DOM_KEY_UNI
+ #undef DOM_KEY_MAP_DECLARATION_END
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD)
+ 
+ // The offset between XKB Keycode and evdev code.
+ constexpr int kXkbKeycodeOffset = 8;
+@@ -191,7 +191,7 @@ int KeycodeConverter::DomCodeToNativeKey
+   return UsbKeycodeToNativeKeycode(static_cast<uint32_t>(code));
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD)
+ // static
+ DomCode KeycodeConverter::XkbKeycodeToDomCode(uint32_t xkb_keycode) {
+   // Currently XKB keycode is the native keycode.
diff --git a/chromium-wip/patches/patch-ui_events_keycodes_dom_keycode__converter.h b/chromium-wip/patches/patch-ui_events_keycodes_dom_keycode__converter.h
new file mode 100644
index 0000000000..53dddc2765
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_events_keycodes_dom_keycode__converter.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/events/keycodes/dom/keycode_converter.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/events/keycodes/dom/keycode_converter.h
+@@ -64,7 +64,7 @@ class KeycodeConverter {
+   // Convert a DomCode into a native keycode.
+   static int DomCodeToNativeKeycode(DomCode code);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD)
+   // Convert a XKB keycode into a DomCode.
+   static DomCode XkbKeycodeToDomCode(uint32_t xkb_keycode);
+ 
diff --git a/chromium-wip/patches/patch-ui_gfx_BUILD.gn b/chromium-wip/patches/patch-ui_gfx_BUILD.gn
new file mode 100644
index 0000000000..a6e0a956f5
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gfx_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gfx/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gfx/BUILD.gn
+@@ -667,7 +667,7 @@ source_set("memory_buffer_sources") {
+     deps += [ "//build/config/linux/libdrm" ]
+   }
+ 
+-  if (is_linux || is_chromeos || is_android) {
++  if ((is_linux || is_chromeos || is_android) && !is_bsd) {
+     deps += [ "//third_party/libsync" ]
+   }
+ 
diff --git a/chromium-wip/patches/patch-ui_gfx_canvas__skia.cc b/chromium-wip/patches/patch-ui_gfx_canvas__skia.cc
new file mode 100644
index 0000000000..e9c0bcf31a
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gfx_canvas__skia.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gfx/canvas_skia.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gfx/canvas_skia.cc
+@@ -219,7 +219,7 @@ void Canvas::DrawStringRectWithFlags(std
+     Range range = StripAcceleratorChars(flags, &adjusted_text);
+     bool elide_text = ((flags & NO_ELLIPSIS) == 0);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     // On Linux, eliding really means fading the end of the string. But only
+     // for LTR text. RTL text is still elided (on the left) with "...".
+     if (elide_text) {
diff --git a/chromium-wip/patches/patch-ui_gfx_font__fallback__linux.cc b/chromium-wip/patches/patch-ui_gfx_font__fallback__linux.cc
new file mode 100644
index 0000000000..13ac3fcf6b
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gfx_font__fallback__linux.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gfx/font_fallback_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gfx/font_fallback_linux.cc
+@@ -32,6 +32,8 @@
+ #include "ui/gfx/linux/fontconfig_util.h"
+ #include "ui/gfx/platform_font.h"
+ 
++#include <unistd.h>
++
+ namespace gfx {
+ 
+ namespace {
diff --git a/chromium-wip/patches/patch-ui_gfx_font__render__params.h b/chromium-wip/patches/patch-ui_gfx_font__render__params.h
new file mode 100644
index 0000000000..45294e46ec
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gfx_font__render__params.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gfx/font_render_params.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gfx/font_render_params.h
+@@ -115,7 +115,7 @@ COMPONENT_EXPORT(GFX)
+ FontRenderParams GetFontRenderParams(const FontRenderParamsQuery& query,
+                                      std::string* family_out);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ // Clears GetFontRenderParams()'s cache. Intended to be called by tests that are
+ // changing Fontconfig's configuration.
+ COMPONENT_EXPORT(GFX) void ClearFontRenderParamsCacheForTest();
+@@ -125,7 +125,7 @@ COMPONENT_EXPORT(GFX) void ClearFontRend
+ COMPONENT_EXPORT(GFX) float GetFontRenderParamsDeviceScaleFactor();
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ // Sets the device scale factor for FontRenderParams to decide
+ // if it should enable subpixel positioning.
+ COMPONENT_EXPORT(GFX)
diff --git a/chromium-wip/patches/patch-ui_gfx_font__render__params__linux.cc b/chromium-wip/patches/patch-ui_gfx_font__render__params__linux.cc
new file mode 100644
index 0000000000..e0dec669ad
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gfx_font__render__params__linux.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gfx/font_render_params_linux.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gfx/font_render_params_linux.cc
+@@ -24,7 +24,7 @@
+ #include "ui/gfx/linux/fontconfig_util.h"
+ #include "ui/gfx/switches.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/linux/linux_ui.h"
+ #endif
+ 
+@@ -222,7 +222,7 @@ FontRenderParams GetFontRenderParams(con
+ 
+   // Start with the delegate's settings, but let Fontconfig have the final say.
+   FontRenderParams params;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (auto* linux_ui = ui::LinuxUi::instance()) {
+     params = linux_ui->GetDefaultFontRenderParams();
+   }
diff --git a/chromium-wip/patches/patch-ui_gfx_font__util.cc b/chromium-wip/patches/patch-ui_gfx_font__util.cc
new file mode 100644
index 0000000000..68e872d62c
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gfx_font__util.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gfx/font_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gfx/font_util.cc
+@@ -6,7 +6,7 @@
+ 
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include <fontconfig/fontconfig.h>
+ #include "ui/gfx/linux/fontconfig_util.h"
+ #endif
+@@ -24,7 +24,7 @@ void InitializeFonts() {
+   // background (resources have not yet been granted to cast) since it prevents
+   // the long delay the user would have seen on first rendering.
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Early initialize FontConfig.
+   InitializeGlobalFontConfigAsync();
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
diff --git a/chromium-wip/patches/patch-ui_gfx_gpu__extra__info.h b/chromium-wip/patches/patch-ui_gfx_gpu__extra__info.h
new file mode 100644
index 0000000000..3b7e1a300f
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gfx_gpu__extra__info.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gfx/gpu_extra_info.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gfx/gpu_extra_info.h
+@@ -51,7 +51,7 @@ struct COMPONENT_EXPORT(GFX) GpuExtraInf
+   std::vector<gfx::BufferUsageAndFormat> gpu_memory_buffer_support_x11;
+ #endif  // BUILDFLAG(IS_OZONE_X11)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   bool is_gmb_nv12_supported = false;
+ #endif
+ };
diff --git a/chromium-wip/patches/patch-ui_gfx_linux_dmabuf__uapi.h b/chromium-wip/patches/patch-ui_gfx_linux_dmabuf__uapi.h
new file mode 100644
index 0000000000..6a538ee90f
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gfx_linux_dmabuf__uapi.h
@@ -0,0 +1,42 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gfx/linux/dmabuf_uapi.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gfx/linux/dmabuf_uapi.h
+@@ -5,12 +5,11 @@
+ #ifndef UI_GFX_LINUX_DMABUF_UAPI_H_
+ #define UI_GFX_LINUX_DMABUF_UAPI_H_
+ 
+-#include <linux/version.h>
++#include <sys/types.h>
+ 
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+-#include <linux/dma-buf.h>
+-#else
+-#include <linux/types.h>
++typedef int32_t  __s32;
++typedef uint32_t __u32;
++typedef uint64_t __u64;
+ 
+ struct dma_buf_sync {
+   __u64 flags;
+@@ -26,9 +25,7 @@ constexpr __u64 DMA_BUF_SYNC_END = 1 << 
+ constexpr char DMA_BUF_BASE = 'b';
+ constexpr unsigned long DMA_BUF_IOCTL_SYNC =
+     _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync);
+-#endif
+ 
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0)
+ struct dma_buf_export_sync_file {
+   __u32 flags;
+   __s32 fd;
+@@ -43,6 +40,5 @@ constexpr unsigned long DMA_BUF_IOCTL_EX
+     _IOWR(DMA_BUF_BASE, 2, struct dma_buf_export_sync_file);
+ constexpr unsigned long DMA_BUF_IOCTL_IMPORT_SYNC_FILE =
+     _IOW(DMA_BUF_BASE, 3, struct dma_buf_import_sync_file);
+-#endif
+ 
+ #endif  // UI_GFX_LINUX_DMABUF_UAPI_H_
diff --git a/chromium-wip/patches/patch-ui_gfx_linux_gbm__wrapper.cc b/chromium-wip/patches/patch-ui_gfx_linux_gbm__wrapper.cc
new file mode 100644
index 0000000000..d932b89464
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gfx_linux_gbm__wrapper.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gfx/linux/gbm_wrapper.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gfx/linux/gbm_wrapper.cc
+@@ -318,7 +318,7 @@ class Device final : public ui::GbmDevic
+     // of 1x1 BOs which are destroyed before creating the final BO creation used
+     // to instantiate the returned GbmBuffer.
+     gfx::Size size_for_verification =
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+         gfx::Size(1, 1);
+ #else
+         requested_size;
diff --git a/chromium-wip/patches/patch-ui_gfx_mojom_native__handle__types__mojom__traits.cc b/chromium-wip/patches/patch-ui_gfx_mojom_native__handle__types__mojom__traits.cc
new file mode 100644
index 0000000000..134201f8b7
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gfx_mojom_native__handle__types__mojom__traits.cc
@@ -0,0 +1,67 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gfx/mojom/native_handle_types_mojom_traits.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gfx/mojom/native_handle_types_mojom_traits.cc
+@@ -14,7 +14,7 @@
+ #include "ui/gfx/mac/io_surface.h"
+ #endif  // BUILDFLAG(IS_APPLE)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_BSD)
+ #include "ui/gfx/native_pixmap_handle.h"
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE)
+ 
+@@ -80,11 +80,11 @@ bool StructTraits<gfx::mojom::AHardwareB
+ }
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_BSD)
+ mojo::PlatformHandle StructTraits<
+     gfx::mojom::NativePixmapPlaneDataView,
+     gfx::NativePixmapPlane>::buffer_handle(gfx::NativePixmapPlane& plane) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return mojo::PlatformHandle(std::move(plane.fd));
+ #elif BUILDFLAG(IS_FUCHSIA)
+   return mojo::PlatformHandle(std::move(plane.vmo));
+@@ -100,7 +100,7 @@ bool StructTraits<
+   out->size = data.size();
+ 
+   mojo::PlatformHandle handle = data.TakeBufferHandle();
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (!handle.is_fd())
+     return false;
+   out->fd = handle.TakeFD();
+@@ -126,7 +126,7 @@ bool StructTraits<
+     gfx::mojom::NativePixmapHandleDataView,
+     gfx::NativePixmapHandle>::Read(gfx::mojom::NativePixmapHandleDataView data,
+                                    gfx::NativePixmapHandle* out) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   out->modifier = data.modifier();
+   out->supports_zero_copy_webgpu_import =
+       data.supports_zero_copy_webgpu_import();
+@@ -211,7 +211,7 @@ gfx::mojom::GpuMemoryBufferPlatformHandl
+     case gfx::IO_SURFACE_BUFFER:
+       return Tag::kIoSurfaceHandle;
+ #endif  // BUILDFLAG(IS_APPLE)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_BSD)
+     case gfx::NATIVE_PIXMAP:
+       return Tag::kNativePixmapHandle;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE)
+@@ -292,7 +292,7 @@ bool UnionTraits<gfx::mojom::GpuMemoryBu
+ #endif
+       return true;
+ #endif  // BUILDFLAG(IS_APPLE)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_BSD)
+     case Tag::kNativePixmapHandle:
+       gmb_handle->type = gfx::NATIVE_PIXMAP;
+       return data.ReadNativePixmapHandle(&gmb_handle->native_pixmap_handle_);
diff --git a/chromium-wip/patches/patch-ui_gfx_mojom_native__handle__types__mojom__traits.h b/chromium-wip/patches/patch-ui_gfx_mojom_native__handle__types__mojom__traits.h
new file mode 100644
index 0000000000..537382a39c
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gfx_mojom_native__handle__types__mojom__traits.h
@@ -0,0 +1,51 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gfx/mojom/native_handle_types_mojom_traits.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gfx/mojom/native_handle_types_mojom_traits.h
+@@ -18,7 +18,7 @@
+ #include "ui/gfx/gpu_memory_buffer_handle.h"
+ #include "ui/gfx/mojom/native_handle_types.mojom-shared.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_BSD)
+ #include "ui/gfx/native_pixmap_handle.h"
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE)
+ 
+@@ -45,7 +45,7 @@ struct COMPONENT_EXPORT(GFX_NATIVE_HANDL
+ };
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_BSD)
+ template <>
+ struct COMPONENT_EXPORT(GFX_NATIVE_HANDLE_TYPES_SHARED_MOJOM_TRAITS)
+     StructTraits<gfx::mojom::NativePixmapPlaneDataView,
+@@ -73,13 +73,13 @@ struct COMPONENT_EXPORT(GFX_NATIVE_HANDL
+     return pixmap_handle.planes;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   static uint64_t modifier(const gfx::NativePixmapHandle& pixmap_handle) {
+     return pixmap_handle.modifier;
+   }
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   static bool supports_zero_copy_webgpu_import(
+       const gfx::NativePixmapHandle& pixmap_handle) {
+     return pixmap_handle.supports_zero_copy_webgpu_import;
+@@ -204,7 +204,7 @@ struct COMPONENT_EXPORT(GFX_NATIVE_HANDL
+   static IOSurfaceHandle io_surface_handle(gfx::GpuMemoryBufferHandle& handle);
+ #endif  // BUILDFLAG(IS_APPLE)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_BSD)
+   static gfx::NativePixmapHandle& native_pixmap_handle(
+       gfx::GpuMemoryBufferHandle& handle) {
+     return handle.native_pixmap_handle_;
diff --git a/chromium-wip/patches/patch-ui_gfx_native__pixmap__handle.cc b/chromium-wip/patches/patch-ui_gfx_native__pixmap__handle.cc
new file mode 100644
index 0000000000..38c8bc58cc
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gfx_native__pixmap__handle.cc
@@ -0,0 +1,68 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gfx/native_pixmap_handle.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gfx/native_pixmap_handle.cc
+@@ -11,7 +11,7 @@
+ #include "ui/gfx/buffer_format_util.h"
+ #include "ui/gfx/geometry/size.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include <drm_fourcc.h>
+ #include <unistd.h>
+ 
+@@ -23,9 +23,13 @@
+ #include "base/fuchsia/fuchsia_logging.h"
+ #endif
+ 
++#if BUILDFLAG(IS_BSD)
++#include <unistd.h>
++#endif
++
+ namespace gfx {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ static_assert(NativePixmapHandle::kNoModifier == DRM_FORMAT_MOD_INVALID,
+               "gfx::NativePixmapHandle::kNoModifier should be an alias for"
+               "DRM_FORMAT_MOD_INVALID");
+@@ -36,7 +40,7 @@ NativePixmapPlane::NativePixmapPlane() :
+ NativePixmapPlane::NativePixmapPlane(int stride,
+                                      int offset,
+                                      uint64_t size
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+                                      ,
+                                      base::ScopedFD fd
+ #elif BUILDFLAG(IS_FUCHSIA)
+@@ -47,7 +51,7 @@ NativePixmapPlane::NativePixmapPlane(int
+     : stride(stride),
+       offset(offset),
+       size(size)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       ,
+       fd(std::move(fd))
+ #elif BUILDFLAG(IS_FUCHSIA)
+@@ -75,7 +79,7 @@ NativePixmapHandle& NativePixmapHandle::
+ NativePixmapHandle CloneHandleForIPC(const NativePixmapHandle& handle) {
+   NativePixmapHandle clone;
+   for (auto& plane : handle.planes) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     DCHECK(plane.fd.is_valid());
+     // Combining the HANDLE_EINTR and ScopedFD's constructor causes the compiler
+     // to emit some very strange assembly that tends to cause FD ownership
+@@ -113,7 +117,7 @@ NativePixmapHandle CloneHandleForIPC(con
+ #endif
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   clone.modifier = handle.modifier;
+   clone.supports_zero_copy_webgpu_import =
+       handle.supports_zero_copy_webgpu_import;
diff --git a/chromium-wip/patches/patch-ui_gfx_native__pixmap__handle.h b/chromium-wip/patches/patch-ui_gfx_native__pixmap__handle.h
new file mode 100644
index 0000000000..c200b6919d
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gfx_native__pixmap__handle.h
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gfx/native_pixmap_handle.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gfx/native_pixmap_handle.h
+@@ -14,7 +14,7 @@
+ #include "build/build_config.h"
+ #include "ui/gfx/buffer_types.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "base/files/scoped_file.h"
+ #endif
+ 
+@@ -34,7 +34,7 @@ struct COMPONENT_EXPORT(GFX) NativePixma
+   NativePixmapPlane(int stride,
+                     int offset,
+                     uint64_t size
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+                     ,
+                     base::ScopedFD fd
+ #elif BUILDFLAG(IS_FUCHSIA)
+@@ -55,7 +55,7 @@ struct COMPONENT_EXPORT(GFX) NativePixma
+   // This is necessary to map the buffers.
+   uint64_t size;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // File descriptor for the underlying memory object (usually dmabuf).
+   base::ScopedFD fd;
+ #elif BUILDFLAG(IS_FUCHSIA)
+@@ -78,7 +78,7 @@ struct COMPONENT_EXPORT(GFX) NativePixma
+ 
+   std::vector<NativePixmapPlane> planes;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // The modifier is retrieved from GBM library and passed to EGL driver.
+   // Generally it's platform specific, and we don't need to modify it in
+   // Chromium code. Also one per plane per entry.
diff --git a/chromium-wip/patches/patch-ui_gfx_native__widget__types.h b/chromium-wip/patches/patch-ui_gfx_native__widget__types.h
new file mode 100644
index 0000000000..1cbe10b32c
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gfx_native__widget__types.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gfx/native_widget_types.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gfx/native_widget_types.h
+@@ -102,7 +102,7 @@ class ViewAndroid;
+ #endif
+ class SkBitmap;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ extern "C" {
+ struct _AtkObject;
+ using AtkObject = struct _AtkObject;
+@@ -186,7 +186,7 @@ using NativeViewAccessible = IAccessible
+ using NativeViewAccessible = base::apple::OwnedNSObject;
+ #elif BUILDFLAG(IS_MAC)
+ using NativeViewAccessible = base::apple::OwnedNSAccessibility;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Linux doesn't have a native accessibility type.
+ using NativeViewAccessible = AtkObject*;
+ #else
diff --git a/chromium-wip/patches/patch-ui_gfx_platform__font__skia.cc b/chromium-wip/patches/patch-ui_gfx_platform__font__skia.cc
new file mode 100644
index 0000000000..dffd71d06a
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gfx_platform__font__skia.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gfx/platform_font_skia.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gfx/platform_font_skia.cc
+@@ -29,7 +29,7 @@
+ #include "ui/gfx/system_fonts_win.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/linux/linux_ui.h"
+ #endif
+ 
+@@ -167,7 +167,7 @@ void PlatformFontSkia::EnsuresDefaultFon
+   weight = system_font.GetWeight();
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // On Linux, LinuxUi is used to query the native toolkit (e.g.
+   // GTK) for the default UI font.
+   if (auto* linux_ui = ui::LinuxUi::instance()) {
diff --git a/chromium-wip/patches/patch-ui_gfx_render__text__api__fuzzer.cc b/chromium-wip/patches/patch-ui_gfx_render__text__api__fuzzer.cc
new file mode 100644
index 0000000000..e65d2af516
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gfx_render__text__api__fuzzer.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gfx/render_text_api_fuzzer.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gfx/render_text_api_fuzzer.cc
+@@ -19,7 +19,7 @@
+ #include "ui/gfx/font_util.h"
+ #include "ui/gfx/render_text.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "third_party/test_fonts/fontconfig/fontconfig_util_linux.h"
+ #endif
+ 
+@@ -46,7 +46,7 @@ struct Environment {
+ 
+     CHECK(base::i18n::InitializeICU());
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     test_fonts::SetUpFontconfig();
+ #endif
+     gfx::InitializeFonts();
diff --git a/chromium-wip/patches/patch-ui_gfx_render__text__fuzzer.cc b/chromium-wip/patches/patch-ui_gfx_render__text__fuzzer.cc
new file mode 100644
index 0000000000..6d041779fc
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gfx_render__text__fuzzer.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gfx/render_text_fuzzer.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gfx/render_text_fuzzer.cc
+@@ -17,7 +17,7 @@
+ #include "ui/gfx/canvas.h"
+ #include "ui/gfx/font_util.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "third_party/test_fonts/fontconfig/fontconfig_util_linux.h"
+ #endif
+ 
+@@ -40,7 +40,7 @@ struct Environment {
+ 
+     CHECK(base::i18n::InitializeICU());
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     test_fonts::SetUpFontconfig();
+ #endif
+     gfx::InitializeFonts();
diff --git a/chromium-wip/patches/patch-ui_gfx_switches.cc b/chromium-wip/patches/patch-ui_gfx_switches.cc
new file mode 100644
index 0000000000..2d9db08d6b
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gfx_switches.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gfx/switches.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gfx/switches.cc
+@@ -36,7 +36,7 @@ const char kHeadless[] = "headless";
+ // See //components/headless/screen_info/README.md for more details.
+ const char kScreenInfo[] = "screen-info";
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Which X11 display to connect to. Emulates the GTK+ "--display=" command line
+ // argument. In use only with Ozone/X11.
+ const char kX11Display[] = "display";
diff --git a/chromium-wip/patches/patch-ui_gfx_switches.h b/chromium-wip/patches/patch-ui_gfx_switches.h
new file mode 100644
index 0000000000..d911924194
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gfx_switches.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gfx/switches.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gfx/switches.h
+@@ -19,7 +19,7 @@ GFX_SWITCHES_EXPORT extern const char kF
+ GFX_SWITCHES_EXPORT extern const char kHeadless[];
+ GFX_SWITCHES_EXPORT extern const char kScreenInfo[];
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ GFX_SWITCHES_EXPORT extern const char kX11Display[];
+ GFX_SWITCHES_EXPORT extern const char kNoXshm[];
+ #endif
diff --git a/chromium-wip/patches/patch-ui_gfx_x_atom__cache.cc b/chromium-wip/patches/patch-ui_gfx_x_atom__cache.cc
new file mode 100644
index 0000000000..54d451d0a7
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gfx_x_atom__cache.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gfx/x/atom_cache.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gfx/x/atom_cache.cc
+@@ -157,6 +157,7 @@ constexpr auto kAtomsToCache = std::to_a
+     "application/octet-stream",
+     "application/vnd.chromium.test",
+     "chromium/filename",
++    "chromium/from-privileged",
+     "chromium/x-bookmark-entries",
+     "chromium/x-browser-actions",
+     "chromium/x-file-system-files",
diff --git a/chromium-wip/patches/patch-ui_gfx_x_generated__protos_dri3.cc b/chromium-wip/patches/patch-ui_gfx_x_generated__protos_dri3.cc
new file mode 100644
index 0000000000..4f6ba2d15b
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gfx_x_generated__protos_dri3.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gfx/x/generated_protos/dri3.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gfx/x/generated_protos/dri3.cc
+@@ -27,6 +27,8 @@
+ #include <xcb/xcb.h>
+ #include <xcb/xcbext.h>
+ 
++#include <unistd.h>
++
+ #include "base/logging.h"
+ #include "base/posix/eintr_wrapper.h"
+ #include "ui/gfx/x/connection.h"
diff --git a/chromium-wip/patches/patch-ui_gfx_x_generated__protos_shm.cc b/chromium-wip/patches/patch-ui_gfx_x_generated__protos_shm.cc
new file mode 100644
index 0000000000..4a4b9a33ce
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gfx_x_generated__protos_shm.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gfx/x/generated_protos/shm.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gfx/x/generated_protos/shm.cc
+@@ -27,6 +27,8 @@
+ #include <xcb/xcb.h>
+ #include <xcb/xcbext.h>
+ 
++#include <unistd.h>
++
+ #include "base/logging.h"
+ #include "base/posix/eintr_wrapper.h"
+ #include "ui/gfx/x/connection.h"
diff --git a/chromium-wip/patches/patch-ui_gfx_x_xlib__support.cc b/chromium-wip/patches/patch-ui_gfx_x_xlib__support.cc
new file mode 100644
index 0000000000..935dc8827d
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gfx_x_xlib__support.cc
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gfx/x/xlib_support.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gfx/x/xlib_support.cc
+@@ -39,10 +39,18 @@ void InitXlib() {
+     return;
+   }
+ 
++#if BUILDFLAG(IS_BSD)
++  CHECK(xlib_loader->Load("libX11.so"));
++#else
+   CHECK(xlib_loader->Load("libX11.so.6"));
++#endif
+ 
+   auto* xlib_xcb_loader = GetXlibXcbLoader();
++#if BUILDFLAG(IS_BSD)
++  CHECK(xlib_xcb_loader->Load("libX11-xcb.so"));
++#else
+   CHECK(xlib_xcb_loader->Load("libX11-xcb.so.1"));
++#endif
+ 
+   CHECK(xlib_loader->XInitThreads());
+ 
diff --git a/chromium-wip/patches/patch-ui_gl_gl__context.cc b/chromium-wip/patches/patch-ui_gl_gl__context.cc
new file mode 100644
index 0000000000..23b305faed
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gl_gl__context.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gl/gl_context.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gl/gl_context.cc
+@@ -159,7 +159,7 @@ bool GLContext::MakeCurrent(GLSurface* s
+     recorded_max_gles_version_if_feasible = true;
+   }
+ #elif (BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-       BUILDFLAG(IS_WIN))
++       BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD))
+   static bool recorded_emulated_gles_version = false;
+   if (!recorded_emulated_gles_version) {
+     base::UmaHistogramBoolean("GPU.ANGLECanEmulateGLES3",
+@@ -526,7 +526,7 @@ bool GLContext::MakeVirtuallyCurrent(
+   DCHECK(virtual_context->IsCurrent(surface));
+ 
+   if (switched_real_contexts || virtual_context != current_virtual_context_) {
+-#if DCHECK_IS_ON()
++#if DCHECK_IS_ON() && !BUILDFLAG(IS_BSD)
+     GLenum error = glGetError();
+     // Accepting a context loss error here enables using debug mode to work on
+     // context loss handling in virtual context mode.
diff --git a/chromium-wip/patches/patch-ui_gl_gl__fence.cc b/chromium-wip/patches/patch-ui_gl_gl__fence.cc
new file mode 100644
index 0000000000..002cfc7b72
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gl_gl__fence.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gl/gl_fence.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gl/gl_fence.cc
+@@ -18,7 +18,7 @@
+ #include "ui/gl/gl_surface_egl.h"
+ #include "ui/gl/gl_version_info.h"
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #define USE_GL_FENCE_ANDROID_NATIVE_FENCE_SYNC
+ #include "ui/gl/gl_fence_android_native_fence_sync.h"
+ #endif
diff --git a/chromium-wip/patches/patch-ui_gl_gl__implementation.cc b/chromium-wip/patches/patch-ui_gl_gl__implementation.cc
new file mode 100644
index 0000000000..d8c752ff27
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gl_gl__implementation.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gl/gl_implementation.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gl/gl_implementation.cc
+@@ -304,7 +304,7 @@ GetRequestedGLImplementationFromCommandL
+     const base::CommandLine* command_line) {
+   bool overrideUseSoftwareGL =
+       command_line->HasSwitch(switches::kOverrideUseSoftwareGLForTests);
+-#if BUILDFLAG(IS_LINUX) || \
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \
+     (BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_CHROMEOS_DEVICE))
+   if (std::getenv("RUNNING_UNDER_RR")) {
+     // https://rr-project.org/ is a Linux-only record-and-replay debugger that
diff --git a/chromium-wip/patches/patch-ui_gl_gl__switches.cc b/chromium-wip/patches/patch-ui_gl_gl__switches.cc
new file mode 100644
index 0000000000..645eb255b7
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gl_gl__switches.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gl/gl_switches.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gl/gl_switches.cc
+@@ -15,7 +15,7 @@
+ #endif
+ 
+ #if BUILDFLAG(ENABLE_VULKAN) && \
+-    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID))
++    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD))
+ #include <vulkan/vulkan_core.h>
+ #include "third_party/angle/src/gpu_info_util/SystemInfo.h"  // nogncheck
+ #endif  // BUILDFLAG(ENABLE_VULKAN) && (BUILDFLAG(IS_LINUX) ||
+@@ -323,7 +323,7 @@ bool IsDefaultANGLEVulkan() {
+   }
+ #endif  // BUILDFLAG(IS_ANDROID)
+ #if BUILDFLAG(ENABLE_VULKAN) && \
+-    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID))
++    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD))
+   angle::SystemInfo system_info;
+   {
+     TRACE_EVENT("gpu,startup", "angle::GetSystemInfoVulkan");
+@@ -405,7 +405,7 @@ bool IsDefaultANGLEVulkan() {
+   }
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // AMDVLK driver is buggy, so disable Vulkan with AMDVLK for now.
+   // crbug.com/1340081
+   if (active_gpu.driverId == VK_DRIVER_ID_AMD_OPEN_SOURCE)
diff --git a/chromium-wip/patches/patch-ui_gl_sync__control__vsync__provider.cc b/chromium-wip/patches/patch-ui_gl_sync__control__vsync__provider.cc
new file mode 100644
index 0000000000..2706f718ea
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gl_sync__control__vsync__provider.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gl/sync_control_vsync_provider.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gl/sync_control_vsync_provider.cc
+@@ -11,7 +11,7 @@
+ #include "base/trace_event/trace_event.h"
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // These constants define a reasonable range for a calculated refresh interval.
+ // Calculating refreshes out of this range will be considered a fatal error.
+ const int64_t kMinVsyncIntervalUs = base::Time::kMicrosecondsPerSecond / 400;
+@@ -26,7 +26,7 @@ const double kRelativeIntervalDifference
+ namespace gl {
+ 
+ SyncControlVSyncProvider::SyncControlVSyncProvider() : gfx::VSyncProvider() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // On platforms where we can't get an accurate reading on the refresh
+   // rate we fall back to the assumption that we're displaying 60 frames
+   // per second.
+@@ -48,7 +48,7 @@ bool SyncControlVSyncProvider::GetVSyncP
+     base::TimeTicks* timebase_out,
+     base::TimeDelta* interval_out) {
+   TRACE_EVENT0("gpu", "SyncControlVSyncProvider::GetVSyncParameters");
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // The actual clock used for the system time returned by
+   // eglGetSyncValuesCHROMIUM is unspecified. In practice, the clock used is
+   // likely to be either CLOCK_REALTIME or CLOCK_MONOTONIC, so we compare the
+@@ -160,7 +160,7 @@ bool SyncControlVSyncProvider::GetVSyncP
+ }
+ 
+ bool SyncControlVSyncProvider::SupportGetVSyncParametersIfAvailable() const {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return true;
+ #else
+   return false;
diff --git a/chromium-wip/patches/patch-ui_gl_sync__control__vsync__provider.h b/chromium-wip/patches/patch-ui_gl_sync__control__vsync__provider.h
new file mode 100644
index 0000000000..301463cf33
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gl_sync__control__vsync__provider.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gl/sync_control_vsync_provider.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gl/sync_control_vsync_provider.h
+@@ -31,7 +31,7 @@ class SyncControlVSyncProvider : public 
+   bool SupportGetVSyncParametersIfAvailable() const override;
+ 
+   static constexpr bool IsSupported() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     return true;
+ #else
+     return false;
+@@ -46,7 +46,7 @@ class SyncControlVSyncProvider : public 
+   virtual bool GetMscRate(int32_t* numerator, int32_t* denominator) = 0;
+ 
+  private:
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   base::TimeTicks last_timebase_;
+   uint64_t last_media_stream_counter_ = 0;
+   base::TimeDelta last_good_interval_;
diff --git a/chromium-wip/patches/patch-ui_gtk_gtk__compat.cc b/chromium-wip/patches/patch-ui_gtk_gtk__compat.cc
new file mode 100644
index 0000000000..210ea7a035
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gtk_gtk__compat.cc
@@ -0,0 +1,56 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gtk/gtk_compat.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gtk/gtk_compat.cc
+@@ -64,27 +64,47 @@ auto DlCast(void* symbol) {
+ }
+ 
+ void* GetLibGio() {
++#if BUILDFLAG(IS_BSD)
++  static void* libgio = DlOpen("libgio-2.0.so");
++#else
+   static void* libgio = DlOpen("libgio-2.0.so.0");
++#endif
+   return libgio;
+ }
+ 
+ void* GetLibGdkPixbuf() {
++#if BUILDFLAG(IS_BSD)
++  static void* libgdk_pixbuf = DlOpen("libgdk_pixbuf-2.0.so");
++#else
+   static void* libgdk_pixbuf = DlOpen("libgdk_pixbuf-2.0.so.0");
++#endif
+   return libgdk_pixbuf;
+ }
+ 
+ void* GetLibGdk3() {
++#if BUILDFLAG(IS_BSD)
++  static void* libgdk3 = DlOpen("libgdk-3.so");
++#else
+   static void* libgdk3 = DlOpen("libgdk-3.so.0");
++#endif
+   return libgdk3;
+ }
+ 
+ void* GetLibGtk3(bool check = true) {
++#if BUILDFLAG(IS_BSD)
++  static void* libgtk3 = DlOpen("libgtk-3.so", check);
++#else
+   static void* libgtk3 = DlOpen("libgtk-3.so.0", check);
++#endif
+   return libgtk3;
+ }
+ 
+ void* GetLibGtk4(bool check = true) {
++#if BUILDFLAG(IS_BSD)
++  static void* libgtk4 = DlOpen("libgtk-4.so", check);
++#else
+   static void* libgtk4 = DlOpen("libgtk-4.so.1", check);
++#endif
+   return libgtk4;
+ }
+ 
diff --git a/chromium-wip/patches/patch-ui_gtk_printing_print__dialog__gtk.cc b/chromium-wip/patches/patch-ui_gtk_printing_print__dialog__gtk.cc
new file mode 100644
index 0000000000..36e4f90aa2
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_gtk_printing_print__dialog__gtk.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/gtk/printing/print_dialog_gtk.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/gtk/printing/print_dialog_gtk.cc
+@@ -446,7 +446,7 @@ void PrintDialogGtk::ShowDialog(
+   GtkPrintCapabilities cap = static_cast<GtkPrintCapabilities>(
+       GTK_PRINT_CAPABILITY_GENERATE_PDF | GTK_PRINT_CAPABILITY_PAGE_SET |
+       GTK_PRINT_CAPABILITY_COPIES | GTK_PRINT_CAPABILITY_COLLATE |
+-      GTK_PRINT_CAPABILITY_REVERSE);
++      GTK_PRINT_CAPABILITY_REVERSE | GTK_PRINT_CAPABILITY_GENERATE_PS);
+   gtk_print_unix_dialog_set_manual_capabilities(
+       GTK_PRINT_UNIX_DIALOG(dialog_.get()), cap);
+   gtk_print_unix_dialog_set_embed_page_setup(
diff --git a/chromium-wip/patches/patch-ui_message__center_views_message__popup__view.cc b/chromium-wip/patches/patch-ui_message__center_views_message__popup__view.cc
new file mode 100644
index 0000000000..7cf95773ff
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_message__center_views_message__popup__view.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/message_center/views/message_popup_view.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/message_center/views/message_popup_view.cc
+@@ -164,7 +164,7 @@ std::unique_ptr<views::Widget> MessagePo
+       views::Widget::InitParams::CLIENT_OWNS_WIDGET,
+       views::Widget::InitParams::TYPE_POPUP);
+   params.z_order = ui::ZOrderLevel::kFloatingWindow;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Make the widget explicitly activatable as TYPE_POPUP is not activatable by
+   // default but we need focus for the inline reply textarea.
+   params.activatable = views::Widget::InitParams::Activatable::kYes;
diff --git a/chromium-wip/patches/patch-ui_native__theme_features_native__theme__features.cc b/chromium-wip/patches/patch-ui_native__theme_features_native__theme__features.cc
new file mode 100644
index 0000000000..246f561579
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_native__theme_features_native__theme__features.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/native_theme/features/native_theme_features.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/native_theme/features/native_theme_features.cc
+@@ -54,7 +54,7 @@ namespace ui {
+ 
+ bool IsFluentOverlayScrollbarEnabled() {
+ // Fluent scrollbars are only used for some OSes due to UI design guidelines.
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return base::FeatureList::IsEnabled(features::kFluentOverlayScrollbar);
+ #else
+   return false;
+@@ -63,7 +63,7 @@ bool IsFluentOverlayScrollbarEnabled() {
+ 
+ bool IsFluentScrollbarEnabled() {
+ // Fluent scrollbars are only used for some OSes due to UI design guidelines.
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return base::FeatureList::IsEnabled(features::kFluentScrollbar) ||
+          IsFluentOverlayScrollbarEnabled();
+ #else
diff --git a/chromium-wip/patches/patch-ui_native__theme_native__theme.h b/chromium-wip/patches/patch-ui_native__theme_native__theme.h
new file mode 100644
index 0000000000..eefe5ea0f6
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_native__theme_native__theme.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/native_theme/native_theme.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/native_theme/native_theme.h
+@@ -61,7 +61,7 @@ class COMPONENT_EXPORT(NATIVE_THEME) Nat
+   // The part to be painted / sized.
+   enum Part {
+     kCheckbox,
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     kFrameTopArea,
+ #endif
+     kInnerSpinButton,
diff --git a/chromium-wip/patches/patch-ui_native__theme_native__theme__base.cc b/chromium-wip/patches/patch-ui_native__theme_native__theme__base.cc
new file mode 100644
index 0000000000..f9e0fe93b4
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_native__theme_native__theme__base.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/native_theme/native_theme_base.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/native_theme/native_theme_base.cc
+@@ -241,7 +241,7 @@ void NativeThemeBase::Paint(cc::PaintCan
+                     std::get<ButtonExtraParams>(extra), color_scheme,
+                     accent_color_opaque);
+       break;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     case kFrameTopArea:
+       PaintFrameTopArea(canvas, state, rect,
+                         std::get<FrameTopAreaExtraParams>(extra), color_scheme);
diff --git a/chromium-wip/patches/patch-ui_ozone_common_egl__util.cc b/chromium-wip/patches/patch-ui_ozone_common_egl__util.cc
new file mode 100644
index 0000000000..354657a860
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_ozone_common_egl__util.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/ozone/common/egl_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/ozone/common/egl_util.cc
+@@ -35,9 +35,9 @@ const base::FilePath::CharType kDefaultG
+     FILE_PATH_LITERAL("libGLESv2.so");
+ #else  // BUILDFLAG(IS_FUCHSIA)
+ const base::FilePath::CharType kDefaultEglSoname[] =
+-    FILE_PATH_LITERAL("libEGL.so.1");
++    FILE_PATH_LITERAL("libEGL.so");
+ const base::FilePath::CharType kDefaultGlesSoname[] =
+-    FILE_PATH_LITERAL("libGLESv2.so.2");
++    FILE_PATH_LITERAL("libGLESv2.so");
+ #endif
+ #if !BUILDFLAG(USE_STATIC_ANGLE)
+ const base::FilePath::CharType kAngleEglSoname[] =
diff --git a/chromium-wip/patches/patch-ui_ozone_platform_headless_headless__surface__factory.cc b/chromium-wip/patches/patch-ui_ozone_platform_headless_headless__surface__factory.cc
new file mode 100644
index 0000000000..725cc0f970
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_ozone_platform_headless_headless__surface__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/ozone/platform/headless/headless_surface_factory.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/ozone/platform/headless/headless_surface_factory.cc
+@@ -34,7 +34,7 @@
+ #include "ui/ozone/platform/headless/headless_window_manager.h"
+ #include "ui/ozone/public/surface_ozone_canvas.h"
+ 
+-#if BUILDFLAG(ENABLE_VULKAN) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA))
++#if BUILDFLAG(ENABLE_VULKAN) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD))
+ #include "ui/ozone/platform/headless/vulkan_implementation_headless.h"
+ #endif
+ 
+@@ -281,7 +281,7 @@ std::unique_ptr<gpu::VulkanImplementatio
+ HeadlessSurfaceFactory::CreateVulkanImplementation(
+     bool use_swiftshader,
+     bool allow_protected_memory) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   return std::make_unique<VulkanImplementationHeadless>(use_swiftshader);
+ #else
+   return nullptr;
diff --git a/chromium-wip/patches/patch-ui_ozone_platform_headless_ozone__platform__headless.cc b/chromium-wip/patches/patch-ui_ozone_platform_headless_ozone__platform__headless.cc
new file mode 100644
index 0000000000..bf8d0eda6e
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_ozone_platform_headless_ozone__platform__headless.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/ozone/platform/headless/ozone_platform_headless.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/ozone/platform/headless/ozone_platform_headless.cc
+@@ -108,7 +108,7 @@ class OzonePlatformHeadlessImpl : public
+   }
+ 
+ // Desktop Linux, not CastOS.
+-#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CASTOS)
+   const PlatformProperties& GetPlatformProperties() override {
+     static base::NoDestructor<OzonePlatform::PlatformProperties> properties;
+     static bool initialized = false;
diff --git a/chromium-wip/patches/patch-ui_ozone_platform_headless_vulkan__implementation__headless.cc b/chromium-wip/patches/patch-ui_ozone_platform_headless_vulkan__implementation__headless.cc
new file mode 100644
index 0000000000..0fd275d90a
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_ozone_platform_headless_vulkan__implementation__headless.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/ozone/platform/headless/vulkan_implementation_headless.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/ozone/platform/headless/vulkan_implementation_headless.cc
+@@ -117,7 +117,7 @@ VulkanImplementationHeadless::ExportVkFe
+ 
+ VkExternalSemaphoreHandleTypeFlagBits
+ VulkanImplementationHeadless::GetExternalSemaphoreHandleType() {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT;
+ #else
+   return VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT;
+@@ -127,7 +127,7 @@ VulkanImplementationHeadless::GetExterna
+ bool VulkanImplementationHeadless::CanImportGpuMemoryBuffer(
+     gpu::VulkanDeviceQueue* device_queue,
+     gfx::GpuMemoryBufferType memory_buffer_type) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   const auto& enabled_extensions = device_queue->enabled_extensions();
+   return gfx::HasExtension(enabled_extensions,
+                            VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME) &&
+@@ -150,7 +150,7 @@ VulkanImplementationHeadless::CreateImag
+       VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_SAMPLED_BIT |
+       VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
+   auto tiling = VK_IMAGE_TILING_OPTIMAL;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (gmb_handle.native_pixmap_handle().modifier !=
+       gfx::NativePixmapHandle::kNoModifier) {
+     tiling = VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT;
diff --git a/chromium-wip/patches/patch-ui_ozone_platform_wayland_common_wayland__util.cc b/chromium-wip/patches/patch-ui_ozone_platform_wayland_common_wayland__util.cc
new file mode 100644
index 0000000000..07076368a7
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_ozone_platform_wayland_common_wayland__util.cc
@@ -0,0 +1,24 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/ozone/platform/wayland/common/wayland_util.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/ozone/platform/wayland/common/wayland_util.cc
+@@ -421,6 +421,7 @@ void RecordConnectionMetrics(wl_display*
+         {"weston", WaylandCompositor::kWeston},
+     };
+ 
++#if !BUILDFLAG(IS_BSD)
+     const int fd = wl_display_get_fd(display);
+     if (fd == -1) {
+       return WaylandCompositor::kUnknown;
+@@ -446,6 +447,7 @@ void RecordConnectionMetrics(wl_display*
+         return compositor;
+       }
+     }
++#endif
+ 
+     return WaylandCompositor::kOther;
+   };
diff --git a/chromium-wip/patches/patch-ui_ozone_platform_wayland_gpu_vulkan__implementation__wayland.cc b/chromium-wip/patches/patch-ui_ozone_platform_wayland_gpu_vulkan__implementation__wayland.cc
new file mode 100644
index 0000000000..75c8a8152d
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_ozone_platform_wayland_gpu_vulkan__implementation__wayland.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/ozone/platform/wayland/gpu/vulkan_implementation_wayland.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/ozone/platform/wayland/gpu/vulkan_implementation_wayland.cc
+@@ -39,7 +39,11 @@ bool VulkanImplementationWayland::Initia
+ 
+     path = path.Append("libvk_swiftshader.so");
+   } else {
++#if BUILDFLAG(IS_BSD)
++    path = base::FilePath("libvulkan.so");
++#else
+     path = base::FilePath("libvulkan.so.1");
++#endif
+   }
+ 
+   return vulkan_instance_.Initialize(path, required_extensions, {});
diff --git a/chromium-wip/patches/patch-ui_ozone_platform_wayland_host_wayland__frame__manager.cc b/chromium-wip/patches/patch-ui_ozone_platform_wayland_host_wayland__frame__manager.cc
new file mode 100644
index 0000000000..50936a9a13
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_ozone_platform_wayland_host_wayland__frame__manager.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/ozone/platform/wayland/host/wayland_frame_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/ozone/platform/wayland/host/wayland_frame_manager.cc
+@@ -461,8 +461,10 @@ std::optional<bool> WaylandFrameManager:
+   surface->UpdateBufferDamageRegion(
+       gfx::ToEnclosingRectIgnoringError(surface_damage));
+ 
++#if !BUILDFLAG(IS_BSD)
+   if (!config.access_fence_handle.is_null())
+     surface->set_acquire_fence(std::move(config.access_fence_handle));
++#endif
+ 
+   bool needs_commit = false;
+ 
diff --git a/chromium-wip/patches/patch-ui_ozone_platform_x11_vulkan__implementation__x11.cc b/chromium-wip/patches/patch-ui_ozone_platform_x11_vulkan__implementation__x11.cc
new file mode 100644
index 0000000000..1f9686bde9
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_ozone_platform_x11_vulkan__implementation__x11.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/ozone/platform/x11/vulkan_implementation_x11.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/ozone/platform/x11/vulkan_implementation_x11.cc
+@@ -59,7 +59,11 @@ bool VulkanImplementationX11::Initialize
+ 
+     path = path.Append("libvk_swiftshader.so");
+   } else {
++#if BUILDFLAG(IS_BSD) 
++    path = base::FilePath("libvulkan.so");
++#else
+     path = base::FilePath("libvulkan.so.1");
++#endif
+   }
+ 
+   return vulkan_instance_.Initialize(path, required_extensions, {});
diff --git a/chromium-wip/patches/patch-ui_ozone_platform_x11_x11__screen__ozone.cc b/chromium-wip/patches/patch-ui_ozone_platform_x11_x11__screen__ozone.cc
new file mode 100644
index 0000000000..a46b1f3a5a
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_ozone_platform_x11_x11__screen__ozone.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/ozone/platform/x11/x11_screen_ozone.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/ozone/platform/x11/x11_screen_ozone.cc
+@@ -22,7 +22,7 @@
+ #include "ui/ozone/platform/x11/x11_window.h"
+ #include "ui/ozone/platform/x11/x11_window_manager.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/linux/linux_ui.h"
+ #endif
+ 
+@@ -97,7 +97,7 @@ X11ScreenOzone::X11ScreenOzone()
+       window_manager_(X11WindowManager::GetInstance()),
+       x11_display_manager_(std::make_unique<XDisplayManager>(this)) {
+   DCHECK(window_manager_);
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (auto* linux_ui = ui::LinuxUi::instance()) {
+     display_scale_factor_observer_.Observe(linux_ui);
+   }
+@@ -267,7 +267,7 @@ void X11ScreenOzone::OnEvent(const x11::
+   x11_display_manager_->OnEvent(xev);
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void X11ScreenOzone::OnDeviceScaleFactorChanged() {
+   x11_display_manager_->DispatchDelayedDisplayListUpdate();
+ }
diff --git a/chromium-wip/patches/patch-ui_ozone_platform_x11_x11__screen__ozone.h b/chromium-wip/patches/patch-ui_ozone_platform_x11_x11__screen__ozone.h
new file mode 100644
index 0000000000..3f2e122d59
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_ozone_platform_x11_x11__screen__ozone.h
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/ozone/platform/x11/x11_screen_ozone.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/ozone/platform/x11/x11_screen_ozone.h
+@@ -16,7 +16,7 @@
+ #include "ui/gfx/x/event.h"
+ #include "ui/ozone/public/platform_screen.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/linux/device_scale_factor_observer.h"
+ #include "ui/linux/linux_ui.h"
+ #endif
+@@ -29,7 +29,7 @@ class X11WindowManager;
+ class X11ScreenOzone : public PlatformScreen,
+                        public x11::EventObserver,
+                        public XDisplayManager::Delegate
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     ,
+                        public DeviceScaleFactorObserver
+ #endif
+@@ -97,7 +97,7 @@ class X11ScreenOzone : public PlatformSc
+   // ui::XDisplayManager::Delegate:
+   void OnXDisplayListUpdated() override;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // DeviceScaleFactorObserver:
+   void OnDeviceScaleFactorChanged() override;
+ #endif
+@@ -109,7 +109,7 @@ class X11ScreenOzone : public PlatformSc
+   // Indicates that |this| is initialized.
+   bool initialized_ = false;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   base::ScopedObservation<ui::LinuxUi, DeviceScaleFactorObserver>
+       display_scale_factor_observer_{this};
+ #endif
diff --git a/chromium-wip/patches/patch-ui_ozone_platform_x11_x11__window.cc b/chromium-wip/patches/patch-ui_ozone_platform_x11_x11__window.cc
new file mode 100644
index 0000000000..c56d7e7c46
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_ozone_platform_x11_x11__window.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/ozone/platform/x11/x11_window.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/ozone/platform/x11/x11_window.cc
+@@ -1508,7 +1508,7 @@ void X11Window::OnXWindowStateChanged() 
+   WindowTiledEdges tiled_state = GetTiledState();
+   if (tiled_state != tiled_state_) {
+     tiled_state_ = tiled_state;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     platform_window_delegate_->OnWindowTiledStateChanged(tiled_state);
+     UpdateDecorationInsets();
+ #endif
diff --git a/chromium-wip/patches/patch-ui_ozone_public_ozone__ui__controls__test__helper.h b/chromium-wip/patches/patch-ui_ozone_public_ozone__ui__controls__test__helper.h
new file mode 100644
index 0000000000..ffeee5bbf9
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_ozone_public_ozone__ui__controls__test__helper.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/ozone/public/ozone_ui_controls_test_helper.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/ozone/public/ozone_ui_controls_test_helper.h
+@@ -62,7 +62,7 @@ class OzoneUIControlsTestHelper {
+   // aura::Window.
+   virtual bool MustUseUiControlsForMoveCursorTo() = 0;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   virtual void ForceUseScreenCoordinatesOnce();
+ #endif
+ };
diff --git a/chromium-wip/patches/patch-ui_ozone_test_mock__platform__window__delegate.h b/chromium-wip/patches/patch-ui_ozone_test_mock__platform__window__delegate.h
new file mode 100644
index 0000000000..7cbc46b0a0
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_ozone_test_mock__platform__window__delegate.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/ozone/test/mock_platform_window_delegate.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/ozone/test/mock_platform_window_delegate.h
+@@ -35,7 +35,7 @@ class MockPlatformWindowDelegate : publi
+   MOCK_METHOD2(OnWindowStateChanged,
+                void(PlatformWindowState old_state,
+                     PlatformWindowState new_state));
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   MOCK_METHOD1(OnWindowTiledStateChanged,
+                void(WindowTiledEdges new_tiled_edges));
+ #endif
diff --git a/chromium-wip/patches/patch-ui_platform__window_platform__window__delegate.cc b/chromium-wip/patches/patch-ui_platform__window_platform__window__delegate.cc
new file mode 100644
index 0000000000..e7ada5dae3
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_platform__window_platform__window__delegate.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/platform_window/platform_window_delegate.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/platform_window/platform_window_delegate.cc
+@@ -56,7 +56,7 @@ gfx::Insets PlatformWindowDelegate::Calc
+   return gfx::Insets();
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void PlatformWindowDelegate::OnWindowTiledStateChanged(
+     WindowTiledEdges new_tiled_edges) {}
+ #endif
diff --git a/chromium-wip/patches/patch-ui_platform__window_platform__window__delegate.h b/chromium-wip/patches/patch-ui_platform__window_platform__window__delegate.h
new file mode 100644
index 0000000000..eb70a6ea87
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_platform__window_platform__window__delegate.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/platform_window/platform_window_delegate.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/platform_window/platform_window_delegate.h
+@@ -144,7 +144,7 @@ class COMPONENT_EXPORT(PLATFORM_WINDOW) 
+   virtual void OnWindowStateChanged(PlatformWindowState old_state,
+                                     PlatformWindowState new_state) = 0;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Notifies the delegate that the tiled state of the window edges has changed.
+   virtual void OnWindowTiledStateChanged(WindowTiledEdges new_tiled_edges);
+ #endif
diff --git a/chromium-wip/patches/patch-ui_platform__window_platform__window__init__properties.h b/chromium-wip/patches/patch-ui_platform__window_platform__window__init__properties.h
new file mode 100644
index 0000000000..3b3701680d
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_platform__window_platform__window__init__properties.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/platform_window/platform_window_init_properties.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/platform_window/platform_window_init_properties.h
+@@ -56,7 +56,7 @@ class WorkspaceExtensionDelegate;
+ class ScenicWindowDelegate;
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ class X11ExtensionDelegate;
+ #endif
+ 
+@@ -120,7 +120,7 @@ struct COMPONENT_EXPORT(PLATFORM_WINDOW)
+ 
+   PlatformWindowShadowType shadow_type = PlatformWindowShadowType::kDefault;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   bool prefer_dark_theme = false;
+   raw_ptr<gfx::ImageSkia> icon = nullptr;
+   std::optional<SkColor> background_color;
diff --git a/chromium-wip/patches/patch-ui_qt_BUILD.gn b/chromium-wip/patches/patch-ui_qt_BUILD.gn
new file mode 100644
index 0000000000..54c6cd71fb
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_qt_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/qt/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/qt/BUILD.gn
+@@ -20,7 +20,7 @@ config("qt_internal_config") {
+ 
+   # It's OK to depend on the system libstdc++ since it's a dependency of QT, so
+   # it will get loaded into the process anyway.
+-  libs = [ "stdc++" ]
++  # libs = [ "stdc++" ]
+ 
+   configs = [
+     "//build/config/linux:runtime_library",
diff --git a/chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__bn.xtb b/chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__bn.xtb
new file mode 100644
index 0000000000..a71ecffd8d
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__bn.xtb
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/strings/translations/app_locale_settings_bn.xtb.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/strings/translations/app_locale_settings_bn.xtb
+@@ -10,7 +10,7 @@
+   <translation id="IDS_WEB_FONT_FAMILY">Vrinda</translation>
+   <translation id="IDS_WEB_FONT_FAMILY_XP">Vrinda</translation>
+ </if>
+-<if expr="is_linux">
++<if expr="is_posix">
+   <translation id="IDS_WEB_FONT_FAMILY">Lohit Bengali</translation>
+ </if>
+ <if expr="is_chromeos">
diff --git a/chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__ja.xtb b/chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__ja.xtb
new file mode 100644
index 0000000000..d66f55c0e0
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__ja.xtb
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/strings/translations/app_locale_settings_ja.xtb.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/strings/translations/app_locale_settings_ja.xtb
+@@ -12,7 +12,7 @@
+ <if expr="is_ios">
+   <translation id="IDS_WEB_FONT_FAMILY">Helvetica,Hiragino Kaku Gothic ProN,sans-serif</translation>
+ </if>
+-<if expr="is_linux">
++<if expr="is_posix">
+   <translation id="IDS_WEB_FONT_FAMILY">VL PGothic,Sazanami Gothic,Kochi Gothic,sans-serif</translation>
+ </if>
+ <if expr="is_chromeos">
diff --git a/chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__ko.xtb b/chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__ko.xtb
new file mode 100644
index 0000000000..bfcd9fb181
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__ko.xtb
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/strings/translations/app_locale_settings_ko.xtb.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/strings/translations/app_locale_settings_ko.xtb
+@@ -12,7 +12,7 @@
+ <if expr="is_ios">
+   <translation id="IDS_WEB_FONT_FAMILY">Helvetica,Apple SD Gothic Neo,AppleGothic,sans-serif</translation>
+ </if>
+-<if expr="is_linux">
++<if expr="is_posix">
+   <translation id="IDS_WEB_FONT_FAMILY">Noto Sans CJK KR,NanumGothic,UnDotum,Baekmuk Gulim,sans-serif</translation>
+ </if>
+ <if expr="is_chromeos">
diff --git a/chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__ml.xtb b/chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__ml.xtb
new file mode 100644
index 0000000000..bff2ab6564
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__ml.xtb
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/strings/translations/app_locale_settings_ml.xtb.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/strings/translations/app_locale_settings_ml.xtb
+@@ -9,7 +9,7 @@
+   <translation id="IDS_WEB_FONT_FAMILY">'Segoe UI',Arial,AnjaliOldLipi,Rachana,Kartika</translation>
+   <translation id="IDS_WEB_FONT_FAMILY_XP">Arial,AnjaliOldLipi,Rachana,Kartika</translation>
+ </if>
+-<if expr="is_linux">
++<if expr="is_posix">
+   <translation id="IDS_WEB_FONT_FAMILY">Arial,AnjaliOldLipi,Rachana,Kartika,sans-serif</translation>
+ </if>
+ <if expr="is_chromeos">
diff --git a/chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__th.xtb b/chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__th.xtb
new file mode 100644
index 0000000000..fd368ba899
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__th.xtb
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/strings/translations/app_locale_settings_th.xtb.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/strings/translations/app_locale_settings_th.xtb
+@@ -6,7 +6,7 @@
+   <translation id="IDS_WEB_FONT_FAMILY">Tahoma,sans-serif</translation>
+   <translation id="IDS_WEB_FONT_FAMILY_XP">Tahoma,sans-serif</translation>
+ </if>
+-<if expr="is_linux">
++<if expr="is_posix">
+   <translation id="IDS_WEB_FONT_FAMILY">Norasi,Waree,Garuda,Loma,sans-serif</translation>
+ </if>
+ <if expr="is_chromeos">
diff --git a/chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__zh-CN.xtb b/chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__zh-CN.xtb
new file mode 100644
index 0000000000..08cdf660ca
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__zh-CN.xtb
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/strings/translations/app_locale_settings_zh-CN.xtb.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/strings/translations/app_locale_settings_zh-CN.xtb
+@@ -12,7 +12,7 @@
+ <if expr="is_ios">
+   <translation id="IDS_WEB_FONT_FAMILY">Helvetica,PingFang SC,STHeiti,sans-serif</translation>
+ </if>
+-<if expr="is_linux">
++<if expr="is_posix">
+   <translation id="IDS_WEB_FONT_FAMILY">Noto Sans CJK SC, WenQuanYi Zen Hei, sans-serif</translation>
+ </if>
+ <if expr="is_chromeos">
diff --git a/chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__zh-TW.xtb b/chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__zh-TW.xtb
new file mode 100644
index 0000000000..06914b11f3
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_strings_translations_app__locale__settings__zh-TW.xtb
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/strings/translations/app_locale_settings_zh-TW.xtb.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/strings/translations/app_locale_settings_zh-TW.xtb
+@@ -12,7 +12,7 @@
+ <if expr="is_ios">
+   <translation id="IDS_WEB_FONT_FAMILY">Helvetica,PingFang TC,Heiti TC,sans-serif</translation>
+ </if>
+-<if expr="is_linux">
++<if expr="is_posix">
+   <translation id="IDS_WEB_FONT_FAMILY">Noto Sans CJK TC, WenQuanYi Zen Hei, sans-serif</translation>
+   </if>
+ <if expr="is_chromeos">
diff --git a/chromium-wip/patches/patch-ui_views_BUILD.gn b/chromium-wip/patches/patch-ui_views_BUILD.gn
new file mode 100644
index 0000000000..f37ae7c7f2
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_views_BUILD.gn
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/views/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/views/BUILD.gn
+@@ -833,7 +833,6 @@ component("views") {
+       "windows_stationarity_monitor_aura.cc",
+     ]
+     deps += [
+-      "//components/crash/core/common:crash_key",
+       "//ui/aura",
+       "//ui/base/cursor/mojom:cursor_type_shared",
+       "//ui/events",
diff --git a/chromium-wip/patches/patch-ui_views_accessibility_view__accessibility.cc b/chromium-wip/patches/patch-ui_views_accessibility_view__accessibility.cc
new file mode 100644
index 0000000000..eec68281b6
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_views_accessibility_view__accessibility.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/views/accessibility/view_accessibility.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/views/accessibility/view_accessibility.cc
+@@ -34,7 +34,7 @@
+ #include "ui/views/accessibility/view_ax_platform_node_delegate_win.h"
+ #elif BUILDFLAG(IS_MAC)
+ #include "ui/views/accessibility/view_ax_platform_node_delegate_mac.h"
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/views/accessibility/view_ax_platform_node_delegate_auralinux.h"
+ #endif
+ 
+@@ -101,7 +101,7 @@ std::unique_ptr<ViewAccessibility> ViewA
+   return ViewAXPlatformNodeDelegateWin::CreatePlatformSpecific(view);
+ #elif BUILDFLAG(IS_MAC)
+   return ViewAXPlatformNodeDelegateMac::CreatePlatformSpecific(view);
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return ViewAXPlatformNodeDelegateAuraLinux::CreatePlatformSpecific(view);
+ #endif
+ }
diff --git a/chromium-wip/patches/patch-ui_views_controls_prefix__selector.cc b/chromium-wip/patches/patch-ui_views_controls_prefix__selector.cc
new file mode 100644
index 0000000000..27695e998d
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_views_controls_prefix__selector.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/views/controls/prefix_selector.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/views/controls/prefix_selector.cc
+@@ -193,7 +193,7 @@ bool PrefixSelector::ShouldDoLearning() 
+   return false;
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ bool PrefixSelector::SetCompositionFromExistingText(
+     const gfx::Range& range,
+     const std::vector<ui::ImeTextSpan>& ui_ime_text_spans) {
diff --git a/chromium-wip/patches/patch-ui_views_controls_prefix__selector.h b/chromium-wip/patches/patch-ui_views_controls_prefix__selector.h
new file mode 100644
index 0000000000..66c8e7344d
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_views_controls_prefix__selector.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/views/controls/prefix_selector.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/views/controls/prefix_selector.h
+@@ -91,7 +91,7 @@ class VIEWS_EXPORT PrefixSelector : publ
+   ukm::SourceId GetClientSourceForMetrics() const override;
+   bool ShouldDoLearning() override;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   bool SetCompositionFromExistingText(
+       const gfx::Range& range,
+       const std::vector<ui::ImeTextSpan>& ui_ime_text_spans) override;
diff --git a/chromium-wip/patches/patch-ui_views_controls_textfield_textfield.cc b/chromium-wip/patches/patch-ui_views_controls_textfield_textfield.cc
new file mode 100644
index 0000000000..c6fe1aaf22
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_views_controls_textfield_textfield.cc
@@ -0,0 +1,71 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/views/controls/textfield/textfield.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/views/controls/textfield/textfield.cc
+@@ -86,7 +86,7 @@
+ #include "base/win/win_util.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/base/ime/linux/text_edit_command_auralinux.h"
+ #include "ui/base/ime/text_input_flags.h"
+ #include "ui/linux/linux_ui.h"
+@@ -183,7 +183,7 @@ bool IsControlKeyModifier(int flags) {
+ // Control-modified key combination, but we cannot extend it to other platforms
+ // as Control has different meanings and behaviors.
+ // https://crrev.com/2580483002/#msg46
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return flags & ui::EF_CONTROL_DOWN;
+ #else
+   return false;
+@@ -790,7 +790,7 @@ bool Textfield::OnKeyPressed(const ui::K
+     return handled;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (!handled) {
+     if (auto* linux_ui = ui::LinuxUi::instance()) {
+       const auto command =
+@@ -975,7 +975,7 @@ void Textfield::AboutToRequestFocusFromT
+ }
+ 
+ bool Textfield::SkipDefaultKeyEventProcessing(const ui::KeyEvent& event) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Skip any accelerator handling that conflicts with custom keybindings.
+   if (auto* linux_ui = ui::LinuxUi::instance()) {
+     if (IsTextEditCommandEnabled(linux_ui->GetTextEditCommandForEvent(
+@@ -2063,7 +2063,7 @@ bool Textfield::ShouldDoLearning() {
+   return false;
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // TODO(crbug.com/41452689): Implement this method to support Korean IME
+ // reconversion feature on native text fields (e.g. find bar).
+ bool Textfield::SetCompositionFromExistingText(
+@@ -2581,7 +2581,7 @@ ui::TextEditCommand Textfield::GetComman
+ #endif
+         return ui::TextEditCommand::DELETE_BACKWARD;
+       }
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       // Only erase by line break on Linux and ChromeOS.
+       if (shift) {
+         return ui::TextEditCommand::DELETE_TO_BEGINNING_OF_LINE;
+@@ -2589,7 +2589,7 @@ ui::TextEditCommand Textfield::GetComman
+ #endif
+       return ui::TextEditCommand::DELETE_WORD_BACKWARD;
+     case ui::VKEY_DELETE:
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       // Only erase by line break on Linux and ChromeOS.
+       if (shift && control) {
+         return ui::TextEditCommand::DELETE_TO_END_OF_LINE;
diff --git a/chromium-wip/patches/patch-ui_views_controls_textfield_textfield.h b/chromium-wip/patches/patch-ui_views_controls_textfield_textfield.h
new file mode 100644
index 0000000000..98c4919162
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_views_controls_textfield_textfield.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/views/controls/textfield/textfield.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/views/controls/textfield/textfield.h
+@@ -48,7 +48,7 @@
+ #include "ui/views/view_observer.h"
+ #include "ui/views/word_lookup_client.h"
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include <vector>
+ #endif
+ 
+@@ -478,7 +478,7 @@ class VIEWS_EXPORT Textfield : public Vi
+   // Set whether the text should be used to improve typing suggestions.
+   void SetShouldDoLearning(bool value) { should_do_learning_ = value; }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   bool SetCompositionFromExistingText(
+       const gfx::Range& range,
+       const std::vector<ui::ImeTextSpan>& ui_ime_text_spans) override;
diff --git a/chromium-wip/patches/patch-ui_views_examples_widget__example.cc b/chromium-wip/patches/patch-ui_views_examples_widget__example.cc
new file mode 100644
index 0000000000..c61a681f2b
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_views_examples_widget__example.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/views/examples/widget_example.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/views/examples/widget_example.cc
+@@ -51,7 +51,7 @@ void WidgetExample::CreateExampleView(Vi
+   modal_button->SetCallback(
+       base::BindRepeating(&WidgetExample::CreateDialogWidget,
+                           base::Unretained(this), modal_button, true));
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Windows does not support TYPE_CONTROL top-level widgets.
+   LabelButton* control_button = BuildButton(
+       container, GetStringUTF16(IDS_WIDGET_CHILD_WIDGET_BUTTON_LABEL));
diff --git a/chromium-wip/patches/patch-ui_views_focus_focus__manager.cc b/chromium-wip/patches/patch-ui_views_focus_focus__manager.cc
new file mode 100644
index 0000000000..d8b6f3b815
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_views_focus_focus__manager.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/views/focus/focus_manager.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/views/focus/focus_manager.cc
+@@ -606,7 +606,7 @@ bool FocusManager::RedirectAcceleratorTo
+     return false;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Processing an accelerator can delete things. Because we
+   // need these objects afterwards on Linux, save widget_ as weak pointer and
+   // save the close_on_deactivate property value of widget_delegate in a
+@@ -621,7 +621,7 @@ bool FocusManager::RedirectAcceleratorTo
+   const bool accelerator_processed =
+       focus_manager->ProcessAccelerator(accelerator);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Need to manually close the bubble widget on Linux. On Linux when the
+   // bubble is shown, the main widget remains active. Because of that when
+   // focus is set to the main widget to process accelerator, the main widget
diff --git a/chromium-wip/patches/patch-ui_views_style_platform__style.cc b/chromium-wip/patches/patch-ui_views_style_platform__style.cc
new file mode 100644
index 0000000000..2544a4ad4c
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_views_style_platform__style.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/views/style/platform_style.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/views/style/platform_style.cc
+@@ -23,7 +23,7 @@
+ #include "ui/views/controls/focusable_border.h"
+ #include "ui/views/controls/scrollbar/scroll_bar_views.h"
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/views/controls/scrollbar/overlay_scroll_bar.h"
+ #endif
+ #endif
+@@ -35,7 +35,7 @@ namespace views {
+ // static
+ std::unique_ptr<ScrollBar> PlatformStyle::CreateScrollBar(
+     ScrollBar::Orientation orientation) {
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return std::make_unique<OverlayScrollBar>(orientation);
+ #else
+   return std::make_unique<ScrollBarViews>(orientation);
diff --git a/chromium-wip/patches/patch-ui_views_style_platform__style.h b/chromium-wip/patches/patch-ui_views_style_platform__style.h
new file mode 100644
index 0000000000..def9b9eabb
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_views_style_platform__style.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/views/style/platform_style.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/views/style/platform_style.h
+@@ -84,7 +84,7 @@ class VIEWS_EXPORT PlatformStyle {
+   // Default setting at bubble creation time for whether arrow will be adjusted
+   // for bubbles going off-screen to bring more bubble area into view. Linux
+   // clips bubble windows that extend outside their parent window bounds.
+-  static constexpr bool kAdjustBubbleIfOffscreen = !BUILDFLAG(IS_LINUX);
++  static constexpr bool kAdjustBubbleIfOffscreen = (!BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD));
+ 
+   // Default focus behavior on the platform.
+   static constexpr View::FocusBehavior kDefaultFocusBehavior =
diff --git a/chromium-wip/patches/patch-ui_views_test_ui__controls__factory__desktop__aura__ozone.cc b/chromium-wip/patches/patch-ui_views_test_ui__controls__factory__desktop__aura__ozone.cc
new file mode 100644
index 0000000000..4033e7ab42
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_views_test_ui__controls__factory__desktop__aura__ozone.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/views/test/ui_controls_factory_desktop_aura_ozone.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/views/test/ui_controls_factory_desktop_aura_ozone.cc
+@@ -237,7 +237,7 @@ bool SendMouseClick(MouseButton type, gf
+                          window_hint);
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // static
+ void ForceUseScreenCoordinatesOnce() {
+   g_ozone_ui_controls_test_helper->ForceUseScreenCoordinatesOnce();
diff --git a/chromium-wip/patches/patch-ui_views_views__delegate.cc b/chromium-wip/patches/patch-ui_views_views__delegate.cc
new file mode 100644
index 0000000000..c7b76a0fb5
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_views_views__delegate.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/views/views_delegate.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/views/views_delegate.cc
+@@ -92,7 +92,7 @@ bool ViewsDelegate::IsWindowInMetro(gfx:
+   return false;
+ }
+ #elif BUILDFLAG(ENABLE_DESKTOP_AURA) && \
+-    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
++    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))
+ gfx::ImageSkia* ViewsDelegate::GetDefaultWindowIcon() const {
+   return nullptr;
+ }
diff --git a/chromium-wip/patches/patch-ui_views_views__delegate.h b/chromium-wip/patches/patch-ui_views_views__delegate.h
new file mode 100644
index 0000000000..6efb5a802c
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_views_views__delegate.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/views/views_delegate.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/views/views_delegate.h
+@@ -143,7 +143,7 @@ class VIEWS_EXPORT ViewsDelegate {
+   // environment.
+   virtual bool IsWindowInMetro(gfx::NativeWindow window) const;
+ #elif BUILDFLAG(ENABLE_DESKTOP_AURA) && \
+-    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
++    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))
+   virtual gfx::ImageSkia* GetDefaultWindowIcon() const;
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.cc b/chromium-wip/patches/patch-ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.cc
new file mode 100644
index 0000000000..cf65aeacac
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.cc
+@@ -203,7 +203,7 @@ DragOperation DesktopDragDropClientOzone
+   return selected_operation_;
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void DesktopDragDropClientOzone::UpdateDragImage(const gfx::ImageSkia& image,
+                                                  const gfx::Vector2d& offset) {
+   DCHECK(drag_handler_);
diff --git a/chromium-wip/patches/patch-ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.h b/chromium-wip/patches/patch-ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.h
new file mode 100644
index 0000000000..caa02ae017
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.h
+@@ -67,7 +67,7 @@ class VIEWS_EXPORT DesktopDragDropClient
+     // The offset of |drag_widget_| relative to the mouse position.
+     gfx::Vector2d offset;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // The last received drag location.  The drag widget is moved asynchronously
+     // so its position is updated when the UI thread has time for that.  When
+     // the first change to the location happens, a call to UpdateDragWidget()
+@@ -88,7 +88,7 @@ class VIEWS_EXPORT DesktopDragDropClient
+       const gfx::Point& root_location,
+       int allowed_operations,
+       ui::mojom::DragEventSource source) override;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   void UpdateDragImage(const gfx::ImageSkia& image,
+                        const gfx::Vector2d& offset) override;
+ #endif
diff --git a/chromium-wip/patches/patch-ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc b/chromium-wip/patches/patch-ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc
new file mode 100644
index 0000000000..26f5ff3058
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
+@@ -51,7 +51,7 @@
+ #include "ui/wm/core/window_util.h"
+ #include "ui/wm/public/window_move_client.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone_linux.h"
+ #endif
+ 
+@@ -358,7 +358,7 @@ std::unique_ptr<aura::client::DragDropCl
+ DesktopWindowTreeHostPlatform::CreateDragDropClient() {
+   ui::WmDragHandler* drag_handler = ui::GetWmDragHandler(*(platform_window()));
+   std::unique_ptr<DesktopDragDropClientOzone> drag_drop_client =
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       std::make_unique<DesktopDragDropClientOzoneLinux>(window(), drag_handler);
+ #else
+       std::make_unique<DesktopDragDropClientOzone>(window(), drag_handler);
+@@ -1190,7 +1190,7 @@ bool DesktopWindowTreeHostPlatform::Rota
+ // DesktopWindowTreeHost:
+ 
+ // Linux subclasses this host and adds some Linux specific bits.
+-#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD)
+ // static
+ DesktopWindowTreeHost* DesktopWindowTreeHost::Create(
+     internal::NativeWidgetDelegate* native_widget_delegate,
diff --git a/chromium-wip/patches/patch-ui_views_widget_root__view.cc b/chromium-wip/patches/patch-ui_views_widget_root__view.cc
new file mode 100644
index 0000000000..a30722d7c6
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_views_widget_root__view.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/views/widget/root_view.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/views/widget/root_view.cc
+@@ -169,7 +169,7 @@ class AnnounceTextView : public View {
+ #if BUILDFLAG(IS_CHROMEOS)
+     // On ChromeOS, kAlert role can invoke an unnecessary event on reparenting.
+     GetViewAccessibility().SetRole(ax::mojom::Role::kStaticText);
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // TODO(crbug.com/40658933): Use live regions (do not use alerts).
+     // May require setting kLiveStatus, kContainerLiveStatus to "polite".
+     GetViewAccessibility().SetRole(ax::mojom::Role::kAlert);
diff --git a/chromium-wip/patches/patch-ui_views_widget_widget.cc b/chromium-wip/patches/patch-ui_views_widget_widget.cc
new file mode 100644
index 0000000000..f6eff97436
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_views_widget_widget.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/views/widget/widget.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/views/widget/widget.cc
+@@ -63,7 +63,7 @@
+ #include "ui/views/widget/widget_removals_observer.h"
+ #include "ui/views/window/dialog_delegate.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/linux/linux_ui.h"
+ #endif
+ 
+@@ -2493,7 +2493,7 @@ const ui::NativeTheme* Widget::GetNative
+     return parent_->GetNativeTheme();
+   }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (auto* linux_ui_theme =
+           ui::LinuxUiTheme::GetForWindow(GetNativeWindow())) {
+     return linux_ui_theme->GetNativeTheme();
diff --git a/chromium-wip/patches/patch-ui_views_widget_widget.h b/chromium-wip/patches/patch-ui_views_widget_widget.h
new file mode 100644
index 0000000000..18e283dfcb
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_views_widget_widget.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/views/widget/widget.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/views/widget/widget.h
+@@ -491,7 +491,7 @@ class VIEWS_EXPORT Widget : public inter
+     bool force_system_menu_for_frameless = false;
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // Only used by X11, for root level windows. Specifies the res_name and
+     // res_class fields, respectively, of the WM_CLASS window property. Controls
+     // window grouping and desktop file matching in Linux window managers.
diff --git a/chromium-wip/patches/patch-ui_views_window_default__frame__view.cc b/chromium-wip/patches/patch-ui_views_window_default__frame__view.cc
new file mode 100644
index 0000000000..6f92496a14
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_views_window_default__frame__view.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/views/window/default_frame_view.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/views/window/default_frame_view.cc
+@@ -285,7 +285,7 @@ int DefaultFrameView::NonClientTopBorder
+ int DefaultFrameView::CaptionButtonY() const {
+   // Maximized buttons start at window top so that even if their images aren't
+   // drawn flush with the screen edge, they still obey Fitts' Law.
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return FrameBorderThickness();
+ #else
+   return frame_->IsMaximized() ? FrameBorderThickness() : kFrameShadowThickness;
diff --git a/chromium-wip/patches/patch-ui_views_window_dialog__delegate.cc b/chromium-wip/patches/patch-ui_views_window_dialog__delegate.cc
new file mode 100644
index 0000000000..717e828a1b
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_views_window_dialog__delegate.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/views/window/dialog_delegate.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/views/window/dialog_delegate.cc
+@@ -108,7 +108,7 @@ Widget* DialogDelegate::CreateDialogWidg
+ 
+ // static
+ bool DialogDelegate::CanSupportCustomFrame(gfx::NativeView parent) {
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(ENABLE_DESKTOP_AURA)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(ENABLE_DESKTOP_AURA)
+   // The new style doesn't support unparented dialogs on Linux desktop.
+   return parent != nullptr;
+ #else
diff --git a/chromium-wip/patches/patch-ui_views_window_frame__background.cc b/chromium-wip/patches/patch-ui_views_window_frame__background.cc
new file mode 100644
index 0000000000..8ec922e6c2
--- /dev/null
+++ b/chromium-wip/patches/patch-ui_views_window_frame__background.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- ui/views/window/frame_background.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ ui/views/window/frame_background.cc
+@@ -110,7 +110,7 @@ void FrameBackground::PaintMaximized(gfx
+                                      int width) const {
+ // Fill the top with the frame color first so we have a constant background
+ // for areas not covered by the theme image.
+-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \
+     BUILDFLAG(ENABLE_DESKTOP_AURA)
+   ui::NativeTheme::FrameTopAreaExtraParams frame_top_area;
+   frame_top_area.use_custom_frame = use_custom_frame_;
diff --git a/chromium-wip/patches/patch-v8_BUILD.gn b/chromium-wip/patches/patch-v8_BUILD.gn
new file mode 100644
index 0000000000..4de8070b00
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_BUILD.gn
@@ -0,0 +1,139 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/BUILD.gn.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/BUILD.gn
+@@ -1012,6 +1012,9 @@ external_v8_defines = [
+   "V8_TARGET_OS_MACOS",
+   "V8_TARGET_OS_WIN",
+   "V8_TARGET_OS_CHROMEOS",
++  "V8_TARGET_OS_OPENBSD",
++  "V8_TARGET_OS_FREEBSD",
++  "V8_TARGET_OS_NETBSD",
+ ]
+ 
+ enabled_external_v8_defines = [
+@@ -1085,6 +1088,15 @@ if (target_os == "android") {
+ } else if (target_os == "chromeos") {
+   enabled_external_v8_defines += [ "V8_HAVE_TARGET_OS" ]
+   enabled_external_v8_defines += [ "V8_TARGET_OS_CHROMEOS" ]
++} else if (target_os == "openbsd") {
++  enabled_external_v8_defines += [ "V8_HAVE_TARGET_OS" ]
++  enabled_external_v8_defines += [ "V8_TARGET_OS_OPENBSD" ]
++} else if (target_os == "freebsd") {
++  enabled_external_v8_defines += [ "V8_HAVE_TARGET_OS" ]
++  enabled_external_v8_defines += [ "V8_TARGET_OS_FREEBSD" ]
++} else if (target_os == "netbsd") {
++  enabled_external_v8_defines += [ "V8_HAVE_TARGET_OS" ]
++  enabled_external_v8_defines += [ "V8_TARGET_OS_NETBSD" ]
+ }
+ 
+ disabled_external_v8_defines = external_v8_defines - enabled_external_v8_defines
+@@ -2456,6 +2468,23 @@ action("generate_bytecode_builtins_list"
+   ]
+ }
+ 
++action("run_paxctl_mksnapshot") {
++    deps = [ ":mksnapshot($v8_snapshot_toolchain)" ]
++
++    script = "tools/run-paxctl.py"
++    stamp = "$target_gen_dir/paxctl_stamp"
++    outputs = [ stamp ]
++
++    sources = []
++    data = []
++
++    args = [
++      rebase_path(stamp, root_build_dir), "/usr/sbin/paxctl", "+m", "./" + rebase_path(get_label_info(":mksnapshot($v8_snapshot_toolchain)",
++                                        "root_out_dir") + "/mksnapshot",
++                         root_build_dir),
++    ]
++}
++
+ # Template to generate different V8 snapshots based on different runtime flags.
+ # Can be invoked with run_mksnapshot(<name>). The target will resolve to
+ # run_mksnapshot_<name>. If <name> is "default", no file suffixes will be used.
+@@ -2474,7 +2503,11 @@ template("run_mksnapshot") {
+     suffix = "_$name"
+   }
+   action("run_mksnapshot_" + name) {
+-    deps = [ ":mksnapshot($v8_snapshot_toolchain)" ]
++    if (target_os == "netbsd") {
++      deps = [ ":mksnapshot($v8_snapshot_toolchain)", ":run_paxctl_mksnapshot" ]
++    } else {
++      deps = [ ":mksnapshot($v8_snapshot_toolchain)" ]
++    }
+     if (v8_verify_deterministic_mksnapshot) {
+       # We archive the snapshot executable when verifying snapshot
+       # determinism to ease debugging.
+@@ -2604,6 +2637,12 @@ template("run_mksnapshot") {
+       if (!v8_enable_builtins_profiling && v8_enable_builtins_reordering) {
+         args += [ "--reorder-builtins" ]
+       }
++
++      if (v8_current_cpu == "x86") {
++        args -= [
++          "--abort-on-bad-builtin-profile-data",
++        ]
++      }
+     }
+ 
+     if (v8_enable_turboshaft_csa) {
+@@ -4732,7 +4771,7 @@ v8_header_set("v8_internal_headers") {
+       # iOS Xcode simulator builds run on an x64 target. iOS and macOS are both
+       # based on Darwin and thus POSIX-compliant to a similar degree.
+       if (is_linux || is_chromeos || is_mac || is_ios ||
+-          target_os == "freebsd") {
++          target_os == "freebsd" || target_os == "netbsd") {
+         sources += [ "src/trap-handler/handler-inside-posix.h" ]
+       } else if (is_win) {
+         sources += [ "src/trap-handler/handler-inside-win.h" ]
+@@ -6117,7 +6156,7 @@ v8_source_set("v8_base_without_compiler"
+       # iOS Xcode simulator builds run on an x64 target. iOS and macOS are both
+       # based on Darwin and thus POSIX-compliant to a similar degree.
+       if (is_linux || is_chromeos || is_mac || is_ios ||
+-          target_os == "freebsd") {
++          target_os == "freebsd" || target_os == "netbsd") {
+         sources += [
+           "src/trap-handler/handler-inside-posix.cc",
+           "src/trap-handler/handler-outside-posix.cc",
+@@ -6765,7 +6804,7 @@ v8_component("v8_libbase") {
+     }
+   }
+ 
+-  if (is_linux || is_chromeos) {
++  if ((is_linux || is_chromeos) && !is_bsd) {
+     sources += [
+       "src/base/debug/stack_trace_posix.cc",
+       "src/base/platform/platform-linux.cc",
+@@ -6776,6 +6815,27 @@ v8_component("v8_libbase") {
+       "dl",
+       "rt",
+     ]
++  } else if (is_openbsd) {
++    sources += [
++      "src/base/debug/stack_trace_posix.cc",
++      "src/base/platform/platform-openbsd.cc",
++    ]
++    libs = [ "execinfo" ]
++  } else if (is_netbsd) {
++    sources += [
++      "src/base/debug/stack_trace_posix.cc",
++      "src/base/platform/platform-openbsd.cc",
++    ]
++    libs = [
++      "rt",
++      "execinfo",
++    ]
++  } else if (is_freebsd) {
++    sources += [
++      "src/base/debug/stack_trace_posix.cc",
++      "src/base/platform/platform-freebsd.cc",
++    ]
++    libs = [ "execinfo" ]
+   } else if (current_os == "aix") {
+     sources += [
+       "src/base/debug/stack_trace_posix.cc",
diff --git a/chromium-wip/patches/patch-v8_include_v8-internal.h b/chromium-wip/patches/patch-v8_include_v8-internal.h
new file mode 100644
index 0000000000..dac927a67d
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_include_v8-internal.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/include/v8-internal.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/include/v8-internal.h
+@@ -232,7 +232,7 @@ using SandboxedPointer_t = Address;
+ #ifdef V8_ENABLE_SANDBOX
+ 
+ // Size of the sandbox, excluding the guard regions surrounding it.
+-#if defined(V8_TARGET_OS_ANDROID)
++#if (defined(V8_TARGET_OS_ANDROID) || defined(V8_TARGET_OS_OPENBSD))
+ // On Android, most 64-bit devices seem to be configured with only 39 bits of
+ // virtual address space for userspace. As such, limit the sandbox to 128GB (a
+ // quarter of the total available address space).
diff --git a/chromium-wip/patches/patch-v8_include_v8config.h b/chromium-wip/patches/patch-v8_include_v8config.h
new file mode 100644
index 0000000000..5f2dff37f8
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_include_v8config.h
@@ -0,0 +1,59 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/include/v8config.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/include/v8config.h
+@@ -207,6 +207,9 @@ path. Add it with -I<path> to the comman
+   && !defined(V8_TARGET_OS_IOS) \
+   && !defined(V8_TARGET_OS_TVOS) \
+   && !defined(V8_TARGET_OS_LINUX) \
++  && !defined(V8_TARGET_OS_OPENBSD) \
++  && !defined(V8_TARGET_OS_FREEBSD) \
++  && !defined(V8_TARGET_OS_NETBSD) \
+   && !defined(V8_TARGET_OS_MACOS) \
+   && !defined(V8_TARGET_OS_WIN) \
+   && !defined(V8_TARGET_OS_CHROMEOS)
+@@ -220,6 +223,9 @@ path. Add it with -I<path> to the comman
+   || defined(V8_TARGET_OS_IOS) \
+   || defined(V8_TARGET_OS_TVOS) \
+   || defined(V8_TARGET_OS_LINUX) \
++  || defined(V8_TARGET_OS_OPENBSD) \
++  || defined(V8_TARGET_OS_FREEBSD) \
++  || defined(V8_TARGET_OS_NETBSD) \
+   || defined(V8_TARGET_OS_MACOS) \
+   || defined(V8_TARGET_OS_WIN) \
+   || defined(V8_TARGET_OS_CHROMEOS)
+@@ -247,6 +253,22 @@ path. Add it with -I<path> to the comman
+ # define V8_TARGET_OS_LINUX
+ #endif
+ 
++#ifdef V8_OS_OPENBSD
++# define V8_TARGET_OS_OPENBSD
++# define V8_TARGET_OS_BSD
++#endif
++
++#ifdef V8_OS_FREEBSD
++# define V8_TARGET_OS_OPENBSD
++# define V8_TARGET_OS_BSD
++#endif
++
++#ifdef V8_OS_NETBSD
++# define V8_TARGET_OS_OPENBSD
++# define V8_TARGET_OS_NETBSD
++# define V8_TARGET_OS_BSD
++#endif
++
+ #ifdef V8_OS_MACOS
+ # define V8_TARGET_OS_MACOS
+ #endif
+@@ -394,6 +416,7 @@ path. Add it with -I<path> to the comman
+ #if (defined(_M_X64) || defined(__x86_64__)            /* x64 (everywhere) */  \
+      || ((defined(__AARCH64EL__) || defined(_M_ARM64)) /* arm64, but ... */    \
+          && !defined(_WIN32)))                         /* not on windows */    \
++     && !defined(__OpenBSD__)                          /* not on OpenBSD */    \
+      && !defined(COMPONENT_BUILD)                      /* no component build */\
+      && __clang_major__ >= 17                          /* clang >= 17 */
+ # define V8_HAS_ATTRIBUTE_PRESERVE_MOST (__has_attribute(preserve_most))
diff --git a/chromium-wip/patches/patch-v8_src_api_api.cc b/chromium-wip/patches/patch-v8_src_api_api.cc
new file mode 100644
index 0000000000..d26d3aeab8
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_src_api_api.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/src/api/api.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/src/api/api.cc
+@@ -159,7 +159,7 @@
+ #include "src/objects/intl-objects.h"
+ #endif  // V8_INTL_SUPPORT
+ 
+-#if V8_OS_LINUX || V8_OS_DARWIN || V8_OS_FREEBSD
++#if V8_OS_LINUX || V8_OS_DARWIN || V8_OS_FREEBSD || V8_OS_OPENBSD || V8_OS_NETBSD
+ #include <signal.h>
+ #include <unistd.h>
+ 
+@@ -6466,7 +6466,7 @@ bool v8::V8::Initialize(const int build_
+   return true;
+ }
+ 
+-#if V8_OS_LINUX || V8_OS_DARWIN
++#if V8_OS_LINUX || V8_OS_DARWIN || V8_OS_FREEBSD || V8_OS_OPENBSD|| V8_OS_NETBSD
+ bool TryHandleWebAssemblyTrapPosix(int sig_code, siginfo_t* info,
+                                    void* context) {
+ #if V8_ENABLE_WEBASSEMBLY && V8_TRAP_HANDLER_SUPPORTED
diff --git a/chromium-wip/patches/patch-v8_src_base_atomicops.h b/chromium-wip/patches/patch-v8_src_base_atomicops.h
new file mode 100644
index 0000000000..697b3fd084
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_src_base_atomicops.h
@@ -0,0 +1,30 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/src/base/atomicops.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/src/base/atomicops.h
+@@ -57,10 +57,10 @@ using Atomic64 = SbAtomic64;
+ using Atomic8 = char;
+ using Atomic16 = int16_t;
+ using Atomic32 = int32_t;
+-#if defined(V8_HOST_ARCH_64_BIT)
++#if defined(V8_HOST_ARCH_64_BIT) || defined(V8_OS_OPENBSD)
+ // We need to be able to go between Atomic64 and AtomicWord implicitly.  This
+ // means Atomic64 and AtomicWord should be the same type on 64-bit.
+-#if defined(__ILP32__)
++#if defined(__ILP32__) && !defined(V8_OS_OPENBSD)
+ using Atomic64 = int64_t;
+ #else
+ using Atomic64 = intptr_t;
+@@ -266,7 +266,7 @@ inline Atomic32 SeqCst_Load(volatile con
+                                    std::memory_order_seq_cst);
+ }
+ 
+-#if defined(V8_HOST_ARCH_64_BIT)
++#if defined(V8_HOST_ARCH_64_BIT) || defined(V8_OS_OPENBSD)
+ 
+ inline Atomic64 Relaxed_CompareAndSwap(volatile Atomic64* ptr,
+                                        Atomic64 old_value, Atomic64 new_value) {
diff --git a/chromium-wip/patches/patch-v8_src_base_platform_memory.h b/chromium-wip/patches/patch-v8_src_base_platform_memory.h
new file mode 100644
index 0000000000..c168706036
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_src_base_platform_memory.h
@@ -0,0 +1,24 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/src/base/platform/memory.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/src/base/platform/memory.h
+@@ -21,13 +21,13 @@
+ #include <malloc/malloc.h>
+ #elif V8_OS_OPENBSD
+ #include <sys/malloc.h>
+-#elif V8_OS_ZOS
++#elif (V8_OS_ZOS || V8_OS_BSD)
+ #include <stdlib.h>
+ #else
+ #include <malloc.h>
+ #endif
+ 
+-#if (V8_OS_POSIX && !V8_OS_AIX && !V8_OS_SOLARIS && !V8_OS_ZOS && !V8_OS_OPENBSD) || V8_OS_WIN
++#if (V8_OS_POSIX && !V8_OS_AIX && !V8_OS_SOLARIS && !V8_OS_ZOS && !V8_OS_BSD) || V8_OS_WIN
+ #define V8_HAS_MALLOC_USABLE_SIZE 1
+ #endif
+ 
diff --git a/chromium-wip/patches/patch-v8_src_base_platform_platform-freebsd.cc b/chromium-wip/patches/patch-v8_src_base_platform_platform-freebsd.cc
new file mode 100644
index 0000000000..85d342cf4e
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_src_base_platform_platform-freebsd.cc
@@ -0,0 +1,38 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/src/base/platform/platform-freebsd.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/src/base/platform/platform-freebsd.cc
+@@ -43,14 +43,10 @@ TimezoneCache* OS::CreateTimezoneCache()
+   return new PosixDefaultTimezoneCache();
+ }
+ 
+-static unsigned StringToLong(char* buffer) {
+-  return static_cast<unsigned>(strtol(buffer, nullptr, 16));
+-}
+-
+ std::vector<OS::SharedLibraryAddress> OS::GetSharedLibraryAddresses() {
+   std::vector<SharedLibraryAddress> result;
+   int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_VMMAP, getpid()};
+-  size_t miblen = sizeof(mib) / sizeof(mib[0]);
++  unsigned int miblen = sizeof(mib) / sizeof(mib[0]);
+   size_t buffer_size;
+   if (sysctl(mib, miblen, nullptr, &buffer_size, nullptr, 0) == 0) {
+     // Overallocate the buffer by 1/3 to account for concurrent
+@@ -82,8 +78,13 @@ std::vector<OS::SharedLibraryAddress> OS
+             lib_name = std::string(path);
+           }
+           result.push_back(SharedLibraryAddress(
++#if defined(__i386__) || defined(OS_FREEBSD)
++              lib_name, static_cast<uintptr_t>(map->kve_start),
++              static_cast<uintptr_t>(map->kve_end)));
++#else
+               lib_name, reinterpret_cast<uintptr_t>(map->kve_start),
+               reinterpret_cast<uintptr_t>(map->kve_end)));
++#endif
+         }
+ 
+         start += ssize;
diff --git a/chromium-wip/patches/patch-v8_src_base_platform_platform-openbsd.cc b/chromium-wip/patches/patch-v8_src_base_platform_platform-openbsd.cc
new file mode 100644
index 0000000000..940fe86566
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_src_base_platform_platform-openbsd.cc
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/src/base/platform/platform-openbsd.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/src/base/platform/platform-openbsd.cc
+@@ -6,6 +6,9 @@
+ // POSIX-compatible parts, the implementation is in platform-posix.cc.
+ 
+ #include <pthread.h>
++#if !defined(__NetBSD__)
++#include <pthread_np.h>
++#endif
+ #include <semaphore.h>
+ #include <signal.h>
+ #include <stdlib.h>
+@@ -122,6 +125,34 @@ void OS::SignalCodeMovingGC() {
+ 
+ void OS::AdjustSchedulingParams() {}
+ 
++// static
++Stack::StackSlot Stack::ObtainCurrentThreadStackStart() {
++#if defined(__NetBSD__)
++  pthread_attr_t attr;
++  int error;
++  pthread_attr_init(&attr);
++  error = pthread_attr_get_np(pthread_self(), &attr);
++  if (!error) {
++    void* base;
++    size_t size;
++    error = pthread_attr_getstack(&attr, &base, &size);
++    CHECK(!error);
++    pthread_attr_destroy(&attr);
++    return reinterpret_cast<uint8_t*>(base) + size;
++  }
++  pthread_attr_destroy(&attr);
++  return nullptr;
++#else
++  stack_t ss;
++  void *base;
++  if (pthread_stackseg_np(pthread_self(), &ss) != 0)
++    return nullptr;
++
++  base = (void*)((size_t) ss.ss_sp - ss.ss_size);
++  return reinterpret_cast<uint8_t*>(base) + ss.ss_size;
++#endif
++}
++
+ std::optional<OS::MemoryRange> OS::GetFirstFreeMemoryRangeWithin(
+     OS::Address boundary_start, OS::Address boundary_end, size_t minimum_size,
+     size_t alignment) {
diff --git a/chromium-wip/patches/patch-v8_src_base_platform_platform-posix.cc b/chromium-wip/patches/patch-v8_src_base_platform_platform-posix.cc
new file mode 100644
index 0000000000..195538516a
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_src_base_platform_platform-posix.cc
@@ -0,0 +1,82 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/src/base/platform/platform-posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/src/base/platform/platform-posix.cc
+@@ -78,9 +78,11 @@
+ #include <sys/syscall.h>
+ #endif
+ 
+-#if V8_OS_FREEBSD || V8_OS_DARWIN || V8_OS_OPENBSD || V8_OS_SOLARIS
++#if V8_OS_FREEBSD || V8_OS_DARWIN || V8_OS_BSD || V8_OS_SOLARIS
++#ifndef MAP_ANONYMOUS
+ #define MAP_ANONYMOUS MAP_ANON
+ #endif
++#endif
+ 
+ #if defined(V8_OS_SOLARIS)
+ #if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE > 2) || defined(__EXTENSIONS__)
+@@ -353,6 +355,13 @@ void OS::SetRandomMmapSeed(int64_t seed)
+   }
+ }
+ 
++#if V8_OS_OPENBSD
++// Allow OpenBSD's mmap to select a random address on OpenBSD
++// static
++void* OS::GetRandomMmapAddr() {
++  return nullptr;
++}
++#else
+ // static
+ void* OS::GetRandomMmapAddr() {
+   uintptr_t raw_addr;
+@@ -451,6 +460,7 @@ void* OS::GetRandomMmapAddr() {
+ #endif
+   return reinterpret_cast<void*>(raw_addr);
+ }
++#endif
+ 
+ // TODO(bbudge) Move Cygwin and Fuchsia stuff into platform-specific files.
+ #if !V8_OS_CYGWIN && !V8_OS_FUCHSIA
+@@ -739,7 +749,7 @@ void OS::DestroySharedMemoryHandle(Platf
+ #if !V8_OS_ZOS
+ // static
+ bool OS::HasLazyCommits() {
+-#if V8_OS_AIX || V8_OS_LINUX || V8_OS_DARWIN
++#if V8_OS_AIX || V8_OS_LINUX || V8_OS_DARWIN || V8_OS_BSD
+   return true;
+ #else
+   // TODO(bbudge) Return true for all POSIX platforms.
+@@ -1194,7 +1204,11 @@ Thread::Thread(const Options& options)
+       stack_size_(options.stack_size()),
+       priority_(options.priority()),
+       start_semaphore_(nullptr) {
++#if !defined(V8_OS_NETBSD)
+   const int min_stack_size = static_cast<int>(PTHREAD_STACK_MIN);
++#else
++  const int min_stack_size = static_cast<int>(sysconf(_SC_THREAD_STACK_MIN));
++#endif
+   if (stack_size_ > 0) stack_size_ = std::max(stack_size_, min_stack_size);
+   set_name(options.name());
+ }
+@@ -1209,7 +1223,7 @@ static void SetThreadName(const char* na
+   pthread_set_name_np(pthread_self(), name);
+ #elif V8_OS_NETBSD
+   static_assert(Thread::kMaxThreadNameLength <= PTHREAD_MAX_NAMELEN_NP);
+-  pthread_setname_np(pthread_self(), "%s", name);
++  pthread_setname_np(pthread_self(), "%s", (void *)name);
+ #elif V8_OS_DARWIN
+   // pthread_setname_np is only available in 10.6 or later, so test
+   // for it at runtime.
+@@ -1388,7 +1402,7 @@ void Thread::SetThreadLocal(LocalStorage
+ // keep this version in POSIX as most Linux-compatible derivatives will
+ // support it. MacOS and FreeBSD are different here.
+ #if !defined(V8_OS_FREEBSD) && !defined(V8_OS_DARWIN) && !defined(_AIX) && \
+-    !defined(V8_OS_SOLARIS)
++    !defined(V8_OS_SOLARIS) && !defined(V8_OS_OPENBSD) && !defined(V8_OS_NETBSD)
+ 
+ namespace {
+ #if DEBUG
diff --git a/chromium-wip/patches/patch-v8_src_base_strings.h b/chromium-wip/patches/patch-v8_src_base_strings.h
new file mode 100644
index 0000000000..8604a7933d
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_src_base_strings.h
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/src/base/strings.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/src/base/strings.h
+@@ -8,6 +8,9 @@
+ #include "src/base/base-export.h"
+ #include "src/base/macros.h"
+ #include "src/base/vector.h"
++#if defined(__NetBSD__)
++#include <stdarg.h>
++#endif
+ 
+ namespace v8 {
+ namespace base {
diff --git a/chromium-wip/patches/patch-v8_src_base_sys-info.cc b/chromium-wip/patches/patch-v8_src_base_sys-info.cc
new file mode 100644
index 0000000000..79a08b7886
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_src_base_sys-info.cc
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/src/base/sys-info.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/src/base/sys-info.cc
+@@ -35,8 +35,12 @@ namespace base {
+ 
+ // static
+ int SysInfo::NumberOfProcessors() {
++#if V8_OS_OPENBSD || V8_OS_NETBSD
+ #if V8_OS_OPENBSD
++  int mib[2] = {CTL_HW, HW_NCPUONLINE};
++#else
+   int mib[2] = {CTL_HW, HW_NCPU};
++#endif
+   int ncpu = 0;
+   size_t len = sizeof(ncpu);
+   if (sysctl(mib, arraysize(mib), &ncpu, &len, nullptr, 0) != 0) {
diff --git a/chromium-wip/patches/patch-v8_src_base_utils_random-number-generator.cc b/chromium-wip/patches/patch-v8_src_base_utils_random-number-generator.cc
new file mode 100644
index 0000000000..cd3e03b6f0
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_src_base_utils_random-number-generator.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/src/base/utils/random-number-generator.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/src/base/utils/random-number-generator.cc
+@@ -56,7 +56,7 @@ RandomNumberGenerator::RandomNumberGener
+   DCHECK_EQ(0, result);
+   USE(result);
+   SetSeed((static_cast<int64_t>(first_half) << 32) + second_half);
+-#elif V8_OS_DARWIN || V8_OS_FREEBSD || V8_OS_OPENBSD
++#elif V8_OS_DARWIN || V8_OS_FREEBSD || V8_OS_OPENBSD || V8_OS_NETBSD
+   // Despite its prefix suggests it is not RC4 algorithm anymore.
+   // It always succeeds while having decent performance and
+   // no file descriptor involved.
diff --git a/chromium-wip/patches/patch-v8_src_diagnostics_perf-jit.cc b/chromium-wip/patches/patch-v8_src_diagnostics_perf-jit.cc
new file mode 100644
index 0000000000..9b32736de7
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_src_diagnostics_perf-jit.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/src/diagnostics/perf-jit.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/src/diagnostics/perf-jit.cc
+@@ -31,7 +31,7 @@
+ #include "src/flags/flags.h"
+ 
+ // Only compile the {PerfJitLogger} on Linux & Darwin.
+-#if V8_OS_LINUX || V8_OS_DARWIN
++#if V8_OS_LINUX || V8_OS_DARWIN || V8_OS_BSD
+ 
+ #include <fcntl.h>
+ #include <sys/mman.h>
diff --git a/chromium-wip/patches/patch-v8_src_diagnostics_perf-jit.h b/chromium-wip/patches/patch-v8_src_diagnostics_perf-jit.h
new file mode 100644
index 0000000000..4f8262379d
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_src_diagnostics_perf-jit.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/src/diagnostics/perf-jit.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/src/diagnostics/perf-jit.h
+@@ -31,7 +31,7 @@
+ #include "include/v8config.h"
+ 
+ // {PerfJitLogger} is only implemented on Linux & Darwin.
+-#if V8_OS_LINUX || V8_OS_DARWIN
++#if V8_OS_LINUX || V8_OS_DARWIN || V8_OS_BSD
+ 
+ #include "src/logging/log.h"
+ 
diff --git a/chromium-wip/patches/patch-v8_src_execution_isolate.cc b/chromium-wip/patches/patch-v8_src_execution_isolate.cc
new file mode 100644
index 0000000000..a12f3949f7
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_src_execution_isolate.cc
@@ -0,0 +1,33 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/src/execution/isolate.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/src/execution/isolate.cc
+@@ -173,6 +173,10 @@
+ #include "src/execution/simulator-base.h"
+ #endif
+ 
++#if defined(V8_OS_OPENBSD)
++#include <sys/mman.h>
++#endif
++
+ extern "C" const uint8_t v8_Default_embedded_blob_code_[];
+ extern "C" uint32_t v8_Default_embedded_blob_code_size_;
+ extern "C" const uint8_t v8_Default_embedded_blob_data_[];
+@@ -5207,6 +5211,13 @@ void Isolate::InitializeDefaultEmbeddedB
+   const uint8_t* data = DefaultEmbeddedBlobData();
+   uint32_t data_size = DefaultEmbeddedBlobDataSize();
+ 
++#if defined(V8_OS_OPENBSD) && !defined(V8_TARGET_ARCH_IA32)
++  if (code_size > 0) {
++    mprotect(reinterpret_cast<void *>(const_cast<uint8_t *>(code)),
++            code_size, PROT_READ | PROT_EXEC);
++  }
++#endif
++
+   if (StickyEmbeddedBlobCode() != nullptr) {
+     base::MutexGuard guard(current_embedded_blob_refcount_mutex_.Pointer());
+     // Check again now that we hold the lock.
diff --git a/chromium-wip/patches/patch-v8_src_flags_flags.cc b/chromium-wip/patches/patch-v8_src_flags_flags.cc
new file mode 100644
index 0000000000..14225ea42d
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_src_flags_flags.cc
@@ -0,0 +1,30 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/src/flags/flags.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/src/flags/flags.cc
+@@ -16,6 +16,10 @@
+ #include <set>
+ #include <sstream>
+ 
++#if V8_OS_OPENBSD
++#include <sys/mman.h>
++#endif
++
+ #include "src/base/fpu.h"
+ #include "src/base/hashing.h"
+ #include "src/base/lazy-instance.h"
+@@ -827,6 +831,10 @@ void FlagList::FreezeFlags() {
+   // Note that for string flags we only protect the pointer itself, but not the
+   // string storage. TODO(12887): Fix this.
+   base::OS::SetDataReadOnly(&v8_flags, sizeof(v8_flags));
++#if V8_OS_OPENBSD
++  if (mimmutable(&v8_flags, sizeof(v8_flags)) == -1)
++    FATAL("unable to set immutability of v8_flags");
++#endif
+ }
+ 
+ // static
diff --git a/chromium-wip/patches/patch-v8_src_libsampler_sampler.cc b/chromium-wip/patches/patch-v8_src_libsampler_sampler.cc
new file mode 100644
index 0000000000..45840eaf57
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_src_libsampler_sampler.cc
@@ -0,0 +1,25 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/src/libsampler/sampler.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/src/libsampler/sampler.cc
+@@ -527,6 +527,16 @@ void SignalHandler::FillRegisterState(vo
+   state->pc = reinterpret_cast<void*>(mcontext.__gregs[_REG_PC]);
+   state->sp = reinterpret_cast<void*>(mcontext.__gregs[_REG_SP]);
+   state->fp = reinterpret_cast<void*>(mcontext.__gregs[_REG_FP]);
++#elif V8_HOST_ARCH_ARM64
++#ifdef __CHERI_PURE_CAPABILITY__
++  state->pc = reinterpret_cast<void*>(mcontext.mc_capregs.cap_elr);
++  state->sp = reinterpret_cast<void*>(mcontext.mc_capregs.cap_sp);
++  state->fp = reinterpret_cast<void*>(mcontext.mc_capregs.cap_x[29]);
++#else   // !__CHERI_PURE_CAPABILITY__
++  state->pc = reinterpret_cast<void*>(mcontext.mc_gpregs.gp_elr);
++  state->sp = reinterpret_cast<void*>(mcontext.mc_gpregs.gp_sp);
++  state->fp = reinterpret_cast<void*>(mcontext.mc_gpregs.gp_x[29]);
++#endif  // __CHERI_PURE_CAPABILITY__
+ #endif  // V8_HOST_ARCH_*
+ #elif V8_OS_NETBSD
+ #if V8_HOST_ARCH_IA32
diff --git a/chromium-wip/patches/patch-v8_src_sandbox_sandbox.cc b/chromium-wip/patches/patch-v8_src_sandbox_sandbox.cc
new file mode 100644
index 0000000000..8fe757857f
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_src_sandbox_sandbox.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/src/sandbox/sandbox.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/src/sandbox/sandbox.cc
+@@ -59,7 +59,7 @@ static Address DetermineAddressSpaceLimi
+   }
+ #endif  // V8_TARGET_ARCH_X64
+ 
+-#if defined(V8_TARGET_ARCH_ARM64) && defined(V8_TARGET_OS_ANDROID)
++#if defined(V8_TARGET_ARCH_ARM64) && (defined(V8_TARGET_OS_ANDROID) || defined(V8_TARGET_OS_OPENBSD))
+   // On Arm64 Android assume a 40-bit virtual address space (39 bits for
+   // userspace and kernel each) as that appears to be the most common
+   // configuration and there seems to be no easy way to retrieve the actual
diff --git a/chromium-wip/patches/patch-v8_src_snapshot_embedded_platform-embedded-file-writer-base.cc b/chromium-wip/patches/patch-v8_src_snapshot_embedded_platform-embedded-file-writer-base.cc
new file mode 100644
index 0000000000..0131b976e3
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_src_snapshot_embedded_platform-embedded-file-writer-base.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/src/snapshot/embedded/platform-embedded-file-writer-base.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/src/snapshot/embedded/platform-embedded-file-writer-base.cc
+@@ -148,6 +148,8 @@ EmbeddedTargetOs ToEmbeddedTargetOs(cons
+     return EmbeddedTargetOs::kStarboard;
+   } else if (string == "zos") {
+     return EmbeddedTargetOs::kZOS;
++  } else if (string == "openbsd") {
++    return EmbeddedTargetOs::kOpenBSD;
+   } else {
+     return EmbeddedTargetOs::kGeneric;
+   }
diff --git a/chromium-wip/patches/patch-v8_src_snapshot_embedded_platform-embedded-file-writer-base.h b/chromium-wip/patches/patch-v8_src_snapshot_embedded_platform-embedded-file-writer-base.h
new file mode 100644
index 0000000000..98104d26e7
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_src_snapshot_embedded_platform-embedded-file-writer-base.h
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/src/snapshot/embedded/platform-embedded-file-writer-base.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/src/snapshot/embedded/platform-embedded-file-writer-base.h
+@@ -36,6 +36,7 @@ enum class EmbeddedTargetOs {
+   kWin,
+   kStarboard,
+   kZOS,
++  kOpenBSD,
+   kGeneric,  // Everything not covered above falls in here.
+ };
+ 
diff --git a/chromium-wip/patches/patch-v8_src_snapshot_embedded_platform-embedded-file-writer-generic.cc b/chromium-wip/patches/patch-v8_src_snapshot_embedded_platform-embedded-file-writer-generic.cc
new file mode 100644
index 0000000000..56f0dd8e81
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_src_snapshot_embedded_platform-embedded-file-writer-generic.cc
@@ -0,0 +1,48 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/src/snapshot/embedded/platform-embedded-file-writer-generic.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/src/snapshot/embedded/platform-embedded-file-writer-generic.cc
+@@ -9,6 +9,10 @@
+ 
+ #include "src/objects/instruction-stream.h"
+ 
++#if V8_OS_OPENBSD
++#include <sys/param.h>
++#endif
++
+ namespace v8 {
+ namespace internal {
+ 
+@@ -35,6 +39,10 @@ const char* DirectiveAsString(DataDirect
+ void PlatformEmbeddedFileWriterGeneric::SectionText() {
+   if (target_os_ == EmbeddedTargetOs::kChromeOS) {
+     fprintf(fp_, ".section .text.hot.embedded\n");
++#if !defined(V8_TARGET_ARCH_IA32)
++  } else if (target_os_ == EmbeddedTargetOs::kOpenBSD) {
++    fprintf(fp_, ".section .openbsd.mutable,\"a\"\n");
++#endif
+   } else {
+     fprintf(fp_, ".section .text\n");
+   }
+@@ -66,6 +74,8 @@ void PlatformEmbeddedFileWriterGeneric::
+   // On these architectures and platforms, we remap the builtins, so need these
+   // to be aligned on a page boundary.
+   fprintf(fp_, ".balign 4096\n");
++#elif defined(V8_OS_OPENBSD) && !defined(V8_TARGET_ARCH_IA32)
++  fprintf(fp_, ".balign %d\n", PAGE_SIZE);
+ #elif V8_TARGET_ARCH_X64
+   // On x64 use 64-bytes code alignment to allow 64-bytes loop header alignment.
+   static_assert(64 >= kCodeAlignment);
+@@ -86,6 +96,8 @@ void PlatformEmbeddedFileWriterGeneric::
+     (V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM64)
+   // Since the builtins are remapped, need to pad until the next page boundary.
+   fprintf(fp_, ".balign 4096\n");
++#elif defined(V8_OS_OPENBSD) && !defined(V8_TARGET_ARCH_IA32)
++  fprintf(fp_, ".balign %d\n", PAGE_SIZE);
+ #endif
+ }
+ 
diff --git a/chromium-wip/patches/patch-v8_src_trap-handler_handler-inside-posix.cc b/chromium-wip/patches/patch-v8_src_trap-handler_handler-inside-posix.cc
new file mode 100644
index 0000000000..35f47a2187
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_src_trap-handler_handler-inside-posix.cc
@@ -0,0 +1,43 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/src/trap-handler/handler-inside-posix.cc.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/src/trap-handler/handler-inside-posix.cc
+@@ -28,7 +28,7 @@
+ 
+ #include <signal.h>
+ 
+-#if defined(V8_OS_LINUX) || defined(V8_OS_FREEBSD)
++#if defined(V8_OS_LINUX) || defined(V8_OS_FREEBSD) || defined(V8_OS_NETBSD)
+ #include <ucontext.h>
+ #elif V8_OS_DARWIN
+ #include <sys/ucontext.h>
+@@ -62,6 +62,10 @@ namespace trap_handler {
+ #define CONTEXT_REG(reg, REG) &uc->uc_mcontext->__ss.__##reg
+ #elif V8_OS_FREEBSD
+ #define CONTEXT_REG(reg, REG) &uc->uc_mcontext.mc_##reg
++#elif V8_OS_OPENBSD
++#define CONTEXT_REG(reg, REG) &uc->sc_##reg
++#elif V8_OS_NETBSD
++#define CONTEXT_REG(reg, REG) &uc->uc_mcontext.__gregs[_REG_##REG]
+ #else
+ #error "Unsupported platform."
+ #endif
+@@ -81,8 +85,12 @@ bool IsKernelGeneratedSignal(siginfo_t* 
+   // si_code at its default of 0 for signals that don’t originate in hardware.
+   // The other conditions are only relevant for Linux.
+   return info->si_code > 0 && info->si_code != SI_USER &&
+-         info->si_code != SI_QUEUE && info->si_code != SI_TIMER &&
+-         info->si_code != SI_ASYNCIO && info->si_code != SI_MESGQ;
++         info->si_code != SI_QUEUE && info->si_code != SI_TIMER
++#ifdef V8_OS_OPENBSD
++         ;
++#else
++         && info->si_code != SI_ASYNCIO && info->si_code != SI_MESGQ;
++#endif
+ }
+ 
+ class UnmaskOobSignalScope {
diff --git a/chromium-wip/patches/patch-v8_src_trap-handler_handler-inside-posix.h b/chromium-wip/patches/patch-v8_src_trap-handler_handler-inside-posix.h
new file mode 100644
index 0000000000..e787c7bd21
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_src_trap-handler_handler-inside-posix.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/src/trap-handler/handler-inside-posix.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/src/trap-handler/handler-inside-posix.h
+@@ -13,7 +13,7 @@ namespace v8 {
+ namespace internal {
+ namespace trap_handler {
+ 
+-#if V8_OS_LINUX || V8_OS_FREEBSD
++#if V8_OS_LINUX || V8_OS_FREEBSD || V8_OS_OPENBSD || V8_OS_NETBSD
+ constexpr int kOobSignal = SIGSEGV;
+ #elif V8_OS_DARWIN
+ constexpr int kOobSignal = SIGBUS;
diff --git a/chromium-wip/patches/patch-v8_src_trap-handler_trap-handler.h b/chromium-wip/patches/patch-v8_src_trap-handler_trap-handler.h
new file mode 100644
index 0000000000..4b646466b1
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_src_trap-handler_trap-handler.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/src/trap-handler/trap-handler.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/src/trap-handler/trap-handler.h
+@@ -18,7 +18,7 @@ namespace v8::internal::trap_handler {
+ // X64 on Linux, Windows, MacOS, FreeBSD.
+ #if V8_HOST_ARCH_X64 && V8_TARGET_ARCH_X64 &&                        \
+     ((V8_OS_LINUX && !V8_OS_ANDROID) || V8_OS_WIN || V8_OS_DARWIN || \
+-     V8_OS_FREEBSD)
++     V8_OS_FREEBSD || V8_OS_OPENBSD || V8_OS_NETBSD)
+ #define V8_TRAP_HANDLER_SUPPORTED true
+ // Arm64 native on Linux, Windows, MacOS.
+ #elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_ARM64 && \
diff --git a/chromium-wip/patches/patch-v8_src_wasm_baseline_ia32_liftoff-assembler-ia32-inl.h b/chromium-wip/patches/patch-v8_src_wasm_baseline_ia32_liftoff-assembler-ia32-inl.h
new file mode 100644
index 0000000000..37b6a64c6e
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_src_wasm_baseline_ia32_liftoff-assembler-ia32-inl.h
@@ -0,0 +1,134 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/src/wasm/baseline/ia32/liftoff-assembler-ia32-inl.h.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/src/wasm/baseline/ia32/liftoff-assembler-ia32-inl.h
+@@ -605,7 +605,7 @@ void LiftoffAssembler::AtomicStoreTagged
+ }
+ 
+ void LiftoffAssembler::Load(LiftoffRegister dst, Register src_addr,
+-                            Register offset_reg, uint32_t offset_imm,
++                            Register offset_reg, uintptr_t offset_imm,
+                             LoadType type, uint32_t* protected_load_pc,
+                             bool /* is_load_mem */, bool /* i64_offset */,
+                             bool needs_shift) {
+@@ -685,7 +685,7 @@ void LiftoffAssembler::Load(LiftoffRegis
+ }
+ 
+ void LiftoffAssembler::Store(Register dst_addr, Register offset_reg,
+-                             uint32_t offset_imm, LiftoffRegister src,
++                             uintptr_t offset_imm, LiftoffRegister src,
+                              StoreType type, LiftoffRegList pinned,
+                              uint32_t* protected_store_pc,
+                              bool /* is_store_mem */, bool /* i64_offset */) {
+@@ -764,7 +764,7 @@ void LiftoffAssembler::Store(Register ds
+ }
+ 
+ void LiftoffAssembler::AtomicLoad(LiftoffRegister dst, Register src_addr,
+-                                  Register offset_reg, uint32_t offset_imm,
++                                  Register offset_reg, uintptr_t offset_imm,
+                                   LoadType type, LiftoffRegList /* pinned */,
+                                   bool /* i64_offset */) {
+   if (type.value() != LoadType::kI64Load) {
+@@ -782,7 +782,7 @@ void LiftoffAssembler::AtomicLoad(Liftof
+ }
+ 
+ void LiftoffAssembler::AtomicStore(Register dst_addr, Register offset_reg,
+-                                   uint32_t offset_imm, LiftoffRegister src,
++                                   uintptr_t offset_imm, LiftoffRegister src,
+                                    StoreType type, LiftoffRegList pinned,
+                                    bool /* i64_offset */) {
+   DCHECK_LE(offset_imm, std::numeric_limits<int32_t>::max());
+@@ -852,7 +852,7 @@ enum Binop { kAdd, kSub, kAnd, kOr, kXor
+ 
+ inline void AtomicAddOrSubOrExchange32(LiftoffAssembler* lasm, Binop binop,
+                                        Register dst_addr, Register offset_reg,
+-                                       uint32_t offset_imm,
++                                       uintptr_t offset_imm,
+                                        LiftoffRegister value,
+                                        LiftoffRegister result, StoreType type) {
+   DCHECK_EQ(value, result);
+@@ -920,7 +920,7 @@ inline void AtomicAddOrSubOrExchange32(L
+ }
+ 
+ inline void AtomicBinop32(LiftoffAssembler* lasm, Binop op, Register dst_addr,
+-                          Register offset_reg, uint32_t offset_imm,
++                          Register offset_reg, uintptr_t offset_imm,
+                           LiftoffRegister value, LiftoffRegister result,
+                           StoreType type) {
+   DCHECK_EQ(value, result);
+@@ -1035,7 +1035,7 @@ inline void AtomicBinop32(LiftoffAssembl
+ }
+ 
+ inline void AtomicBinop64(LiftoffAssembler* lasm, Binop op, Register dst_addr,
+-                          Register offset_reg, uint32_t offset_imm,
++                          Register offset_reg, uintptr_t offset_imm,
+                           LiftoffRegister value, LiftoffRegister result) {
+   // We need {ebx} here, which is the root register. As the root register it
+   // needs special treatment. As we use {ebx} directly in the code below, we
+@@ -1131,7 +1131,7 @@ inline void AtomicBinop64(LiftoffAssembl
+ }  // namespace liftoff
+ 
+ void LiftoffAssembler::AtomicAdd(Register dst_addr, Register offset_reg,
+-                                 uint32_t offset_imm, LiftoffRegister value,
++                                 uintptr_t offset_imm, LiftoffRegister value,
+                                  LiftoffRegister result, StoreType type,
+                                  bool /* i64_offset */) {
+   if (type.value() == StoreType::kI64Store) {
+@@ -1145,7 +1145,7 @@ void LiftoffAssembler::AtomicAdd(Registe
+ }
+ 
+ void LiftoffAssembler::AtomicSub(Register dst_addr, Register offset_reg,
+-                                 uint32_t offset_imm, LiftoffRegister value,
++                                 uintptr_t offset_imm, LiftoffRegister value,
+                                  LiftoffRegister result, StoreType type,
+                                  bool /* i64_offset */) {
+   if (type.value() == StoreType::kI64Store) {
+@@ -1158,7 +1158,7 @@ void LiftoffAssembler::AtomicSub(Registe
+ }
+ 
+ void LiftoffAssembler::AtomicAnd(Register dst_addr, Register offset_reg,
+-                                 uint32_t offset_imm, LiftoffRegister value,
++                                 uintptr_t offset_imm, LiftoffRegister value,
+                                  LiftoffRegister result, StoreType type,
+                                  bool /* i64_offset */) {
+   if (type.value() == StoreType::kI64Store) {
+@@ -1172,7 +1172,7 @@ void LiftoffAssembler::AtomicAnd(Registe
+ }
+ 
+ void LiftoffAssembler::AtomicOr(Register dst_addr, Register offset_reg,
+-                                uint32_t offset_imm, LiftoffRegister value,
++                                uintptr_t offset_imm, LiftoffRegister value,
+                                 LiftoffRegister result, StoreType type,
+                                 bool /* i64_offset */) {
+   if (type.value() == StoreType::kI64Store) {
+@@ -1186,7 +1186,7 @@ void LiftoffAssembler::AtomicOr(Register
+ }
+ 
+ void LiftoffAssembler::AtomicXor(Register dst_addr, Register offset_reg,
+-                                 uint32_t offset_imm, LiftoffRegister value,
++                                 uintptr_t offset_imm, LiftoffRegister value,
+                                  LiftoffRegister result, StoreType type,
+                                  bool /* i64_offset */) {
+   if (type.value() == StoreType::kI64Store) {
+@@ -1200,7 +1200,7 @@ void LiftoffAssembler::AtomicXor(Registe
+ }
+ 
+ void LiftoffAssembler::AtomicExchange(Register dst_addr, Register offset_reg,
+-                                      uint32_t offset_imm,
++                                      uintptr_t offset_imm,
+                                       LiftoffRegister value,
+                                       LiftoffRegister result, StoreType type,
+                                       bool /* i64_offset */) {
+@@ -1226,7 +1226,7 @@ void LiftoffAssembler::AtomicExchangeTag
+ }
+ 
+ void LiftoffAssembler::AtomicCompareExchange(
+-    Register dst_addr, Register offset_reg, uint32_t offset_imm,
++    Register dst_addr, Register offset_reg, uintptr_t offset_imm,
+     LiftoffRegister expected, LiftoffRegister new_value, LiftoffRegister result,
+     StoreType type, bool /* i64_offset */) {
+   // We expect that the offset has already been added to {dst_addr}, and no
diff --git a/chromium-wip/patches/patch-v8_tools_run-paxctl.py b/chromium-wip/patches/patch-v8_tools_run-paxctl.py
new file mode 100644
index 0000000000..ebbfc25ebe
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_tools_run-paxctl.py
@@ -0,0 +1,25 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/tools/run-paxctl.py.orig	2025-08-12 17:48:59.629804811 +0000
++++ v8/tools/run-paxctl.py
+@@ -0,0 +1,16 @@
++#!@PYTHONBIN@
++# Copyright 2014 the V8 project 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 program wraps an arbitrary command since gn currently can only execute
++scripts."""
++
++import subprocess
++import sys
++import os
++
++with open(sys.argv[1], 'w'):
++  os.utime(sys.argv[1], None)
++
++sys.exit(subprocess.call(sys.argv[2:]))
diff --git a/chromium-wip/patches/patch-v8_tools_run.py b/chromium-wip/patches/patch-v8_tools_run.py
new file mode 100644
index 0000000000..b6778e2ca0
--- /dev/null
+++ b/chromium-wip/patches/patch-v8_tools_run.py
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- v8/tools/run.py.orig	2025-07-29 22:51:44.000000000 +0000
++++ v8/tools/run.py
+@@ -21,7 +21,7 @@ if cmd and cmd[0] == '--redirect-stdout'
+   kwargs = dict(stdout=subprocess.PIPE)
+   cmd = cmd[2:]
+ 
+-process = subprocess.Popen(cmd, **kwargs)
++process = subprocess.Popen(cmd, env={"LD_LIBRARY_PATH":"@WRKSRC@/out/Release"}, **kwargs)
+ stdout, _ = process.communicate()
+ if stdout_file:
+   with stdout_file.open('w') as f:
diff --git a/chromium-wip/tests.mk b/chromium-wip/tests.mk
new file mode 100644
index 0000000000..ba3a6797b1
--- /dev/null
+++ b/chromium-wip/tests.mk
@@ -0,0 +1,59 @@
+# $NetBSD$
+
+REGRESS_DISTFILE=		chromium-${VERSION}-testdata${EXTRACT_SUFX_C}
+DISTFILES+=			${REGRESS_DISTFILE}
+EXTRACT_ONLY=			${DISTNAME}${EXTRACT_SUFX_C}
+#EXTRACT_ONLY+=			${PROFILE_DISTFILES}
+EXTRACT_ONLY+=			${_GITHUB_DEFAULT_DISTFILES}
+
+USE_TOOLS+=	xzcat gzip tar
+
+#TEST_ENV+=	FONTCONFIG_SYSROOT=${WRKSRC}/third_party/test_fonts
+
+TEST_TARGET=	base_unittests
+TEST_TARGET+=	blink_unittests
+TEST_TARGET+=	chromedriver_unittests
+
+# third_party/crashpad/crashpad/handler/handler_main.cc: error:
+# use of undeclared identifier 'ReinstallCrashHandler'
+# use of undeclared identifier 'InstallCrashHandler'
+# use of undeclared identifier 'CrashReportExceptionHandler'
+# use of undeclared identifier 'exception_handler_server'
+#TEST_TARGET+=	components_unittests
+
+TEST_TARGET+=	content_unittests
+TEST_TARGET+=	crypto_unittests
+TEST_TARGET+=	gl_tests
+TEST_TARGET+=	gpu_unittests
+TEST_TARGET+=	headless_unittests
+TEST_TARGET+=	media_unittests
+
+# third_party/ipcz/src/reference_drivers/wrapped_file_descriptor.h:
+# no member named 'kFileDescriptor' in 'ipcz::reference_drivers::Object'
+#TEST_TARGET+=	mojo_unittests
+
+TEST_TARGET+=	net_unittests
+TEST_TARGET+=	pdf_unittests
+
+# printing/mojom/printing_context_mojom_traits_unittest.cc:88:2:
+# error: "System print dialog support not implemented for this platform."
+#TEST_TARGET+=	printing_unittests
+
+TEST_TARGET+=	skia_unittests
+TEST_TARGET+=	url_unittests
+TEST_TARGET+=	wm_unittests
+
+pre-test:
+	@${ECHO_MSG} "=> Extracting ${REGRESS_DISTFILE}"
+	${XZCAT} ${DISTDIR}/${REGRESS_DISTFILE} | ${TAR} -C ${WRKDIR} -xf -
+	${MKDIR} ${WRKSRC}/third_party/llvm-build/Release+Asserts/bin
+	${LN} -sf ${PREFIX}/bin/clang++ ${WRKSRC}/third_party/llvm-build/Release+Asserts/bin/clang++
+	${LN} -sf ${PREFIX}/bin/clang ${WRKSRC}/third_party/llvm-build/Release+Asserts/bin/clang
+	${LN} -sf ${PREFIX}/bin/llvm-ar ${WRKSRC}/third_party/llvm-build/Release+Asserts/bin/llvm-ar
+
+do-test:
+.for t in ${TEST_TARGET}
+	@${ECHO_MSG} "=> Test target: ${t}"
+	cd ${WRKSRC} && \
+	${SETENV} ${TEST_ENV} ${PREFIX}/bin/ninja -j ${MAKE_JOBS:U1} -C out/${BUILDTYPE} ${t}
+.endfor


Home | Main Index | Thread Index | Old Index