From bfe7b23f5c54dae039349ef81792b05c7b6495a5 Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Sat, 1 Oct 2022 12:52:12 +0200 Subject: [PATCH] www/ungoogled-chromium: add port of ungoogled chromium ungoogled-chromium is a free and open-source Chromium-based web browser with the aim of increasing privacy through removing Google components and blobs. additionaly to the upstream version of ungoogled-chromium, patches have been added to support parallel installation by using separate cache and config directories --- www/Makefile | 1 + www/ungoogled-chromium/Makefile | 372 +++ www/ungoogled-chromium/Makefile.tests | 16 + www/ungoogled-chromium/distinfo | 9 + www/ungoogled-chromium/files/patch-BUILD.gn | 80 + ...-apps_ui_views_app__window__frame__view.cc | 11 + ...-ash_display_mirror__window__controller.cc | 14 + .../files/patch-base_BUILD.gn | 164 ++ ..._allocator_address__space__randomization.h | 20 + ...tor_partition__allocator_page__allocator.h | 11 + ...on__allocator_page__allocator__constants.h | 38 + ...ocator_page__allocator__internals__posix.h | 16 + ...on__allocator_partition__address__space.cc | 11 + ...r_partition__allocator_partition__alloc.cc | 17 + ...artition__alloc__base_rand__util__posix.cc | 13 + ...eading_platform__thread__internal__posix.h | 11 + ..._base_threading_platform__thread__posix.cc | 11 + ...tion__allocator_partition__alloc__config.h | 29 + ...n__allocator_partition__alloc__constants.h | 20 + ...tor_partition__allocator_partition__page.h | 29 + ...or_partition__allocator_partition__root.cc | 38 + ...or_partition__allocator_spinning__mutex.cc | 47 + ...rtition__allocator_starscan_stack_stack.cc | 50 + .../files/patch-base_atomicops.h | 14 + .../files/patch-base_base__paths__posix.cc | 98 + .../files/patch-base_base__switches.cc | 11 + .../files/patch-base_base__switches.h | 11 + www/ungoogled-chromium/files/patch-base_cpu.h | 11 + .../files/patch-base_debug_debugger__posix.cc | 68 + .../files/patch-base_debug_elf__reader.cc | 18 + .../patch-base_debug_proc__maps__linux.cc | 11 + .../patch-base_debug_stack__trace__posix.cc | 38 + .../patch-base_files_dir__reader__linux.h | 39 + .../patch-base_files_dir__reader__posix.h | 20 + ...tch-base_files_file__path__watcher__bsd.cc | 57 + ...h-base_files_file__path__watcher__kqueue.h | 10 + ...ase_files_file__path__watcher__unittest.cc | 29 + .../patch-base_files_file__util__posix.cc | 52 + .../patch-base_files_file__util__unittest.cc | 20 + ..._files_important__file__writer__cleaner.cc | 12 + .../files/patch-base_files_scoped__file.cc | 11 + .../files/patch-base_i18n_icu__util.cc | 20 + .../files/patch-base_linux__util.cc | 28 + .../files/patch-base_logging__unittest.cc | 31 + .../patch-base_memory_discardable__memory.cc | 38 + ...ase_memory_discardable__memory__internal.h | 11 + ..._madv__free__discardable__memory__posix.cc | 21 + ..._memory_platform__shared__memory__region.h | 29 + ...platform__shared__memory__region__posix.cc | 29 + ...-base_message__loop_message__pump__glib.cc | 28 + .../patch-base_native__library__posix.cc | 11 + .../patch-base_native__library__unittest.cc | 11 + .../patch-base_posix_can__lower__nice__to.cc | 16 + .../patch-base_posix_unix__domain__socket.cc | 39 + ...se_posix_unix__domain__socket__unittest.cc | 11 + .../files/patch-base_process_kill.h | 11 + .../files/patch-base_process_kill__posix.cc | 11 + .../files/patch-base_process_launch.h | 11 + .../files/patch-base_process_launch__posix.cc | 12 + .../files/patch-base_process_memory.cc | 11 + .../patch-base_process_process__handle.cc | 11 + .../patch-base_process_process__handle.h | 11 + ...h-base_process_process__handle__freebsd.cc | 25 + ...h-base_process_process__handle__openbsd.cc | 89 + ...base_process_process__iterator__freebsd.cc | 51 + ...base_process_process__iterator__openbsd.cc | 45 + .../patch-base_process_process__metrics.cc | 47 + .../patch-base_process_process__metrics.h | 129 + ...-base_process_process__metrics__freebsd.cc | 290 +++ ...-base_process_process__metrics__openbsd.cc | 215 ++ ...ch-base_process_process__metrics__posix.cc | 20 + ...base_process_process__metrics__unittest.cc | 20 + .../patch-base_process_process__posix.cc | 93 + .../patch-base_process_process__unittest.cc | 11 + .../patch-base_profiler_module__cache.cc | 11 + ...r_stack__sampling__profiler__test__util.cc | 11 + ...ler_stack__sampling__profiler__unittest.cc | 11 + .../files/patch-base_rand__util.h | 11 + .../files/patch-base_rand__util__posix.cc | 57 + ...ch-base_strings_safe__sprintf__unittest.cc | 18 + .../patch-base_synchronization_lock__impl.h | 23 + .../files/patch-base_syslog__logging.cc | 20 + .../files/patch-base_system_sys__info.cc | 11 + .../files/patch-base_system_sys__info.h | 20 + .../patch-base_system_sys__info__freebsd.cc | 115 + .../patch-base_system_sys__info__openbsd.cc | 94 + .../patch-base_system_sys__info__posix.cc | 43 + .../patch-base_system_sys__info__unittest.cc | 20 + ...ead__pool_environment__config__unittest.cc | 11 + ...patch-base_test_launcher_test__launcher.cc | 10 + ...patch-base_test_test__file__util__linux.cc | 13 + ...patch-base_test_test__file__util__posix.cc | 11 + ...h-base_third__party_symbolize_symbolize.cc | 11 + .../patch-base_threading_platform__thread.h | 11 + ...-base_threading_platform__thread__linux.cc | 77 + ...-base_threading_platform__thread__posix.cc | 21 + ...se_threading_platform__thread__unittest.cc | 47 + ...ase_trace__event_malloc__dump__provider.cc | 30 + ...base_trace__event_memory__dump__manager.cc | 11 + ...base_trace__event_process__memory__dump.cc | 20 + .../files/patch-base_tracing_trace__time.cc | 28 + .../files/patch-base_tracing_trace__time.h | 11 + .../files/patch-build_config_BUILD.gn | 22 + .../files/patch-build_config_BUILDCONFIG.gn | 45 + .../patch-build_config_compiler_BUILD.gn | 113 + .../files/patch-build_config_linux_BUILD.gn | 11 + .../patch-build_config_linux_pkg-config.py | 11 + .../files/patch-build_config_ozone.gni | 19 + .../files/patch-build_config_rust.gni | 11 + .../patch-build_config_v8__target__cpu.gni | 13 + .../files/patch-build_detect__host__arch.py | 11 + .../files/patch-build_gn__run__binary.py | 11 + .../files/patch-build_linux_chrome.map | 13 + .../files/patch-build_linux_strip__binary.py | 10 + .../patch-build_linux_unbundle_libevent.gn | 15 + .../patch-build_linux_unbundle_libusb.gn | 27 + ...build_linux_unbundle_replace__gn__files.py | 10 + .../patch-build_toolchain_freebsd_BUILD.gn | 69 + ...ch-build_toolchain_gcc__solink__wrapper.py | 11 + .../patch-build_toolchain_gcc__toolchain.gni | 44 + .../patch-build_toolchain_openbsd_BUILD.gn | 69 + .../files/patch-cc_BUILD.gn | 19 + ...h-chrome_app_app__management__strings.grdp | 11 + .../patch-chrome_app_chrome__command__ids.h | 11 + .../files/patch-chrome_app_chrome__main.cc | 20 + ...patch-chrome_app_chrome__main__delegate.cc | 121 + .../patch-chrome_app_chromium__strings.grd | 20 + .../patch-chrome_app_generated__resources.grd | 74 + ...tch-chrome_app_google__chrome__strings.grd | 20 + .../patch-chrome_app_profiles__strings.grdp | 11 + .../patch-chrome_app_settings__strings.grdp | 20 + ..._app_theme_chrome__unscaled__resources.grd | 32 + ...atch-chrome_app_theme_theme__resources.grd | 34 + .../patch-chrome_browser_about__flags.cc | 128 + ...ome_browser_after__startup__task__utils.cc | 11 + ...ps_platform__apps_platform__app__launch.cc | 20 + ...pps_platform__apps_platform__app__launch.h | 11 + ...hrome__autocomplete__scheme__classifier.cc | 11 + ...er_background_background__mode__manager.cc | 11 + ..._background_background__mode__optimizer.cc | 11 + .../patch-chrome_browser_browser__features.cc | 11 + ...h-chrome_browser_browser__process__impl.cc | 29 + ...ch-chrome_browser_browser__process__impl.h | 11 + ...atch-chrome_browser_browser__resources.grd | 11 + ...ser_chrome__browser__interface__binders.cc | 71 + ...ch-chrome_browser_chrome__browser__main.cc | 52 + ...ome__browser__main__extra__parts__linux.cc | 11 + ...me_browser_chrome__browser__main__linux.cc | 28 + ...me_browser_chrome__browser__main__posix.cc | 11 + ...rowser_chrome__content__browser__client.cc | 150 ++ ...browser_chrome__content__browser__client.h | 11 + ...crash__upload__list_crash__upload__list.cc | 11 + ...__protocol__handler__registry__delegate.cc | 11 + .../files/patch-chrome_browser_defaults.cc | 11 + ...me_browser_dev__ui__browser__resources.grd | 11 + ...device__oauth2__token__service__factory.cc | 11 + ...browser_devtools_devtools__eye__dropper.cc | 11 + ..._browser_diagnostics_diagnostics__writer.h | 11 + ...oad_chrome__download__manager__delegate.cc | 29 + ...ome_browser_download_download__commands.cc | 20 + ...rome_browser_download_download__commands.h | 11 + ...browser_download_download__file__picker.cc | 20 + ..._browser_download_download__item__model.cc | 29 + ...chrome_browser_download_download__prefs.cc | 90 + ...-chrome_browser_download_download__prefs.h | 20 + ...rs_analysis_analysis__service__settings.cc | 16 + ...ice__trust__connector__service__factory.cc | 43 + ...__trust_device__trust__service__factory.cc | 11 + ...ommands_key__rotation__command__factory.cc | 20 + ...nce_key__persistence__delegate__factory.cc | 20 + ...trust_signals_signals__service__factory.cc | 20 + ...reporting_browser__crash__event__router.cc | 19 + ..._reporting_browser__crash__event__router.h | 20 + ...ommands_cbcm__remote__commands__factory.cc | 20 + ...nterprise_signals_device__info__fetcher.cc | 20 + ...se_signals_device__info__fetcher__linux.cc | 78 + .../patch-chrome_browser_extensions_BUILD.gn | 13 + ...hrome__desktop__report__request__helper.cc | 29 + ...e__reporting__private_conversion__utils.cc | 11 + ...se__reporting__private_conversion__utils.h | 11 + ...ate_enterprise__reporting__private__api.cc | 38 + ...vate_enterprise__reporting__private__api.h | 29 + ...r__private_removable__storage__provider.cc | 20 + ...saging_native__process__launcher__posix.cc | 11 + ...sions_api_settings__private_prefs__util.cc | 20 + ...__private_webrtc__logging__private__api.cc | 29 + ...ser__context__keyed__service__factories.cc | 20 + ...ser_extensions_external__provider__impl.cc | 20 + ...le__system__access__permission__context.cc | 11 + ...me_browser_first__run_first__run__dialog.h | 11 + ..._browser_first__run_first__run__internal.h | 11 + ...patch-chrome_browser_flag__descriptions.cc | 65 + .../patch-chrome_browser_flag__descriptions.h | 51 + ...e_browser_headless_headless__mode__util.cc | 29 + ...ome_browser_intranet__redirect__detector.h | 11 + ...eries_fileapi_mtp__device__map__service.cc | 15 + ...galleries_media__file__system__registry.cc | 16 + ...rome_browser_media_audio__service__util.cc | 20 + ...me_browser_media_router_discovery_BUILD.gn | 11 + ...scovery_discovery__network__list__posix.cc | 48 + ...y_discovery__network__list__wifi__linux.cc | 30 + ...dia_webrtc_webrtc__event__log__uploader.cc | 11 + ...wser_media_webrtc_webrtc__log__uploader.cc | 13 + ...edia_webrtc_webrtc__logging__controller.cc | 33 + ...media_webrtc_webrtc__logging__controller.h | 20 + .../patch-chrome_browser_memory__details.cc | 20 + ...h-chrome_browser_memory__details__linux.cc | 37 + ...e__browser__main__extra__parts__metrics.cc | 23 + ...etrics_chrome__metrics__service__client.cc | 47 + ...rome_browser_metrics_perf_cpu__identity.cc | 11 + ..._power_process__metrics__recorder__util.cc | 11 + ..._browser_metrics_power_process__monitor.cc | 29 + ...e_browser_metrics_power_process__monitor.h | 11 + ...r_net_system__network__context__manager.cc | 38 + ..._tab__page_modules_drive_drive__service.cc | 11 + ...ser_new__tab__page_new__tab__page__util.cc | 11 + ...ns_notification__display__service__impl.cc | 29 + ...tification__platform__bridge__delegator.cc | 11 + ...nager_password__reuse__manager__factory.cc | 11 + ...ch-chrome_browser_platform__util__linux.cc | 12 + ...policy_browser__signin__policy__handler.cc | 11 + ..._cloud__management__controller__desktop.cc | 38 + ...uration__policy__handler__list__factory.cc | 120 + ...ice__management__service__configuration.cc | 20 + ...tch-chrome_browser_prefs_browser__prefs.cc | 44 + ...efs_pref__service__incognito__allowlist.cc | 11 + ...inting_print__backend__service__manager.cc | 29 + ...ome_browser_printing_print__job__worker.cc | 11 + ...hrome_browser_process__singleton__posix.cc | 20 + ...__browser__main__extra__parts__profiles.cc | 25 + ...h-chrome_browser_profiles_profile__impl.cc | 31 + ...chrome_browser_profiles_profiles__state.cc | 11 + ...ome_browser_renderer__preferences__util.cc | 29 + ...urces_plugin__metadata_plugins__linux.json | 31 + ...s_sandbox__internals_sandbox__internals.ts | 29 + ...arance__page_appearance__browser__proxy.ts | 20 + ...ngs_appearance__page_appearance__page.html | 29 + ...tings_appearance__page_appearance__page.ts | 51 + ...tings_autofill__page_passwords__shared.css | 11 + ...chrome_browser_resources_settings_route.ts | 11 + ...rowser_resources_signin_signin__shared.css | 11 + ..._confirmation_sync__confirmation__app.html | 38 + ...ntent__scanning_binary__upload__service.cc | 20 + ...ing_download__protection_file__analyzer.cc | 29 + ...sing_download__protection_file__analyzer.h | 29 + ..._reporting_incident__reporting__service.cc | 11 + ...__self_receiving__ui__handler__registry.cc | 20 + ...lf_send__tab__to__self__client__service.cc | 20 + ...r_sharing_sharing__device__registration.cc | 11 + ...haring_sharing__handler__registry__impl.cc | 20 + ...owser_shutdown__signal__handlers__posix.cc | 21 + ...hrome_browser_sync_chrome__sync__client.cc | 11 + ...r_sync_device__info__sync__client__impl.cc | 11 + ...wser_task__manager_sampling_task__group.cc | 38 + ...owser_task__manager_sampling_task__group.h | 38 + ...__manager_sampling_task__group__sampler.cc | 47 + ...k__manager_sampling_task__group__sampler.h | 38 + ...k__manager_sampling_task__manager__impl.cc | 11 + ...er_task__manager_task__manager__observer.h | 11 + ...tch-chrome_browser_themes_theme__helper.cc | 20 + ...ch-chrome_browser_themes_theme__service.cc | 29 + ...wser_themes_theme__service__aura__linux.cc | 37 + ..._browser_themes_theme__service__factory.cc | 37 + .../files/patch-chrome_browser_ui_browser.h | 11 + ...browser_ui_browser__command__controller.cc | 38 + ...patch-chrome_browser_ui_browser__dialogs.h | 11 + ...-chrome_browser_ui_browser__view__prefs.cc | 20 + .../patch-chrome_browser_ui_chrome__pages.cc | 20 + .../patch-chrome_browser_ui_chrome__pages.h | 20 + ...r_ui_color_native__chrome__color__mixer.cc | 11 + ...usive__access_exclusive__access__bubble.cc | 11 + .../files/patch-chrome_browser_ui_sad__tab.cc | 11 + ...ng__hub_sharing__hub__bubble__controller.h | 11 + ...ome_browser_ui_signin__view__controller.cc | 11 + ...er_ui_signin__view__controller__delegate.h | 11 + ...e_browser_ui_startup_bad__flags__prompt.cc | 11 + ...er_ui_startup_startup__browser__creator.cc | 29 + ...startup_startup__browser__creator__impl.cc | 11 + .../patch-chrome_browser_ui_tab__helpers.cc | 36 + ...ui_task__manager_task__manager__columns.cc | 11 + ...sk__manager_task__manager__table__model.cc | 29 + ...ome_browser_ui_views_accelerator__table.cc | 43 + ...hrome__native__app__window__views__aura.cc | 20 + ...ome__browser__main__extra__parts__views.cc | 20 + ...browser_ui_views_chrome__views__delegate.h | 16 + ...ui_views_chrome__views__delegate__linux.cc | 20 + ..._ui_views_download_download__item__view.cc | 20 + ...i_views_eye__dropper_eye__dropper__view.cc | 11 + ...s_eye__dropper_eye__dropper__view__aura.cc | 11 + ...ome_browser_ui_views_first__run__dialog.cc | 20 + ...e_browser_ui_views_frame_browser__frame.cc | 52 + ...on__client__frame__view__factory__views.cc | 29 + ...me_browser_ui_views_frame_browser__view.cc | 11 + ...iews_frame_opaque__browser__frame__view.cc | 29 + ...views_frame_opaque__browser__frame__view.h | 11 + ...iews_frame_system__menu__model__builder.cc | 29 + ...ews_frame_system__menu__model__delegate.cc | 29 + ...e_browser_ui_views_hung__renderer__view.cc | 11 + ...iews_profiles_profile__menu__view__base.cc | 11 + ...gnin__view__controller__delegate__views.cc | 20 + ...ignin__view__controller__delegate__views.h | 11 + .../patch-chrome_browser_ui_views_tabs_tab.cc | 11 + ...ser_ui_views_tabs_tab__drag__controller.cc | 38 + ...views_tabs_tab__hover__card__controller.cc | 11 + ...__applications_app__browser__controller.cc | 11 + ...patch-chrome_browser_ui_webui_about__ui.cc | 20 + ...ui_chrome__web__ui__controller__factory.cc | 92 + ...onnectors__internals_zero__trust__utils.cc | 29 + ...ser_ui_webui_ntp_app__launcher__handler.cc | 20 + ...r_ui_webui_settings_appearance__handler.cc | 20 + ...er_ui_webui_settings_appearance__handler.h | 11 + ..._settings__localized__strings__provider.cc | 47 + ..._browser_ui_window__sizer_window__sizer.cc | 11 + ...b__applications_extension__status__utils.h | 11 + ...ons_extensions_extension__status__utils.cc | 20 + ...on_web__app__file__handler__registration.h | 11 + ...ions_os__integration_web__app__shortcut.cc | 47 + ...tions_os__integration_web__app__shortcut.h | 38 + ...integration_web__app__shortcut__manager.cc | 11 + ...er_web__applications_web__app__provider.cc | 11 + ...hrome__authenticator__request__delegate.cc | 11 + .../files/patch-chrome_common_channel__info.h | 11 + ...atch-chrome_common_channel__info__posix.cc | 11 + .../patch-chrome_common_chrome__features.cc | 65 + .../patch-chrome_common_chrome__features.h | 47 + .../patch-chrome_common_chrome__paths.cc | 87 + .../files/patch-chrome_common_chrome__paths.h | 29 + ...ch-chrome_common_chrome__paths__internal.h | 11 + .../patch-chrome_common_chrome__switches.cc | 19 + .../patch-chrome_common_chrome__switches.h | 17 + ...ions_chrome__permission__message__rules.cc | 11 + ...rome_common_media_cdm__host__file__path.cc | 11 + .../files/patch-chrome_common_pref__names.cc | 56 + .../files/patch-chrome_common_pref__names.h | 56 + .../patch-chrome_common_url__constants.cc | 11 + .../patch-chrome_common_url__constants.h | 11 + ...tch-chrome_common_webui__url__constants.cc | 68 + ...atch-chrome_common_webui__url__constants.h | 57 + ...enderer_chrome__render__frame__observer.cc | 11 + ..._safe__document__analyzer__mojom__traits.h | 11 + ..._printing_print__backend__service__impl.cc | 11 + ...ces_speech_audio__source__fetcher__impl.cc | 11 + .../files/patch-chrome_test_BUILD.gn | 11 + ...rome_test_chromedriver_chrome__launcher.cc | 10 + ...test_chromedriver_chrome_chrome__finder.cc | 20 + ...t_chromedriver_key__converter__unittest.cc | 20 + ...ver_keycode__text__conversion__unittest.cc | 20 + ...eraction_webui__interaction__test__util.cc | 11 + .../patch-chrome_updater_app_app__install.cc | 11 + ...patch-chrome_updater_app_app__uninstall.cc | 11 + .../patch-chrome_updater_configurator.cc | 11 + ...e_updater_device__management_dm__client.cc | 11 + ..._updater_device__management_dm__storage.cc | 20 + .../files/patch-chrome_updater_installer.cc | 11 + .../files/patch-chrome_updater_updater.cc | 11 + .../files/patch-chrome_updater_util.cc | 11 + .../files/patch-chrome_utility_services.cc | 56 + ...cast_browser_cast__browser__main__parts.cc | 38 + ..._browser_cast__content__browser__client.cc | 11 + ...st_media_base_default__monotonic__clock.cc | 20 + ...stant_browser_autofill__assistant__impl.cc | 11 + ...fill__assistant_browser_client__context.cc | 11 + ...omponents_autofill__payments__strings.grdp | 11 + ...ll_core_browser_personal__data__manager.cc | 12 + ...ore_common_autofill__payments__features.cc | 11 + ...nts_autofill_core_common_autofill__util.cc | 11 + ...nents_cast__channel_cast__message__util.cc | 11 + ...mponents_components__chromium__strings.grd | 11 + ...ts_components__google__chrome__strings.grd | 11 + ...ore_browser_website__settings__registry.cc | 11 + ...ents_cookie__config_cookie__store__util.cc | 11 + ...-components_crash_content_browser_BUILD.gn | 29 + .../patch-components_crash_core_app_BUILD.gn | 52 + ...rash_core_app_chrome__crashpad__handler.cc | 12 + ...e_browser_crash__upload__list__crashpad.cc | 16 + ...atch-components_crash_core_common_BUILD.gn | 20 + ...__signals_core_common_signals__features.cc | 11 + ...e__signals_core_common_signals__features.h | 11 + ...core_system__signals_platform__delegate.cc | 11 + ...ce_discardable__shared__memory__manager.cc | 11 + ...r__support_user__agent__utils__unittest.cc | 20 + ...ure__engagement_public_event__constants.cc | 11 + ...ture__engagement_public_event__constants.h | 11 + ...gagement_public_feature__configurations.cc | 21 + ...e__engagement_public_feature__constants.cc | 20 + ...re__engagement_public_feature__constants.h | 20 + ...eature__engagement_public_feature__list.cc | 21 + ...feature__engagement_public_feature__list.h | 40 + ...ents_feed_core_proto_v2_wire_version.proto | 13 + ...d_core_v2_feed__network__impl__unittest.cc | 13 + ...tch-components_feed_core_v2_proto__util.cc | 24 + ...ents_feed_core_v2_proto__util__unittest.cc | 13 + ...onents_feed_core_v2_test_proto__printer.cc | 13 + ...patch-components_flags__ui_flags__state.cc | 11 + .../files/patch-components_gwp__asan_BUILD.gn | 11 + ...wp__asan_crash__handler_crash__analyzer.cc | 20 + ...nvalidation_impl_invalidation__switches.cc | 11 + ...-components_live__caption_caption__util.cc | 11 + ...metrics_drive__metrics__provider__linux.cc | 16 + .../patch-components_metrics_motherboard.cc | 10 + ...-components_neterror_resources_neterror.js | 11 + ..._browser_network__session__configurator.cc | 11 + ...etwork__session__configurator__unittest.cc | 11 + ...components_new__or__sad__tab__strings.grdp | 20 + ...n__guide_core_optimization__guide__util.cc | 11 + ...mponents_os__crypt_keyring__util__linux.cc | 17 + ...onents_os__crypt_libsecret__util__linux.cc | 18 + .../patch-components_os__crypt_os__crypt.h | 72 + ..._preview_browser_paint__preview__client.cc | 13 + ...rowser_paint__preview__client__unittest.cc | 13 + ..._preview_common_proto_paint__preview.proto | 13 + ...iew_player_player__compositor__delegate.cc | 13 + ...d__manager_core_browser_login__database.cc | 29 + ..._core_browser_login__database__unittest.cc | 29 + ...ore_browser_sync_password__sync__bridge.cc | 20 + ...core_common_password__manager__features.cc | 28 + ..._core_common_password__manager__features.h | 24 + ...nts_performance__manager_public_features.h | 11 + ..._prediction__service_prediction__common.cc | 20 + ...ore_browser_policy__pref__mapping__test.cc | 11 + ...core_common_cloud_cloud__policy__client.cc | 11 + ...y_core_common_cloud_cloud__policy__util.cc | 55 + ...ts_policy_resources_policy__templates.json | 200 ++ ...s_policy_tools_generate__policy__source.py | 14 + ...t_common_file__type__policies__unittest.cc | 11 + ...ontent_resources_gen__file__type__proto.py | 19 + ..._browser_db_v4__protocol__manager__util.cc | 11 + ...ser_realtime_url__lookup__service__base.cc | 11 + ...s_security__interstitials_content_utils.cc | 11 + ...__preview__compositor__collection__impl.cc | 29 + ...t__preview__compositor__collection__impl.h | 20 + ...andbox_screen__ai__sandbox__hook__linux.cc | 18 + ...sandbox_screen__ai__sandbox__hook__linux.h | 16 + ...c__utils_browser_startup__metric__utils.cc | 11 + ...patch-components_storage__monitor_BUILD.gn | 11 + ...e__monitor_removable__device__constants.cc | 11 + ...ge__monitor_removable__device__constants.h | 11 + ..._device__info_local__device__info__util.cc | 11 + ...__info_local__device__info__util__linux.cc | 14 + ...s_translate_core_common_translate__util.cc | 11 + ...ts_update__client_update__query__params.cc | 11 + ...atter_spoof__checks_idn__spoof__checker.cc | 11 + ..._viz_common_gpu_dawn__context__provider.cc | 11 + ...mponents_viz_host_host__display__client.cc | 11 + ...omponents_viz_host_host__display__client.h | 11 + ...s_viz_host_renderer__settings__creation.cc | 11 + ...y__embedder_skia__output__surface__impl.cc | 11 + ...lay__embedder_software__output__surface.cc | 20 + ...play__embedder_software__output__surface.h | 20 + ...ents_viz_service_display_skia__renderer.cc | 11 + ...nks_root__compositor__frame__sink__impl.cc | 20 + ...inks_root__compositor__frame__sink__impl.h | 11 + ...mponents_viz_test_fake__display__client.cc | 11 + ...omponents_viz_test_fake__display__client.h | 11 + ...omponents_viz_test_mock__display__client.h | 11 + .../files/patch-content_app_content__main.cc | 11 + ...content_app_content__main__runner__impl.cc | 120 + .../files/patch-content_browser_BUILD.gn | 16 + ...ser_browser__child__process__host__impl.cc | 10 + ...tch-content_browser_browser__main__loop.cc | 37 + ...child__process__launcher__helper__linux.cc | 80 + ...ositor_viz__process__transport__factory.cc | 11 + ...devtools_protocol_system__info__handler.cc | 11 + ...rowser_download_download__manager__impl.cc | 29 + ..._access_font__enumeration__data__source.cc | 29 + ...ch-content_browser_gpu_compositor__util.cc | 20 + ...-content_browser_gpu_gpu__process__host.cc | 28 + ...edia_frameless__media__interface__proxy.cc | 20 + ...media_frameless__media__interface__proxy.h | 20 + ...t_browser_media_media__interface__proxy.cc | 20 + ...ia_media__keys__listener__manager__impl.cc | 11 + ...ugin__process__host__receiver__bindings.cc | 20 + ...r_renderer__host_delegated__frame__host.cc | 11 + ...t_input_input__device__change__observer.cc | 29 + ..._renderer__host_render__message__filter.cc | 29 + ...r_renderer__host_render__message__filter.h | 18 + ...derer__host_render__process__host__impl.cc | 55 + ...nderer__host_render__process__host__impl.h | 38 + ...renderer__host_render__view__host__impl.cc | 11 + ...__host_render__widget__host__view__aura.cc | 47 + ...r__host_render__widget__host__view__aura.h | 11 + ...der__widget__host__view__event__handler.cc | 11 + ...ch-content_browser_sandbox__host__linux.cc | 18 + ...uler_responsiveness_jank__monitor__impl.cc | 11 + ..._responsiveness_native__event__observer.cc | 20 + ...r_responsiveness_native__event__observer.h | 47 + ...lity__process__host__receiver__bindings.cc | 20 + ...tent_browser_utility__sandbox__delegate.cc | 24 + ...tch-content_browser_v8__snapshot__files.cc | 11 + ...web__contents_web__contents__view__aura.cc | 29 + ...er_webui_web__ui__main__frame__observer.cc | 38 + ...ser_webui_web__ui__main__frame__observer.h | 20 + ..._zygote__host_zygote__host__impl__linux.cc | 70 + ...r_zygote__host_zygote__host__impl__linux.h | 25 + .../patch-content_child_child__process.cc | 11 + .../files/patch-content_common_BUILD.gn | 12 + ...tch-content_common_font__list__unittest.cc | 11 + ...ent_common_mojo__core__library__support.cc | 11 + .../files/patch-content_common_user__agent.cc | 37 + .../files/patch-content_gpu_gpu__main.cc | 47 + ...h-content_gpu_gpu__sandbox__hook__linux.cc | 70 + ...pi__plugin_ppapi__blink__platform__impl.cc | 29 + ...api__plugin_ppapi__blink__platform__impl.h | 25 + ...ntent_ppapi__plugin_ppapi__plugin__main.cc | 23 + ...ent_public_browser_render__process__host.h | 20 + ...browser_zygote__host_zygote__host__linux.h | 16 + ...lic_common_common__param__traits__macros.h | 11 + ...content_public_common_content__features.cc | 50 + ...-content_public_common_content__features.h | 11 + ...content_public_common_content__switches.cc | 20 + ...-content_public_common_content__switches.h | 19 + ...-content_public_common_zygote_features.gni | 8 + ..._public_test_mock__render__process__host.h | 11 + ...ontent_public_test_mock__render__thread.cc | 11 + ...nt_renderer_media_render__media__client.cc | 11 + ...-content_renderer_render__process__impl.cc | 29 + ...h-content_renderer_render__thread__impl.cc | 38 + ...enderer_renderer__blink__platform__impl.cc | 47 + ...renderer_renderer__blink__platform__impl.h | 38 + ...nderer__main__platform__delegate__linux.cc | 18 + .../files/patch-content_shell_BUILD.gn | 11 + ...content_shell_app_shell__main__delegate.cc | 11 + ...ell_browser_shell__browser__main__parts.cc | 47 + ...atch-content_shell_browser_shell__paths.cc | 20 + ...utility_shell__content__utility__client.cc | 20 + .../files/patch-content_test_BUILD.gn | 20 + .../files/patch-content_utility_services.cc | 47 + ...eech__recognition__sandbox__hook__linux.cc | 37 + ...peech__recognition__sandbox__hook__linux.h | 14 + ..._platform__with__sandbox__support__impl.cc | 29 + ...__platform__with__sandbox__support__impl.h | 24 + .../patch-content_utility_utility__main.cc | 78 + .../files/patch-content_zygote_BUILD.gn | 11 + .../patch-content_zygote_zygote__linux.cc | 15 + ...atch-content_zygote_zygote__main__linux.cc | 64 + ...tch-device_bluetooth_bluetooth__adapter.cc | 11 + ...patch-device_bluetooth_cast__bluetooth.gni | 9 + .../patch-device_gamepad_gamepad__provider.cc | 11 + ...patch-device_gamepad_hid__writer__linux.cc | 11 + ..._browser_api_messaging_message__service.cc | 20 + ..._networking__private__delegate__factory.cc | 20 + ...ser__context__keyed__service__factories.cc | 11 + ...tch-extensions_browser_extension__prefs.cc | 11 + .../patch-extensions_browser_pref__names.cc | 11 + .../patch-extensions_browser_pref__names.h | 11 + ...ons_common_api___permission__features.json | 29 + .../patch-extensions_common_api_runtime.json | 12 + .../files/patch-extensions_common_command.cc | 11 + ...atch-extensions_common_features_feature.cc | 11 + ...ns_renderer_bindings_api__binding__util.cc | 11 + ...nsions_renderer_bindings_argument__spec.cc | 11 + ...ensions_shell_app_shell__main__delegate.cc | 20 + ...i_runtime_shell__runtime__api__delegate.cc | 11 + ...ell_browser_shell__browser__main__parts.cc | 11 + ..._browser_shell__extensions__api__client.cc | 11 + ...l_browser_shell__extensions__api__client.h | 20 + ...gle__apis_gcm_engine_heartbeat__manager.cc | 29 + ...fer_common_gpu__memory__buffer__support.cc | 20 + ..._angle__vulkan__image__backing__factory.cc | 11 + ...red__image_external__vk__image__backing.cc | 20 + ...ared__image_gl__texture__image__backing.cc | 11 + ...ge_gl__texture__image__backing__factory.cc | 11 + ...ce_shared__image_shared__image__factory.cc | 29 + ...ge_wrapped__sk__image__backing__factory.cc | 11 + ...d__buffer_service_webgpu__decoder__impl.cc | 11 + ...tests_gl__gpu__memory__buffer__unittest.cc | 20 + ...fer_tests_gl__oes__egl__image__unittest.cc | 20 + ...u_command__buffer_tests_gl__test__utils.cc | 20 + ...pu_command__buffer_tests_gl__test__utils.h | 11 + .../patch-gpu_config_gpu__control__list.cc | 20 + .../patch-gpu_config_gpu__test__config.cc | 11 + ...ipc_common_gpu__memory__buffer__support.cc | 20 + ..._ipc_common_gpu__memory__buffer__support.h | 11 + .../files/patch-gpu_ipc_service_gpu__init.cc | 65 + ...pc_service_gpu__memory__buffer__factory.cc | 20 + .../files/patch-gpu_ipc_service_x__util.h | 16 + .../patch-gpu_vulkan_generate__bindings.py | 11 + .../patch-gpu_vulkan_vulkan__device__queue.cc | 20 + .../patch-gpu_vulkan_vulkan__device__queue.h | 11 + ...h-gpu_vulkan_vulkan__function__pointers.cc | 11 + ...ch-gpu_vulkan_vulkan__function__pointers.h | 27 + .../files/patch-gpu_vulkan_vulkan__image.cc | 11 + .../files/patch-gpu_vulkan_vulkan__image.h | 20 + .../files/patch-gpu_vulkan_vulkan__util.cc | 11 + ...b_browser_headless__browser__main__parts.h | 11 + ...r_headless__browser__main__parts__linux.cc | 11 + ...owser_headless__content__browser__client.h | 11 + ...ser_headless__request__context__manager.cc | 11 + ...b_browser_headless__web__contents__impl.cc | 11 + ...s_lib_headless__content__main__delegate.cc | 11 + .../files/patch-ipc_ipc__channel.h | 11 + .../files/patch-ipc_ipc__channel__common.cc | 11 + .../files/patch-ipc_ipc__channel__mojo.cc | 11 + .../files/patch-ipc_ipc__message__utils.cc | 11 + .../files/patch-ipc_ipc__message__utils.h | 11 + .../files/patch-media_BUILD.gn | 12 + .../files/patch-media_audio_BUILD.gn | 24 + ...h-media_audio_alsa_audio__manager__alsa.cc | 54 + .../patch-media_audio_audio__features.cc | 11 + .../patch-media_audio_audio__input__device.cc | 11 + ...ia_audio_audio__output__proxy__unittest.cc | 14 + ...media_audio_sndio_audio__manager__sndio.cc | 184 ++ ...-media_audio_sndio_audio__manager__sndio.h | 69 + .../patch-media_audio_sndio_sndio__input.cc | 204 ++ .../patch-media_audio_sndio_sndio__input.h | 94 + .../patch-media_audio_sndio_sndio__output.cc | 190 ++ .../patch-media_audio_sndio_sndio__output.h | 91 + .../files/patch-media_base_audio__latency.cc | 11 + .../files/patch-media_base_media__switches.cc | 47 + .../files/patch-media_base_media__switches.h | 20 + .../files/patch-media_base_scopedfd__helper.h | 11 + .../patch-media_base_supported__types.cc | 11 + ...dia_base_user__input__monitor__unittest.cc | 29 + .../files/patch-media_base_vector__math.cc | 11 + .../files/patch-media_base_video__frame.cc | 74 + .../files/patch-media_base_video__frame.h | 47 + ...create__video__capture__device__factory.cc | 20 + ...o_fake__video__capture__device__factory.cc | 11 + ...o_file__video__capture__device__factory.cc | 11 + ...ia_capture_video_linux_fake__v4l2__impl.cc | 11 + ...dia_capture_video_linux_fake__v4l2__impl.h | 25 + ...ure_video_linux_v4l2__capture__delegate.cc | 44 + ...ture_video_linux_v4l2__capture__delegate.h | 15 + ...apture_video_linux_v4l2__capture__device.h | 11 + ...video_linux_v4l2__capture__device__impl.cc | 11 + ..._video_linux_v4l2__capture__device__impl.h | 11 + ..._video__capture__device__factory__linux.cc | 45 + ...x_video__capture__device__factory__linux.h | 11 + ...ideo_video__capture__buffer__pool__impl.cc | 11 + ...re_video_video__capture__device__client.cc | 11 + .../patch-media_cdm_cdm__paths__unittest.cc | 11 + .../patch-media_gpu_buffer__validation.cc | 29 + ...a_gpu_chromeos_video__decoder__pipeline.cc | 20 + ...pu__video__encode__accelerator__factory.cc | 11 + ...__video__decoding__sandbox__hook__linux.cc | 26 + ...e__video__decoding__sandbox__hook__linux.h | 16 + ...h-media_gpu_vaapi_vaapi__video__decoder.cc | 11 + .../patch-media_gpu_vaapi_vaapi__wrapper.cc | 11 + .../files/patch-media_media__options.gni | 30 + ...e__video__decoder__types__mojom__traits.cc | 29 + ...le__video__decoder__types__mojom__traits.h | 11 + ..._mojo_mojom_video__frame__mojom__traits.cc | 11 + ...h-media_video_fake__gpu__memory__buffer.cc | 38 + ...gpu__memory__buffer__video__frame__pool.cc | 29 + ...deo_video__encode__accelerator__adapter.cc | 20 + ...deo__encode__accelerator__adapter__test.cc | 11 + .../patch-media_webrtc_audio__processor.cc | 11 + .../patch-media_webrtc_helpers__unittests.cc | 20 + .../patch-media_webrtc_webrtc__features.cc | 20 + .../files/patch-mojo_core_BUILD.gn | 11 + .../files/patch-mojo_core_channel.cc | 14 + .../files/patch-mojo_core_embedder_features.h | 11 + .../patch-mojo_public_c_system_thunks.cc | 38 + ...patch-mojo_public_tools_bindings_mojom.gni | 19 + .../files/patch-net_BUILD.gn | 83 + ...atch-net_base_network__change__notifier.cc | 21 + ...t_base_network__change__notifier__posix.cc | 11 + ...atch-net_base_network__interfaces__posix.h | 11 + .../patch-net_base_sockaddr__util__posix.cc | 12 + ...et_base_sockaddr__util__posix__unittest.cc | 12 + .../files/patch-net_cert_cert__verifier.cc | 11 + .../patch-net_cert_cert__verify__proc.cc | 11 + .../files/patch-net_cert_cert__verify__proc.h | 11 + ...h-net_cert_cert__verify__proc__unittest.cc | 11 + ...ch-net_cert_test__root__certs__unittest.cc | 11 + ...h-net_disk__cache_blockfile_disk__format.h | 12 + ...isk__cache_simple_simple__file__tracker.cc | 20 + .../files/patch-net_dns_BUILD.gn | 31 + .../patch-net_dns_address__sorter__posix.cc | 10 + ...tch-net_dns_dns__config__service__posix.cc | 26 + .../files/patch-net_dns_dns__reloader.cc | 18 + .../files/patch-net_dns_dns__reloader.h | 11 + .../files/patch-net_dns_dns__util.cc | 11 + .../patch-net_dns_host__resolver__manager.cc | 11 + .../patch-net_dns_host__resolver__proc.cc | 22 + .../files/patch-net_dns_public_BUILD.gn | 11 + .../patch-net_dns_public_resolv__reader.h | 10 + .../patch-net_dns_public_scoped__res__state.h | 10 + ...atch-net_http_http__auth__gssapi__posix.cc | 14 + ...patch-net_http_http__auth__gssapi__posix.h | 12 + .../patch-net_http_http__network__session.cc | 12 + ...roxy__resolution_proxy__config__service.cc | 35 + ...esolution_proxy__config__service__linux.cc | 40 + .../files/patch-net_socket_socket__posix.cc | 11 + ...patch-net_socket_socks5__client__socket.cc | 12 + .../patch-net_socket_tcp__socket__posix.cc | 20 + .../patch-net_socket_udp__socket__posix.cc | 29 + .../patch-net_socket_udp__socket__unittest.cc | 47 + .../patch-net_third__party_quiche_BUILD.gn | 11 + ...y__tool_cert__verify__comparision__tool.cc | 29 + ...s_cert__verify__tool_cert__verify__tool.cc | 38 + ..._annotation_network__traffic__annotation.h | 20 + ...-net_url__request_url__request__context.cc | 11 + ...h-net_url__request_url__request__context.h | 11 + ..._request_url__request__context__builder.cc | 11 + .../files/patch-pdf_pdfium_pdfium__engine.cc | 20 + ..._mojom_printing__context__mojom__traits.cc | 20 + ...g_mojom_printing__context__mojom__traits.h | 11 + .../files/patch-printing_print__settings.cc | 20 + .../files/patch-printing_print__settings.h | 38 + ...ch-printing_print__settings__conversion.cc | 11 + ...patch-printing_printing__context__linux.cc | 38 + ...ox_print__backend__sandbox__hook__linux.cc | 51 + ...box_print__backend__sandbox__hook__linux.h | 16 + .../patch-remoting_base_chromoting__event.cc | 11 + .../patch-remoting_base_host__settings.cc | 20 + ...atch-remoting_client_display_sys__opengl.h | 11 + ...oting_codec_webrtc__video__encoder__vpx.cc | 11 + .../patch-remoting_host_base_switches.cc | 18 + .../files/patch-remoting_host_base_switches.h | 18 + .../patch-remoting_host_chromoting__host.cc | 11 + ...remoting_host_chromoting__host__context.cc | 11 + ...host_chromoting__host__services__client.cc | 20 + ...atch-remoting_host_evaluate__capability.cc | 11 + .../patch-remoting_host_heartbeat__sender.cc | 11 + .../patch-remoting_host_host__attributes.cc | 11 + .../patch-remoting_host_host__details.cc | 11 + .../files/patch-remoting_host_host__main.cc | 29 + .../patch-remoting_host_ipc__constants.cc | 11 + ...me_it2me__native__messaging__host__main.cc | 47 + ...moting_host_me2me__desktop__environment.cc | 11 + .../patch-remoting_host_policy__watcher.cc | 11 + ...te__open__url_remote__open__url__client.cc | 20 + ...mote__open__url_remote__open__url__util.cc | 11 + ..._open__url_url__forwarder__configurator.cc | 11 + ...tch-remoting_host_remoting__me2me__host.cc | 144 ++ ...h-remoting_host_setup_start__host__main.cc | 29 + ...mote__webauthn__caller__security__utils.cc | 29 + ...n_remote__webauthn__extension__notifier.cc | 28 + ...h-remoting_resources_remoting__strings.grd | 20 + .../files/patch-sandbox_BUILD.gn | 11 + .../files/patch-sandbox_features.gni | 11 + .../files/patch-sandbox_linux_BUILD.gn | 58 + ...ox_linux_services_init__process__reaper.cc | 15 + ...andbox_linux_services_libc__interceptor.cc | 21 + .../files/patch-sandbox_policy_BUILD.gn | 39 + .../files/patch-sandbox_policy_features.cc | 14 + ...sandbox_policy_freebsd_sandbox__freebsd.cc | 256 ++ ...-sandbox_policy_freebsd_sandbox__freebsd.h | 281 +++ .../patch-sandbox_policy_mojom_sandbox.mojom | 15 + ...sandbox_policy_openbsd_sandbox__openbsd.cc | 416 ++++ ...-sandbox_policy_openbsd_sandbox__openbsd.h | 285 +++ .../files/patch-sandbox_policy_sandbox.cc | 22 + .../files/patch-sandbox_policy_sandbox.h | 22 + .../patch-sandbox_policy_sandbox__type.cc | 70 + .../files/patch-sandbox_policy_switches.cc | 22 + .../files/patch-sandbox_policy_switches.h | 21 + ...vices_audio_audio__sandbox__hook__linux.cc | 31 + ...rvices_audio_audio__sandbox__hook__linux.h | 14 + ...cert__verifier_cert__verifier__creation.cc | 28 + ...ces_device_compute__pressure_cpu__probe.cc | 10 + ...device_geolocation_location__arbitrator.cc | 11 + .../files/patch-services_device_hid_BUILD.gn | 28 + ...rvices_device_hid_hid__connection__fido.cc | 200 ++ ...ervices_device_hid_hid__connection__fido.h | 60 + ...ces_device_hid_hid__connection__freebsd.cc | 245 ++ ...ices_device_hid_hid__connection__freebsd.h | 70 + .../patch-services_device_hid_hid__service.cc | 24 + ...-services_device_hid_hid__service__fido.cc | 330 +++ ...h-services_device_hid_hid__service__fido.h | 46 + ...rvices_device_hid_hid__service__freebsd.cc | 400 ++++ ...ervices_device_hid_hid__service__freebsd.h | 52 + .../patch-services_device_serial_BUILD.gn | 16 + ...evice_serial_serial__device__enumerator.cc | 20 + ...evice_serial_serial__io__handler__posix.cc | 11 + ...one__monitor_time__zone__monitor__linux.cc | 14 + .../files/patch-services_device_usb_BUILD.gn | 38 + .../files/patch-services_network_BUILD.gn | 10 + ...s_network_network__sandbox__hook__linux.cc | 26 + ...es_network_network__sandbox__hook__linux.h | 14 + ...patch-services_network_network__service.cc | 11 + ...rumentation_queued__request__dispatcher.cc | 65 + ...ublic_cpp_memory__instrumentation_BUILD.gn | 16 + ..._cpp_memory__instrumentation_os__metrics.h | 20 + ...emory__instrumentation_os__metrics__bsd.cc | 61 + .../patch-services_service__manager_BUILD.gn | 11 + ...er_public_cpp_service__executable_BUILD.gn | 11 + ...s_video__capture_broadcasting__receiver.cc | 11 + ...public_mojom_video__capture__service.mojom | 15 + .../patch-skia_ext_SkMemory__new__handler.cpp | 11 + ...third__party_abseil-cpp_absl_base_config.h | 21 + ...y_abseil-cpp_absl_base_internal_sysinfo.cc | 23 + ..._absl_debugging_internal_elf__mem__image.h | 11 + ...me_internal_cctz_src_time__zone__format.cc | 11 + .../files/patch-third__party_angle_BUILD.gn | 47 + ...h-third__party_angle_src_common_platform.h | 19 + ...rd__party_angle_src_common_vulkan_BUILD.gn | 11 + ...src_gpu__info__util_SystemInfo__internal.h | 16 + ...src_gpu__info__util_SystemInfo__libpci.cpp | 90 + ..._src_gpu__info__util_SystemInfo__linux.cpp | 35 + ...le_src_gpu__info__util_SystemInfo__x11.cpp | 60 + ...hird__party_angle_src_libANGLE_Display.cpp | 47 + ...__party_angle_src_libANGLE_formatutils.cpp | 11 + ...ngle_src_libANGLE_renderer_driver__utils.h | 11 + ..._libANGLE_renderer_gl_glx_FunctionsGLX.cpp | 15 + ..._libANGLE_renderer_vulkan_DisplayVk__api.h | 11 + ...party_angle_src_third__party_volk_BUILD.gn | 11 + .../patch-third__party_angle_util_BUILD.gn | 11 + ...common_privacy__budget_active__sampling.cc | 11 + ...es_renderer__preferences__mojom__traits.cc | 11 + ...derer__preferences_renderer__preferences.h | 11 + ...ces_renderer__preferences__mojom__traits.h | 11 + ...rd__party_blink_public_platform_platform.h | 11 + ..._party_blink_public_platform_web__vector.h | 11 + ...indings_scripts_bind__gen_style__format.py | 11 + ...rer_build_scripts_run__with__pythonpath.py | 10 + ..._renderer_controller_blink__initializer.cc | 35 + ...ontroller_memory__usage__monitor__posix.cc | 21 + ...controller_memory__usage__monitor__posix.h | 47 + ...renderer_core_editing_editing__behavior.cc | 11 + ...core_execution__context_navigator__base.cc | 11 + ..._renderer_core_exported_web__view__impl.cc | 20 + ...nk_renderer_core_frame_web__frame__test.cc | 20 + ...tml_canvas_canvas__async__blob__creator.cc | 11 + ...core_inspector_inspector__memory__agent.cc | 11 + ...blink_renderer_core_layout_layout__view.cc | 20 + ..._blink_renderer_core_paint_paint__layer.cc | 11 + ...erer_core_scroll_scrollbar__theme__aura.cc | 20 + ...ules_media_audio_audio__device__factory.cc | 11 + ...o_audio__renderer__mixer__manager__test.cc | 11 + ...onnection_webrtc__audio__renderer__test.cc | 11 + ...s_webaudio_audio__worklet__thread__test.cc | 11 + ...s_webgl_webgl__rendering__context__base.cc | 11 + ...es_webgl_webgl__webcodecs__video__frame.cc | 11 + ...rd__party_blink_renderer_platform_BUILD.gn | 11 + ...ink_renderer_platform_fonts_font__cache.cc | 20 + ...link_renderer_platform_fonts_font__cache.h | 47 + ...nderer_platform_fonts_font__description.cc | 20 + ...k_renderer_platform_fonts_font__metrics.cc | 29 + ...rer_platform_fonts_font__platform__data.cc | 20 + ...atform_fonts_font__unique__name__lookup.cc | 20 + ...r_platform_fonts_skia_font__cache__skia.cc | 29 + ...latform_graphics_begin__frame__provider.cc | 15 + ...atform_graphics_video__frame__submitter.cc | 11 + ..._platform_runtime__enabled__features.json5 | 62 + ...nderer_platform_scheduler_common_thread.cc | 11 + ...t_compositing_categorized__worker__pool.cc | 11 + ...erer_platform_wtf_container__annotations.h | 11 + ...blink_renderer_platform_wtf_math__extras.h | 23 + ...blink_renderer_platform_wtf_stack__util.cc | 37 + ...third__party_boringssl_BUILD.generated.gni | 18 + .../patch-third__party_boringssl_BUILD.gn | 11 + ...ringssl_src_crypto_cpu__aarch64__openbsd.c | 60 + ...gssl_src_crypto_fipsmodule_rand_internal.h | 12 + ...ingssl_src_crypto_rand__extra_arc4random.c | 36 + ...party_boringssl_src_crypto_refcount__c11.c | 12 + ...party_boringssl_src_include_openssl_base.h | 14 + ...rty_boringssl_src_include_openssl_thread.h | 10 + ...atch-third__party_brotli_common_platform.h | 11 + ...d_crashpad_build_crashpad__buildconfig.gni | 11 + ...d__party_crashpad_crashpad_client_BUILD.gn | 16 + ...crashpad_client_crashpad__client__posix.cc | 43 + ...d_minidump_minidump__misc__info__writer.cc | 13 + ...ashpad_crashpad_util_misc_address__types.h | 20 + ...hpad_crashpad_util_misc_capture__context.h | 22 + ...rty_crashpad_crashpad_util_misc_metrics.cc | 11 + ..._party_crashpad_crashpad_util_misc_uuid.cc | 11 + ...pad_crashpad_util_posix_close__multiple.cc | 11 + ...ad_crashpad_util_posix_drop__privileges.cc | 11 + ...ty_crashpad_crashpad_util_posix_signals.cc | 33 + ...d_util_posix_symbolic__constants__posix.cc | 20 + .../files/patch-third__party_crc32c_BUILD.gn | 11 + ...y_dawn_include_dawn_native_VulkanBackend.h | 11 + ...ird__party_dawn_src_dawn_common_Platform.h | 14 + ..._dawn_src_dawn_native_vulkan_BackendVk.cpp | 11 + .../files/patch-third__party_ffmpeg_BUILD.gn | 10 + ...omium_config_Chrome_openbsd_arm64_config.h | 740 ++++++ ..._Chrome_openbsd_arm64_config__components.h | 2066 ++++++++++++++++ ...mium_config_Chrome_openbsd_ia32_config.asm | 723 ++++++ ...romium_config_Chrome_openbsd_ia32_config.h | 740 ++++++ ...g_Chrome_openbsd_ia32_config__components.h | 2066 ++++++++++++++++ ...omium_config_Chrome_openbsd_x64_config.asm | 725 ++++++ ...hromium_config_Chrome_openbsd_x64_config.h | 742 ++++++ ...ig_Chrome_openbsd_x64_config__components.h | 2086 +++++++++++++++++ ...third__party_ffmpeg_libavcodec_x86_cabac.h | 12 + .../patch-third__party_ffmpeg_libavutil_cpu.c | 14 + .../patch-third__party_ffmpeg_libavutil_mem.c | 12 + ...ird__party_ffmpeg_libavutil_random__seed.c | 14 + ...h-third__party_fontconfig_include_config.h | 89 + ...third__party_fontconfig_src_src_fccompat.c | 13 + ...arty_ipcz_src_reference__drivers_random.cc | 20 + ..._party_ipcz_src_standalone_base_logging.cc | 12 + ...hird__party_leveldatabase_env__chromium.cc | 12 + .../files/patch-third__party_libevent_event.h | 14 + ...p_src_phonenumbers_base_memory_singleton.h | 11 + ...c_phonenumbers_base_synchronization_lock.h | 11 + ...pp_src_phonenumbers_base_thread__checker.h | 20 + ...ird__party_libsync_src_include_sync_sync.h | 12 + .../patch-third__party_libsync_src_sync.c | 25 + .../files/patch-third__party_libusb_BUILD.gn | 46 + ...atch-third__party_libusb_src_libusb_core.c | 11 + .../patch-third__party_libxml_linux_config.h | 12 + .../patch-third__party_libxml_src_dict.c | 41 + .../patch-third__party_lzma__sdk_C_CpuArch.c | 44 + .../files/patch-third__party_maldoca_BUILD.gn | 13 + ...oca_src_maldoca_base_get__runfiles__dir.cc | 32 + ...ca_service_common_process__doc__wrapper.cc | 29 + .../files/patch-third__party_nasm_BUILD.gn | 16 + ...ch-third__party_nasm_config_config-linux.h | 111 + .../files/patch-third__party_node_node.py | 11 + .../files/patch-third__party_opus_BUILD.gn | 10 + ...party_pdfium_core_fxge_cfx__fontmapper.cpp | 11 + ...pdfium_core_fxge_linux_fx__linux__impl.cpp | 23 + ...d__party_pdfium_fxjs_fx__date__helpers.cpp | 22 + ...xfa_fxfa_parser_cxfa__timezoneprovider.cpp | 41 + ...etto_include_perfetto_base_build__config.h | 66 + ...etto_include_perfetto_base_thread__utils.h | 22 + ...arty_perfetto_include_perfetto_base_time.h | 20 + ...etto_include_perfetto_ext_base_event__fd.h | 11 + ..._include_perfetto_ext_base_thread__utils.h | 15 + ...to_protos_perfetto_trace_ftrace_v4l2.proto | 56 + ...hird__party_perfetto_src_base_event__fd.cc | 22 + ..._party_perfetto_src_base_periodic__task.cc | 20 + ...__party_perfetto_src_base_string__utils.cc | 15 + ...rty_perfetto_src_base_subprocess__posix.cc | 22 + ..._perfetto_src_base_test_vm__test__utils.cc | 11 + ..._perfetto_src_base_thread__task__runner.cc | 14 + ...d__party_perfetto_src_base_unix__socket.cc | 26 + ...src_tracing_core_tracing__service__impl.cc | 12 + ...rotobuf_src_google_protobuf_arenastring.cc | 12 + ...c_google_protobuf_stubs_platform__macros.h | 11 + .../files/patch-third__party_ruy_BUILD.gn | 11 + ...patch-third__party_skia_src_core_SkCpu.cpp | 45 + ...__party_skia_src_ports_SkOSFile__posix.cpp | 11 + .../files/patch-third__party_sqlite_BUILD.gn | 11 + ...d__party_sqlite_src_amalgamation_sqlite3.c | 23 + ...d__party_swiftshader_src_Reactor_Debug.cpp | 11 + ...ty_swiftshader_src_System_Configurator.cpp | 12 + ...er_src_Vulkan_VkSemaphoreExternalLinux.hpp | 20 + ...-third__party_swiftshader_src_WSI_BUILD.gn | 11 + ...hird__party_swiftshader_src_WSI_libXCB.cpp | 20 + ...configs_linux_include_llvm_Config_config.h | 174 ++ ...o_build_Linux_include_llvm_Config_config.h | 47 + ...iftshader_third__party_marl_src_memory.cpp | 11 + ...iftshader_third__party_marl_src_thread.cpp | 11 + ...ird__party_test__fonts_fontconfig_BUILD.gn | 15 + ...onts_fontconfig_fontconfig__util__linux.cc | 27 + .../patch-third__party_tflite_features.gni | 11 + .../patch-third__party_unrar_src_crypt.cpp | 11 + ...rty_vulkan-deps_vulkan-loader_src_BUILD.gn | 11 + ...ulkan-loader_src_loader_get__environment.c | 20 + ...ulkan-loader_src_loader_get__environment.h | 16 + ...lkan-loader_src_loader_stack__allocation.h | 16 + ...n-loader_src_loader_vk__loader__platform.h | 45 + ...n-layers_src_layers_vk__loader__platform.h | 11 + ...idation-layers_src_layers_vk__mem__alloc.h | 12 + ...memory__allocator_include_vk__mem__alloc.h | 11 + .../patch-third__party_wayland_features.gni | 17 + .../files/patch-third__party_webrtc_BUILD.gn | 12 + ...arty_webrtc_modules_audio__device_BUILD.gn | 11 + ...ture_linux_x11_x__server__pixel__buffer.cc | 15 + ...tch-third__party_webrtc_rtc__base_BUILD.gn | 11 + ...hird__party_webrtc_rtc__base_byte__order.h | 11 + ...ird__party_webrtc_rtc__base_ip__address.cc | 12 + ...h-third__party_webrtc_rtc__base_network.cc | 15 + ...brtc_rtc__base_physical__socket__server.cc | 65 + ...ebrtc_rtc__base_physical__socket__server.h | 11 + ...ebrtc_rtc__base_platform__thread__types.cc | 40 + ...c_rtc__base_third__party_sigslot_sigslot.h | 23 + ...rd__party_webrtc_system__wrappers_BUILD.gn | 11 + .../files/patch-third__party_zlib_BUILD.gn | 29 + .../patch-tools_generate__stubs_rules.gni | 10 + ...tools_gn_build_build__linux.ninja.template | 11 + .../files/patch-tools_gn_build_gen.py | 34 + ...tch-tools_gn_src_base_files_file__posix.cc | 11 + .../files/patch-tools_gn_src_gn_version.h | 15 + .../patch-tools_gn_src_util_exe__path.cc | 90 + ...schema__compiler_cpp__bundle__generator.py | 11 + ...son__schema__compiler_feature__compiler.py | 11 + ...mory_partition__allocator_inspect__utils.h | 11 + ...ols_perf_chrome__telemetry__build_BUILD.gn | 20 + ...h-tools_protoc__wrapper_protoc__wrapper.py | 24 + ...tools_variations_fieldtrial__to__struct.py | 11 + .../files/patch-ui_aura_screen__ozone.cc | 11 + .../files/patch-ui_aura_screen__ozone.h | 20 + ...-ui_base_clipboard_clipboard__constants.cc | 11 + ...h-ui_base_clipboard_clipboard__constants.h | 11 + .../patch-ui_base_cursor_cursor__factory.cc | 11 + .../patch-ui_base_cursor_cursor__factory.h | 11 + ...p_os__exchange__data__provider__factory.cc | 20 + ...__exchange__data__provider__non__backed.cc | 11 + ...-ui_base_ime_dummy__text__input__client.cc | 11 + ...h-ui_base_ime_dummy__text__input__client.h | 11 + ...h-ui_base_ime_fake__text__input__client.cc | 11 + ...ch-ui_base_ime_fake__text__input__client.h | 11 + ..._linux__input__method__context__factory.cc | 20 + .../patch-ui_base_ime_text__input__client.h | 11 + ...patch-ui_base_resource_resource__bundle.cc | 11 + ...ch-ui_base_test_skia__gold__pixel__diff.cc | 11 + .../files/patch-ui_base_ui__base__features.cc | 20 + .../patch-ui_base_webui_web__ui__util.cc | 11 + .../patch-ui_base_x_x11__cursor__factory.cc | 11 + .../patch-ui_base_x_x11__cursor__factory.h | 20 + .../patch-ui_base_x_x11__cursor__loader.cc | 41 + .../patch-ui_base_x_x11__shm__image__pool.cc | 53 + .../files/patch-ui_color_color__id.h | 11 + .../files/patch-ui_compositor_compositor.cc | 11 + .../files/patch-ui_compositor_compositor.h | 11 + ...patch-ui_compositor_compositor__observer.h | 11 + .../files/patch-ui_display_screen.cc | 11 + .../files/patch-ui_display_screen.h | 20 + ..._devices_x11_device__data__manager__x11.cc | 10 + .../files/patch-ui_events_event.cc | 20 + .../files/patch-ui_events_event__switches.cc | 11 + .../files/patch-ui_events_event__switches.h | 11 + ..._events_keycodes_dom_keycode__converter.cc | 38 + ...i_events_keycodes_dom_keycode__converter.h | 11 + .../files/patch-ui_gfx_BUILD.gn | 11 + .../files/patch-ui_gfx_canvas__skia.cc | 11 + .../files/patch-ui_gfx_codec_png__codec.cc | 11 + .../patch-ui_gfx_font__fallback__linux.cc | 11 + .../files/patch-ui_gfx_font__list.cc | 11 + .../files/patch-ui_gfx_font__render__params.h | 20 + ...atch-ui_gfx_font__render__params__linux.cc | 20 + .../files/patch-ui_gfx_font__util.cc | 20 + .../files/patch-ui_gfx_gpu__memory__buffer.cc | 11 + .../files/patch-ui_gfx_gpu__memory__buffer.h | 20 + ...ch-ui_gfx_ipc_gfx__param__traits__macros.h | 44 + ...fx_linux_client__native__pixmap__dmabuf.cc | 25 + ..._gfx_mojom_buffer__types__mojom__traits.cc | 20 + ...om_native__handle__types__mojom__traits.cc | 34 + ...jom_native__handle__types__mojom__traits.h | 36 + .../patch-ui_gfx_native__pixmap__handle.cc | 62 + .../patch-ui_gfx_native__pixmap__handle.h | 38 + .../patch-ui_gfx_native__widget__types.h | 20 + .../patch-ui_gfx_platform__font__skia.cc | 20 + .../patch-ui_gfx_render__text__api__fuzzer.cc | 20 + .../patch-ui_gfx_render__text__fuzzer.cc | 20 + .../files/patch-ui_gfx_switches.cc | 11 + .../files/patch-ui_gfx_switches.h | 11 + .../patch-ui_gfx_x_generated__protos_dri3.cc | 11 + .../patch-ui_gfx_x_generated__protos_shm.cc | 11 + .../files/patch-ui_gfx_x_xlib__support.cc | 21 + .../files/patch-ui_gl_BUILD.gn | 35 + .../files/patch-ui_gl_generate__bindings.py | 12 + ...ch-ui_gl_gl__bindings__api__autogen__glx.h | 10 + .../patch-ui_gl_gl__bindings__autogen__glx.cc | 61 + .../patch-ui_gl_gl__bindings__autogen__glx.h | 43 + .../files/patch-ui_gl_gl__context.cc | 11 + .../files/patch-ui_gl_gl__features.cc | 11 + ...ch-ui_gl_gl__image__glx__native__pixmap.cc | 11 + ...ch-ui_gl_sync__control__vsync__provider.cc | 38 + ...tch-ui_gl_sync__control__vsync__provider.h | 20 + .../files/patch-ui_gtk_gtk__compat.cc | 50 + ...atch-ui_gtk_printing_print__dialog__gtk.cc | 11 + ...sage__center_views_message__popup__view.cc | 11 + .../patch-ui_native__theme_native__theme.h | 11 + ...ch-ui_native__theme_native__theme__base.cc | 11 + .../files/patch-ui_ozone_common_egl__util.cc | 14 + ...orm_headless_headless__surface__factory.cc | 20 + ...form_headless_ozone__platform__headless.cc | 11 + ...adless_vulkan__implementation__headless.cc | 11 + ...and_gpu_vulkan__implementation__wayland.cc | 14 + ...ozone_platform_x11_ozone__platform__x11.cc | 11 + ...latform_x11_vulkan__implementation__x11.cc | 14 + .../patch-ui_ozone_public_ozone__platform.h | 11 + ...indow_platform__window__init__properties.h | 20 + ...patch-ui_strings_app__locale__settings.grd | 11 + ...translations_app__locale__settings__bn.xtb | 11 + ...translations_app__locale__settings__ja.xtb | 11 + ...translations_app__locale__settings__ko.xtb | 11 + ...translations_app__locale__settings__ml.xtb | 11 + ...translations_app__locale__settings__th.xtb | 11 + ...nslations_app__locale__settings__zh-CN.xtb | 11 + ...nslations_app__locale__settings__zh-TW.xtb | 11 + ...atch-ui_views_controls_prefix__selector.cc | 11 + ...patch-ui_views_controls_prefix__selector.h | 11 + ...h-ui_views_controls_textfield_textfield.cc | 64 + ...ch-ui_views_controls_textfield_textfield.h | 20 + .../patch-ui_views_corewm_tooltip__aura.cc | 11 + ...patch-ui_views_examples_widget__example.cc | 11 + .../patch-ui_views_focus_focus__manager.cc | 20 + .../patch-ui_views_style_platform__style.cc | 29 + .../files/patch-ui_views_views__delegate.cc | 11 + .../files/patch-ui_views_views__delegate.h | 11 + ..._aura_desktop__drag__drop__client__ozone.h | 11 + ...et_desktop__aura_desktop__screen__ozone.cc | 11 + ...a_desktop__window__tree__host__platform.cc | 38 + ...st__platform__impl__interactive__uitest.cc | 11 + .../files/patch-ui_views_widget_widget.cc | 20 + .../files/patch-ui_views_widget_widget.h | 11 + ...tch-ui_views_window_custom__frame__view.cc | 11 + .../patch-ui_views_window_dialog__delegate.cc | 11 + ...patch-ui_views_window_frame__background.cc | 11 + .../files/patch-ui_webui_resources_js_cr.js | 14 + .../files/patch-v8_BUILD.gn | 45 + .../files/patch-v8_include_v8-internal.h | 11 + .../files/patch-v8_include_v8config.h | 37 + .../files/patch-v8_src_api_api.cc | 20 + .../files/patch-v8_src_base_atomicops.h | 24 + ...h-v8_src_base_platform_platform-freebsd.cc | 32 + ...h-v8_src_base_platform_platform-openbsd.cc | 28 + ...tch-v8_src_base_platform_platform-posix.cc | 53 + .../files/patch-v8_src_base_sys-info.cc | 11 + ..._backend_ia32_instruction-selector-ia32.cc | 20 + .../patch-v8_src_diagnostics_perf-jit.cc | 11 + .../files/patch-v8_src_diagnostics_perf-jit.h | 11 + .../files/patch-v8_src_sandbox_sandbox.cc | 11 + ...8_src_trap-handler_handler-inside-posix.cc | 26 + ...v8_src_trap-handler_handler-inside-posix.h | 11 + .../patch-v8_src_trap-handler_trap-handler.h | 11 + ...asm_baseline_ia32_liftoff-assembler-ia32.h | 101 + .../files/patch-v8_tools_run.py | 11 + ...ayer_browser_browser__main__parts__impl.cc | 20 + ..._browser_content__browser__client__impl.cc | 20 + ...r_browser_content__browser__client__impl.h | 11 + ...owser_system__network__context__manager.cc | 11 + .../patch-weblayer_common_weblayer__paths.cc | 20 + .../files/ungoogled-chromium.desktop.in | 11 + .../files/ungoogled-chromium.in | 19 + www/ungoogled-chromium/pkg-descr | 2 + www/ungoogled-chromium/pkg-plist | 145 ++ 1112 files changed, 38541 insertions(+) create mode 100644 www/ungoogled-chromium/Makefile create mode 100644 www/ungoogled-chromium/Makefile.tests create mode 100644 www/ungoogled-chromium/distinfo create mode 100644 www/ungoogled-chromium/files/patch-BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-apps_ui_views_app__window__frame__view.cc create mode 100644 www/ungoogled-chromium/files/patch-ash_display_mirror__window__controller.cc create mode 100644 www/ungoogled-chromium/files/patch-base_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_address__space__randomization.h create mode 100644 www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_page__allocator.h create mode 100644 www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_page__allocator__constants.h create mode 100644 www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h create mode 100644 www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__address__space.cc create mode 100644 www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.cc create mode 100644 www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_rand__util__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_threading_platform__thread__internal__posix.h create mode 100644 www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_threading_platform__thread__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__config.h create mode 100644 www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__constants.h create mode 100644 www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__page.h create mode 100644 www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__root.cc create mode 100644 www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_spinning__mutex.cc create mode 100644 www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_starscan_stack_stack.cc create mode 100644 www/ungoogled-chromium/files/patch-base_atomicops.h create mode 100644 www/ungoogled-chromium/files/patch-base_base__paths__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-base_base__switches.cc create mode 100644 www/ungoogled-chromium/files/patch-base_base__switches.h create mode 100644 www/ungoogled-chromium/files/patch-base_cpu.h create mode 100644 www/ungoogled-chromium/files/patch-base_debug_debugger__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-base_debug_elf__reader.cc create mode 100644 www/ungoogled-chromium/files/patch-base_debug_proc__maps__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-base_debug_stack__trace__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-base_files_dir__reader__linux.h create mode 100644 www/ungoogled-chromium/files/patch-base_files_dir__reader__posix.h create mode 100644 www/ungoogled-chromium/files/patch-base_files_file__path__watcher__bsd.cc create mode 100644 www/ungoogled-chromium/files/patch-base_files_file__path__watcher__kqueue.h create mode 100644 www/ungoogled-chromium/files/patch-base_files_file__path__watcher__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-base_files_file__util__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-base_files_file__util__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-base_files_important__file__writer__cleaner.cc create mode 100644 www/ungoogled-chromium/files/patch-base_files_scoped__file.cc create mode 100644 www/ungoogled-chromium/files/patch-base_i18n_icu__util.cc create mode 100644 www/ungoogled-chromium/files/patch-base_linux__util.cc create mode 100644 www/ungoogled-chromium/files/patch-base_logging__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-base_memory_discardable__memory.cc create mode 100644 www/ungoogled-chromium/files/patch-base_memory_discardable__memory__internal.h create mode 100644 www/ungoogled-chromium/files/patch-base_memory_madv__free__discardable__memory__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-base_memory_platform__shared__memory__region.h create mode 100644 www/ungoogled-chromium/files/patch-base_memory_platform__shared__memory__region__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-base_message__loop_message__pump__glib.cc create mode 100644 www/ungoogled-chromium/files/patch-base_native__library__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-base_native__library__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-base_posix_can__lower__nice__to.cc create mode 100644 www/ungoogled-chromium/files/patch-base_posix_unix__domain__socket.cc create mode 100644 www/ungoogled-chromium/files/patch-base_posix_unix__domain__socket__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-base_process_kill.h create mode 100644 www/ungoogled-chromium/files/patch-base_process_kill__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-base_process_launch.h create mode 100644 www/ungoogled-chromium/files/patch-base_process_launch__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-base_process_memory.cc create mode 100644 www/ungoogled-chromium/files/patch-base_process_process__handle.cc create mode 100644 www/ungoogled-chromium/files/patch-base_process_process__handle.h create mode 100644 www/ungoogled-chromium/files/patch-base_process_process__handle__freebsd.cc create mode 100644 www/ungoogled-chromium/files/patch-base_process_process__handle__openbsd.cc create mode 100644 www/ungoogled-chromium/files/patch-base_process_process__iterator__freebsd.cc create mode 100644 www/ungoogled-chromium/files/patch-base_process_process__iterator__openbsd.cc create mode 100644 www/ungoogled-chromium/files/patch-base_process_process__metrics.cc create mode 100644 www/ungoogled-chromium/files/patch-base_process_process__metrics.h create mode 100644 www/ungoogled-chromium/files/patch-base_process_process__metrics__freebsd.cc create mode 100644 www/ungoogled-chromium/files/patch-base_process_process__metrics__openbsd.cc create mode 100644 www/ungoogled-chromium/files/patch-base_process_process__metrics__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-base_process_process__metrics__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-base_process_process__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-base_process_process__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-base_profiler_module__cache.cc create mode 100644 www/ungoogled-chromium/files/patch-base_profiler_stack__sampling__profiler__test__util.cc create mode 100644 www/ungoogled-chromium/files/patch-base_profiler_stack__sampling__profiler__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-base_rand__util.h create mode 100644 www/ungoogled-chromium/files/patch-base_rand__util__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-base_strings_safe__sprintf__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-base_synchronization_lock__impl.h create mode 100644 www/ungoogled-chromium/files/patch-base_syslog__logging.cc create mode 100644 www/ungoogled-chromium/files/patch-base_system_sys__info.cc create mode 100644 www/ungoogled-chromium/files/patch-base_system_sys__info.h create mode 100644 www/ungoogled-chromium/files/patch-base_system_sys__info__freebsd.cc create mode 100644 www/ungoogled-chromium/files/patch-base_system_sys__info__openbsd.cc create mode 100644 www/ungoogled-chromium/files/patch-base_system_sys__info__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-base_system_sys__info__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-base_task_thread__pool_environment__config__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-base_test_launcher_test__launcher.cc create mode 100644 www/ungoogled-chromium/files/patch-base_test_test__file__util__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-base_test_test__file__util__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-base_third__party_symbolize_symbolize.cc create mode 100644 www/ungoogled-chromium/files/patch-base_threading_platform__thread.h create mode 100644 www/ungoogled-chromium/files/patch-base_threading_platform__thread__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-base_threading_platform__thread__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-base_threading_platform__thread__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-base_trace__event_malloc__dump__provider.cc create mode 100644 www/ungoogled-chromium/files/patch-base_trace__event_memory__dump__manager.cc create mode 100644 www/ungoogled-chromium/files/patch-base_trace__event_process__memory__dump.cc create mode 100644 www/ungoogled-chromium/files/patch-base_tracing_trace__time.cc create mode 100644 www/ungoogled-chromium/files/patch-base_tracing_trace__time.h create mode 100644 www/ungoogled-chromium/files/patch-build_config_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-build_config_BUILDCONFIG.gn create mode 100644 www/ungoogled-chromium/files/patch-build_config_compiler_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-build_config_linux_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-build_config_linux_pkg-config.py create mode 100644 www/ungoogled-chromium/files/patch-build_config_ozone.gni create mode 100644 www/ungoogled-chromium/files/patch-build_config_rust.gni create mode 100644 www/ungoogled-chromium/files/patch-build_config_v8__target__cpu.gni create mode 100644 www/ungoogled-chromium/files/patch-build_detect__host__arch.py create mode 100644 www/ungoogled-chromium/files/patch-build_gn__run__binary.py create mode 100644 www/ungoogled-chromium/files/patch-build_linux_chrome.map create mode 100644 www/ungoogled-chromium/files/patch-build_linux_strip__binary.py create mode 100644 www/ungoogled-chromium/files/patch-build_linux_unbundle_libevent.gn create mode 100644 www/ungoogled-chromium/files/patch-build_linux_unbundle_libusb.gn create mode 100644 www/ungoogled-chromium/files/patch-build_linux_unbundle_replace__gn__files.py create mode 100644 www/ungoogled-chromium/files/patch-build_toolchain_freebsd_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-build_toolchain_gcc__solink__wrapper.py create mode 100644 www/ungoogled-chromium/files/patch-build_toolchain_gcc__toolchain.gni create mode 100644 www/ungoogled-chromium/files/patch-build_toolchain_openbsd_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-cc_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-chrome_app_app__management__strings.grdp create mode 100644 www/ungoogled-chromium/files/patch-chrome_app_chrome__command__ids.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_app_chrome__main.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_app_chrome__main__delegate.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_app_chromium__strings.grd create mode 100644 www/ungoogled-chromium/files/patch-chrome_app_generated__resources.grd create mode 100644 www/ungoogled-chromium/files/patch-chrome_app_google__chrome__strings.grd create mode 100644 www/ungoogled-chromium/files/patch-chrome_app_profiles__strings.grdp create mode 100644 www/ungoogled-chromium/files/patch-chrome_app_settings__strings.grdp create mode 100644 www/ungoogled-chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd create mode 100644 www/ungoogled-chromium/files/patch-chrome_app_theme_theme__resources.grd create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_after__startup__task__utils.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_autocomplete_chrome__autocomplete__scheme__classifier.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_background_background__mode__manager.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_background_background__mode__optimizer.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_browser__features.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_browser__resources.grd create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__extra__parts__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_crash__upload__list_crash__upload__list.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_custom__handlers_chrome__protocol__handler__registry__delegate.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_defaults.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_dev__ui__browser__resources.grd create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_device__identity_device__oauth2__token__service__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_devtools_devtools__eye__dropper.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_diagnostics_diagnostics__writer.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_download_download__commands.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_download_download__commands.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_download_download__file__picker.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_download_download__item__model.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_analysis_analysis__service__settings.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_browser_commands_key__rotation__command__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_core_persistence_key__persistence__delegate__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_enterprise_remote__commands_cbcm__remote__commands__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_enterprise_signals_device__info__fetcher.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_enterprise_signals_device__info__fetcher__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_extensions_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_messaging_native__process__launcher__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_first__run_first__run__dialog.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_first__run_first__run__internal.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_headless_headless__mode__util.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_intranet__redirect__detector.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_media_audio__service__util.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_media_router_discovery_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_media_router_discovery_discovery__network__list__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_media_router_discovery_discovery__network__list__wifi__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__event__log__uploader.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_memory__details.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_memory__details__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_metrics_perf_cpu__identity.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_metrics_power_process__metrics__recorder__util.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_metrics_power_process__monitor.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_metrics_power_process__monitor.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_new__tab__page_modules_drive_drive__service.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_new__tab__page_new__tab__page__util.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_notifications_notification__display__service__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_notifications_notification__platform__bridge__delegator.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_platform__util__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_policy_browser__signin__policy__handler.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_policy_device__management__service__configuration.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_prefs_browser__prefs.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_printing_print__backend__service__manager.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_printing_print__job__worker.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_process__singleton__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_profiles_profile__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_profiles_profiles__state.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_renderer__preferences__util.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_resources_plugin__metadata_plugins__linux.json create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_resources_sandbox__internals_sandbox__internals.ts create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__browser__proxy.ts create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.ts create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_autofill__page_passwords__shared.css create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_route.ts create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_resources_signin_signin__shared.css create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_resources_signin_sync__confirmation_sync__confirmation__app.html create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_cloud__content__scanning_binary__upload__service.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_incident__reporting_incident__reporting__service.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_send__tab__to__self_receiving__ui__handler__registry.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_send__tab__to__self_send__tab__to__self__client__service.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_sharing_sharing__device__registration.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_sharing_sharing__handler__registry__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_shutdown__signal__handlers__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_sync_chrome__sync__client.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_sync_device__info__sync__client__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_task__manager_sampling_task__group.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_task__manager_sampling_task__group.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_task__manager_sampling_task__group__sampler.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_task__manager_sampling_task__group__sampler.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_task__manager_sampling_task__manager__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_task__manager_task__manager__observer.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_themes_theme__helper.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_themes_theme__service.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_themes_theme__service__aura__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_themes_theme__service__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_browser.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__command__controller.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__dialogs.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__view__prefs.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_color_native__chrome__color__mixer.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_exclusive__access_exclusive__access__bubble.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_sad__tab.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_sharing__hub_sharing__hub__bubble__controller.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_signin__view__controller.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_signin__view__controller__delegate.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_tab__helpers.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_task__manager_task__manager__columns.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_task__manager_task__manager__table__model.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_views_accelerator__table.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_views_chrome__browser__main__extra__parts__views.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_views_chrome__views__delegate.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_views_chrome__views__delegate__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_views_download_download__item__view.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_views_eye__dropper_eye__dropper__view.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_views_eye__dropper_eye__dropper__view__aura.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_views_first__run__dialog.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__frame.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__non__client__frame__view__factory__views.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__view.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_views_hung__renderer__view.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view__base.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__hover__card__controller.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_web__applications_app__browser__controller.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_about__ui.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_connectors__internals_zero__trust__utils.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_ntp_app__launcher__handler.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_settings_appearance__handler.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_settings_appearance__handler.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_ui_window__sizer_window__sizer.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_web__applications_extension__status__utils.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_web__applications_extensions_extension__status__utils.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut__manager.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_web__applications_web__app__provider.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_common_channel__info.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_common_channel__info__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_common_chrome__features.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_common_chrome__features.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_common_chrome__paths.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_common_chrome__paths.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_common_chrome__paths__internal.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_common_extensions_permissions_chrome__permission__message__rules.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_common_media_cdm__host__file__path.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_common_pref__names.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_common_pref__names.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_common_url__constants.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_common_url__constants.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_renderer_chrome__render__frame__observer.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_services_file__util_public_mojom_safe__document__analyzer__mojom__traits.h create mode 100644 www/ungoogled-chromium/files/patch-chrome_services_printing_print__backend__service__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_services_speech_audio__source__fetcher__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_test_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-chrome_test_chromedriver_chrome__launcher.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_test_chromedriver_chrome_chrome__finder.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_test_chromedriver_key__converter__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_test_chromedriver_keycode__text__conversion__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_test_interaction_webui__interaction__test__util.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_updater_app_app__install.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_updater_app_app__uninstall.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_updater_configurator.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_updater_device__management_dm__client.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_updater_device__management_dm__storage.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_updater_installer.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_updater_updater.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_updater_util.cc create mode 100644 www/ungoogled-chromium/files/patch-chrome_utility_services.cc create mode 100644 www/ungoogled-chromium/files/patch-chromecast_browser_cast__browser__main__parts.cc create mode 100644 www/ungoogled-chromium/files/patch-chromecast_browser_cast__content__browser__client.cc create mode 100644 www/ungoogled-chromium/files/patch-chromecast_media_base_default__monotonic__clock.cc create mode 100644 www/ungoogled-chromium/files/patch-components_autofill__assistant_browser_autofill__assistant__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-components_autofill__assistant_browser_client__context.cc create mode 100644 www/ungoogled-chromium/files/patch-components_autofill__payments__strings.grdp create mode 100644 www/ungoogled-chromium/files/patch-components_autofill_core_browser_personal__data__manager.cc create mode 100644 www/ungoogled-chromium/files/patch-components_autofill_core_common_autofill__payments__features.cc create mode 100644 www/ungoogled-chromium/files/patch-components_autofill_core_common_autofill__util.cc create mode 100644 www/ungoogled-chromium/files/patch-components_cast__channel_cast__message__util.cc create mode 100644 www/ungoogled-chromium/files/patch-components_components__chromium__strings.grd create mode 100644 www/ungoogled-chromium/files/patch-components_components__google__chrome__strings.grd create mode 100644 www/ungoogled-chromium/files/patch-components_content__settings_core_browser_website__settings__registry.cc create mode 100644 www/ungoogled-chromium/files/patch-components_cookie__config_cookie__store__util.cc create mode 100644 www/ungoogled-chromium/files/patch-components_crash_content_browser_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-components_crash_core_app_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-components_crash_core_app_chrome__crashpad__handler.cc create mode 100644 www/ungoogled-chromium/files/patch-components_crash_core_browser_crash__upload__list__crashpad.cc create mode 100644 www/ungoogled-chromium/files/patch-components_crash_core_common_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-components_device__signals_core_common_signals__features.cc create mode 100644 www/ungoogled-chromium/files/patch-components_device__signals_core_common_signals__features.h create mode 100644 www/ungoogled-chromium/files/patch-components_device__signals_core_system__signals_platform__delegate.cc create mode 100644 www/ungoogled-chromium/files/patch-components_discardable__memory_service_discardable__shared__memory__manager.cc create mode 100644 www/ungoogled-chromium/files/patch-components_embedder__support_user__agent__utils__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-components_feature__engagement_public_event__constants.cc create mode 100644 www/ungoogled-chromium/files/patch-components_feature__engagement_public_event__constants.h create mode 100644 www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__configurations.cc create mode 100644 www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.cc create mode 100644 www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.h create mode 100644 www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__list.cc create mode 100644 www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__list.h create mode 100644 www/ungoogled-chromium/files/patch-components_feed_core_proto_v2_wire_version.proto create mode 100644 www/ungoogled-chromium/files/patch-components_feed_core_v2_feed__network__impl__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-components_feed_core_v2_proto__util.cc create mode 100644 www/ungoogled-chromium/files/patch-components_feed_core_v2_proto__util__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-components_feed_core_v2_test_proto__printer.cc create mode 100644 www/ungoogled-chromium/files/patch-components_flags__ui_flags__state.cc create mode 100644 www/ungoogled-chromium/files/patch-components_gwp__asan_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-components_gwp__asan_crash__handler_crash__analyzer.cc create mode 100644 www/ungoogled-chromium/files/patch-components_invalidation_impl_invalidation__switches.cc create mode 100644 www/ungoogled-chromium/files/patch-components_live__caption_caption__util.cc create mode 100644 www/ungoogled-chromium/files/patch-components_metrics_drive__metrics__provider__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-components_metrics_motherboard.cc create mode 100644 www/ungoogled-chromium/files/patch-components_neterror_resources_neterror.js create mode 100644 www/ungoogled-chromium/files/patch-components_network__session__configurator_browser_network__session__configurator.cc create mode 100644 www/ungoogled-chromium/files/patch-components_network__session__configurator_browser_network__session__configurator__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-components_new__or__sad__tab__strings.grdp create mode 100644 www/ungoogled-chromium/files/patch-components_optimization__guide_core_optimization__guide__util.cc create mode 100644 www/ungoogled-chromium/files/patch-components_os__crypt_keyring__util__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-components_os__crypt_libsecret__util__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-components_os__crypt_os__crypt.h create mode 100644 www/ungoogled-chromium/files/patch-components_paint__preview_browser_paint__preview__client.cc create mode 100644 www/ungoogled-chromium/files/patch-components_paint__preview_browser_paint__preview__client__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-components_paint__preview_common_proto_paint__preview.proto create mode 100644 www/ungoogled-chromium/files/patch-components_paint__preview_player_player__compositor__delegate.cc create mode 100644 www/ungoogled-chromium/files/patch-components_password__manager_core_browser_login__database.cc create mode 100644 www/ungoogled-chromium/files/patch-components_password__manager_core_browser_login__database__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc create mode 100644 www/ungoogled-chromium/files/patch-components_password__manager_core_common_password__manager__features.cc create mode 100644 www/ungoogled-chromium/files/patch-components_password__manager_core_common_password__manager__features.h create mode 100644 www/ungoogled-chromium/files/patch-components_performance__manager_public_features.h create mode 100644 www/ungoogled-chromium/files/patch-components_permissions_prediction__service_prediction__common.cc create mode 100644 www/ungoogled-chromium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc create mode 100644 www/ungoogled-chromium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc create mode 100644 www/ungoogled-chromium/files/patch-components_policy_core_common_cloud_cloud__policy__util.cc create mode 100644 www/ungoogled-chromium/files/patch-components_policy_resources_policy__templates.json create mode 100644 www/ungoogled-chromium/files/patch-components_policy_tools_generate__policy__source.py create mode 100644 www/ungoogled-chromium/files/patch-components_safe__browsing_content_common_file__type__policies__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-components_safe__browsing_content_resources_gen__file__type__proto.py create mode 100644 www/ungoogled-chromium/files/patch-components_safe__browsing_core_browser_db_v4__protocol__manager__util.cc create mode 100644 www/ungoogled-chromium/files/patch-components_safe__browsing_core_browser_realtime_url__lookup__service__base.cc create mode 100644 www/ungoogled-chromium/files/patch-components_security__interstitials_content_utils.cc create mode 100644 www/ungoogled-chromium/files/patch-components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.h create mode 100644 www/ungoogled-chromium/files/patch-components_services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-components_services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.h create mode 100644 www/ungoogled-chromium/files/patch-components_startup__metric__utils_browser_startup__metric__utils.cc create mode 100644 www/ungoogled-chromium/files/patch-components_storage__monitor_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-components_storage__monitor_removable__device__constants.cc create mode 100644 www/ungoogled-chromium/files/patch-components_storage__monitor_removable__device__constants.h create mode 100644 www/ungoogled-chromium/files/patch-components_sync__device__info_local__device__info__util.cc create mode 100644 www/ungoogled-chromium/files/patch-components_sync__device__info_local__device__info__util__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-components_translate_core_common_translate__util.cc create mode 100644 www/ungoogled-chromium/files/patch-components_update__client_update__query__params.cc create mode 100644 www/ungoogled-chromium/files/patch-components_url__formatter_spoof__checks_idn__spoof__checker.cc create mode 100644 www/ungoogled-chromium/files/patch-components_viz_common_gpu_dawn__context__provider.cc create mode 100644 www/ungoogled-chromium/files/patch-components_viz_host_host__display__client.cc create mode 100644 www/ungoogled-chromium/files/patch-components_viz_host_host__display__client.h create mode 100644 www/ungoogled-chromium/files/patch-components_viz_host_renderer__settings__creation.cc create mode 100644 www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_software__output__surface.cc create mode 100644 www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_software__output__surface.h create mode 100644 www/ungoogled-chromium/files/patch-components_viz_service_display_skia__renderer.cc create mode 100644 www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h create mode 100644 www/ungoogled-chromium/files/patch-components_viz_test_fake__display__client.cc create mode 100644 www/ungoogled-chromium/files/patch-components_viz_test_fake__display__client.h create mode 100644 www/ungoogled-chromium/files/patch-components_viz_test_mock__display__client.h create mode 100644 www/ungoogled-chromium/files/patch-content_app_content__main.cc create mode 100644 www/ungoogled-chromium/files/patch-content_app_content__main__runner__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-content_browser_browser__child__process__host__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_browser__main__loop.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_child__process__launcher__helper__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_compositor_viz__process__transport__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_devtools_protocol_system__info__handler.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_download_download__manager__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_font__access_font__enumeration__data__source.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_gpu_compositor__util.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__process__host.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_media_frameless__media__interface__proxy.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_media_frameless__media__interface__proxy.h create mode 100644 www/ungoogled-chromium/files/patch-content_browser_media_media__interface__proxy.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_media_media__keys__listener__manager__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_ppapi__plugin__process__host__receiver__bindings.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_renderer__host_delegated__frame__host.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_renderer__host_input_input__device__change__observer.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__message__filter.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__message__filter.h create mode 100644 www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.h create mode 100644 www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__view__host__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.h create mode 100644 www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__event__handler.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_sandbox__host__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_scheduler_responsiveness_jank__monitor__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_scheduler_responsiveness_native__event__observer.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_scheduler_responsiveness_native__event__observer.h create mode 100644 www/ungoogled-chromium/files/patch-content_browser_utility__process__host__receiver__bindings.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_utility__sandbox__delegate.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_v8__snapshot__files.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_web__contents_web__contents__view__aura.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_webui_web__ui__main__frame__observer.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_webui_web__ui__main__frame__observer.h create mode 100644 www/ungoogled-chromium/files/patch-content_browser_zygote__host_zygote__host__impl__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-content_browser_zygote__host_zygote__host__impl__linux.h create mode 100644 www/ungoogled-chromium/files/patch-content_child_child__process.cc create mode 100644 www/ungoogled-chromium/files/patch-content_common_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-content_common_font__list__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-content_common_mojo__core__library__support.cc create mode 100644 www/ungoogled-chromium/files/patch-content_common_user__agent.cc create mode 100644 www/ungoogled-chromium/files/patch-content_gpu_gpu__main.cc create mode 100644 www/ungoogled-chromium/files/patch-content_gpu_gpu__sandbox__hook__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-content_ppapi__plugin_ppapi__blink__platform__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-content_ppapi__plugin_ppapi__blink__platform__impl.h create mode 100644 www/ungoogled-chromium/files/patch-content_ppapi__plugin_ppapi__plugin__main.cc create mode 100644 www/ungoogled-chromium/files/patch-content_public_browser_render__process__host.h create mode 100644 www/ungoogled-chromium/files/patch-content_public_browser_zygote__host_zygote__host__linux.h create mode 100644 www/ungoogled-chromium/files/patch-content_public_common_common__param__traits__macros.h create mode 100644 www/ungoogled-chromium/files/patch-content_public_common_content__features.cc create mode 100644 www/ungoogled-chromium/files/patch-content_public_common_content__features.h create mode 100644 www/ungoogled-chromium/files/patch-content_public_common_content__switches.cc create mode 100644 www/ungoogled-chromium/files/patch-content_public_common_content__switches.h create mode 100644 www/ungoogled-chromium/files/patch-content_public_common_zygote_features.gni create mode 100644 www/ungoogled-chromium/files/patch-content_public_test_mock__render__process__host.h create mode 100644 www/ungoogled-chromium/files/patch-content_public_test_mock__render__thread.cc create mode 100644 www/ungoogled-chromium/files/patch-content_renderer_media_render__media__client.cc create mode 100644 www/ungoogled-chromium/files/patch-content_renderer_render__process__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-content_renderer_render__thread__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-content_renderer_renderer__blink__platform__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-content_renderer_renderer__blink__platform__impl.h create mode 100644 www/ungoogled-chromium/files/patch-content_renderer_renderer__main__platform__delegate__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-content_shell_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-content_shell_app_shell__main__delegate.cc create mode 100644 www/ungoogled-chromium/files/patch-content_shell_browser_shell__browser__main__parts.cc create mode 100644 www/ungoogled-chromium/files/patch-content_shell_browser_shell__paths.cc create mode 100644 www/ungoogled-chromium/files/patch-content_shell_utility_shell__content__utility__client.cc create mode 100644 www/ungoogled-chromium/files/patch-content_test_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-content_utility_services.cc create mode 100644 www/ungoogled-chromium/files/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.h create mode 100644 www/ungoogled-chromium/files/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.h create mode 100644 www/ungoogled-chromium/files/patch-content_utility_utility__main.cc create mode 100644 www/ungoogled-chromium/files/patch-content_zygote_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-content_zygote_zygote__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-content_zygote_zygote__main__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-device_bluetooth_bluetooth__adapter.cc create mode 100644 www/ungoogled-chromium/files/patch-device_bluetooth_cast__bluetooth.gni create mode 100644 www/ungoogled-chromium/files/patch-device_gamepad_gamepad__provider.cc create mode 100644 www/ungoogled-chromium/files/patch-device_gamepad_hid__writer__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-extensions_browser_api_messaging_message__service.cc create mode 100644 www/ungoogled-chromium/files/patch-extensions_browser_api_networking__private_networking__private__delegate__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-extensions_browser_browser__context__keyed__service__factories.cc create mode 100644 www/ungoogled-chromium/files/patch-extensions_browser_extension__prefs.cc create mode 100644 www/ungoogled-chromium/files/patch-extensions_browser_pref__names.cc create mode 100644 www/ungoogled-chromium/files/patch-extensions_browser_pref__names.h create mode 100644 www/ungoogled-chromium/files/patch-extensions_common_api___permission__features.json create mode 100644 www/ungoogled-chromium/files/patch-extensions_common_api_runtime.json create mode 100644 www/ungoogled-chromium/files/patch-extensions_common_command.cc create mode 100644 www/ungoogled-chromium/files/patch-extensions_common_features_feature.cc create mode 100644 www/ungoogled-chromium/files/patch-extensions_renderer_bindings_api__binding__util.cc create mode 100644 www/ungoogled-chromium/files/patch-extensions_renderer_bindings_argument__spec.cc create mode 100644 www/ungoogled-chromium/files/patch-extensions_shell_app_shell__main__delegate.cc create mode 100644 www/ungoogled-chromium/files/patch-extensions_shell_browser_api_runtime_shell__runtime__api__delegate.cc create mode 100644 www/ungoogled-chromium/files/patch-extensions_shell_browser_shell__browser__main__parts.cc create mode 100644 www/ungoogled-chromium/files/patch-extensions_shell_browser_shell__extensions__api__client.cc create mode 100644 www/ungoogled-chromium/files/patch-extensions_shell_browser_shell__extensions__api__client.h create mode 100644 www/ungoogled-chromium/files/patch-google__apis_gcm_engine_heartbeat__manager.cc create mode 100644 www/ungoogled-chromium/files/patch-gpu_command__buffer_common_gpu__memory__buffer__support.cc create mode 100644 www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing.cc create mode 100644 www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_gl__texture__image__backing.cc create mode 100644 www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_gl__texture__image__backing__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_shared__image__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-gpu_command__buffer_tests_gl__gpu__memory__buffer__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-gpu_command__buffer_tests_gl__oes__egl__image__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-gpu_command__buffer_tests_gl__test__utils.cc create mode 100644 www/ungoogled-chromium/files/patch-gpu_command__buffer_tests_gl__test__utils.h create mode 100644 www/ungoogled-chromium/files/patch-gpu_config_gpu__control__list.cc create mode 100644 www/ungoogled-chromium/files/patch-gpu_config_gpu__test__config.cc create mode 100644 www/ungoogled-chromium/files/patch-gpu_ipc_common_gpu__memory__buffer__support.cc create mode 100644 www/ungoogled-chromium/files/patch-gpu_ipc_common_gpu__memory__buffer__support.h create mode 100644 www/ungoogled-chromium/files/patch-gpu_ipc_service_gpu__init.cc create mode 100644 www/ungoogled-chromium/files/patch-gpu_ipc_service_gpu__memory__buffer__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-gpu_ipc_service_x__util.h create mode 100644 www/ungoogled-chromium/files/patch-gpu_vulkan_generate__bindings.py create mode 100644 www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__device__queue.cc create mode 100644 www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__device__queue.h create mode 100644 www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__function__pointers.cc create mode 100644 www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__function__pointers.h create mode 100644 www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__image.cc create mode 100644 www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__image.h create mode 100644 www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__util.cc create mode 100644 www/ungoogled-chromium/files/patch-headless_lib_browser_headless__browser__main__parts.h create mode 100644 www/ungoogled-chromium/files/patch-headless_lib_browser_headless__browser__main__parts__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-headless_lib_browser_headless__content__browser__client.h create mode 100644 www/ungoogled-chromium/files/patch-headless_lib_browser_headless__request__context__manager.cc create mode 100644 www/ungoogled-chromium/files/patch-headless_lib_browser_headless__web__contents__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-headless_lib_headless__content__main__delegate.cc create mode 100644 www/ungoogled-chromium/files/patch-ipc_ipc__channel.h create mode 100644 www/ungoogled-chromium/files/patch-ipc_ipc__channel__common.cc create mode 100644 www/ungoogled-chromium/files/patch-ipc_ipc__channel__mojo.cc create mode 100644 www/ungoogled-chromium/files/patch-ipc_ipc__message__utils.cc create mode 100644 www/ungoogled-chromium/files/patch-ipc_ipc__message__utils.h create mode 100644 www/ungoogled-chromium/files/patch-media_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-media_audio_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-media_audio_alsa_audio__manager__alsa.cc create mode 100644 www/ungoogled-chromium/files/patch-media_audio_audio__features.cc create mode 100644 www/ungoogled-chromium/files/patch-media_audio_audio__input__device.cc create mode 100644 www/ungoogled-chromium/files/patch-media_audio_audio__output__proxy__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-media_audio_sndio_audio__manager__sndio.cc create mode 100644 www/ungoogled-chromium/files/patch-media_audio_sndio_audio__manager__sndio.h create mode 100644 www/ungoogled-chromium/files/patch-media_audio_sndio_sndio__input.cc create mode 100644 www/ungoogled-chromium/files/patch-media_audio_sndio_sndio__input.h create mode 100644 www/ungoogled-chromium/files/patch-media_audio_sndio_sndio__output.cc create mode 100644 www/ungoogled-chromium/files/patch-media_audio_sndio_sndio__output.h create mode 100644 www/ungoogled-chromium/files/patch-media_base_audio__latency.cc create mode 100644 www/ungoogled-chromium/files/patch-media_base_media__switches.cc create mode 100644 www/ungoogled-chromium/files/patch-media_base_media__switches.h create mode 100644 www/ungoogled-chromium/files/patch-media_base_scopedfd__helper.h create mode 100644 www/ungoogled-chromium/files/patch-media_base_supported__types.cc create mode 100644 www/ungoogled-chromium/files/patch-media_base_user__input__monitor__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-media_base_vector__math.cc create mode 100644 www/ungoogled-chromium/files/patch-media_base_video__frame.cc create mode 100644 www/ungoogled-chromium/files/patch-media_base_video__frame.h create mode 100644 www/ungoogled-chromium/files/patch-media_capture_video_create__video__capture__device__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-media_capture_video_fake__video__capture__device__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-media_capture_video_file__video__capture__device__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-media_capture_video_linux_fake__v4l2__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-media_capture_video_linux_fake__v4l2__impl.h create mode 100644 www/ungoogled-chromium/files/patch-media_capture_video_linux_v4l2__capture__delegate.cc create mode 100644 www/ungoogled-chromium/files/patch-media_capture_video_linux_v4l2__capture__delegate.h create mode 100644 www/ungoogled-chromium/files/patch-media_capture_video_linux_v4l2__capture__device.h create mode 100644 www/ungoogled-chromium/files/patch-media_capture_video_linux_v4l2__capture__device__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-media_capture_video_linux_v4l2__capture__device__impl.h create mode 100644 www/ungoogled-chromium/files/patch-media_capture_video_linux_video__capture__device__factory__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-media_capture_video_linux_video__capture__device__factory__linux.h create mode 100644 www/ungoogled-chromium/files/patch-media_capture_video_video__capture__buffer__pool__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-media_capture_video_video__capture__device__client.cc create mode 100644 www/ungoogled-chromium/files/patch-media_cdm_cdm__paths__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-media_gpu_buffer__validation.cc create mode 100644 www/ungoogled-chromium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc create mode 100644 www/ungoogled-chromium/files/patch-media_gpu_gpu__video__encode__accelerator__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.h create mode 100644 www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc create mode 100644 www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc create mode 100644 www/ungoogled-chromium/files/patch-media_media__options.gni create mode 100644 www/ungoogled-chromium/files/patch-media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.cc create mode 100644 www/ungoogled-chromium/files/patch-media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h create mode 100644 www/ungoogled-chromium/files/patch-media_mojo_mojom_video__frame__mojom__traits.cc create mode 100644 www/ungoogled-chromium/files/patch-media_video_fake__gpu__memory__buffer.cc create mode 100644 www/ungoogled-chromium/files/patch-media_video_gpu__memory__buffer__video__frame__pool.cc create mode 100644 www/ungoogled-chromium/files/patch-media_video_video__encode__accelerator__adapter.cc create mode 100644 www/ungoogled-chromium/files/patch-media_video_video__encode__accelerator__adapter__test.cc create mode 100644 www/ungoogled-chromium/files/patch-media_webrtc_audio__processor.cc create mode 100644 www/ungoogled-chromium/files/patch-media_webrtc_helpers__unittests.cc create mode 100644 www/ungoogled-chromium/files/patch-media_webrtc_webrtc__features.cc create mode 100644 www/ungoogled-chromium/files/patch-mojo_core_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-mojo_core_channel.cc create mode 100644 www/ungoogled-chromium/files/patch-mojo_core_embedder_features.h create mode 100644 www/ungoogled-chromium/files/patch-mojo_public_c_system_thunks.cc create mode 100644 www/ungoogled-chromium/files/patch-mojo_public_tools_bindings_mojom.gni create mode 100644 www/ungoogled-chromium/files/patch-net_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-net_base_network__change__notifier.cc create mode 100644 www/ungoogled-chromium/files/patch-net_base_network__change__notifier__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-net_base_network__interfaces__posix.h create mode 100644 www/ungoogled-chromium/files/patch-net_base_sockaddr__util__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-net_base_sockaddr__util__posix__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-net_cert_cert__verifier.cc create mode 100644 www/ungoogled-chromium/files/patch-net_cert_cert__verify__proc.cc create mode 100644 www/ungoogled-chromium/files/patch-net_cert_cert__verify__proc.h create mode 100644 www/ungoogled-chromium/files/patch-net_cert_cert__verify__proc__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-net_cert_test__root__certs__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-net_disk__cache_blockfile_disk__format.h create mode 100644 www/ungoogled-chromium/files/patch-net_disk__cache_simple_simple__file__tracker.cc create mode 100644 www/ungoogled-chromium/files/patch-net_dns_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-net_dns_address__sorter__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-net_dns_dns__config__service__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-net_dns_dns__reloader.cc create mode 100644 www/ungoogled-chromium/files/patch-net_dns_dns__reloader.h create mode 100644 www/ungoogled-chromium/files/patch-net_dns_dns__util.cc create mode 100644 www/ungoogled-chromium/files/patch-net_dns_host__resolver__manager.cc create mode 100644 www/ungoogled-chromium/files/patch-net_dns_host__resolver__proc.cc create mode 100644 www/ungoogled-chromium/files/patch-net_dns_public_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-net_dns_public_resolv__reader.h create mode 100644 www/ungoogled-chromium/files/patch-net_dns_public_scoped__res__state.h create mode 100644 www/ungoogled-chromium/files/patch-net_http_http__auth__gssapi__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-net_http_http__auth__gssapi__posix.h create mode 100644 www/ungoogled-chromium/files/patch-net_http_http__network__session.cc create mode 100644 www/ungoogled-chromium/files/patch-net_proxy__resolution_proxy__config__service.cc create mode 100644 www/ungoogled-chromium/files/patch-net_proxy__resolution_proxy__config__service__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-net_socket_socket__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-net_socket_socks5__client__socket.cc create mode 100644 www/ungoogled-chromium/files/patch-net_socket_tcp__socket__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-net_socket_udp__socket__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-net_socket_udp__socket__unittest.cc create mode 100644 www/ungoogled-chromium/files/patch-net_third__party_quiche_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-net_tools_cert__verify__tool_cert__verify__comparision__tool.cc create mode 100644 www/ungoogled-chromium/files/patch-net_tools_cert__verify__tool_cert__verify__tool.cc create mode 100644 www/ungoogled-chromium/files/patch-net_traffic__annotation_network__traffic__annotation.h create mode 100644 www/ungoogled-chromium/files/patch-net_url__request_url__request__context.cc create mode 100644 www/ungoogled-chromium/files/patch-net_url__request_url__request__context.h create mode 100644 www/ungoogled-chromium/files/patch-net_url__request_url__request__context__builder.cc create mode 100644 www/ungoogled-chromium/files/patch-pdf_pdfium_pdfium__engine.cc create mode 100644 www/ungoogled-chromium/files/patch-printing_mojom_printing__context__mojom__traits.cc create mode 100644 www/ungoogled-chromium/files/patch-printing_mojom_printing__context__mojom__traits.h create mode 100644 www/ungoogled-chromium/files/patch-printing_print__settings.cc create mode 100644 www/ungoogled-chromium/files/patch-printing_print__settings.h create mode 100644 www/ungoogled-chromium/files/patch-printing_print__settings__conversion.cc create mode 100644 www/ungoogled-chromium/files/patch-printing_printing__context__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-printing_sandbox_print__backend__sandbox__hook__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-printing_sandbox_print__backend__sandbox__hook__linux.h create mode 100644 www/ungoogled-chromium/files/patch-remoting_base_chromoting__event.cc create mode 100644 www/ungoogled-chromium/files/patch-remoting_base_host__settings.cc create mode 100644 www/ungoogled-chromium/files/patch-remoting_client_display_sys__opengl.h create mode 100644 www/ungoogled-chromium/files/patch-remoting_codec_webrtc__video__encoder__vpx.cc create mode 100644 www/ungoogled-chromium/files/patch-remoting_host_base_switches.cc create mode 100644 www/ungoogled-chromium/files/patch-remoting_host_base_switches.h create mode 100644 www/ungoogled-chromium/files/patch-remoting_host_chromoting__host.cc create mode 100644 www/ungoogled-chromium/files/patch-remoting_host_chromoting__host__context.cc create mode 100644 www/ungoogled-chromium/files/patch-remoting_host_chromoting__host__services__client.cc create mode 100644 www/ungoogled-chromium/files/patch-remoting_host_evaluate__capability.cc create mode 100644 www/ungoogled-chromium/files/patch-remoting_host_heartbeat__sender.cc create mode 100644 www/ungoogled-chromium/files/patch-remoting_host_host__attributes.cc create mode 100644 www/ungoogled-chromium/files/patch-remoting_host_host__details.cc create mode 100644 www/ungoogled-chromium/files/patch-remoting_host_host__main.cc create mode 100644 www/ungoogled-chromium/files/patch-remoting_host_ipc__constants.cc create mode 100644 www/ungoogled-chromium/files/patch-remoting_host_it2me_it2me__native__messaging__host__main.cc create mode 100644 www/ungoogled-chromium/files/patch-remoting_host_me2me__desktop__environment.cc create mode 100644 www/ungoogled-chromium/files/patch-remoting_host_policy__watcher.cc create mode 100644 www/ungoogled-chromium/files/patch-remoting_host_remote__open__url_remote__open__url__client.cc create mode 100644 www/ungoogled-chromium/files/patch-remoting_host_remote__open__url_remote__open__url__util.cc create mode 100644 www/ungoogled-chromium/files/patch-remoting_host_remote__open__url_url__forwarder__configurator.cc create mode 100644 www/ungoogled-chromium/files/patch-remoting_host_remoting__me2me__host.cc create mode 100644 www/ungoogled-chromium/files/patch-remoting_host_setup_start__host__main.cc create mode 100644 www/ungoogled-chromium/files/patch-remoting_host_webauthn_remote__webauthn__caller__security__utils.cc create mode 100644 www/ungoogled-chromium/files/patch-remoting_host_webauthn_remote__webauthn__extension__notifier.cc create mode 100644 www/ungoogled-chromium/files/patch-remoting_resources_remoting__strings.grd create mode 100644 www/ungoogled-chromium/files/patch-sandbox_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-sandbox_features.gni create mode 100644 www/ungoogled-chromium/files/patch-sandbox_linux_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-sandbox_linux_services_init__process__reaper.cc create mode 100644 www/ungoogled-chromium/files/patch-sandbox_linux_services_libc__interceptor.cc create mode 100644 www/ungoogled-chromium/files/patch-sandbox_policy_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-sandbox_policy_features.cc create mode 100644 www/ungoogled-chromium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.cc create mode 100644 www/ungoogled-chromium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.h create mode 100644 www/ungoogled-chromium/files/patch-sandbox_policy_mojom_sandbox.mojom create mode 100644 www/ungoogled-chromium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.cc create mode 100644 www/ungoogled-chromium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.h create mode 100644 www/ungoogled-chromium/files/patch-sandbox_policy_sandbox.cc create mode 100644 www/ungoogled-chromium/files/patch-sandbox_policy_sandbox.h create mode 100644 www/ungoogled-chromium/files/patch-sandbox_policy_sandbox__type.cc create mode 100644 www/ungoogled-chromium/files/patch-sandbox_policy_switches.cc create mode 100644 www/ungoogled-chromium/files/patch-sandbox_policy_switches.h create mode 100644 www/ungoogled-chromium/files/patch-services_audio_audio__sandbox__hook__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-services_audio_audio__sandbox__hook__linux.h create mode 100644 www/ungoogled-chromium/files/patch-services_cert__verifier_cert__verifier__creation.cc create mode 100644 www/ungoogled-chromium/files/patch-services_device_compute__pressure_cpu__probe.cc create mode 100644 www/ungoogled-chromium/files/patch-services_device_geolocation_location__arbitrator.cc create mode 100644 www/ungoogled-chromium/files/patch-services_device_hid_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-services_device_hid_hid__connection__fido.cc create mode 100644 www/ungoogled-chromium/files/patch-services_device_hid_hid__connection__fido.h create mode 100644 www/ungoogled-chromium/files/patch-services_device_hid_hid__connection__freebsd.cc create mode 100644 www/ungoogled-chromium/files/patch-services_device_hid_hid__connection__freebsd.h create mode 100644 www/ungoogled-chromium/files/patch-services_device_hid_hid__service.cc create mode 100644 www/ungoogled-chromium/files/patch-services_device_hid_hid__service__fido.cc create mode 100644 www/ungoogled-chromium/files/patch-services_device_hid_hid__service__fido.h create mode 100644 www/ungoogled-chromium/files/patch-services_device_hid_hid__service__freebsd.cc create mode 100644 www/ungoogled-chromium/files/patch-services_device_hid_hid__service__freebsd.h create mode 100644 www/ungoogled-chromium/files/patch-services_device_serial_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-services_device_serial_serial__device__enumerator.cc create mode 100644 www/ungoogled-chromium/files/patch-services_device_serial_serial__io__handler__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-services_device_time__zone__monitor_time__zone__monitor__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-services_device_usb_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-services_network_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-services_network_network__sandbox__hook__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-services_network_network__sandbox__hook__linux.h create mode 100644 www/ungoogled-chromium/files/patch-services_network_network__service.cc create mode 100644 www/ungoogled-chromium/files/patch-services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc create mode 100644 www/ungoogled-chromium/files/patch-services_resource__coordinator_public_cpp_memory__instrumentation_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics.h create mode 100644 www/ungoogled-chromium/files/patch-services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics__bsd.cc create mode 100644 www/ungoogled-chromium/files/patch-services_service__manager_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-services_service__manager_public_cpp_service__executable_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-services_video__capture_broadcasting__receiver.cc create mode 100644 www/ungoogled-chromium/files/patch-services_video__capture_public_mojom_video__capture__service.mojom create mode 100644 www/ungoogled-chromium/files/patch-skia_ext_SkMemory__new__handler.cpp create mode 100644 www/ungoogled-chromium/files/patch-third__party_abseil-cpp_absl_base_config.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_abseil-cpp_absl_time_internal_cctz_src_time__zone__format.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_angle_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-third__party_angle_src_common_platform.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_angle_src_common_vulkan_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__internal.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__libpci.cpp create mode 100644 www/ungoogled-chromium/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__linux.cpp create mode 100644 www/ungoogled-chromium/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__x11.cpp create mode 100644 www/ungoogled-chromium/files/patch-third__party_angle_src_libANGLE_Display.cpp create mode 100644 www/ungoogled-chromium/files/patch-third__party_angle_src_libANGLE_formatutils.cpp create mode 100644 www/ungoogled-chromium/files/patch-third__party_angle_src_libANGLE_renderer_driver__utils.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_angle_src_libANGLE_renderer_gl_glx_FunctionsGLX.cpp create mode 100644 www/ungoogled-chromium/files/patch-third__party_angle_src_libANGLE_renderer_vulkan_DisplayVk__api.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_angle_src_third__party_volk_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-third__party_angle_util_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_common_privacy__budget_active__sampling.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_public_platform_platform.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_public_platform_web__vector.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_bindings_scripts_bind__gen_style__format.py create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_build_scripts_run__with__pythonpath.py create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_controller_blink__initializer.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_editing_editing__behavior.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_execution__context_navigator__base.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_frame_web__frame__test.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_layout_layout__view.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_paint_paint__layer.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_media_audio_audio__device__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_webaudio_audio__worklet__thread__test.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_webgl_webgl__webcodecs__video__frame.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_platform_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_platform_fonts_font__cache.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_platform_fonts_font__cache.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_platform_fonts_font__description.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_platform_fonts_font__metrics.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_platform_fonts_font__platform__data.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_platform_fonts_font__unique__name__lookup.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_platform_fonts_skia_font__cache__skia.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_platform_graphics_begin__frame__provider.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_platform_graphics_video__frame__submitter.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_platform_runtime__enabled__features.json5 create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_platform_scheduler_common_thread.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_platform_widget_compositing_categorized__worker__pool.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_platform_wtf_container__annotations.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_platform_wtf_math__extras.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_blink_renderer_platform_wtf_stack__util.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_boringssl_BUILD.generated.gni create mode 100644 www/ungoogled-chromium/files/patch-third__party_boringssl_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-third__party_boringssl_src_crypto_cpu__aarch64__openbsd.c create mode 100644 www/ungoogled-chromium/files/patch-third__party_boringssl_src_crypto_fipsmodule_rand_internal.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_boringssl_src_crypto_rand__extra_arc4random.c create mode 100644 www/ungoogled-chromium/files/patch-third__party_boringssl_src_crypto_refcount__c11.c create mode 100644 www/ungoogled-chromium/files/patch-third__party_boringssl_src_include_openssl_base.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_boringssl_src_include_openssl_thread.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_brotli_common_platform.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_crashpad_crashpad_build_crashpad__buildconfig.gni create mode 100644 www/ungoogled-chromium/files/patch-third__party_crashpad_crashpad_client_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-third__party_crashpad_crashpad_client_crashpad__client__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_crashpad_crashpad_minidump_minidump__misc__info__writer.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_crashpad_crashpad_util_misc_address__types.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_crashpad_crashpad_util_misc_capture__context.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_crashpad_crashpad_util_misc_metrics.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_crashpad_crashpad_util_misc_uuid.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_crashpad_crashpad_util_posix_close__multiple.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_crashpad_crashpad_util_posix_drop__privileges.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_crashpad_crashpad_util_posix_signals.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_crashpad_crashpad_util_posix_symbolic__constants__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_crc32c_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-third__party_dawn_include_dawn_native_VulkanBackend.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_dawn_src_dawn_common_Platform.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_dawn_src_dawn_native_vulkan_BackendVk.cpp create mode 100644 www/ungoogled-chromium/files/patch-third__party_ffmpeg_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-third__party_ffmpeg_chromium_config_Chrome_openbsd_arm64_config.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_ffmpeg_chromium_config_Chrome_openbsd_arm64_config__components.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_ffmpeg_chromium_config_Chrome_openbsd_ia32_config.asm create mode 100644 www/ungoogled-chromium/files/patch-third__party_ffmpeg_chromium_config_Chrome_openbsd_ia32_config.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_ffmpeg_chromium_config_Chrome_openbsd_ia32_config__components.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_ffmpeg_chromium_config_Chrome_openbsd_x64_config.asm create mode 100644 www/ungoogled-chromium/files/patch-third__party_ffmpeg_chromium_config_Chrome_openbsd_x64_config.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_ffmpeg_chromium_config_Chrome_openbsd_x64_config__components.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_ffmpeg_libavcodec_x86_cabac.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_ffmpeg_libavutil_cpu.c create mode 100644 www/ungoogled-chromium/files/patch-third__party_ffmpeg_libavutil_mem.c create mode 100644 www/ungoogled-chromium/files/patch-third__party_ffmpeg_libavutil_random__seed.c create mode 100644 www/ungoogled-chromium/files/patch-third__party_fontconfig_include_config.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_fontconfig_src_src_fccompat.c create mode 100644 www/ungoogled-chromium/files/patch-third__party_ipcz_src_reference__drivers_random.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_ipcz_src_standalone_base_logging.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_leveldatabase_env__chromium.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_libevent_event.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_memory_singleton.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_synchronization_lock.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_thread__checker.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_libsync_src_include_sync_sync.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_libsync_src_sync.c create mode 100644 www/ungoogled-chromium/files/patch-third__party_libusb_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-third__party_libusb_src_libusb_core.c create mode 100644 www/ungoogled-chromium/files/patch-third__party_libxml_linux_config.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_libxml_src_dict.c create mode 100644 www/ungoogled-chromium/files/patch-third__party_lzma__sdk_C_CpuArch.c create mode 100644 www/ungoogled-chromium/files/patch-third__party_maldoca_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-third__party_maldoca_src_maldoca_base_get__runfiles__dir.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_maldoca_src_maldoca_service_common_process__doc__wrapper.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_nasm_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-third__party_nasm_config_config-linux.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_node_node.py create mode 100644 www/ungoogled-chromium/files/patch-third__party_opus_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-third__party_pdfium_core_fxge_cfx__fontmapper.cpp create mode 100644 www/ungoogled-chromium/files/patch-third__party_pdfium_core_fxge_linux_fx__linux__impl.cpp create mode 100644 www/ungoogled-chromium/files/patch-third__party_pdfium_fxjs_fx__date__helpers.cpp create mode 100644 www/ungoogled-chromium/files/patch-third__party_pdfium_xfa_fxfa_parser_cxfa__timezoneprovider.cpp create mode 100644 www/ungoogled-chromium/files/patch-third__party_perfetto_include_perfetto_base_build__config.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_perfetto_include_perfetto_base_thread__utils.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_perfetto_include_perfetto_base_time.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_perfetto_include_perfetto_ext_base_event__fd.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_perfetto_include_perfetto_ext_base_thread__utils.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_perfetto_protos_perfetto_trace_ftrace_v4l2.proto create mode 100644 www/ungoogled-chromium/files/patch-third__party_perfetto_src_base_event__fd.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_perfetto_src_base_periodic__task.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_perfetto_src_base_string__utils.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_perfetto_src_base_subprocess__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_perfetto_src_base_test_vm__test__utils.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_perfetto_src_base_thread__task__runner.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_perfetto_src_base_unix__socket.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_perfetto_src_tracing_core_tracing__service__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_protobuf_src_google_protobuf_arenastring.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_protobuf_src_google_protobuf_stubs_platform__macros.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_ruy_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-third__party_skia_src_core_SkCpu.cpp create mode 100644 www/ungoogled-chromium/files/patch-third__party_skia_src_ports_SkOSFile__posix.cpp create mode 100644 www/ungoogled-chromium/files/patch-third__party_sqlite_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-third__party_sqlite_src_amalgamation_sqlite3.c create mode 100644 www/ungoogled-chromium/files/patch-third__party_swiftshader_src_Reactor_Debug.cpp create mode 100644 www/ungoogled-chromium/files/patch-third__party_swiftshader_src_System_Configurator.cpp create mode 100644 www/ungoogled-chromium/files/patch-third__party_swiftshader_src_Vulkan_VkSemaphoreExternalLinux.hpp create mode 100644 www/ungoogled-chromium/files/patch-third__party_swiftshader_src_WSI_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-third__party_swiftshader_src_WSI_libXCB.cpp create mode 100644 www/ungoogled-chromium/files/patch-third__party_swiftshader_third__party_llvm-10.0_configs_linux_include_llvm_Config_config.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_swiftshader_third__party_llvm-subzero_build_Linux_include_llvm_Config_config.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_swiftshader_third__party_marl_src_memory.cpp create mode 100644 www/ungoogled-chromium/files/patch-third__party_swiftshader_third__party_marl_src_thread.cpp create mode 100644 www/ungoogled-chromium/files/patch-third__party_test__fonts_fontconfig_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-third__party_test__fonts_fontconfig_fontconfig__util__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_tflite_features.gni create mode 100644 www/ungoogled-chromium/files/patch-third__party_unrar_src_crypt.cpp create mode 100644 www/ungoogled-chromium/files/patch-third__party_vulkan-deps_vulkan-loader_src_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-third__party_vulkan-deps_vulkan-loader_src_loader_get__environment.c create mode 100644 www/ungoogled-chromium/files/patch-third__party_vulkan-deps_vulkan-loader_src_loader_get__environment.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_vulkan-deps_vulkan-loader_src_loader_stack__allocation.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_vulkan-deps_vulkan-loader_src_loader_vk__loader__platform.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_vulkan-deps_vulkan-validation-layers_src_layers_vk__loader__platform.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_vulkan-deps_vulkan-validation-layers_src_layers_vk__mem__alloc.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_vulkan__memory__allocator_include_vk__mem__alloc.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_wayland_features.gni create mode 100644 www/ungoogled-chromium/files/patch-third__party_webrtc_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-third__party_webrtc_modules_audio__device_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-third__party_webrtc_modules_desktop__capture_linux_x11_x__server__pixel__buffer.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_webrtc_rtc__base_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-third__party_webrtc_rtc__base_byte__order.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_webrtc_rtc__base_ip__address.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_webrtc_rtc__base_network.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_webrtc_rtc__base_physical__socket__server.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_webrtc_rtc__base_physical__socket__server.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_webrtc_rtc__base_platform__thread__types.cc create mode 100644 www/ungoogled-chromium/files/patch-third__party_webrtc_rtc__base_third__party_sigslot_sigslot.h create mode 100644 www/ungoogled-chromium/files/patch-third__party_webrtc_system__wrappers_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-third__party_zlib_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-tools_generate__stubs_rules.gni create mode 100644 www/ungoogled-chromium/files/patch-tools_gn_build_build__linux.ninja.template create mode 100644 www/ungoogled-chromium/files/patch-tools_gn_build_gen.py create mode 100644 www/ungoogled-chromium/files/patch-tools_gn_src_base_files_file__posix.cc create mode 100644 www/ungoogled-chromium/files/patch-tools_gn_src_gn_version.h create mode 100644 www/ungoogled-chromium/files/patch-tools_gn_src_util_exe__path.cc create mode 100644 www/ungoogled-chromium/files/patch-tools_json__schema__compiler_cpp__bundle__generator.py create mode 100644 www/ungoogled-chromium/files/patch-tools_json__schema__compiler_feature__compiler.py create mode 100644 www/ungoogled-chromium/files/patch-tools_memory_partition__allocator_inspect__utils.h create mode 100644 www/ungoogled-chromium/files/patch-tools_perf_chrome__telemetry__build_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-tools_protoc__wrapper_protoc__wrapper.py create mode 100644 www/ungoogled-chromium/files/patch-tools_variations_fieldtrial__to__struct.py create mode 100644 www/ungoogled-chromium/files/patch-ui_aura_screen__ozone.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_aura_screen__ozone.h create mode 100644 www/ungoogled-chromium/files/patch-ui_base_clipboard_clipboard__constants.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_base_clipboard_clipboard__constants.h create mode 100644 www/ungoogled-chromium/files/patch-ui_base_cursor_cursor__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_base_cursor_cursor__factory.h create mode 100644 www/ungoogled-chromium/files/patch-ui_base_dragdrop_os__exchange__data__provider__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_base_dragdrop_os__exchange__data__provider__non__backed.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_base_ime_dummy__text__input__client.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_base_ime_dummy__text__input__client.h create mode 100644 www/ungoogled-chromium/files/patch-ui_base_ime_fake__text__input__client.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_base_ime_fake__text__input__client.h create mode 100644 www/ungoogled-chromium/files/patch-ui_base_ime_linux_linux__input__method__context__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_base_ime_text__input__client.h create mode 100644 www/ungoogled-chromium/files/patch-ui_base_resource_resource__bundle.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_base_test_skia__gold__pixel__diff.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_base_ui__base__features.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_base_webui_web__ui__util.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_base_x_x11__cursor__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_base_x_x11__cursor__factory.h create mode 100644 www/ungoogled-chromium/files/patch-ui_base_x_x11__cursor__loader.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_base_x_x11__shm__image__pool.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_color_color__id.h create mode 100644 www/ungoogled-chromium/files/patch-ui_compositor_compositor.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_compositor_compositor.h create mode 100644 www/ungoogled-chromium/files/patch-ui_compositor_compositor__observer.h create mode 100644 www/ungoogled-chromium/files/patch-ui_display_screen.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_display_screen.h create mode 100644 www/ungoogled-chromium/files/patch-ui_events_devices_x11_device__data__manager__x11.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_events_event.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_events_event__switches.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_events_event__switches.h create mode 100644 www/ungoogled-chromium/files/patch-ui_events_keycodes_dom_keycode__converter.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_events_keycodes_dom_keycode__converter.h create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_canvas__skia.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_codec_png__codec.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_font__fallback__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_font__list.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_font__render__params.h create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_font__render__params__linux.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_font__util.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_gpu__memory__buffer.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_gpu__memory__buffer.h create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_ipc_gfx__param__traits__macros.h create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_linux_client__native__pixmap__dmabuf.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_mojom_buffer__types__mojom__traits.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_mojom_native__handle__types__mojom__traits.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_mojom_native__handle__types__mojom__traits.h create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_native__pixmap__handle.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_native__pixmap__handle.h create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_native__widget__types.h create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_platform__font__skia.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_render__text__api__fuzzer.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_render__text__fuzzer.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_switches.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_switches.h create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_x_generated__protos_dri3.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_x_generated__protos_shm.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_gfx_x_xlib__support.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_gl_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-ui_gl_generate__bindings.py create mode 100644 www/ungoogled-chromium/files/patch-ui_gl_gl__bindings__api__autogen__glx.h create mode 100644 www/ungoogled-chromium/files/patch-ui_gl_gl__bindings__autogen__glx.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_gl_gl__bindings__autogen__glx.h create mode 100644 www/ungoogled-chromium/files/patch-ui_gl_gl__context.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_gl_gl__features.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_gl_gl__image__glx__native__pixmap.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_gl_sync__control__vsync__provider.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_gl_sync__control__vsync__provider.h create mode 100644 www/ungoogled-chromium/files/patch-ui_gtk_gtk__compat.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_gtk_printing_print__dialog__gtk.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_message__center_views_message__popup__view.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_native__theme_native__theme.h create mode 100644 www/ungoogled-chromium/files/patch-ui_native__theme_native__theme__base.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_ozone_common_egl__util.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_ozone_platform_headless_headless__surface__factory.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_ozone_platform_headless_ozone__platform__headless.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_ozone_platform_headless_vulkan__implementation__headless.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_ozone_platform_wayland_gpu_vulkan__implementation__wayland.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_ozone_platform_x11_ozone__platform__x11.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_ozone_platform_x11_vulkan__implementation__x11.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_ozone_public_ozone__platform.h create mode 100644 www/ungoogled-chromium/files/patch-ui_platform__window_platform__window__init__properties.h create mode 100644 www/ungoogled-chromium/files/patch-ui_strings_app__locale__settings.grd create mode 100644 www/ungoogled-chromium/files/patch-ui_strings_translations_app__locale__settings__bn.xtb create mode 100644 www/ungoogled-chromium/files/patch-ui_strings_translations_app__locale__settings__ja.xtb create mode 100644 www/ungoogled-chromium/files/patch-ui_strings_translations_app__locale__settings__ko.xtb create mode 100644 www/ungoogled-chromium/files/patch-ui_strings_translations_app__locale__settings__ml.xtb create mode 100644 www/ungoogled-chromium/files/patch-ui_strings_translations_app__locale__settings__th.xtb create mode 100644 www/ungoogled-chromium/files/patch-ui_strings_translations_app__locale__settings__zh-CN.xtb create mode 100644 www/ungoogled-chromium/files/patch-ui_strings_translations_app__locale__settings__zh-TW.xtb create mode 100644 www/ungoogled-chromium/files/patch-ui_views_controls_prefix__selector.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_views_controls_prefix__selector.h create mode 100644 www/ungoogled-chromium/files/patch-ui_views_controls_textfield_textfield.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_views_controls_textfield_textfield.h create mode 100644 www/ungoogled-chromium/files/patch-ui_views_corewm_tooltip__aura.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_views_examples_widget__example.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_views_focus_focus__manager.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_views_style_platform__style.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_views_views__delegate.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_views_views__delegate.h create mode 100644 www/ungoogled-chromium/files/patch-ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.h create mode 100644 www/ungoogled-chromium/files/patch-ui_views_widget_desktop__aura_desktop__screen__ozone.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_views_widget_desktop__aura_desktop__window__tree__host__platform__impl__interactive__uitest.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_views_widget_widget.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_views_widget_widget.h create mode 100644 www/ungoogled-chromium/files/patch-ui_views_window_custom__frame__view.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_views_window_dialog__delegate.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_views_window_frame__background.cc create mode 100644 www/ungoogled-chromium/files/patch-ui_webui_resources_js_cr.js create mode 100644 www/ungoogled-chromium/files/patch-v8_BUILD.gn create mode 100644 www/ungoogled-chromium/files/patch-v8_include_v8-internal.h create mode 100644 www/ungoogled-chromium/files/patch-v8_include_v8config.h create mode 100644 www/ungoogled-chromium/files/patch-v8_src_api_api.cc create mode 100644 www/ungoogled-chromium/files/patch-v8_src_base_atomicops.h create mode 100644 www/ungoogled-chromium/files/patch-v8_src_base_platform_platform-freebsd.cc create mode 100644 www/ungoogled-chromium/files/patch-v8_src_base_platform_platform-openbsd.cc create mode 100644 www/ungoogled-chromium/files/patch-v8_src_base_platform_platform-posix.cc create mode 100644 www/ungoogled-chromium/files/patch-v8_src_base_sys-info.cc create mode 100644 www/ungoogled-chromium/files/patch-v8_src_compiler_backend_ia32_instruction-selector-ia32.cc create mode 100644 www/ungoogled-chromium/files/patch-v8_src_diagnostics_perf-jit.cc create mode 100644 www/ungoogled-chromium/files/patch-v8_src_diagnostics_perf-jit.h create mode 100644 www/ungoogled-chromium/files/patch-v8_src_sandbox_sandbox.cc create mode 100644 www/ungoogled-chromium/files/patch-v8_src_trap-handler_handler-inside-posix.cc create mode 100644 www/ungoogled-chromium/files/patch-v8_src_trap-handler_handler-inside-posix.h create mode 100644 www/ungoogled-chromium/files/patch-v8_src_trap-handler_trap-handler.h create mode 100644 www/ungoogled-chromium/files/patch-v8_src_wasm_baseline_ia32_liftoff-assembler-ia32.h create mode 100644 www/ungoogled-chromium/files/patch-v8_tools_run.py create mode 100644 www/ungoogled-chromium/files/patch-weblayer_browser_browser__main__parts__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-weblayer_browser_content__browser__client__impl.cc create mode 100644 www/ungoogled-chromium/files/patch-weblayer_browser_content__browser__client__impl.h create mode 100644 www/ungoogled-chromium/files/patch-weblayer_browser_system__network__context__manager.cc create mode 100644 www/ungoogled-chromium/files/patch-weblayer_common_weblayer__paths.cc create mode 100644 www/ungoogled-chromium/files/ungoogled-chromium.desktop.in create mode 100644 www/ungoogled-chromium/files/ungoogled-chromium.in create mode 100644 www/ungoogled-chromium/pkg-descr create mode 100644 www/ungoogled-chromium/pkg-plist diff --git a/www/Makefile b/www/Makefile index 33e3d5b45761..fa7369c33f50 100644 --- a/www/Makefile +++ b/www/Makefile @@ -2302,6 +2302,7 @@ SUBDIR += uchiwa SUBDIR += ufdbguard SUBDIR += ulfius + SUBDIR += ungoogled-chromium SUBDIR += unit SUBDIR += unit-java SUBDIR += unit-perl diff --git a/www/ungoogled-chromium/Makefile b/www/ungoogled-chromium/Makefile new file mode 100644 index 000000000000..b60659369fbf --- /dev/null +++ b/www/ungoogled-chromium/Makefile @@ -0,0 +1,372 @@ +PORTNAME= ungoogled-chromium +PORTVERSION= 106.0.5249.91 +UGVERSION= ${DISTVERSION}-1 +CATEGORIES= www wayland +MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ \ + https://nerd.hu/distfiles/:external +DISTFILES= chromium-${DISTVERSION}${EXTRACT_SUFX} \ + ungoogled-chromium-${UGVERSION}.tar.gz:external + +MAINTAINER= chromium@FreeBSD.org +COMMENT= Google web browser based on WebKit sans integration with Google +WWW= https://github.com/ungoogled-software/ungoogled-chromium + +LICENSE= BSD3CLAUSE LGPL21 MPL11 +LICENSE_COMB= multi + +ONLY_FOR_ARCHS= aarch64 amd64 i386 + +PATCH_DEPENDS= gpatch:devel/patch \ + ${PYTHON_VERSION}:lang/python${PYTHON_SUFFIX} + +BUILD_DEPENDS= bash:shells/bash \ + ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}ply>0:devel/py-ply@${PY_FLAVOR} \ + gperf:devel/gperf \ + flock:sysutils/flock \ + node:www/node \ + xcb-proto>0:x11/xcb-proto \ + ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \ + ${LOCALBASE}/share/usbids/usb.ids:misc/usbids \ + ${PYTHON_PKGNAMEPREFIX}html5lib>0:www/py-html5lib@${PY_FLAVOR} \ + ${LOCALBASE}/include/va/va.h:multimedia/libva \ + ${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/mesa-dri + +LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-atk \ + libatspi.so:accessibility/at-spi2-core \ + libspeechd.so:accessibility/speech-dispatcher \ + libsnappy.so:archivers/snappy \ + libFLAC.so:audio/flac \ + libopus.so:audio/opus \ + libspeex.so:audio/speex \ + libdbus-1.so:devel/dbus \ + libdbus-glib-1.so:devel/dbus-glib \ + libevent.so:devel/libevent \ + libicuuc.so:devel/icu \ + libjsoncpp.so:devel/jsoncpp \ + libpci.so:devel/libpci \ + libnspr4.so:devel/nspr \ + libre2.so:devel/re2 \ + libcairo.so:graphics/cairo \ + libdrm.so:graphics/libdrm \ + libexif.so:graphics/libexif \ + libpng.so:graphics/png \ + libwebp.so:graphics/webp \ + libopenh264.so:multimedia/openh264 \ + libfreetype.so:print/freetype2 \ + libharfbuzz.so:print/harfbuzz \ + libharfbuzz-icu.so:print/harfbuzz-icu \ + libgcrypt.so:security/libgcrypt \ + libsecret-1.so:security/libsecret \ + libnss3.so:security/nss \ + libexpat.so:textproc/expat2 \ + libfontconfig.so:x11-fonts/fontconfig \ + libwayland-client.so:graphics/wayland \ + libxkbcommon.so:x11/libxkbcommon \ + libxshmfence.so:x11/libxshmfence + +RUN_DEPENDS= xdg-open:devel/xdg-utils \ + noto-basic>0:x11-fonts/noto-basic + +USES= bison compiler:c++17-lang cpe desktop-file-utils gl gnome iconv jpeg \ + localbase:ldflags ninja perl5 pkgconfig python:3.7+,build shebangfix \ + tar:xz xorg + +CPE_VENDOR= google +CPE_PRODUCT= chrome +USE_GL= gbm gl +USE_GNOME= atk dconf gdkpixbuf2 glib20 gtk30 libxml2 libxslt +USE_LDCONFIG= ${DATADIR} +USE_PERL5= build +USE_XORG= x11 xcb xcomposite xcursor xext xdamage xfixes xi \ + xorgproto xrandr xrender xscrnsaver xtst +SHEBANG_FILES= chrome/tools/build/linux/chrome-wrapper buildtools/linux64/clang-format + +MAKE_ARGS= -C out/${BUILDTYPE} +ALL_TARGET= chrome + +BINARY_ALIAS= python3=${PYTHON_CMD} + +# TODO bz@ : install libwidevinecdm.so (see third_party/widevine/cdm/BUILD.gn) +# +# Run "./out/${BUILDTYPE}/gn args out/${BUILDTYPE} --list" for all variables. +# Some parts don't have use_system_* flag, and can be turned on/off by using +# replace_gn_files.py script, some parts just turned on/off for target host +# OS "target_os == is_bsd", like libusb, libpci. +GN_ARGS+= fatal_linker_warnings=false \ + icu_use_data_file=false \ + is_clang=true \ + optimize_webui=true \ + toolkit_views=true \ + use_allocator="none" \ + use_allocator_shim=false \ + use_aura=true \ + use_custom_libcxx=false \ + use_gnome_keyring=false \ + use_lld=true \ + use_sysroot=false \ + use_system_freetype=false \ + use_system_harfbuzz=true \ + use_system_libjpeg=true \ + use_system_libwayland=true \ + use_system_wayland_scanner=true \ + use_udev=false \ + extra_cxxflags="${CXXFLAGS}" \ + extra_ldflags="${LDFLAGS}" + +# sync with flags.gni +GN_ARGS+= build_with_tflite_lib=false \ + chrome_pgo_phase=0 \ + clang_use_chrome_plugins=false \ + disable_fieldtrial_testing_config=true \ + enable_hangout_services_extension=false \ + enable_js_type_check=false \ + enable_mdns=false \ + enable_mse_mpeg2ts_stream_parser=true \ + enable_nacl=false \ + enable_reading_list=false \ + enable_remoting=false \ + enable_reporting=false \ + enable_service_discovery=false \ + exclude_unwind_tables=true \ + google_api_key="" \ + google_default_client_id="" \ + google_default_client_secret="" \ + safe_browsing_mode=0 \ + treat_warnings_as_errors=false \ + use_official_google_api_keys=false \ + use_unofficial_version_number=false + +# TODO: investigate building with these options: +# use_system_minigbm +GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild --skip-generate-buildfiles + +SUB_FILES= ungoogled-chromium.desktop ungoogled-chromium +SUB_LIST+= COMMENT="${COMMENT}" + +OPTIONS_DEFINE= CODECS CUPS DEBUG DRIVER KERBEROS LTO TEST +OPTIONS_DEFAULT= CODECS CUPS DRIVER KERBEROS SNDIO +OPTIONS_EXCLUDE_aarch64=LTO +OPTIONS_GROUP= AUDIO +OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO SNDIO +OPTIONS_RADIO= KERBEROS +OPTIONS_RADIO_KERBEROS= HEIMDAL HEIMDAL_BASE MIT +OPTIONS_SUB= yes +CODECS_DESC= Compile and enable patented codecs like H.264 +DRIVER_DESC= Install chromedriver +HEIMDAL_BASE_DESC= Heimdal Kerberos (base) +HEIMDAL_DESC= Heimdal Kerberos (security/heimdal) +MIT_DESC= MIT Kerberos (security/krb5) + +ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib +ALSA_RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins \ + alsa-lib>=1.1.1_1:audio/alsa-lib +ALSA_VARS= GN_ARGS+=use_alsa=true +ALSA_VARS_OFF= GN_ARGS+=use_alsa=false + +CODECS_VARS= GN_ARGS+=ffmpeg_branding="Chrome" \ + GN_ARGS+=proprietary_codecs=true +CODECS_VARS_OFF= GN_ARGS+=ffmpeg_branding="Chromium" \ + GN_ARGS+=proprietary_codecs=false + +CUPS_LIB_DEPENDS= libcups.so:print/cups +CUPS_VARS= GN_ARGS+=use_cups=true +CUPS_VARS_OFF= GN_ARGS+=use_cups=false + +DEBUG_BUILD_DEPENDS= esbuild:devel/esbuild +DEBUG_VARS= BUILDTYPE=Debug \ + GN_ARGS+=is_debug=true \ + GN_ARGS+=is_component_build=false \ + GN_ARGS+=symbol_level=1 \ + GN_BOOTSTRAP_FLAGS+=--debug \ + WANTSPACE="21 GB" +DEBUG_VARS_OFF= BUILDTYPE=Release \ + GN_ARGS+=blink_symbol_level=0 \ + GN_ARGS+=is_debug=false \ + GN_ARGS+=is_official_build=true \ + GN_ARGS+=symbol_level=0 \ + WANTSPACE="14 GB" + +DRIVER_MAKE_ARGS= chromedriver + +HEIMDAL_LIB_DEPENDS= libkrb.so.26:security/heimdal +KERBEROS_VARS= GN_ARGS+=use_kerberos=true +KERBEROS_VARS_OFF= GN_ARGS+=use_kerberos=false + +LTO_VARS= GN_ARGS+=use_thin_lto=true \ + GN_ARGS+=thin_lto_enable_optimizations=true \ + WANTSPACE="14 GB" +LTO_VARS_OFF= GN_ARGS+=use_thin_lto=false + +MIT_LIB_DEPENDS= libkrb.so.3:security/krb5 +PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio +PULSEAUDIO_VARS= GN_ARGS+=use_pulseaudio=true +PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false + +# With SNDIO=on we exclude audio_manager_linux from the build (see +# media/audio/BUILD.gn) and use audio_manager_openbsd which does not +# support falling back to ALSA or PulseAudio. +SNDIO_PREVENTS= ALSA PULSEAUDIO +SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio +SNDIO_VARS= GN_ARGS+=use_sndio=true +SNDIO_VARS_OFF= GN_ARGS+=use_sndio=false + +.include "Makefile.tests" +TEST_DISTFILES= chromium-${DISTVERSION}-testdata${EXTRACT_SUFX} \ + test_fonts-336e775eec536b2d785cc80eff6ac39051931286.tar.gz:external +TEST_ALL_TARGET= ${TEST_TARGETS} + +.include +.include + +.if ${PORT_OPTIONS:MHEIMDAL_BASE} && !exists(/usr/lib/libkrb5.so) +IGNORE= you have selected HEIMDAL_BASE but do not have Heimdal installed in base +.endif + +.if ${COMPILER_VERSION} != 130 +LLVM_DEFAULT= 13 +BUILD_DEPENDS+= clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} +BINARY_ALIAS+= cpp=${LOCALBASE}/bin/clang-cpp${LLVM_DEFAULT} \ + cc=${LOCALBASE}/bin/clang${LLVM_DEFAULT} \ + c++=${LOCALBASE}/bin/clang++${LLVM_DEFAULT} \ + ar=${LOCALBASE}/bin/llvm-ar${LLVM_DEFAULT} \ + nm=${LOCALBASE}/bin/llvm-nm${LLVM_DEFAULT} \ + ld=${LOCALBASE}/bin/ld.lld${LLVM_DEFAULT} +.else +BINARY_ALIAS+= ar=/usr/bin/llvm-ar \ + nm=/usr/bin/llvm-nm +.endif + +# swiftshader/lib/{libEGL.so,libGLESv2.so} is x86 only +.if ${ARCH} == aarch64 +PLIST_SUB+= NOT_AARCH64="@comment " +.else +PLIST_SUB+= NOT_AARCH64="" +.endif + +# Allow relocations against read-only segments (override lld default) +LDFLAGS_i386= -Wl,-znotext + +# TODO: -isystem, would be just as ugly as this approach, but more reliably +# build would fail without C_INCLUDE_PATH/CPLUS_INCLUDE_PATH env var set. +MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \ + CPLUS_INCLUDE_PATH=${LOCALBASE}/include + +WRKSRC= ${WRKDIR}/chromium-${DISTVERSION} + +pre-everything:: + @${ECHO_MSG} + @${ECHO_MSG} "To build Ungoogled Chromium, you should have around 2GB of memory" + @${ECHO_MSG} "and around ${WANTSPACE} of free disk space." + @${ECHO_MSG} + +post-extract-TEST-on: + @${MKDIR} ${WRKSRC}/third_party/test_fonts/test_fonts + @${MV} ${WRKDIR}/test_fonts ${WRKSRC}/third_party/test_fonts/ + +pre-patch: + cd ${WRKDIR}/ungoogled-chromium-${UGVERSION} && ${PYTHON_CMD} \ + utils/prune_binaries.py ${WRKSRC} pruning.list + cd ${WRKDIR}/ungoogled-chromium-${UGVERSION} && PATCH_BIN=gpatch \ + ${PYTHON_CMD} utils/patches.py apply ${WRKSRC} patches + cd ${WRKDIR}/ungoogled-chromium-${UGVERSION} && ${PYTHON_CMD} \ + utils/domain_substitution.py apply -r domain_regex.list -f \ + domain_substitution.list -c ${WRKSRC}/domsubcache.tar.gz ${WRKSRC} + +pre-configure: + # We used to remove bundled libraries to be sure that chromium uses + # system libraries and not shipped ones. + # cd ${WRKSRC} && ${PYTHON_CMD} \ + #./build/linux/unbundle/remove_bundled_libraries.py [list of preserved] + cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \ + ./build/linux/unbundle/replace_gn_files.py --system-libraries \ + flac fontconfig freetype harfbuzz-ng icu libdrm libevent libpng \ + libusb libwebp libxml libxslt openh264 opus snappy || ${FALSE} + # Chromium uses an unreleased version of FFmpeg, so configure it +.for brand in Chrome Chromium + ${CP} -R \ + ${WRKSRC}/third_party/ffmpeg/chromium/config/${brand}/linux/ \ + ${WRKSRC}/third_party/ffmpeg/chromium/config/${brand}/freebsd +.endfor + +do-configure: + # GN generator bootstrapping and generating ninja files + cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} CC=${CC} CXX=${CXX} LD=${CXX} \ + READELF=${READELF} AR=${AR} NM=${NM} ${PYTHON_CMD} \ + ./tools/gn/bootstrap/bootstrap.py ${GN_BOOTSTRAP_FLAGS} + cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./out/${BUILDTYPE}/gn \ + gen --args='${GN_ARGS}' out/${BUILDTYPE} + + # Setup nodejs dependency + @${MKDIR} ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin + ${LN} -sf ${LOCALBASE}/bin/node ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin/node + + # Setup buildtools/freebsd + @${MKDIR} ${WRKSRC}/buildtools/freebsd + ${LN} -sf ${WRKSRC}/buildtools/linux64/clang-format ${WRKSRC}/buildtools/freebsd + ${LN} -sf ${WRKSRC}/out/${BUILDTYPE}/gn ${WRKSRC}/buildtools/freebsd + ${LN} -sf /usr/bin/strip ${WRKSRC}/buildtools/freebsd/strip + +do-install: + @${MKDIR} ${STAGEDIR}${DATADIR} + ${INSTALL_MAN} ${WRKSRC}/chrome/app/resources/manpage.1.in \ + ${STAGEDIR}${MANPREFIX}/man/man1/ungoogled-chromium.1 + @${SED} -i "" -e 's,\@\@PACKAGE\@\@,chromium,g;s,\@\@MENUNAME\@\@,Chromium Web Browser,g' \ + ${STAGEDIR}${MANPREFIX}/man/man1/ungoogled-chromium.1 + ${CP} ${WRKSRC}/chrome/app/theme/chromium/product_logo_22_mono.png ${WRKSRC}/chrome/app/theme/chromium/product_logo_22.png +.for s in 22 24 48 64 128 256 + @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps + ${INSTALL_DATA} ${WRKSRC}/chrome/app/theme/chromium/product_logo_${s}.png \ + ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps/ungoogled-chromium.png +.endfor + ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*.png ${STAGEDIR}${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*.pak ${STAGEDIR}${DATADIR} +.for d in protoc mksnapshot + ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/${d} ${STAGEDIR}${DATADIR} +.endfor +.for d in snapshot_blob.bin v8_context_snapshot.bin + ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${d} ${STAGEDIR}${DATADIR} +.endfor + ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chrome \ + ${STAGEDIR}${DATADIR}/ungoogled-chromium + cd ${WRKSRC}/out/${BUILDTYPE} && \ + ${COPYTREE_SHARE} "locales resources" ${STAGEDIR}${DATADIR} + @${MKDIR} ${STAGEDIR}${DESKTOPDIR} + ${INSTALL_DATA} ${WRKDIR}/ungoogled-chromium.desktop \ + ${STAGEDIR}${DESKTOPDIR} + ${INSTALL_SCRIPT} ${WRKDIR}/ungoogled-chromium ${STAGEDIR}${PREFIX}/bin + ${INSTALL_SCRIPT} ${WRKSRC}/chrome/tools/build/linux/chrome-wrapper \ + ${STAGEDIR}${DATADIR} + + # ANGLE, EGL, Vk +.for f in libEGL.so libGLESv2.so libVkICD_mock_icd.so + ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR} +.endfor + ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libvulkan.so.1 \ + ${STAGEDIR}${DATADIR}/libvulkan.so +.if ${BUILDTYPE} == Debug + ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libVkLayer_khronos_validation.so ${STAGEDIR}${DATADIR} +.endif + + # SwiftShader +.if ${ARCH} != aarch64 + ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libvk_swiftshader.so ${STAGEDIR}${DATADIR} +.endif + +post-install-DEBUG-on: + ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/*.so \ + ${STAGEDIR}${DATADIR} + ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/character_data_generator \ + ${STAGEDIR}${DATADIR} + +post-install-DRIVER-on: + ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chromedriver \ + ${STAGEDIR}${PREFIX}/bin/ungoogled-chromedriver + +do-test-TEST-on: +.for t in ${TEST_TARGETS} + cd ${WRKSRC}/out/${BUILDTYPE} && ${SETENV} LC_ALL=en_US.UTF-8 \ + ./${t} --gtest_filter=-${EXCLUDE_${t}:ts:} || ${TRUE} +.endfor + +.include diff --git a/www/ungoogled-chromium/Makefile.tests b/www/ungoogled-chromium/Makefile.tests new file mode 100644 index 000000000000..a635e949f167 --- /dev/null +++ b/www/ungoogled-chromium/Makefile.tests @@ -0,0 +1,16 @@ +TEST_TARGETS= base_unittests \ + blink_unittests \ + chromedriver_unittests \ + components_unittests \ + content_unittests \ + crypto_unittests \ + gl_tests \ + gpu_unittests \ + headless_unittests \ + media_unittests \ + mojo_unittests \ + net_unittests \ + printing_unittests \ + skia_unittests \ + url_unittests \ + wm_unittests diff --git a/www/ungoogled-chromium/distinfo b/www/ungoogled-chromium/distinfo new file mode 100644 index 000000000000..46a2a72cf840 --- /dev/null +++ b/www/ungoogled-chromium/distinfo @@ -0,0 +1,9 @@ +TIMESTAMP = 1664607238 +SHA256 (chromium-106.0.5249.91.tar.xz) = 5740496b406db5357e2dad131e1ed2cd1c5831732df7aea5f21036ece8e7549a +SIZE (chromium-106.0.5249.91.tar.xz) = 1611228868 +SHA256 (ungoogled-chromium-106.0.5249.91-1.tar.gz) = 2f49d563a079fd50b68c898889c327f3b9f413ecad5b6c5030f96b932e6d0b30 +SIZE (ungoogled-chromium-106.0.5249.91-1.tar.gz) = 664907 +SHA256 (chromium-106.0.5249.91-testdata.tar.xz) = 3a72db5fadd4a370decac2c90d04b18c26054fd00aa099e1b0abad8c2ce95de7 +SIZE (chromium-106.0.5249.91-testdata.tar.xz) = 265399980 +SHA256 (test_fonts-336e775eec536b2d785cc80eff6ac39051931286.tar.gz) = a2ca2962daf482a8f943163541e1c73ba4b2694fabcd2510981f2db4eda493c8 +SIZE (test_fonts-336e775eec536b2d785cc80eff6ac39051931286.tar.gz) = 32624734 diff --git a/www/ungoogled-chromium/files/patch-BUILD.gn b/www/ungoogled-chromium/files/patch-BUILD.gn new file mode 100644 index 000000000000..0508cd496d04 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-BUILD.gn @@ -0,0 +1,80 @@ +--- BUILD.gn.orig 2022-10-01 07:40:07 UTC ++++ BUILD.gn +@@ -53,7 +53,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) +@@ -83,7 +83,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", +@@ -441,7 +440,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", +@@ -634,6 +633,15 @@ group("gn_all") { + deps += [ "//gpu/tools/compositor_model_bench" ] + } + ++ if (is_bsd) { ++ deps -= [ ++ "//third_party/breakpad:dump_syms($host_toolchain)", ++ "//third_party/breakpad:microdump_stackwalk($host_toolchain)", ++ "//third_party/breakpad:minidump_dump($host_toolchain)", ++ "//third_party/breakpad:minidump_stackwalk($host_toolchain)", ++ ] ++ } ++ + if (is_mac) { + deps += [ + "//third_party/breakpad:crash_inspector", +@@ -682,7 +690,7 @@ group("gn_all") { + host_os == "win") { + deps += [ "//chrome/test/mini_installer:mini_installer_tests" ] + } +- } else if (!is_android && !is_ios && !is_fuchsia) { ++ } else if (!is_android && !is_ios && !is_fuchsia && !is_bsd) { + deps += [ "//third_party/breakpad:symupload($host_toolchain)" ] + } + +@@ -1194,7 +1202,7 @@ if (!is_ios) { + data_deps += [ "//content/web_test:web_test_common_mojom_js_data_deps" ] + } + +- if (!is_win && !is_android) { ++ if (!is_win && !is_android && !is_bsd) { + data_deps += + [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] + } +@@ -1203,7 +1211,7 @@ if (!is_ios) { + data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] + } + +- if (is_linux || is_chromeos) { ++ if ((is_linux && !is_bsd) || is_chromeos) { + data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] + } + +@@ -1646,7 +1654,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_toolchain)" ] + } diff --git a/www/ungoogled-chromium/files/patch-apps_ui_views_app__window__frame__view.cc b/www/ungoogled-chromium/files/patch-apps_ui_views_app__window__frame__view.cc new file mode 100644 index 000000000000..14f75eb0a3ae --- /dev/null +++ b/www/ungoogled-chromium/files/patch-apps_ui_views_app__window__frame__view.cc @@ -0,0 +1,11 @@ +--- apps/ui/views/app_window_frame_view.cc.orig 2022-10-01 07:40:07 UTC ++++ apps/ui/views/app_window_frame_view.cc +@@ -137,7 +137,7 @@ gfx::Rect AppWindowFrameView::GetWindowBoundsForClient + gfx::Rect window_bounds = client_bounds; + // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is + // complete. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || 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/www/ungoogled-chromium/files/patch-ash_display_mirror__window__controller.cc b/www/ungoogled-chromium/files/patch-ash_display_mirror__window__controller.cc new file mode 100644 index 000000000000..a59bc463b2a5 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-ash_display_mirror__window__controller.cc @@ -0,0 +1,14 @@ +--- ash/display/mirror_window_controller.cc.orig 2022-10-01 07:40:07 UTC ++++ ash/display/mirror_window_controller.cc +@@ -296,7 +296,11 @@ void MirrorWindowController::UpdateWindow( + return info.id() == iter->first; + }) == display_info_list.end()) { + CloseAndDeleteHost(iter->second, true); ++#if defined(__llvm__) ++ mirroring_host_info_map_.erase(iter++); ++#else + iter = mirroring_host_info_map_.erase(iter); ++#endif + } else { + ++iter; + } diff --git a/www/ungoogled-chromium/files/patch-base_BUILD.gn b/www/ungoogled-chromium/files/patch-base_BUILD.gn new file mode 100644 index 000000000000..6744bd068762 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_BUILD.gn @@ -0,0 +1,164 @@ +--- base/BUILD.gn.orig 2022-10-01 07:40:07 UTC ++++ base/BUILD.gn +@@ -162,7 +162,7 @@ buildflag_header("ios_cronet_buildflags") { + flags = [ "CRONET_BUILD=$is_cronet_build" ] + } + +-enable_message_pump_epoll = is_linux || is_chromeos || is_android ++enable_message_pump_epoll = (is_linux || is_chromeos || is_android) && !is_bsd + buildflag_header("message_pump_buildflags") { + header = "message_pump_buildflags.h" + header_dir = "base/message_loop" +@@ -1031,7 +1031,7 @@ mixed_component("base") { + "timer/hi_res_timer_manager_posix.cc", + ] + +- if (!is_nacl && !is_apple) { ++ if (!is_nacl && !is_apple && !is_bsd) { + sources += [ + "profiler/stack_copier_signal.cc", + "profiler/stack_copier_signal.h", +@@ -1040,6 +1040,12 @@ mixed_component("base") { + "profiler/thread_delegate_posix.h", + ] + } ++ ++ if (is_bsd) { ++ sources += [ ++ "profiler/stack_sampler_posix.cc", ++ ] ++ } + } + + if (is_win) { +@@ -1541,11 +1547,23 @@ mixed_component("base") { + # Needed for 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" ] ++ } ++ ++ if (is_freebsd) { ++ libs += [ ++ "execinfo", ++ "util", ++ ] ++ } ++ + if (use_allocator_shim) { + sources += [ + "allocator/allocator_shim.cc", +@@ -1573,7 +1591,7 @@ mixed_component("base") { + ] + configs += [ "//base/allocator:mac_no_default_new_delete_symbols" ] + } +- if (is_chromeos || is_linux) { ++ if (is_chromeos || (is_linux && !is_bsd)) { + sources += [ + "allocator/allocator_shim_override_cpp_symbols.h", + "allocator/allocator_shim_override_glibc_weak_symbols.h", +@@ -1629,7 +1647,7 @@ mixed_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" ] + } + +@@ -2211,6 +2229,42 @@ mixed_component("base") { + } + } + ++ if (is_bsd) { ++ sources -= [ ++ "files/file_path_watcher_inotify.cc", ++ "files/file_util_linux.cc", ++ "files/scoped_file_linux.cc", ++ "process/memory_linux.cc", ++ "process/process_linux.cc", ++ "system/sys_info_linux.cc", ++ "process/process_iterator_linux.cc", ++ "process/process_metrics_linux.cc", ++ "process/process_handle_linux.cc" ++ ] ++ sources += [ ++ "process/memory_stubs.cc", ++ "files/file_path_watcher_kqueue.cc", ++ "files/file_path_watcher_kqueue.h", ++ "files/file_path_watcher_bsd.cc", ++ ] ++ } ++ ++ 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", ++ ] ++ } ++ + # iOS + if (is_ios) { + sources -= [ +@@ -2310,7 +2364,7 @@ mixed_component("base") { + } + + if (dep_libevent) { +- deps += [ "//third_party/libevent" ] ++ public_deps += [ "//third_party/libevent" ] + } + + if (use_libevent) { +@@ -3545,7 +3599,7 @@ test("base_unittests") { + } + } + +- if (is_linux || is_chromeos) { ++ if ((is_linux || is_chromeos) && !is_bsd) { + sources += [ + "debug/proc_maps_linux_unittest.cc", + "files/scoped_file_linux_unittest.cc", +@@ -3593,7 +3647,7 @@ test("base_unittests") { + "posix/file_descriptor_shuffle_unittest.cc", + "posix/unix_domain_socket_unittest.cc", + ] +- if (!is_nacl && !is_apple) { ++ if (!is_nacl && !is_apple && !is_bsd) { + sources += [ + "profiler/stack_copier_signal_unittest.cc", + "profiler/thread_delegate_posix_unittest.cc", +@@ -3603,7 +3657,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" ] + } + +@@ -3791,7 +3845,7 @@ test("base_unittests") { + } + } + +- 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/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_address__space__randomization.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_address__space__randomization.h new file mode 100644 index 000000000000..bbdbf6a76c02 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_address__space__randomization.h @@ -0,0 +1,20 @@ +--- base/allocator/partition_allocator/address_space_randomization.h.orig 2022-10-01 07:40:07 UTC ++++ base/allocator/partition_allocator/address_space_randomization.h +@@ -38,7 +38,7 @@ AslrMask(uintptr_t bits) { + + #if defined(ARCH_CPU_64_BITS) + +- #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) ++ #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) && !defined(OS_BSD) + + // We shouldn't allocate system pages at all for sanitizer builds. However, + // we do, and if random hint addresses interfere with address ranges +@@ -128,7 +128,7 @@ AslrMask(uintptr_t bits) { + return AslrAddress(0x20000000ULL); + } + +- #elif BUILDFLAG(IS_LINUX) ++ #elif BUILDFLAG(IS_LINUX) || 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/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_page__allocator.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_page__allocator.h new file mode 100644 index 000000000000..49d3070a84cd --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_page__allocator.h @@ -0,0 +1,11 @@ +--- base/allocator/partition_allocator/page_allocator.h.orig 2022-10-01 07:40:07 UTC ++++ base/allocator/partition_allocator/page_allocator.h +@@ -206,7 +206,7 @@ void DecommitAndZeroSystemPages(void* address, size_t + // recommitted. Do not assume that this will not change over time. + constexpr PA_COMPONENT_EXPORT( + PARTITION_ALLOC) bool DecommittedMemoryIsAlwaysZeroed() { +-#if BUILDFLAG(IS_APPLE) ++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) + return false; + #else + return true; diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_page__allocator__constants.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_page__allocator__constants.h new file mode 100644 index 000000000000..c8db5e5a3584 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_page__allocator__constants.h @@ -0,0 +1,38 @@ +--- base/allocator/partition_allocator/page_allocator_constants.h.orig 2022-10-01 07:40:07 UTC ++++ base/allocator/partition_allocator/page_allocator_constants.h +@@ -25,7 +25,7 @@ + // elimination. + #define PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR __attribute__((const)) + +-#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) ++#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) + // 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 +@@ -81,7 +81,7 @@ PageAllocationGranularityShift() { + return 14; // 16kB + #elif BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS) + return static_cast(vm_page_shift); +-#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) ++#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) + // arm64 supports 4kb (shift = 12), 16kb (shift = 14), and 64kb (shift = 16) + // page sizes. Retrieve from or initialize cache. + size_t shift = page_characteristics.shift.load(std::memory_order_relaxed); +@@ -102,7 +102,7 @@ PageAllocationGranularity() { + // This is literally equivalent to |1 << PageAllocationGranularityShift()| + // below, but was separated out for IS_APPLE to avoid << on a non-constexpr. + return vm_page_size; +-#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) ++#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) + // arm64 supports 4kb, 16kb, and 64kb page sizes. Retrieve from or + // initialize cache. + size_t size = page_characteristics.size.load(std::memory_order_relaxed); +@@ -141,7 +141,7 @@ SystemPageShift() { + PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR PA_ALWAYS_INLINE size_t + SystemPageSize() { + #if (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)) || \ +- (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) ++ ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)) + // This is literally equivalent to |1 << SystemPageShift()| below, but was + // separated out for 64-bit IS_APPLE and arm64 on Linux to avoid << on a + // non-constexpr. diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h new file mode 100644 index 000000000000..7178749831fe --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h @@ -0,0 +1,16 @@ +--- base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2022-10-01 07:40:07 UTC ++++ base/allocator/partition_allocator/page_allocator_internals_posix.h +@@ -347,8 +347,12 @@ bool TryRecommitSystemPagesInternal( + + void DiscardSystemPagesInternal(uintptr_t address, size_t length) { + void* ptr = reinterpret_cast(address); +-#if BUILDFLAG(IS_APPLE) ++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) ++#if 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/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__address__space.cc b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__address__space.cc new file mode 100644 index 000000000000..eb97978cde25 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__address__space.cc @@ -0,0 +1,11 @@ +--- base/allocator/partition_allocator/partition_address_space.cc.orig 2022-10-01 07:40:07 UTC ++++ base/allocator/partition_allocator/partition_address_space.cc +@@ -238,7 +238,7 @@ void PartitionAddressSpace::UninitConfigurablePoolForT + setup_.configurable_pool_ = 0; + } + +-#if BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) + + PageCharacteristics page_characteristics; + diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.cc b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.cc new file mode 100644 index 000000000000..3d4b7cced3c8 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.cc @@ -0,0 +1,17 @@ +--- base/allocator/partition_allocator/partition_alloc.cc.orig 2022-10-01 07:40:07 UTC ++++ base/allocator/partition_allocator/partition_alloc.cc +@@ -63,8 +63,14 @@ void PartitionAllocGlobalInit(OomFunction on_out_of_me + "maximum direct mapped allocation"); + + // Check that some of our zanier calculations worked out as expected. ++#if defined(__i386__) && defined(OS_FREEBSD) ++ // alignof(std::max_align_t) is only 4 on FreeBSD/i386 ++ static_assert(internal::kSmallestBucket >= internal::kAlignment, ++ "generic smallest bucket"); ++#else + static_assert(internal::kSmallestBucket == internal::kAlignment, + "generic smallest bucket"); ++#endif + static_assert(internal::kMaxBucketed == 917504, "generic max bucketed"); + STATIC_ASSERT_OR_PA_CHECK( + internal::MaxSystemPagesPerRegularSlotSpan() <= 16, diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_rand__util__posix.cc b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_rand__util__posix.cc new file mode 100644 index 000000000000..bff3736161f6 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_rand__util__posix.cc @@ -0,0 +1,13 @@ +--- base/allocator/partition_allocator/partition_alloc_base/rand_util_posix.cc.orig 2022-10-01 07:40:07 UTC ++++ base/allocator/partition_allocator/partition_alloc_base/rand_util_posix.cc +@@ -86,6 +86,10 @@ void RandBytes(void* output, size_t output_length) { + if (getentropy(output, output_length) == 0) { + return; + } ++#elif BUILDFLAG(IS_BSD) ++ if (getentropy(output, output_length) == 0) { ++ return; ++ } + #endif + + // If the OS-specific mechanisms didn't work, fall through to reading from diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_threading_platform__thread__internal__posix.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_threading_platform__thread__internal__posix.h new file mode 100644 index 000000000000..025d6762fd2f --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_threading_platform__thread__internal__posix.h @@ -0,0 +1,11 @@ +--- base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread_internal_posix.h.orig 2022-10-01 07:40:07 UTC ++++ base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread_internal_posix.h +@@ -10,7 +10,7 @@ + + namespace partition_alloc::internal::base::internal { + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || 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/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_threading_platform__thread__posix.cc b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_threading_platform__thread__posix.cc new file mode 100644 index 000000000000..3b22be9a746d --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_threading_platform__thread__posix.cc @@ -0,0 +1,11 @@ +--- base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread_posix.cc.orig 2022-10-01 07:40:07 UTC ++++ base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread_posix.cc +@@ -17,7 +17,7 @@ + #include "base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread_internal_posix.h" + #include "build/build_config.h" + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include + #include + #endif diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__config.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__config.h new file mode 100644 index 000000000000..bf7b17bdeace --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__config.h @@ -0,0 +1,29 @@ +--- base/allocator/partition_allocator/partition_alloc_config.h.orig 2022-10-01 07:40:07 UTC ++++ base/allocator/partition_allocator/partition_alloc_config.h +@@ -76,7 +76,7 @@ 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). +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + #define PA_HAS_LINUX_KERNEL + #endif + +@@ -195,7 +195,7 @@ constexpr bool kUseLazyCommit = false; + + // On these platforms, lock all the partitions before fork(), and unlock after. + // This may be required on more platforms in the future. +-#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #define PA_HAS_ATFORK_HANDLER + #endif + +@@ -235,7 +235,7 @@ constexpr bool kUseLazyCommit = false; + // + // Also enabled on ARM64 macOS, as the 16kiB pages on this platform lead to + // larger slot spans. +-#if BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) ++#if BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) || BUILDFLAG(IS_BSD) + #define PA_PREFER_SMALLER_SLOT_SPANS + #endif // BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) + diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__constants.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__constants.h new file mode 100644 index 000000000000..0ba2a5b4a10a --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__constants.h @@ -0,0 +1,20 @@ +--- base/allocator/partition_allocator/partition_alloc_constants.h.orig 2022-10-01 07:40:07 UTC ++++ base/allocator/partition_allocator/partition_alloc_constants.h +@@ -91,7 +91,7 @@ PartitionPageShift() { + return 18; // 256 KiB + } + #elif (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)) || \ +- (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) ++ ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)) + PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR PA_ALWAYS_INLINE size_t + PartitionPageShift() { + return PageAllocationGranularityShift() + 2; +@@ -270,7 +270,7 @@ constexpr size_t kNumPools = 3; + // Special-case Android and iOS, which incur test failures with larger + // GigaCage. Regardless, allocating >8GiB with malloc() on these platforms is + // unrealistic as of 2022. +-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) ++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) + constexpr size_t kPoolMaxSize = 8 * kGiB; + #else + constexpr size_t kPoolMaxSize = 16 * kGiB; diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__page.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__page.h new file mode 100644 index 000000000000..b395f9ec7f7d --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__page.h @@ -0,0 +1,29 @@ +--- base/allocator/partition_allocator/partition_page.h.orig 2022-10-01 07:40:07 UTC ++++ base/allocator/partition_allocator/partition_page.h +@@ -131,13 +131,14 @@ struct SlotSpanMetadata { + PartitionBucket* const bucket = nullptr; + + // CHECK()ed in AllocNewSlotSpan(). +-#if defined(PA_HAS_64_BITS_POINTERS) && BUILDFLAG(IS_APPLE) ++#if (defined(PA_HAS_64_BITS_POINTERS) && BUILDFLAG(IS_APPLE)) || \ ++ (BUILDFLAG(IS_FREEBSD) && defined(__i386__)) + // System page size is not a constant on Apple OSes, but is either 4 or 16kiB + // (1 << 12 or 1 << 14), as checked in PartitionRoot::Init(). And + // PartitionPageSize() is 4 times the OS page size. + static constexpr size_t kMaxSlotsPerSlotSpan = + 4 * (1 << 14) / kSmallestBucket; +-#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) ++#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) + // System page size can be 4, 16, or 64 kiB on Linux on arm64. 64 kiB is + // currently (kMaxSlotsPerSlotSpanBits == 13) not supported by the code, + // so we use the 16 kiB maximum (64 kiB will crash). +@@ -151,7 +152,9 @@ struct SlotSpanMetadata { + #endif // defined(PA_HAS_64_BITS_POINTERS) && BUILDFLAG(IS_APPLE) + // The maximum number of bits needed to cover all currently supported OSes. + static constexpr size_t kMaxSlotsPerSlotSpanBits = 13; ++#if !BUILDFLAG(IS_FREEBSD) && defined(__i386__) + static_assert(kMaxSlotsPerSlotSpan < (1 << kMaxSlotsPerSlotSpanBits), ""); ++#endif + + // |marked_full| isn't equivalent to being full. Slot span is marked as full + // iff it isn't on the active slot span list (or any other list). diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__root.cc b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__root.cc new file mode 100644 index 000000000000..9e911ca9bc1b --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__root.cc @@ -0,0 +1,38 @@ +--- base/allocator/partition_allocator/partition_root.cc.orig 2022-10-01 07:40:07 UTC ++++ base/allocator/partition_allocator/partition_root.cc +@@ -33,7 +33,7 @@ + #include "wow64apiset.h" + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include + #endif + +@@ -230,7 +230,7 @@ void PartitionAllocMallocInitOnce() { + if (!g_global_init_called.compare_exchange_strong(expected, true)) + return; + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || 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. +@@ -321,7 +321,7 @@ static size_t PartitionPurgeSlotSpan( + constexpr size_t kMaxSlotCount = + (PartitionPageSize() * kMaxPartitionPagesPerRegularSlotSpan) / + MaxPurgeableSlotSize(); +-#elif BUILDFLAG(IS_APPLE) || (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) ++#elif BUILDFLAG(IS_APPLE) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) && defined(ARCH_CPU_ARM64)) + // It's better for slot_usage to be stack-allocated and fixed-size, which + // demands that its size be constexpr. On IS_APPLE and Linux on arm64, + // PartitionPageSize() is always SystemPageSize() << 2, so regardless of +@@ -709,7 +709,7 @@ void PartitionRoot::Init(PartitionOptions + // apple OSes. + PA_CHECK((internal::SystemPageSize() == (size_t{1} << 12)) || + (internal::SystemPageSize() == (size_t{1} << 14))); +-#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) ++#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(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 needs to be + // added here in the future, to allow 64 kiB pagesize. That is only diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_spinning__mutex.cc b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_spinning__mutex.cc new file mode 100644 index 000000000000..f99049492e24 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_spinning__mutex.cc @@ -0,0 +1,47 @@ +--- base/allocator/partition_allocator/spinning_mutex.cc.orig 2022-10-01 07:40:07 UTC ++++ base/allocator/partition_allocator/spinning_mutex.cc +@@ -18,7 +18,15 @@ + + #if defined(PA_HAS_LINUX_KERNEL) + #include ++#if defined(OS_OPENBSD) ++#include ++#elif defined(OS_FREEBSD) ++#include ++#include ++#include ++#else + #include ++#endif + #include + #include + #endif // defined(PA_HAS_LINUX_KERNEL) +@@ -107,8 +115,13 @@ void SpinningMutex::FutexWait() { + // |kLockedContended| anymore. Note that even without spurious wakeups, the + // value of |state_| is not guaranteed when this returns, as another thread + // may get the lock before we get to run. ++#if defined(OS_FREEBSD) ++ int err = _umtx_op(&state_, UMTX_OP_WAIT_UINT_PRIVATE, ++ kLockedContended, nullptr, nullptr); ++#else + int err = syscall(SYS_futex, &state_, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, + kLockedContended, nullptr, nullptr, 0); ++#endif + + if (err) { + // These are programming error, check them. +@@ -120,8 +133,14 @@ void SpinningMutex::FutexWait() { + + void SpinningMutex::FutexWake() { + int saved_errno = errno; ++#if defined(OS_FREEBSD) ++ long retval = _umtx_op(&state_, UMTX_OP_WAKE_PRIVATE, ++ 1 /* wake up a single waiter */, nullptr, nullptr); ++#else + long retval = syscall(SYS_futex, &state_, FUTEX_WAKE | FUTEX_PRIVATE_FLAG, + 1 /* wake up a single waiter */, nullptr, nullptr, 0); ++#endif ++ + PA_CHECK(retval != -1); + errno = saved_errno; + } diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_starscan_stack_stack.cc b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_starscan_stack_stack.cc new file mode 100644 index 000000000000..79c8624b6350 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_starscan_stack_stack.cc @@ -0,0 +1,50 @@ +--- base/allocator/partition_allocator/starscan/stack/stack.cc.orig 2022-10-01 07:40:07 UTC ++++ base/allocator/partition_allocator/starscan/stack/stack.cc +@@ -17,6 +17,10 @@ + #include + #endif + ++#if defined(OS_BSD) ++#include ++#endif ++ + #if defined(LIBC_GLIBC) + extern "C" void* __libc_stack_end; + #endif +@@ -47,6 +51,36 @@ void* GetStackTop() { + + void* GetStackTop() { + return pthread_get_stackaddr_np(pthread_self()); ++} ++ ++#elif defined(OS_OPENBSD) ++ ++void* GetStackTop() { ++ stack_t ss; ++ if (pthread_stackseg_np(pthread_self(), &ss) != 0) ++ return nullptr; ++ return reinterpret_cast(ss.ss_sp); ++} ++ ++#elif defined(OS_FREEBSD) ++ ++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(base) + size; ++ } ++ pthread_attr_destroy(&attr); ++ return nullptr; + } + + #elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) diff --git a/www/ungoogled-chromium/files/patch-base_atomicops.h b/www/ungoogled-chromium/files/patch-base_atomicops.h new file mode 100644 index 000000000000..ed8ded9f1c96 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_atomicops.h @@ -0,0 +1,14 @@ +--- base/atomicops.h.orig 2022-10-01 07:40:07 UTC ++++ base/atomicops.h +@@ -56,7 +56,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/www/ungoogled-chromium/files/patch-base_base__paths__posix.cc b/www/ungoogled-chromium/files/patch-base_base__paths__posix.cc new file mode 100644 index 000000000000..091857f7db2a --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_base__paths__posix.cc @@ -0,0 +1,98 @@ +--- base/base_paths_posix.cc.orig 2022-10-01 07:40:07 UTC ++++ base/base_paths_posix.cc +@@ -15,6 +15,7 @@ + #include + #include + ++#include "base/command_line.h" + #include "base/environment.h" + #include "base/files/file_path.h" + #include "base/files/file_util.h" +@@ -25,9 +26,13 @@ + #include "base/process/process_metrics.h" + #include "build/build_config.h" + +-#if BUILDFLAG(IS_FREEBSD) ++#if BUILDFLAG(IS_BSD) + #include + #include ++#if BUILDFLAG(IS_OPENBSD) ++#include ++#define MAXTOKENS 2 ++#endif + #elif BUILDFLAG(IS_SOLARIS) || BUILDFLAG(IS_AIX) + #include + #endif +@@ -68,13 +73,65 @@ bool PathProviderPosix(int key, FilePath* result) { + *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"); +- return true; ++ 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; ++ } ++ ++ 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) ++ goto out; ++ ++ for (int i = 0; i < cnt; i++) { ++ if (files[i].fd_fd == KERN_FILE_TEXT && ++ files[i].va_fsid == static_cast(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("/usr/local/ungoogled-chromium/ungoogled-chromium"); ++ return true; ++#if !BUILDFLAG(IS_AIX) ++ } ++ return ret; ++#endif + #endif + } + case DIR_SRC_TEST_DATA_ROOT: { diff --git a/www/ungoogled-chromium/files/patch-base_base__switches.cc b/www/ungoogled-chromium/files/patch-base_base__switches.cc new file mode 100644 index 000000000000..a5d89d37a139 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_base__switches.cc @@ -0,0 +1,11 @@ +--- base/base_switches.cc.orig 2022-10-01 07:40:07 UTC ++++ base/base_switches.cc +@@ -170,7 +170,7 @@ const char kForceFieldTrialParams[] = "force-fieldtria + + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // TODO(crbug.com/1176772): Remove kEnableCrashpad and IsCrashpadEnabled() when + // Crashpad is fully enabled on Linux. Indicates that Crashpad should be + // enabled. diff --git a/www/ungoogled-chromium/files/patch-base_base__switches.h b/www/ungoogled-chromium/files/patch-base_base__switches.h new file mode 100644 index 000000000000..71316c4d96ef --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_base__switches.h @@ -0,0 +1,11 @@ +--- base/base_switches.h.orig 2022-10-01 07:40:07 UTC ++++ base/base_switches.h +@@ -60,7 +60,7 @@ extern const char kEnableIdleTracing[]; + extern const char kForceFieldTrialParams[]; + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // TODO(crbug.com/1176772): Remove kEnableCrashpad and IsCrashpadEnabled() when + // Crashpad is fully enabled on Linux. + extern const char kEnableCrashpad[]; diff --git a/www/ungoogled-chromium/files/patch-base_cpu.h b/www/ungoogled-chromium/files/patch-base_cpu.h new file mode 100644 index 000000000000..75f3fbb02cd2 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_cpu.h @@ -0,0 +1,11 @@ +--- base/cpu.h.orig 2022-10-01 07:40:07 UTC ++++ base/cpu.h +@@ -108,7 +108,7 @@ class BASE_EXPORT CPU final { + const std::string& cpu_brand() const { return cpu_brand_; } + + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ +- BUILDFLAG(IS_AIX) ++ BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) + enum class CoreType { + kUnknown = 0, + kOther, diff --git a/www/ungoogled-chromium/files/patch-base_debug_debugger__posix.cc b/www/ungoogled-chromium/files/patch-base_debug_debugger__posix.cc new file mode 100644 index 000000000000..2215c8de0bab --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_debug_debugger__posix.cc @@ -0,0 +1,68 @@ +--- base/debug/debugger_posix.cc.orig 2022-10-01 07:40:07 UTC ++++ base/debug/debugger_posix.cc +@@ -35,6 +35,10 @@ + #include + #endif + ++#if BUILDFLAG(IS_OPENBSD) ++#include ++#endif ++ + #if BUILDFLAG(IS_FREEBSD) + #include + #endif +@@ -95,32 +99,51 @@ bool BeingDebugged() { + + // 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; ++#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)); ++ if ((info = reinterpret_cast(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); + #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) +- being_debugged = (info.p_flag & P_TRACED) != 0; ++#elif BUILDFLAG(IS_OPENBSD) ++ being_debugged = (info->p_psflags & PS_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/www/ungoogled-chromium/files/patch-base_debug_elf__reader.cc b/www/ungoogled-chromium/files/patch-base_debug_elf__reader.cc new file mode 100644 index 000000000000..8fbbd906e0c7 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_debug_elf__reader.cc @@ -0,0 +1,18 @@ +--- base/debug/elf_reader.cc.orig 2022-10-01 07:40:07 UTC ++++ base/debug/elf_reader.cc +@@ -78,6 +78,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base, + bool found = false; + while (current_section < section_end) { + current_note = reinterpret_cast(current_section); ++#if !defined(OS_BSD) + if (current_note->n_type == NT_GNU_BUILD_ID) { + StringPiece note_name(current_section + sizeof(Nhdr), + current_note->n_namesz); +@@ -87,6 +88,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base, + break; + } + } ++#endif + + size_t section_size = bits::AlignUp(current_note->n_namesz, 4u) + + bits::AlignUp(current_note->n_descsz, 4u) + diff --git a/www/ungoogled-chromium/files/patch-base_debug_proc__maps__linux.cc b/www/ungoogled-chromium/files/patch-base_debug_proc__maps__linux.cc new file mode 100644 index 000000000000..30c6e6205902 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_debug_proc__maps__linux.cc @@ -0,0 +1,11 @@ +--- base/debug/proc_maps_linux.cc.orig 2022-10-01 07:40:07 UTC ++++ base/debug/proc_maps_linux.cc +@@ -13,7 +13,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 + #endif + diff --git a/www/ungoogled-chromium/files/patch-base_debug_stack__trace__posix.cc b/www/ungoogled-chromium/files/patch-base_debug_stack__trace__posix.cc new file mode 100644 index 000000000000..f828c074ab75 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_debug_stack__trace__posix.cc @@ -0,0 +1,38 @@ +--- base/debug/stack_trace_posix.cc.orig 2022-10-01 07:40:07 UTC ++++ base/debug/stack_trace_posix.cc +@@ -39,7 +39,7 @@ + #include + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "base/debug/proc_maps_linux.h" + #endif + +@@ -698,6 +698,9 @@ class SandboxSymbolizeHelper { + // 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)) { +@@ -715,6 +718,7 @@ class SandboxSymbolizeHelper { + + is_initialized_ = true; + return true; ++#endif + } + + // Opens all object files and caches their file descriptors. +@@ -871,7 +875,7 @@ size_t CollectStackTrace(void** trace, size_t count) { + // If we do not have unwind tables, then try tracing using frame pointers. + return base::debug::TraceStackFramePointers(const_cast(trace), + count, 0); +-#elif !defined(__UCLIBC__) && !defined(_AIX) ++#elif !defined(__UCLIBC__) && !defined(_AIX) && !BUILDFLAG(IS_BSD) + // Though the backtrace API man page does not list any possible negative + // return values, we take no chance. + return base::saturated_cast( diff --git a/www/ungoogled-chromium/files/patch-base_files_dir__reader__linux.h b/www/ungoogled-chromium/files/patch-base_files_dir__reader__linux.h new file mode 100644 index 000000000000..74f2516ba6e6 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_files_dir__reader__linux.h @@ -0,0 +1,39 @@ +--- base/files/dir_reader_linux.h.orig 2022-10-01 07:40:07 UTC ++++ base/files/dir_reader_linux.h +@@ -16,10 +16,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 ++typedef struct dirent linux_dirent; ++#else + struct linux_dirent { + uint64_t d_ino; + int64_t d_off; +@@ -27,6 +33,7 @@ struct linux_dirent { + unsigned char d_type; + char d_name[0]; + }; ++#endif + + class DirReaderLinux { + public: +@@ -61,7 +68,11 @@ class DirReaderLinux { + if (offset_ != size_) + return true; + ++#if BUILDFLAG(IS_BSD) ++ const int r = getdents(fd_, reinterpret_cast(buf_), sizeof(buf_)); ++#else + const long r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_)); ++#endif + if (r == 0) + return false; + if (r < 0) { diff --git a/www/ungoogled-chromium/files/patch-base_files_dir__reader__posix.h b/www/ungoogled-chromium/files/patch-base_files_dir__reader__posix.h new file mode 100644 index 000000000000..131f7afcd8c5 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_files_dir__reader__posix.h @@ -0,0 +1,20 @@ +--- base/files/dir_reader_posix.h.orig 2022-10-01 07:40:07 UTC ++++ 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/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__bsd.cc b/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__bsd.cc new file mode 100644 index 000000000000..5e17eef81845 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__bsd.cc @@ -0,0 +1,57 @@ +--- base/files/file_path_watcher_bsd.cc.orig 2022-10-01 07:40:07 UTC ++++ 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 ++ ++#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(); ++ } ++ DCHECK(impl_.get()); ++ return impl_->Watch(path, type, callback); ++ } ++ ++ void Cancel() override { ++ if (impl_.get()) ++ impl_->Cancel(); ++ set_cancelled(); ++ } ++ ++ private: ++ std::unique_ptr impl_; ++}; ++ ++} // namespace ++ ++FilePathWatcher::FilePathWatcher() { ++ sequence_checker_.DetachFromSequence(); ++ impl_ = std::make_unique(); ++} ++ ++} // namespace base diff --git a/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__kqueue.h b/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__kqueue.h new file mode 100644 index 000000000000..f359a963aea5 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__kqueue.h @@ -0,0 +1,10 @@ +--- base/files/file_path_watcher_kqueue.h.orig 2022-10-01 07:40:07 UTC ++++ 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 + #include + + #include diff --git a/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__unittest.cc b/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__unittest.cc new file mode 100644 index 000000000000..0da5585ec8dc --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__unittest.cc @@ -0,0 +1,29 @@ +--- base/files/file_path_watcher_unittest.cc.orig 2022-10-01 07:40:07 UTC ++++ base/files/file_path_watcher_unittest.cc +@@ -498,7 +498,7 @@ TEST_F(FilePathWatcherTest, MAYBE_WatchDirectory) { + VLOG(1) << "Waiting for file1 creation"; + ASSERT_TRUE(WaitForEvents()); + +-#if !BUILDFLAG(IS_APPLE) ++#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) + // Mac implementation does not detect files modified in a directory. + ASSERT_TRUE(WriteFile(file1, "content v2")); + VLOG(1) << "Waiting for file1 modification"; +@@ -1118,7 +1118,7 @@ enum Permission { + 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; + +@@ -1149,7 +1149,7 @@ bool ChangeFilePermissions(const FilePath& path, Permi + } + #endif // BUILDFLAG(IS_APPLE) + +-#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/www/ungoogled-chromium/files/patch-base_files_file__util__posix.cc b/www/ungoogled-chromium/files/patch-base_files_file__util__posix.cc new file mode 100644 index 000000000000..50b63ab9e370 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_files_file__util__posix.cc @@ -0,0 +1,52 @@ +--- base/files/file_util_posix.cc.orig 2022-10-01 07:40:07 UTC ++++ base/files/file_util_posix.cc +@@ -700,32 +700,34 @@ bool CreateDirectoryAndGetError(const FilePath& full_p + File::Error* error) { + ScopedBlockingCall scoped_blocking_call( + FROM_HERE, BlockingType::MAY_BLOCK); // For call to mkdir(). ++ const FilePath kFileSystemRoot("/"); + std::vector subpaths; + + // Collect a list of all parent directories. + FilePath last_path = full_path; +- subpaths.push_back(full_path); ++ if (full_path != kFileSystemRoot) ++ subpaths.push_back(full_path); + for (FilePath path = full_path.DirName(); +- path.value() != last_path.value(); path = path.DirName()) { ++ (path.value() != last_path.value() && ++ (path != kFileSystemRoot)); path = path.DirName()) { + subpaths.push_back(path); + last_path = path; + } + + // Iterate through the parents and create the missing ones. + for (const FilePath& subpath : base::Reversed(subpaths)) { +- if (DirectoryExists(subpath)) +- continue; +- if (mkdir(subpath.value().c_str(), 0700) == 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) +- *error = File::OSErrorToFileError(saved_errno); +- return false; ++ if (!PathExists(subpath)) { ++ if ((mkdir(subpath.value().c_str(), 0700) == -1) && ++ ((full_path != subpath) ? (errno != ENOENT) : (-1))) { ++ int saved_errno = errno; ++ if (error) ++ *error = File::OSErrorToFileError(saved_errno); ++ return false; ++ } ++ } else if (!DirectoryExists(subpath)) { ++ if (error) ++ *error = File::OSErrorToFileError(ENOTDIR); ++ return false; + } + } + return true; diff --git a/www/ungoogled-chromium/files/patch-base_files_file__util__unittest.cc b/www/ungoogled-chromium/files/patch-base_files_file__util__unittest.cc new file mode 100644 index 000000000000..619d941c725e --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_files_file__util__unittest.cc @@ -0,0 +1,20 @@ +--- base/files/file_util_unittest.cc.orig 2022-10-01 07:40:07 UTC ++++ base/files/file_util_unittest.cc +@@ -3522,7 +3522,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) { + } + #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"; +@@ -4245,7 +4245,7 @@ TEST(FileUtilMultiThreadedTest, MultiThreadedTempFiles + 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/www/ungoogled-chromium/files/patch-base_files_important__file__writer__cleaner.cc b/www/ungoogled-chromium/files/patch-base_files_important__file__writer__cleaner.cc new file mode 100644 index 000000000000..bd72445b2df1 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_files_important__file__writer__cleaner.cc @@ -0,0 +1,12 @@ +--- base/files/important_file_writer_cleaner.cc.orig 2022-10-01 07:40:07 UTC ++++ 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/www/ungoogled-chromium/files/patch-base_files_scoped__file.cc b/www/ungoogled-chromium/files/patch-base_files_scoped__file.cc new file mode 100644 index 000000000000..3ddf2f9aaaac --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_files_scoped__file.cc @@ -0,0 +1,11 @@ +--- base/files/scoped_file.cc.orig 2022-10-01 07:40:07 UTC ++++ base/files/scoped_file.cc +@@ -31,7 +31,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/www/ungoogled-chromium/files/patch-base_i18n_icu__util.cc b/www/ungoogled-chromium/files/patch-base_i18n_icu__util.cc new file mode 100644 index 000000000000..fd39d74dbe60 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_i18n_icu__util.cc @@ -0,0 +1,20 @@ +--- base/i18n/icu_util.cc.orig 2022-10-01 07:40:07 UTC ++++ base/i18n/icu_util.cc +@@ -53,7 +53,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 +@@ -325,7 +325,7 @@ void InitializeIcuTimeZone() { + FuchsiaIntlProfileWatcher::GetPrimaryTimeZoneIdForIcuInitialization(); + icu::TimeZone::adoptDefault( + icu::TimeZone::createTimeZone(icu::UnicodeString::fromUTF8(zone_id))); +-#elif BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) ++#elif BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_BSD) + // To respond to the time zone change properly, the default time zone + // cache in ICU has to be populated on starting up. + // See TimeZoneMonitorLinux::NotifyClientsFromImpl(). diff --git a/www/ungoogled-chromium/files/patch-base_linux__util.cc b/www/ungoogled-chromium/files/patch-base_linux__util.cc new file mode 100644 index 000000000000..b001a14e9375 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_linux__util.cc @@ -0,0 +1,28 @@ +--- base/linux_util.cc.orig 2022-10-01 07:40:07 UTC ++++ base/linux_util.cc +@@ -15,6 +15,7 @@ + + #include + #include ++#include + + #include "base/base_export.h" + #include "base/files/dir_reader_posix.h" +@@ -135,6 +136,9 @@ void SetLinuxDistro(const std::string& distro) { + } + + bool GetThreadsForProcess(pid_t pid, std::vector* tids) { ++#if defined(OS_BSD) ++ return false; ++#else + // 25 > strlen("/proc//task") + strlen(std::to_string(INT_MAX)) + 1 = 22 + char buf[25]; + strings::SafeSPrintf(buf, "/proc/%d/task", pid); +@@ -152,6 +156,7 @@ bool GetThreadsForProcess(pid_t pid, std::vector + #endif + +@@ -574,14 +574,18 @@ void CheckCrashTestSighandler(int, siginfo_t* info, vo + // 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) + crash_addr = reinterpret_cast(info->si_addr); + #else // OS_* + ucontext_t* context = reinterpret_cast(context_ptr); + #if defined(ARCH_CPU_X86) + crash_addr = static_cast(context->uc_mcontext.gregs[REG_EIP]); + #elif defined(ARCH_CPU_X86_64) ++#if BUILDFLAG(IS_OPENBSD) ++ crash_addr = static_cast(context->sc_rip); ++#else + crash_addr = static_cast(context->uc_mcontext.gregs[REG_RIP]); ++#endif + #elif defined(ARCH_CPU_ARMEL) + crash_addr = static_cast(context->uc_mcontext.arm_pc); + #elif defined(ARCH_CPU_ARM64) diff --git a/www/ungoogled-chromium/files/patch-base_memory_discardable__memory.cc b/www/ungoogled-chromium/files/patch-base_memory_discardable__memory.cc new file mode 100644 index 000000000000..5ab46fa58774 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_memory_discardable__memory.cc @@ -0,0 +1,38 @@ +--- base/memory/discardable_memory.cc.orig 2022-10-01 07:40:07 UTC ++++ base/memory/discardable_memory.cc +@@ -25,7 +25,7 @@ const base::Feature kMadvFreeDiscardableMemory{ + "MadvFreeDiscardableMemory", 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) + const base::Feature kDiscardableMemoryBackingTrial{ + "DiscardableMemoryBackingTrial", base::FEATURE_DISABLED_BY_DEFAULT}; + +@@ -50,7 +50,7 @@ const base::FeatureParam + + 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 = +@@ -69,7 +69,7 @@ DiscardableMemoryBacking GetBackingForFieldTrial() { + + } // 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. +@@ -99,7 +99,7 @@ DiscardableMemory::DiscardableMemory() = default; + 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/www/ungoogled-chromium/files/patch-base_memory_discardable__memory__internal.h b/www/ungoogled-chromium/files/patch-base_memory_discardable__memory__internal.h new file mode 100644 index 000000000000..74d6b371cef8 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_memory_discardable__memory__internal.h @@ -0,0 +1,11 @@ +--- base/memory/discardable_memory_internal.h.orig 2022-10-01 07:40:07 UTC ++++ base/memory/discardable_memory_internal.h +@@ -10,7 +10,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/www/ungoogled-chromium/files/patch-base_memory_madv__free__discardable__memory__posix.cc b/www/ungoogled-chromium/files/patch-base_memory_madv__free__discardable__memory__posix.cc new file mode 100644 index 000000000000..b621decda352 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_memory_madv__free__discardable__memory__posix.cc @@ -0,0 +1,21 @@ +--- base/memory/madv_free_discardable_memory_posix.cc.orig 2022-10-01 07:40:07 UTC ++++ base/memory/madv_free_discardable_memory_posix.cc +@@ -295,6 +295,10 @@ void MadvFreeDiscardableMemoryPosix::SetKeepMemoryForT + + 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 vec(allocated_pages_); + #else +@@ -310,6 +314,7 @@ bool MadvFreeDiscardableMemoryPosix::IsResident() cons + return false; + } + return true; ++#endif + } + + bool MadvFreeDiscardableMemoryPosix::IsDiscarded() const { diff --git a/www/ungoogled-chromium/files/patch-base_memory_platform__shared__memory__region.h b/www/ungoogled-chromium/files/patch-base_memory_platform__shared__memory__region.h new file mode 100644 index 000000000000..71079157dd1d --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_memory_platform__shared__memory__region.h @@ -0,0 +1,29 @@ +--- base/memory/platform_shared_memory_region.h.orig 2022-10-01 07:40:07 UTC ++++ base/memory/platform_shared_memory_region.h +@@ -16,7 +16,7 @@ + + #include + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + namespace content { + class SandboxIPCHandler; + } +@@ -83,7 +83,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion { + 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: +@@ -211,7 +211,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion { + 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/www/ungoogled-chromium/files/patch-base_memory_platform__shared__memory__region__posix.cc b/www/ungoogled-chromium/files/patch-base_memory_platform__shared__memory__region__posix.cc new file mode 100644 index 000000000000..ac7afdc29e95 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_memory_platform__shared__memory__region__posix.cc @@ -0,0 +1,29 @@ +--- base/memory/platform_shared_memory_region_posix.cc.orig 2022-10-01 07:40:07 UTC ++++ base/memory/platform_shared_memory_region_posix.cc +@@ -55,7 +55,7 @@ bool CheckFDAccessMode(int fd, int expected_mode) { + + } // 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 = +@@ -171,7 +171,7 @@ bool PlatformSharedMemoryRegion::ConvertToUnsafe() { + // 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 +@@ -200,7 +200,7 @@ PlatformSharedMemoryRegion PlatformSharedMemoryRegion: + // 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/www/ungoogled-chromium/files/patch-base_message__loop_message__pump__glib.cc b/www/ungoogled-chromium/files/patch-base_message__loop_message__pump__glib.cc new file mode 100644 index 000000000000..84eece67a91e --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_message__loop_message__pump__glib.cc @@ -0,0 +1,28 @@ +--- base/message_loop/message_pump_glib.cc.orig 2022-10-01 07:40:07 UTC ++++ base/message_loop/message_pump_glib.cc +@@ -8,6 +8,11 @@ + #include + #include + ++#if BUILDFLAG(IS_BSD) ++#include ++#include ++#endif ++ + #include "base/logging.h" + #include "base/memory/raw_ptr.h" + #include "base/notreached.h" +@@ -51,9 +56,13 @@ int GetTimeIntervalMilliseconds(TimeTicks next_task_ti + } + + bool RunningOnMainThread() { ++#if BUILDFLAG(IS_BSD) ++ return pthread_main_np(); ++#else + auto pid = getpid(); + auto tid = PlatformThread::CurrentId(); + return pid > 0 && tid > 0 && pid == tid; ++#endif + } + + // A brief refresher on GLib: diff --git a/www/ungoogled-chromium/files/patch-base_native__library__posix.cc b/www/ungoogled-chromium/files/patch-base_native__library__posix.cc new file mode 100644 index 000000000000..7cbb17fce86a --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_native__library__posix.cc @@ -0,0 +1,11 @@ +--- base/native_library_posix.cc.orig 2022-10-01 07:40:07 UTC ++++ base/native_library_posix.cc +@@ -33,7 +33,7 @@ NativeLibrary LoadNativeLibraryWithOptions(const FileP + // 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/www/ungoogled-chromium/files/patch-base_native__library__unittest.cc b/www/ungoogled-chromium/files/patch-base_native__library__unittest.cc new file mode 100644 index 000000000000..332fe755fd4a --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_native__library__unittest.cc @@ -0,0 +1,11 @@ +--- base/native_library_unittest.cc.orig 2022-10-01 07:40:07 UTC ++++ base/native_library_unittest.cc +@@ -119,7 +119,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/www/ungoogled-chromium/files/patch-base_posix_can__lower__nice__to.cc b/www/ungoogled-chromium/files/patch-base_posix_can__lower__nice__to.cc new file mode 100644 index 000000000000..b2c7da827da8 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_posix_can__lower__nice__to.cc @@ -0,0 +1,16 @@ +--- base/posix/can_lower_nice_to.cc.orig 2022-10-01 07:40:07 UTC ++++ base/posix/can_lower_nice_to.cc +@@ -11,8 +11,12 @@ + + #include "build/build_config.h" + ++#if BUILDFLAG(IS_FREEBSD) ++#include ++#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/www/ungoogled-chromium/files/patch-base_posix_unix__domain__socket.cc b/www/ungoogled-chromium/files/patch-base_posix_unix__domain__socket.cc new file mode 100644 index 000000000000..a361dc6d8ccf --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_posix_unix__domain__socket.cc @@ -0,0 +1,39 @@ +--- base/posix/unix_domain_socket.cc.orig 2022-10-01 07:40:07 UTC ++++ base/posix/unix_domain_socket.cc +@@ -51,7 +51,7 @@ bool CreateSocketPair(ScopedFD* one, ScopedFD* two) { + + // 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 +@@ -149,7 +149,7 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd, + + 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)) +@@ -177,7 +177,7 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd, + wire_fds = reinterpret_cast(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) { +@@ -211,6 +211,9 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd, + socklen_t pid_size = sizeof(pid); + 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/www/ungoogled-chromium/files/patch-base_posix_unix__domain__socket__unittest.cc b/www/ungoogled-chromium/files/patch-base_posix_unix__domain__socket__unittest.cc new file mode 100644 index 000000000000..969253ca926e --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_posix_unix__domain__socket__unittest.cc @@ -0,0 +1,11 @@ +--- base/posix/unix_domain_socket_unittest.cc.orig 2022-10-01 07:40:07 UTC ++++ base/posix/unix_domain_socket_unittest.cc +@@ -10,6 +10,8 @@ + #include + #include + ++#include ++ + #include "base/bind.h" + #include "base/callback_helpers.h" + #include "base/files/file_util.h" diff --git a/www/ungoogled-chromium/files/patch-base_process_kill.h b/www/ungoogled-chromium/files/patch-base_process_kill.h new file mode 100644 index 000000000000..8470d2dbfea6 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_process_kill.h @@ -0,0 +1,11 @@ +--- base/process/kill.h.orig 2022-10-01 07:40:07 UTC ++++ base/process/kill.h +@@ -113,7 +113,7 @@ BASE_EXPORT TerminationStatus GetTerminationStatus(Pro + 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/www/ungoogled-chromium/files/patch-base_process_kill__posix.cc b/www/ungoogled-chromium/files/patch-base_process_kill__posix.cc new file mode 100644 index 000000000000..43688c37dc81 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_process_kill__posix.cc @@ -0,0 +1,11 @@ +--- base/process/kill_posix.cc.orig 2022-10-01 07:40:07 UTC ++++ base/process/kill_posix.cc +@@ -158,7 +158,7 @@ void EnsureProcessTerminated(Process process) { + 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/www/ungoogled-chromium/files/patch-base_process_launch.h b/www/ungoogled-chromium/files/patch-base_process_launch.h new file mode 100644 index 000000000000..f77e6e9d9143 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_process_launch.h @@ -0,0 +1,11 @@ +--- base/process/launch.h.orig 2022-10-01 07:40:07 UTC ++++ base/process/launch.h +@@ -198,7 +198,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/www/ungoogled-chromium/files/patch-base_process_launch__posix.cc b/www/ungoogled-chromium/files/patch-base_process_launch__posix.cc new file mode 100644 index 000000000000..75b6612ffbd1 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_process_launch__posix.cc @@ -0,0 +1,12 @@ +--- base/process/launch_posix.cc.orig 2022-10-01 07:40:07 UTC ++++ base/process/launch_posix.cc +@@ -64,6 +64,9 @@ + #error "macOS should use launch_mac.cc" + #endif + ++#if defined(OS_FREEBSD) ++#pragma weak environ ++#endif + extern char** environ; + + namespace base { diff --git a/www/ungoogled-chromium/files/patch-base_process_memory.cc b/www/ungoogled-chromium/files/patch-base_process_memory.cc new file mode 100644 index 000000000000..0428c9c57337 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_process_memory.cc @@ -0,0 +1,11 @@ +--- base/process/memory.cc.orig 2022-10-01 07:40:07 UTC ++++ base/process/memory.cc +@@ -29,7 +29,7 @@ namespace base { + // Defined in memory_mac.mm for macOS + use_allocator="none". In case of + // USE_PARTITION_ALLOC_AS_MALLOC, no need to route the call to the system + // default calloc of macOS. +-#if !BUILDFLAG(IS_APPLE) || BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) ++#if (!BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)) || BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) + + bool UncheckedCalloc(size_t num_items, size_t size, void** result) { + const size_t alloc_size = num_items * size; diff --git a/www/ungoogled-chromium/files/patch-base_process_process__handle.cc b/www/ungoogled-chromium/files/patch-base_process_process__handle.cc new file mode 100644 index 000000000000..f33e81ebacf8 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_process_process__handle.cc @@ -0,0 +1,11 @@ +--- base/process/process_handle.cc.orig 2022-10-01 07:40:07 UTC ++++ 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/www/ungoogled-chromium/files/patch-base_process_process__handle.h b/www/ungoogled-chromium/files/patch-base_process_process__handle.h new file mode 100644 index 000000000000..9015f4dbd03d --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_process_process__handle.h @@ -0,0 +1,11 @@ +--- base/process/process_handle.h.orig 2022-10-01 07:40:07 UTC ++++ base/process/process_handle.h +@@ -106,7 +106,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/www/ungoogled-chromium/files/patch-base_process_process__handle__freebsd.cc b/www/ungoogled-chromium/files/patch-base_process_process__handle__freebsd.cc new file mode 100644 index 000000000000..07eed6768732 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_process_process__handle__freebsd.cc @@ -0,0 +1,25 @@ +--- base/process/process_handle_freebsd.cc.orig 2022-10-01 07:40:07 UTC ++++ 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 + #include +@@ -15,10 +16,13 @@ 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/www/ungoogled-chromium/files/patch-base_process_process__handle__openbsd.cc b/www/ungoogled-chromium/files/patch-base_process_process__handle__openbsd.cc new file mode 100644 index 000000000000..5d2e2ba47fe7 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_process_process__handle__openbsd.cc @@ -0,0 +1,89 @@ +--- base/process/process_handle_openbsd.cc.orig 2022-10-01 07:40:07 UTC ++++ base/process/process_handle_openbsd.cc +@@ -3,8 +3,11 @@ + // found in the LICENSE file. + + #include "base/process/process_handle.h" ++#include "base/files/file_util.h" + + #include ++#include ++#include + #include + #include + #include +@@ -12,39 +15,59 @@ + 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 }; + + if (sysctl(mib, std::size(mib), NULL, &length, NULL, 0) < 0) + return -1; + ++ info = (struct kinfo_proc *)malloc(length); ++ + mib[5] = (length / sizeof(struct kinfo_proc)); + +- if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) +- return -1; ++ 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; +- size_t len; ++ struct kinfo_proc *info; ++ size_t length; ++ char *path = NULL; + 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) ++ if (sysctl(mib, std::size(mib), NULL, &length, 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); + +- return FilePath(); ++ info = (struct kinfo_proc *)malloc(length); ++ ++ mib[5] = (length / sizeof(struct kinfo_proc)); ++ ++ if (sysctl(mib, std::size(mib), info, &length, NULL, 0) < 0) ++ goto out; ++ ++ if ((info->p_flag & P_SYSTEM) != 0) ++ goto out; ++ ++ if (strcmp(info->p_comm, "chrome") == 0) { ++ path = info->p_comm; ++ goto out; ++ } ++ ++out: ++ free(info); ++ return FilePath(path); + } + + } // namespace base diff --git a/www/ungoogled-chromium/files/patch-base_process_process__iterator__freebsd.cc b/www/ungoogled-chromium/files/patch-base_process_process__iterator__freebsd.cc new file mode 100644 index 000000000000..461a5de769d8 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_process_process__iterator__freebsd.cc @@ -0,0 +1,51 @@ +--- base/process/process_iterator_freebsd.cc.orig 2022-10-01 07:40:07 UTC ++++ base/process/process_iterator_freebsd.cc +@@ -20,7 +20,7 @@ ProcessIterator::ProcessIterator(const ProcessFilter* + : index_of_kinfo_proc_(), + 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; +@@ -39,7 +39,7 @@ ProcessIterator::ProcessIterator(const ProcessFilter* + 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) { +@@ -49,7 +49,7 @@ ProcessIterator::ProcessIterator(const ProcessFilter* + } + } 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; + } +@@ -71,18 +71,13 @@ bool ProcessIterator::CheckForNextProcess() { + 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/www/ungoogled-chromium/files/patch-base_process_process__iterator__openbsd.cc b/www/ungoogled-chromium/files/patch-base_process_process__iterator__openbsd.cc new file mode 100644 index 000000000000..56f8a2f82b3e --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_process_process__iterator__openbsd.cc @@ -0,0 +1,45 @@ +--- base/process/process_iterator_openbsd.cc.orig 2022-10-01 07:40:07 UTC ++++ base/process/process_iterator_openbsd.cc +@@ -6,6 +6,9 @@ + + #include + #include ++#include ++#include ++#include + #include + + #include "base/logging.h" +@@ -18,12 +21,13 @@ ProcessIterator::ProcessIterator(const ProcessFilter* + : index_of_kinfo_proc_(), + filter_(filter) { + +- int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_UID, getuid(), ++ int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_UID, static_cast(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; +@@ -32,7 +36,7 @@ ProcessIterator::ProcessIterator(const ProcessFilter* + 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; +@@ -48,7 +52,7 @@ ProcessIterator::ProcessIterator(const ProcessFilter* + } + } 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/www/ungoogled-chromium/files/patch-base_process_process__metrics.cc b/www/ungoogled-chromium/files/patch-base_process_process__metrics.cc new file mode 100644 index 000000000000..a2dc3e96f5b6 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_process_process__metrics.cc @@ -0,0 +1,47 @@ +--- base/process/process_metrics.cc.orig 2022-10-01 07:40:07 UTC ++++ 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 SystemMetrics::ToValue() const { + Value res(Value::Type::DICTIONARY); + + res.SetIntKey("committed_memory", static_cast(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 meminfo = memory_info_.ToValue(); + Value vmstat = vmstat_info_.ToValue(); + meminfo.MergeDictionary(&vmstat); +@@ -99,7 +99,7 @@ std::unique_ptr ProcessMetrics::Create + #endif // !BUILDFLAG(IS_MAC) + } + +-#if !BUILDFLAG(IS_FREEBSD) || !BUILDFLAG(IS_POSIX) ++#if !BUILDFLAG(IS_FREEBSD) + double ProcessMetrics::GetPlatformIndependentCPUUsage() { + TimeDelta cumulative_cpu = GetCumulativeCPUUsage(); + TimeTicks time = TimeTicks::Now(); +@@ -150,7 +150,7 @@ double ProcessMetrics::GetPreciseCPUUsage() { + #endif // BUILDFLAG(IS_WIN) + + #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/www/ungoogled-chromium/files/patch-base_process_process__metrics.h b/www/ungoogled-chromium/files/patch-base_process_process__metrics.h new file mode 100644 index 000000000000..c37d15293fcf --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_process_process__metrics.h @@ -0,0 +1,129 @@ +--- base/process/process_metrics.h.orig 2022-10-01 07:40:07 UTC ++++ base/process/process_metrics.h +@@ -36,7 +36,7 @@ + #endif + + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ +- BUILDFLAG(IS_AIX) ++ BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) + #include + #include + #include +@@ -52,7 +52,7 @@ class Value; + // Full declaration is in process_metrics_iocounters.h. + struct IoCounters; + +-#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. + // +@@ -107,7 +107,7 @@ class BASE_EXPORT ProcessMetrics { + // convenience wrapper for CreateProcessMetrics(). + static std::unique_ptr CreateCurrentProcessMetrics(); + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + // Resident Set Size is a Linux/Android specific memory concept. Do not + // attempt to extend this to other platforms. + BASE_EXPORT size_t GetResidentSetSize() const; +@@ -155,7 +155,7 @@ class BASE_EXPORT ProcessMetrics { + #endif // BUILDFLAG(IS_WIN) + + #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 +@@ -238,7 +238,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) + // Bytes of swap as reported by /proc/[pid]/status. + uint64_t GetVmSwapBytes() const; + +@@ -259,7 +259,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) +@@ -270,7 +270,7 @@ class BASE_EXPORT ProcessMetrics { + #endif + + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ +- BUILDFLAG(IS_AIX) ++ BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) + CPU::CoreType GetCoreType(uint32_t core_index); + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || + // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_AIX) +@@ -284,9 +284,7 @@ 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_WIN) + TimeTicks last_cpu_time_for_precise_cpu_usage_; +@@ -294,7 +292,7 @@ class BASE_EXPORT ProcessMetrics { + #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_; +@@ -337,7 +335,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_de + + #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. + // +@@ -372,7 +370,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 +@@ -387,7 +385,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; +@@ -424,7 +422,7 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoK + // 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//stat and return the sum of the + // CPU-related ticks. Returns -1 on parse error. + // Exposed for testing. +@@ -611,7 +609,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/www/ungoogled-chromium/files/patch-base_process_process__metrics__freebsd.cc b/www/ungoogled-chromium/files/patch-base_process_process__metrics__freebsd.cc new file mode 100644 index 000000000000..a1dce10fea0e --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_process_process__metrics__freebsd.cc @@ -0,0 +1,290 @@ +--- base/process/process_metrics_freebsd.cc.orig 2022-10-01 07:40:07 UTC ++++ base/process/process_metrics_freebsd.cc +@@ -3,20 +3,39 @@ + // found in the LICENSE file. + + #include "base/process/process_metrics.h" ++#include "base/notreached.h" + + #include ++#include + #include + #include + #include + ++#include /* O_RDONLY */ ++#include ++#include ++ + #include "base/memory/ptr_util.h" + #include "base/process/process_metrics_iocounters.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) {} ++ : process_(process) {} + + // static + std::unique_ptr ProcessMetrics::CreateProcessMetrics( +@@ -26,17 +45,18 @@ std::unique_ptr ProcessMetrics::Create + + double ProcessMetrics::GetPlatformIndependentCPUUsage() { + struct kinfo_proc info; +- int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, process_}; +- size_t length = sizeof(info); ++ 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 0; ++ return 0.0; + +- return (info.ki_pctcpu / FSCALE) * 100.0; ++ return static_cast((info.ki_pctcpu * 100.0) / FSCALE); + } + + TimeDelta ProcessMetrics::GetCumulativeCPUUsage() { +- NOTREACHED(); ++ NOTIMPLEMENTED(); + return TimeDelta(); + } + +@@ -67,4 +87,221 @@ 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; ++} ++ ++size_t ProcessMetrics::GetResidentSetSize() const { ++ kvm_t *kd = kvm_open(nullptr, "/dev/null", nullptr, O_RDONLY, "kvm_open"); ++ ++ if (kd == nullptr) ++ return 0; ++ ++ struct kinfo_proc *pp; ++ int nproc; ++ ++ if ((pp = kvm_getprocs(kd, KERN_PROC_PID, process_, &nproc)) == nullptr) { ++ kvm_close(kd); ++ return 0; ++ } ++ ++ size_t rss; ++ ++ if (nproc > 0) { ++ rss = pp->ki_rssize << GetPageShift(); ++ } else { ++ rss = 0; ++ } ++ ++ kvm_close(kd); ++ return rss; ++} ++ ++uint64_t ProcessMetrics::GetVmSwapBytes() const { ++ kvm_t *kd = kvm_open(nullptr, "/dev/null", nullptr, O_RDONLY, "kvm_open"); ++ ++ if (kd == nullptr) ++ return 0; ++ ++ struct kinfo_proc *pp; ++ int nproc; ++ ++ if ((pp = kvm_getprocs(kd, KERN_PROC_PID, process_, &nproc)) == nullptr) { ++ kvm_close(kd); ++ return 0; ++ } ++ ++ size_t swrss; ++ ++ if (nproc > 0) { ++ swrss = pp->ki_swrss > pp->ki_rssize ++ ? (pp->ki_swrss - pp->ki_rssize) << GetPageShift() ++ : 0; ++ } else { ++ swrss = 0; ++ } ++ ++ kvm_close(kd); ++ return swrss; ++} ++ ++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 SystemDiskInfo::ToValue() const { ++ Value res(Value::Type::DICTIONARY); ++ ++ // Write out uint64_t variables as doubles. ++ // Note: this may discard some precision, but for JS there's no other option. ++ res.SetDoubleKey("reads", static_cast(reads)); ++ res.SetDoubleKey("reads_merged", static_cast(reads_merged)); ++ res.SetDoubleKey("sectors_read", static_cast(sectors_read)); ++ res.SetDoubleKey("read_time", static_cast(read_time)); ++ res.SetDoubleKey("writes", static_cast(writes)); ++ res.SetDoubleKey("writes_merged", static_cast(writes_merged)); ++ res.SetDoubleKey("sectors_written", static_cast(sectors_written)); ++ res.SetDoubleKey("write_time", static_cast(write_time)); ++ res.SetDoubleKey("io", static_cast(io)); ++ res.SetDoubleKey("io_time", static_cast(io_time)); ++ res.SetDoubleKey("weighted_io_time", static_cast(weighted_io_time)); ++ ++ return res; ++} ++ ++Value SystemMemoryInfoKB::ToValue() const { ++ Value res(Value::Type::DICTIONARY); ++ ++ res.SetIntKey("total", total); ++ res.SetIntKey("free", free); ++ res.SetIntKey("available", available); ++ res.SetIntKey("buffers", buffers); ++ res.SetIntKey("cached", cached); ++ res.SetIntKey("active_anon", active_anon); ++ res.SetIntKey("inactive_anon", inactive_anon); ++ res.SetIntKey("active_file", active_file); ++ res.SetIntKey("inactive_file", inactive_file); ++ res.SetIntKey("swap_total", swap_total); ++ res.SetIntKey("swap_free", swap_free); ++ res.SetIntKey("swap_used", swap_total - swap_free); ++ res.SetIntKey("dirty", dirty); ++ res.SetIntKey("reclaimable", reclaimable); ++ ++ return res; ++} ++ ++Value VmStatInfo::ToValue() const { ++ Value res(Value::Type::DICTIONARY); ++ ++ res.SetIntKey("pswpin", pswpin); ++ res.SetIntKey("pswpout", pswpout); ++ res.SetIntKey("pgmajfault", pgmajfault); ++ ++ return res; ++} + } // namespace base diff --git a/www/ungoogled-chromium/files/patch-base_process_process__metrics__openbsd.cc b/www/ungoogled-chromium/files/patch-base_process_process__metrics__openbsd.cc new file mode 100644 index 000000000000..c143d5d66c2d --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_process_process__metrics__openbsd.cc @@ -0,0 +1,215 @@ +--- base/process/process_metrics_openbsd.cc.orig 2022-10-01 07:40:07 UTC ++++ base/process/process_metrics_openbsd.cc +@@ -6,14 +6,23 @@ + + #include + #include ++#include + #include + #include ++#include + ++#include ++ + #include "base/memory/ptr_util.h" + #include "base/process/process_metrics_iocounters.h" ++#include "base/values.h" ++#include "base/notreached.h" + + namespace base { + ++ProcessMetrics::ProcessMetrics(ProcessHandle process) ++ : process_(process) {} ++ + // static + std::unique_ptr ProcessMetrics::CreateProcessMetrics( + ProcessHandle process) { +@@ -24,49 +33,23 @@ bool ProcessMetrics::GetIOCounters(IoCounters* io_coun + return false; + } + +-static int GetProcessCPU(pid_t pid) { ++TimeDelta ProcessMetrics::GetCumulativeCPUUsage() { + 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); ++ struct timeval tv; + +- if (sysctl(mib, std::size(mib), NULL, &length, NULL, 0) < 0) +- return -1; ++ int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process_, ++ sizeof(struct kinfo_proc), 1 }; + +- mib[5] = (length / sizeof(struct kinfo_proc)); +- + if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) +- return 0; ++ return TimeDelta(); + +- return info.p_pctcpu; +-} ++ tv.tv_sec = info.p_rtime_sec; ++ tv.tv_usec = info.p_rtime_usec; + +-double ProcessMetrics::GetPlatformIndependentCPUUsage() { +- TimeTicks time = TimeTicks::Now(); +- +- if (last_cpu_time_.is_zero()) { +- // First call, just set the last values. +- last_cpu_time_ = time; +- return 0; +- } +- +- int cpu = GetProcessCPU(process_); +- +- last_cpu_time_ = time; +- double percentage = static_cast((cpu * 100.0) / FSCALE); +- +- return percentage; ++ return Microseconds(TimeValToMicroseconds(tv)); + } + +-TimeDelta ProcessMetrics::GetCumulativeCPUUsage() { +- NOTREACHED(); +- return TimeDelta(); +-} +- +-ProcessMetrics::ProcessMetrics(ProcessHandle process) +- : process_(process), +- last_cpu_(0) {} +- + size_t GetSystemCommitCharge() { + int mib[] = { CTL_VM, VM_METER }; + int pagesize; +@@ -84,6 +67,129 @@ size_t GetSystemCommitCharge() { + pagesize = getpagesize(); + + return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize); ++} ++ ++int ProcessMetrics::GetOpenFdCount() const { ++ struct kinfo_file *files; ++ kvm_t *kd = NULL; ++ int total_count = 0; ++ char errbuf[_POSIX2_LINE_MAX]; ++ ++ if ((kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, errbuf)) == NULL) ++ goto out; ++ ++ if ((files = kvm_getfiles(kd, KERN_FILE_BYPID, process_, ++ sizeof(struct kinfo_file), &total_count)) == NULL) { ++ total_count = 0; ++ goto out; ++ } ++ ++ kvm_close(kd); ++ ++out: ++ return total_count; ++} ++ ++int ProcessMetrics::GetOpenFdSoftLimit() const { ++ return GetMaxFds(); ++} ++ ++uint64_t ProcessMetrics::GetVmSwapBytes() const { ++ NOTIMPLEMENTED(); ++ return 0; ++} ++ ++bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo) { ++ NOTIMPLEMENTED_LOG_ONCE(); ++ 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; ++ ++bool GetSystemDiskInfo(SystemDiskInfo* diskinfo) { ++ NOTIMPLEMENTED(); ++ return false; ++} ++ ++bool GetVmStatInfo(VmStatInfo* vmstat) { ++ NOTIMPLEMENTED(); ++ return false; ++} ++ ++int ProcessMetrics::GetIdleWakeupsPerSecond() { ++ NOTIMPLEMENTED(); ++ return 0; ++} ++ ++Value SystemMemoryInfoKB::ToValue() const { ++ Value res(Value::Type::DICTIONARY); ++ res.SetIntKey("total", total); ++ res.SetIntKey("free", free); ++ res.SetIntKey("available", available); ++ res.SetIntKey("buffers", buffers); ++ res.SetIntKey("cached", cached); ++ res.SetIntKey("active_anon", active_anon); ++ res.SetIntKey("inactive_anon", inactive_anon); ++ res.SetIntKey("active_file", active_file); ++ res.SetIntKey("inactive_file", inactive_file); ++ res.SetIntKey("swap_total", swap_total); ++ res.SetIntKey("swap_free", swap_free); ++ res.SetIntKey("swap_used", swap_total - swap_free); ++ res.SetIntKey("dirty", dirty); ++ res.SetIntKey("reclaimable", reclaimable); ++ ++ NOTIMPLEMENTED(); ++ ++ return res; ++} ++ ++Value VmStatInfo::ToValue() const { ++ Value res(Value::Type::DICTIONARY); ++ res.SetIntKey("pswpin", pswpin); ++ res.SetIntKey("pswpout", pswpout); ++ res.SetIntKey("pgmajfault", pgmajfault); ++ ++ NOTIMPLEMENTED(); ++ ++ return res; ++} ++ ++SystemDiskInfo& SystemDiskInfo::operator=(const SystemDiskInfo&) = default; ++ ++Value SystemDiskInfo::ToValue() const { ++ Value res(Value::Type::DICTIONARY); ++ ++ // Write out uint64_t variables as doubles. ++ // Note: this may discard some precision, but for JS there's no other option. ++ res.SetDoubleKey("reads", static_cast(reads)); ++ res.SetDoubleKey("reads_merged", static_cast(reads_merged)); ++ res.SetDoubleKey("sectors_read", static_cast(sectors_read)); ++ res.SetDoubleKey("read_time", static_cast(read_time)); ++ res.SetDoubleKey("writes", static_cast(writes)); ++ res.SetDoubleKey("writes_merged", static_cast(writes_merged)); ++ res.SetDoubleKey("sectors_written", static_cast(sectors_written)); ++ res.SetDoubleKey("write_time", static_cast(write_time)); ++ res.SetDoubleKey("io", static_cast(io)); ++ res.SetDoubleKey("io_time", static_cast(io_time)); ++ res.SetDoubleKey("weighted_io_time", static_cast(weighted_io_time)); ++ ++ NOTIMPLEMENTED(); ++ ++ return res; + } + + } // namespace base diff --git a/www/ungoogled-chromium/files/patch-base_process_process__metrics__posix.cc b/www/ungoogled-chromium/files/patch-base_process_process__metrics__posix.cc new file mode 100644 index 000000000000..1d8226ebb594 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_process_process__metrics__posix.cc @@ -0,0 +1,20 @@ +--- base/process/process_metrics_posix.cc.orig 2022-10-01 07:40:07 UTC ++++ base/process/process_metrics_posix.cc +@@ -20,6 +20,8 @@ + + #if BUILDFLAG(IS_APPLE) + #include ++#elif BUILDFLAG(IS_OPENBSD) ++#include + #else + #include + #endif +@@ -135,7 +137,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/www/ungoogled-chromium/files/patch-base_process_process__metrics__unittest.cc b/www/ungoogled-chromium/files/patch-base_process_process__metrics__unittest.cc new file mode 100644 index 000000000000..70839ae96f8e --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_process_process__metrics__unittest.cc @@ -0,0 +1,20 @@ +--- base/process/process_metrics_unittest.cc.orig 2022-10-01 07:40:07 UTC ++++ base/process/process_metrics_unittest.cc +@@ -44,7 +44,7 @@ namespace debug { + + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) || \ +- BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + + namespace { + +@@ -347,7 +347,7 @@ TEST_F(SystemMetricsTest, ParseVmstat) { + + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) || \ +- BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + + // Test that ProcessMetrics::GetPlatformIndependentCPUUsage() doesn't return + // negative values when the number of threads running on the process decreases diff --git a/www/ungoogled-chromium/files/patch-base_process_process__posix.cc b/www/ungoogled-chromium/files/patch-base_process_process__posix.cc new file mode 100644 index 000000000000..3251a7edddfb --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_process_process__posix.cc @@ -0,0 +1,93 @@ +--- base/process/process_posix.cc.orig 2022-10-01 07:40:07 UTC ++++ base/process/process_posix.cc +@@ -25,10 +25,15 @@ + #include "build/build_config.h" + #include "third_party/abseil-cpp/absl/types/optional.h" + +-#if BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + #include + #endif + ++#if defined(OS_BSD) ++#include ++#include ++#endif ++ + #if BUILDFLAG(CLANG_PROFILING) + #include "base/test/clang_profiling.h" + #endif +@@ -95,7 +100,7 @@ bool WaitpidWithTimeout(base::ProcessHandle handle, + return ret_pid > 0; + } + +-#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. +@@ -200,7 +205,7 @@ bool WaitForExitWithTimeoutImpl(base::ProcessHandle ha + 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 +@@ -392,7 +397,55 @@ void Process::Exited(int exit_code) const { + + int Process::GetPriority() const { + DCHECK(IsValid()); ++// avoid pledge(2) violation ++#if defined(OS_BSD) ++ return 0; ++#else + return getpriority(PRIO_PROCESS, static_cast(process_)); ++#endif ++} ++ ++Time Process::CreationTime() const { ++// avoid ps pledge in the network process ++#if !defined(OS_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 !defined(OS_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(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; ++} ++ ++bool Process::IsProcessBackgrounded() const { ++ return false; ++} ++ ++bool Process::SetProcessBackgrounded(bool value) { ++ return false; ++} ++ ++// static ++bool Process::CanBackgroundProcesses() { ++ return false; + } + + } // namespace base diff --git a/www/ungoogled-chromium/files/patch-base_process_process__unittest.cc b/www/ungoogled-chromium/files/patch-base_process_process__unittest.cc new file mode 100644 index 000000000000..ee62a994e4d5 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_process_process__unittest.cc @@ -0,0 +1,11 @@ +--- base/process/process_unittest.cc.orig 2022-10-01 07:40:07 UTC ++++ base/process/process_unittest.cc +@@ -193,7 +193,7 @@ TEST_F(ProcessTest, CreationTimeOtherProcess) { + // 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/www/ungoogled-chromium/files/patch-base_profiler_module__cache.cc b/www/ungoogled-chromium/files/patch-base_profiler_module__cache.cc new file mode 100644 index 000000000000..02c7a0fc4eb0 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_profiler_module__cache.cc @@ -0,0 +1,11 @@ +--- base/profiler/module_cache.cc.orig 2022-10-01 07:40:07 UTC ++++ base/profiler/module_cache.cc +@@ -34,7 +34,7 @@ struct ModuleAddressCompare { + + std::string TransformModuleIDToBreakpadFormat(StringPiece module_id) { + std::string mangled_id(module_id); +-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || 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/www/ungoogled-chromium/files/patch-base_profiler_stack__sampling__profiler__test__util.cc b/www/ungoogled-chromium/files/patch-base_profiler_stack__sampling__profiler__test__util.cc new file mode 100644 index 000000000000..dd4cc7494787 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_profiler_stack__sampling__profiler__test__util.cc @@ -0,0 +1,11 @@ +--- base/profiler/stack_sampling_profiler_test_util.cc.orig 2022-10-01 07:40:07 UTC ++++ base/profiler/stack_sampling_profiler_test_util.cc +@@ -39,7 +39,7 @@ + // Fortunately, it provides _alloca, which functions identically. + #include + #define alloca _alloca +-#else ++#elif !BUILDFLAG(IS_BSD) + #include + #endif + diff --git a/www/ungoogled-chromium/files/patch-base_profiler_stack__sampling__profiler__unittest.cc b/www/ungoogled-chromium/files/patch-base_profiler_stack__sampling__profiler__unittest.cc new file mode 100644 index 000000000000..1d2a16d04f44 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_profiler_stack__sampling__profiler__unittest.cc @@ -0,0 +1,11 @@ +--- base/profiler/stack_sampling_profiler_unittest.cc.orig 2022-10-01 07:40:07 UTC ++++ base/profiler/stack_sampling_profiler_unittest.cc +@@ -41,7 +41,7 @@ + #include + #include + #include +-#else ++#elif !BUILDFLAG(IS_BSD) + #include + #endif + diff --git a/www/ungoogled-chromium/files/patch-base_rand__util.h b/www/ungoogled-chromium/files/patch-base_rand__util.h new file mode 100644 index 000000000000..d58cefc589c7 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_rand__util.h @@ -0,0 +1,11 @@ +--- base/rand_util.h.orig 2022-10-01 07:40:07 UTC ++++ base/rand_util.h +@@ -80,7 +80,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/www/ungoogled-chromium/files/patch-base_rand__util__posix.cc b/www/ungoogled-chromium/files/patch-base_rand__util__posix.cc new file mode 100644 index 000000000000..17765f8e6f2b --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_rand__util__posix.cc @@ -0,0 +1,57 @@ +--- base/rand_util_posix.cc.orig 2022-10-01 07:40:07 UTC ++++ base/rand_util_posix.cc +@@ -22,7 +22,7 @@ + #include "base/time/time.h" + #include "build/build_config.h" + +-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_NACL) ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) + #include "third_party/lss/linux_syscall_support.h" + #elif BUILDFLAG(IS_MAC) + // TODO(crbug.com/995996): Waiting for this header to appear in the iOS SDK. +@@ -39,6 +39,7 @@ static constexpr int kOpenFlags = O_RDONLY; + static constexpr int kOpenFlags = O_RDONLY | O_CLOEXEC; + #endif + ++#if !BUILDFLAG(IS_BSD) + // We keep the file descriptor for /dev/urandom around so we don't need to + // reopen it (which is expensive), and since we may not even be able to reopen + // it if we are later put in a sandbox. This class wraps the file descriptor so +@@ -56,10 +57,11 @@ class URandomFd { + private: + const int fd_; + }; ++#endif + + #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ + BUILDFLAG(IS_ANDROID)) && \ +- !BUILDFLAG(IS_NACL) ++ !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) + // TODO(pasko): Unify reading kernel version numbers in: + // mojo/core/channel_linux.cc + // chrome/browser/android/seccomp_support_detector.cc +@@ -144,6 +146,7 @@ void ConfigureRandBytesFieldTrial() { + // (https://chromium-review.9oo91esource.qjz9zk/c/chromium/src/+/1545096) and land + // it or some form of it. + void RandBytes(void* output, size_t output_length) { ++#if !BUILDFLAG(IS_BSD) + #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ + BUILDFLAG(IS_ANDROID)) && \ + !BUILDFLAG(IS_NACL) +@@ -172,11 +175,16 @@ void RandBytes(void* output, size_t output_length) { + const bool success = + ReadFromFD(urandom_fd, static_cast(output), output_length); + CHECK(success); ++#else ++ arc4random_buf(static_cast(output), output_length); ++#endif + } + ++#if !BUILDFLAG(IS_BSD) + int GetUrandomFD() { + static NoDestructor urandom_fd; + return urandom_fd->fd(); + } ++#endif + + } // namespace base diff --git a/www/ungoogled-chromium/files/patch-base_strings_safe__sprintf__unittest.cc b/www/ungoogled-chromium/files/patch-base_strings_safe__sprintf__unittest.cc new file mode 100644 index 000000000000..25eefa3de232 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_strings_safe__sprintf__unittest.cc @@ -0,0 +1,18 @@ +--- base/strings/safe_sprintf_unittest.cc.orig 2022-10-01 07:40:07 UTC ++++ base/strings/safe_sprintf_unittest.cc +@@ -732,6 +732,7 @@ TEST(SafeSPrintfTest, EmbeddedNul) { + #endif + } + ++#if !BUILDFLAG(IS_BSD) + TEST(SafeSPrintfTest, EmitNULL) { + char buf[40]; + #if defined(__GNUC__) +@@ -748,6 +749,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/www/ungoogled-chromium/files/patch-base_synchronization_lock__impl.h b/www/ungoogled-chromium/files/patch-base_synchronization_lock__impl.h new file mode 100644 index 000000000000..41f5326626f4 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_synchronization_lock__impl.h @@ -0,0 +1,23 @@ +--- base/synchronization/lock_impl.h.orig 2022-10-01 07:40:07 UTC ++++ base/synchronization/lock_impl.h +@@ -107,6 +107,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); +@@ -127,6 +131,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/www/ungoogled-chromium/files/patch-base_syslog__logging.cc b/www/ungoogled-chromium/files/patch-base_syslog__logging.cc new file mode 100644 index 000000000000..44fbed6ce89b --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_syslog__logging.cc @@ -0,0 +1,20 @@ +--- base/syslog_logging.cc.orig 2022-10-01 07:40:07 UTC ++++ base/syslog_logging.cc +@@ -15,7 +15,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) + // defines LOG_INFO, LOG_WARNING macros that could conflict with + // base::LOG_INFO, base::LOG_WARNING. + #include +@@ -147,7 +147,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/www/ungoogled-chromium/files/patch-base_system_sys__info.cc b/www/ungoogled-chromium/files/patch-base_system_sys__info.cc new file mode 100644 index 000000000000..ad267c047e73 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_system_sys__info.cc @@ -0,0 +1,11 @@ +--- base/system/sys_info.cc.orig 2022-10-01 07:40:07 UTC ++++ base/system/sys_info.cc +@@ -101,7 +101,7 @@ std::string SysInfo::HardwareModelName() { + #endif + + void SysInfo::GetHardwareInfo(base::OnceCallback 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/www/ungoogled-chromium/files/patch-base_system_sys__info.h b/www/ungoogled-chromium/files/patch-base_system_sys__info.h new file mode 100644 index 000000000000..c0f1f4ab8fb7 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_system_sys__info.h @@ -0,0 +1,20 @@ +--- base/system/sys_info.h.orig 2022-10-01 07:40:07 UTC ++++ base/system/sys_info.h +@@ -211,6 +211,8 @@ class BASE_EXPORT SysInfo { + // On Desktop this returns true when memory <= 2GB. + static bool IsLowEndDevice(); + ++ static uint64_t MaxSharedMemorySize(); ++ + private: + FRIEND_TEST_ALL_PREFIXES(SysInfoTest, AmountOfAvailablePhysicalMemory); + FRIEND_TEST_ALL_PREFIXES(debug::SystemMetricsTest, ParseMeminfo); +@@ -221,7 +223,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/www/ungoogled-chromium/files/patch-base_system_sys__info__freebsd.cc b/www/ungoogled-chromium/files/patch-base_system_sys__info__freebsd.cc new file mode 100644 index 000000000000..fc9a45185508 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_system_sys__info__freebsd.cc @@ -0,0 +1,115 @@ +--- base/system/sys_info_freebsd.cc.orig 2022-10-01 07:40:07 UTC ++++ base/system/sys_info_freebsd.cc +@@ -9,30 +9,106 @@ + #include + + #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 0; + } +- return static_cast(pages) * page_size; ++ ++ return static_cast(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((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 0; + } ++ + return static_cast(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/www/ungoogled-chromium/files/patch-base_system_sys__info__openbsd.cc b/www/ungoogled-chromium/files/patch-base_system_sys__info__openbsd.cc new file mode 100644 index 000000000000..ebad387696c4 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_system_sys__info__openbsd.cc @@ -0,0 +1,94 @@ +--- base/system/sys_info_openbsd.cc.orig 2022-10-01 07:40:07 UTC ++++ base/system/sys_info_openbsd.cc +@@ -11,6 +11,7 @@ + #include + + #include "base/notreached.h" ++#include "base/strings/string_util.h" + + namespace { + +@@ -26,9 +27,15 @@ uint64_t AmountOfMemory(int pages_name) { + + namespace base { + ++// pledge(2) ++int64_t aofpmem = 0; ++int64_t aofapmem = 0; ++int64_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) { +@@ -40,10 +47,26 @@ 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 + uint64_t SysInfo::AmountOfAvailablePhysicalMemoryImpl() { + // We should add inactive file-backed memory also but there is no such + // information from OpenBSD unfortunately. +@@ -55,23 +78,28 @@ 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 0; + } +- return static_cast(limit); ++ shmmax = static_cast(limit); ++out: ++ return shmmax; + } + + // static +-std::string SysInfo::CPUModelName() { +- int mib[] = {CTL_HW, HW_MODEL}; +- char name[256]; +- size_t len = std::size(name); +- if (sysctl(mib, std::size(mib), name, &len, NULL, 0) < 0) { +- NOTREACHED(); +- return std::string(); +- } +- return name; ++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/www/ungoogled-chromium/files/patch-base_system_sys__info__posix.cc b/www/ungoogled-chromium/files/patch-base_system_sys__info__posix.cc new file mode 100644 index 000000000000..6dd83fe626eb --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_system_sys__info__posix.cc @@ -0,0 +1,43 @@ +--- base/system/sys_info_posix.cc.orig 2022-10-01 07:40:07 UTC ++++ base/system/sys_info_posix.cc +@@ -37,7 +37,7 @@ + + namespace { + +-#if !BUILDFLAG(IS_OPENBSD) ++#if !BUILDFLAG(IS_BSD) + int NumberOfProcessors() { + // sysconf returns the number of "logical" (not "physical") processors on both + // Mac and Linux. So we get the number of max available "logical" processors. +@@ -77,7 +77,7 @@ int NumberOfProcessors() { + + base::LazyInstance>:: + Leaky g_lazy_number_of_processors = LAZY_INSTANCE_INITIALIZER; +-#endif // !BUILDFLAG(IS_OPENBSD) ++#endif // !BUILDFLAG(IS_BSD) + + uint64_t AmountOfVirtualMemory() { + struct rlimit limit; +@@ -144,11 +144,11 @@ bool GetDiskSpaceInfo(const base::FilePath& path, + + namespace base { + +-#if !BUILDFLAG(IS_OPENBSD) ++#if !BUILDFLAG(IS_BSD) + int SysInfo::NumberOfProcessors() { + return g_lazy_number_of_processors.Get().value(); + } +-#endif // !BUILDFLAG(IS_OPENBSD) ++#endif // !BUILDFLAG(IS_BSD) + + // static + uint64_t SysInfo::AmountOfVirtualMemory() { +@@ -238,6 +238,8 @@ std::string SysInfo::OperatingSystemArchitecture() { + 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/www/ungoogled-chromium/files/patch-base_system_sys__info__unittest.cc b/www/ungoogled-chromium/files/patch-base_system_sys__info__unittest.cc new file mode 100644 index 000000000000..2f28252e1ba3 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_system_sys__info__unittest.cc @@ -0,0 +1,20 @@ +--- base/system/sys_info_unittest.cc.orig 2022-10-01 07:40:07 UTC ++++ base/system/sys_info_unittest.cc +@@ -234,12 +234,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/www/ungoogled-chromium/files/patch-base_task_thread__pool_environment__config__unittest.cc b/www/ungoogled-chromium/files/patch-base_task_thread__pool_environment__config__unittest.cc new file mode 100644 index 000000000000..3b69bef1d3e9 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_task_thread__pool_environment__config__unittest.cc @@ -0,0 +1,11 @@ +--- base/task/thread_pool/environment_config_unittest.cc.orig 2022-10-01 07:40:07 UTC ++++ base/task/thread_pool/environment_config_unittest.cc +@@ -15,7 +15,7 @@ TEST(ThreadPoolEnvironmentConfig, CanUseBackgroundPrio + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) + EXPECT_TRUE(CanUseBackgroundThreadTypeForWorkerThread()); + #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ +- 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 diff --git a/www/ungoogled-chromium/files/patch-base_test_launcher_test__launcher.cc b/www/ungoogled-chromium/files/patch-base_test_launcher_test__launcher.cc new file mode 100644 index 000000000000..11e36f98a47b --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_test_launcher_test__launcher.cc @@ -0,0 +1,10 @@ +--- base/test/launcher/test_launcher.cc.orig 2022-10-01 07:40:07 UTC ++++ base/test/launcher/test_launcher.cc +@@ -65,6 +65,7 @@ + #include "third_party/libxml/chromium/libxml_utils.h" + + #if BUILDFLAG(IS_POSIX) ++#include + #include + + #include "base/files/file_descriptor_watcher_posix.h" diff --git a/www/ungoogled-chromium/files/patch-base_test_test__file__util__linux.cc b/www/ungoogled-chromium/files/patch-base_test_test__file__util__linux.cc new file mode 100644 index 000000000000..09006e625582 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_test_test__file__util__linux.cc @@ -0,0 +1,13 @@ +--- base/test/test_file_util_linux.cc.orig 2022-10-01 07:40:07 UTC ++++ base/test/test_file_util_linux.cc +@@ -54,8 +54,10 @@ bool EvictFileFromSystemCache(const FilePath& file) { + return false; + if (fdatasync(fd.get()) != 0) + return false; ++#if !defined(OS_BSD) + if (posix_fadvise(fd.get(), 0, 0, POSIX_FADV_DONTNEED) != 0) + return false; ++#endif + return true; + } + diff --git a/www/ungoogled-chromium/files/patch-base_test_test__file__util__posix.cc b/www/ungoogled-chromium/files/patch-base_test_test__file__util__posix.cc new file mode 100644 index 000000000000..c234b3d0c2e0 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_test_test__file__util__posix.cc @@ -0,0 +1,11 @@ +--- base/test/test_file_util_posix.cc.orig 2022-10-01 07:40:07 UTC ++++ base/test/test_file_util_posix.cc +@@ -88,7 +88,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/www/ungoogled-chromium/files/patch-base_third__party_symbolize_symbolize.cc b/www/ungoogled-chromium/files/patch-base_third__party_symbolize_symbolize.cc new file mode 100644 index 000000000000..ec34dc89e727 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_third__party_symbolize_symbolize.cc @@ -0,0 +1,11 @@ +--- base/third_party/symbolize/symbolize.cc.orig 2022-10-01 07:40:07 UTC ++++ base/third_party/symbolize/symbolize.cc +@@ -114,7 +114,7 @@ _END_GOOGLE_NAMESPACE_ + #if defined(HAVE_DLFCN_H) + #include + #endif +-#if BUILDFLAG(IS_OPENBSD) ++#if defined(__OpenBSD__) + #include + #else + #include diff --git a/www/ungoogled-chromium/files/patch-base_threading_platform__thread.h b/www/ungoogled-chromium/files/patch-base_threading_platform__thread.h new file mode 100644 index 000000000000..969c9339f278 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_threading_platform__thread.h @@ -0,0 +1,11 @@ +--- base/threading/platform_thread.h.orig 2022-10-01 07:40:07 UTC ++++ base/threading/platform_thread.h +@@ -253,7 +253,7 @@ class BASE_EXPORT PlatformThread { + // Returns a realtime period provided by `delegate`. + static TimeDelta GetRealtimePeriod(Delegate* delegate); + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // Toggles a specific thread's type at runtime. This can be used to + // change the priority of a thread in a different process and will fail + // if the calling process does not have proper permissions. The diff --git a/www/ungoogled-chromium/files/patch-base_threading_platform__thread__linux.cc b/www/ungoogled-chromium/files/patch-base_threading_platform__thread__linux.cc new file mode 100644 index 000000000000..d7ac0d9a78dd --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_threading_platform__thread__linux.cc @@ -0,0 +1,77 @@ +--- base/threading/platform_thread_linux.cc.orig 2022-10-01 07:40:07 UTC ++++ base/threading/platform_thread_linux.cc +@@ -29,7 +29,9 @@ + + #if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) + #include ++#if !BUILDFLAG(IS_BSD) + #include ++#endif + #include + #include + #include +@@ -132,7 +134,7 @@ long sched_setattr(pid_t pid, + #endif // !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) + #endif // BUILDFLAG(IS_CHROMEOS) + +-#if !BUILDFLAG(IS_NACL) ++#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) + const FilePath::CharType kCgroupDirectory[] = + FILE_PATH_LITERAL("/sys/fs/cgroup"); + +@@ -304,7 +306,7 @@ void SetThreadCgroupsForThreadType(PlatformThreadId th + namespace internal { + + namespace { +-#if !BUILDFLAG(IS_NACL) ++#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) + const struct sched_param kRealTimePrio = {8}; + #endif + } // namespace +@@ -330,7 +332,7 @@ const ThreadTypeToNiceValuePair kThreadTypeToNiceValue + }; + + bool CanSetThreadTypeToRealtimeAudio() { +-#if !BUILDFLAG(IS_NACL) ++#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) + // A non-zero soft-limit on RLIMIT_RTPRIO is required to be allowed to invoke + // pthread_setschedparam in SetCurrentThreadTypeForPlatform(). + struct rlimit rlim; +@@ -342,7 +344,7 @@ bool CanSetThreadTypeToRealtimeAudio() { + + bool SetCurrentThreadTypeForPlatform(ThreadType thread_type, + MessagePumpType pump_type_hint) { +-#if !BUILDFLAG(IS_NACL) ++#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) + // For legacy schedtune interface + SetThreadCgroupsForThreadType(PlatformThread::CurrentId(), thread_type); + +@@ -361,7 +363,7 @@ bool SetCurrentThreadTypeForPlatform(ThreadType thread + + absl::optional + GetCurrentThreadPriorityForPlatformForTest() { +-#if !BUILDFLAG(IS_NACL) ++#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) + int maybe_sched_rr = 0; + struct sched_param maybe_realtime_prio = {0}; + if (pthread_getschedparam(pthread_self(), &maybe_sched_rr, +@@ -380,7 +382,7 @@ GetCurrentThreadPriorityForPlatformForTest() { + void PlatformThread::SetName(const std::string& name) { + ThreadIdNameManager::GetInstance()->SetName(name); + +-#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) ++#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) && !BUILDFLAG(IS_BSD) + // On linux we can get the thread names to show up in the debugger by setting + // the process name for the LWP. We don't want to do this for the main + // thread because that would rename the process, causing tools like killall +@@ -410,8 +412,10 @@ void PlatformThread::SetThreadType(ProcessId process_i + // priority. + CHECK_NE(thread_id, process_id); + ++#if !BUILDFLAG(IS_BSD) + // For legacy schedtune interface + SetThreadCgroupsForThreadType(thread_id, thread_type); ++#endif + + #if BUILDFLAG(IS_CHROMEOS) + // For upstream uclamp interface. We try both legacy (schedtune, as done diff --git a/www/ungoogled-chromium/files/patch-base_threading_platform__thread__posix.cc b/www/ungoogled-chromium/files/patch-base_threading_platform__thread__posix.cc new file mode 100644 index 000000000000..50cd9860d582 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_threading_platform__thread__posix.cc @@ -0,0 +1,21 @@ +--- base/threading/platform_thread_posix.cc.orig 2022-10-01 07:40:07 UTC ++++ base/threading/platform_thread_posix.cc +@@ -76,7 +76,7 @@ void* ThreadFunc(void* params) { + if (!thread_params->joinable) + base::DisallowSingleton(); + +-#if !BUILDFLAG(IS_NACL) ++#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) + #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) + partition_alloc::internal::PCScan::NotifyThreadCreated( + partition_alloc::internal::GetStackPointer()); +@@ -371,6 +371,9 @@ namespace internal { + void SetCurrentThreadTypeImpl(ThreadType thread_type, + 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)) diff --git a/www/ungoogled-chromium/files/patch-base_threading_platform__thread__unittest.cc b/www/ungoogled-chromium/files/patch-base_threading_platform__thread__unittest.cc new file mode 100644 index 000000000000..fb81a24e57fa --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_threading_platform__thread__unittest.cc @@ -0,0 +1,47 @@ +--- base/threading/platform_thread_unittest.cc.orig 2022-10-01 07:40:07 UTC ++++ base/threading/platform_thread_unittest.cc +@@ -31,7 +31,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 + #include + #include +@@ -417,7 +417,7 @@ TEST(PlatformThreadTest, + // and hardcodes what we know. Please inform scheduler-dev@ch40m1um.qjz9zk 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. + constexpr bool kCanIncreasePriority = false; +@@ -523,7 +523,7 @@ TEST(PlatformThreadTest, SetHugeThreadName) { + TEST(PlatformThreadTest, GetDefaultThreadStackSize) { + size_t stack_size = PlatformThread::GetDefaultThreadStackSize(); + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) || \ +- ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ ++ ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ + !defined(THREAD_SANITIZER)) || \ + (BUILDFLAG(IS_ANDROID) && !defined(ADDRESS_SANITIZER)) + EXPECT_EQ(0u, stack_size); +@@ -684,12 +684,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() == reinterpret_cast(pthread_self()); ++#else + return PlatformThread::CurrentId() == syscall(__NR_gettid); ++#endif + } + + void* CheckTidCacheCorrectWrapper(void*) { diff --git a/www/ungoogled-chromium/files/patch-base_trace__event_malloc__dump__provider.cc b/www/ungoogled-chromium/files/patch-base_trace__event_malloc__dump__provider.cc new file mode 100644 index 000000000000..e31a3000825b --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_trace__event_malloc__dump__provider.cc @@ -0,0 +1,30 @@ +--- base/trace_event/malloc_dump_provider.cc.orig 2022-10-01 07:40:07 UTC ++++ base/trace_event/malloc_dump_provider.cc +@@ -24,6 +24,8 @@ + + #if BUILDFLAG(IS_APPLE) + #include ++#elif defined(OS_BSD) ++#include + #else + #include + #endif +@@ -185,7 +187,7 @@ void ReportAppleAllocStats(size_t* total_virtual_size, + + #if (BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(IS_ANDROID)) || \ + (!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, +@@ -356,6 +358,9 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDump + &allocated_objects_count); + #elif BUILDFLAG(IS_FUCHSIA) + // TODO(fuchsia): Port, see https://crbug.com/706592. ++#elif defined(OS_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/www/ungoogled-chromium/files/patch-base_trace__event_memory__dump__manager.cc b/www/ungoogled-chromium/files/patch-base_trace__event_memory__dump__manager.cc new file mode 100644 index 000000000000..6fc72cbe49c3 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_trace__event_memory__dump__manager.cc @@ -0,0 +1,11 @@ +--- base/trace_event/memory_dump_manager.cc.orig 2022-10-01 07:40:07 UTC ++++ base/trace_event/memory_dump_manager.cc +@@ -82,7 +82,7 @@ const char* const MemoryDumpManager::kSystemAllocatorP + #if defined(MALLOC_MEMORY_TRACING_SUPPORTED) + MallocDumpProvider::kAllocatedObjects; + #else +- nullptr; ++ ""; + #endif + + // static diff --git a/www/ungoogled-chromium/files/patch-base_trace__event_process__memory__dump.cc b/www/ungoogled-chromium/files/patch-base_trace__event_process__memory__dump.cc new file mode 100644 index 000000000000..8a3d32f18fee --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_trace__event_process__memory__dump.cc @@ -0,0 +1,20 @@ +--- base/trace_event/process_memory_dump.cc.orig 2022-10-01 07:40:07 UTC ++++ base/trace_event/process_memory_dump.cc +@@ -112,7 +112,7 @@ absl::optional ProcessMemoryDump::CountResiden + #if BUILDFLAG(IS_WIN) + std::unique_ptr vec( + new PSAPI_WORKING_SET_EX_INFORMATION[max_vec_size]); +-#elif BUILDFLAG(IS_APPLE) ++#elif BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) + std::unique_ptr vec(new char[max_vec_size]); + #elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) + std::unique_ptr vec(new unsigned char[max_vec_size]); +@@ -134,7 +134,7 @@ absl::optional ProcessMemoryDump::CountResiden + + 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/851760): Implement counting resident bytes. + // For now, log and avoid unused variable warnings. + NOTIMPLEMENTED_LOG_ONCE(); diff --git a/www/ungoogled-chromium/files/patch-base_tracing_trace__time.cc b/www/ungoogled-chromium/files/patch-base_tracing_trace__time.cc new file mode 100644 index 000000000000..55691d99604b --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_tracing_trace__time.cc @@ -0,0 +1,28 @@ +--- base/tracing/trace_time.cc.orig 2022-10-01 07:40:07 UTC ++++ base/tracing/trace_time.cc +@@ -8,13 +8,17 @@ + #include "build/build_config.h" + #include "third_party/perfetto/include/perfetto/base/time.h" + ++#if BUILDFLAG(IS_FREEBSD) ++#define CLOCK_BOOTTIME CLOCK_UPTIME ++#endif ++ + namespace base { + namespace 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) +@@ -24,4 +28,4 @@ int64_t TraceBootTicksNow() { + } + + } // namespace tracing +-} // namespace base +\ No newline at end of file ++} // namespace base diff --git a/www/ungoogled-chromium/files/patch-base_tracing_trace__time.h b/www/ungoogled-chromium/files/patch-base_tracing_trace__time.h new file mode 100644 index 000000000000..8728928a1673 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_tracing_trace__time.h @@ -0,0 +1,11 @@ +--- base/tracing/trace_time.h.orig 2022-10-01 07:40:07 UTC ++++ 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/www/ungoogled-chromium/files/patch-build_config_BUILD.gn b/www/ungoogled-chromium/files/patch-build_config_BUILD.gn new file mode 100644 index 000000000000..a9e33c0218ee --- /dev/null +++ b/www/ungoogled-chromium/files/patch-build_config_BUILD.gn @@ -0,0 +1,22 @@ +--- build/config/BUILD.gn.orig 2022-10-01 07:40:07 UTC ++++ build/config/BUILD.gn +@@ -215,13 +215,17 @@ config("default_libs") { + "CoreText.framework", + "Foundation.framework", + ] +- } else if (is_linux || is_chromeos) { ++ } else if ((is_linux && !is_bsd) || is_chromeos) { + libs = [ + "dl", + "pthread", + "rt", + ] +- } ++ } else if (is_bsd) { ++ libs = [ ++ "pthread", ++ ] ++ } + } + + group("common_deps") { diff --git a/www/ungoogled-chromium/files/patch-build_config_BUILDCONFIG.gn b/www/ungoogled-chromium/files/patch-build_config_BUILDCONFIG.gn new file mode 100644 index 000000000000..cf46aee73705 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-build_config_BUILDCONFIG.gn @@ -0,0 +1,45 @@ +--- build/config/BUILDCONFIG.gn.orig 2022-10-01 07:40:07 UTC ++++ 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_cpu != "s390x" && current_cpu != "s390" && + current_cpu != "ppc64" && current_cpu != "ppc" && + current_cpu != "mips" && current_cpu != "mips64" && +@@ -220,6 +221,10 @@ 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 { + assert(false, "Unsupported host_os: $host_os") + } +@@ -264,6 +269,8 @@ if (target_os == "android") { + _default_toolchain = "//build/toolchain/aix:$target_cpu" + } else if (target_os == "zos") { + _default_toolchain = "//build/toolchain/zos:$target_cpu" ++} else if (target_os == "openbsd" || target_os == "freebsd") { ++ _default_toolchain = host_toolchain + } else { + assert(false, "Unsupported target_os: $target_os") + } +@@ -298,7 +305,11 @@ 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" ++is_openbsd = current_os == "openbsd" ++is_freebsd = current_os == "freebsd" ++is_bsd = current_os == "openbsd" || current_os == "freebsd" + is_mac = current_os == "mac" + is_nacl = current_os == "nacl" + is_win = current_os == "win" || current_os == "winuwp" diff --git a/www/ungoogled-chromium/files/patch-build_config_compiler_BUILD.gn b/www/ungoogled-chromium/files/patch-build_config_compiler_BUILD.gn new file mode 100644 index 000000000000..7d8092d64a5b --- /dev/null +++ b/www/ungoogled-chromium/files/patch-build_config_compiler_BUILD.gn @@ -0,0 +1,113 @@ +--- build/config/compiler/BUILD.gn.orig 2022-10-01 07:40:07 UTC ++++ build/config/compiler/BUILD.gn +@@ -222,13 +222,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" ] ++ } + } + + # compiler --------------------------------------------------------------------- +@@ -452,6 +455,10 @@ config("compiler") { + } + } + ++ if (is_openbsd) { ++ ldflags += [ "-Wl,-z,wxneeded" ] ++ } ++ + # Linux-specific compiler flags setup. + # ------------------------------------ + if (use_gold) { +@@ -527,7 +534,7 @@ config("compiler") { + ldflags += [ "-Wl,-z,keep-text-section-prefix" ] + } + +- if (is_clang && !is_nacl && current_os != "zos") { ++ if (is_clang && !is_nacl && current_os != "zos" && !is_bsd) { + cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ] + + # TODO(hans): Remove this once Clang generates better optimized debug info +@@ -891,7 +898,7 @@ config("compiler_cpu_abi") { + ] + } + } else if (current_cpu == "arm") { +- if (is_clang && !is_android && !is_nacl && ++ if (is_clang && !is_android && !is_nacl && !is_bsd && + !(is_chromeos_lacros && is_chromeos_device)) { + cflags += [ "--target=arm-linux-gnueabihf" ] + ldflags += [ "--target=arm-linux-gnueabihf" ] +@@ -906,7 +913,7 @@ config("compiler_cpu_abi") { + cflags += [ "-mtune=$arm_tune" ] + } + } else if (current_cpu == "arm64") { +- if (is_clang && !is_android && !is_nacl && !is_fuchsia && ++ if (is_clang && !is_android && !is_nacl && !is_fuchsia && !is_bsd && + !(is_chromeos_lacros && is_chromeos_device)) { + cflags += [ "--target=aarch64-linux-gnu" ] + ldflags += [ "--target=aarch64-linux-gnu" ] +@@ -1234,7 +1241,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", +@@ -1532,7 +1539,7 @@ config("default_warnings") { + ] + } + +- if (!is_nacl) { ++ if (!is_nacl && !is_bsd) { + cflags += [ + # TODO(crbug.com/1343975) Evaluate and possibly enable. + "-Wno-deprecated-builtins", +@@ -1705,7 +1712,7 @@ config("no_chromium_code") { + # third-party libraries. + "-Wno-c++11-narrowing", + ] +- if (!is_nacl) { ++ if (!is_nacl && !is_freebsd) { + cflags += [ + # Disabled for similar reasons as -Wunused-variable. + "-Wno-unused-but-set-variable", +@@ -2219,7 +2226,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. +@@ -2235,7 +2242,7 @@ config("afdo") { + cflags += [ "-fprofile-sample-use=${rebased_clang_sample_profile}" ] + 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 ] + } +@@ -2375,7 +2382,8 @@ config("symbols") { + } + } + +- if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos") { ++ if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos" && ++ !is_bsd) { + if (is_apple) { + # TODO(https://crbug.com/1050118): Investigate missing debug info on mac. + # Make sure we don't use constructor homing on mac. diff --git a/www/ungoogled-chromium/files/patch-build_config_linux_BUILD.gn b/www/ungoogled-chromium/files/patch-build_config_linux_BUILD.gn new file mode 100644 index 000000000000..466c6829e7d1 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-build_config_linux_BUILD.gn @@ -0,0 +1,11 @@ +--- build/config/linux/BUILD.gn.orig 2022-10-01 07:40:07 UTC ++++ 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/www/ungoogled-chromium/files/patch-build_config_linux_pkg-config.py b/www/ungoogled-chromium/files/patch-build_config_linux_pkg-config.py new file mode 100644 index 000000000000..6b0ac80396d4 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-build_config_linux_pkg-config.py @@ -0,0 +1,11 @@ +--- build/config/linux/pkg-config.py.orig 2022-10-01 07:40:07 UTC ++++ build/config/linux/pkg-config.py +@@ -109,7 +109,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'])): + print("[[],[],[],[],[]]") + return 0 + diff --git a/www/ungoogled-chromium/files/patch-build_config_ozone.gni b/www/ungoogled-chromium/files/patch-build_config_ozone.gni new file mode 100644 index 000000000000..b42f13511953 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-build_config_ozone.gni @@ -0,0 +1,19 @@ +--- build/config/ozone.gni.orig 2022-10-01 07:40:07 UTC ++++ build/config/ozone.gni +@@ -87,7 +87,15 @@ declare_args() { + } else if (is_chromeos_lacros) { + ozone_platform = "wayland" + ozone_platform_wayland = 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_freebsd) { + ozone_platform = "x11" + ozone_platform_wayland = true + ozone_platform_x11 = true diff --git a/www/ungoogled-chromium/files/patch-build_config_rust.gni b/www/ungoogled-chromium/files/patch-build_config_rust.gni new file mode 100644 index 000000000000..0c1aad6f4204 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-build_config_rust.gni @@ -0,0 +1,11 @@ +--- build/config/rust.gni.orig 2022-10-01 07:40:07 UTC ++++ build/config/rust.gni +@@ -124,7 +124,7 @@ if (enable_rust) { + rust_sysroot = "//third_party/rust-toolchain" + use_unverified_rust_toolchain = false + } else { +- if (host_os != "linux") { ++ if (host_os != "linux" && host_os != "openbsd" && host_os != "freebsd") { + assert(false, + "Attempt to use Android Rust toolchain on an unsupported platform") + } diff --git a/www/ungoogled-chromium/files/patch-build_config_v8__target__cpu.gni b/www/ungoogled-chromium/files/patch-build_config_v8__target__cpu.gni new file mode 100644 index 000000000000..3d883327375b --- /dev/null +++ b/www/ungoogled-chromium/files/patch-build_config_v8__target__cpu.gni @@ -0,0 +1,13 @@ +--- build/config/v8_target_cpu.gni.orig 2022-10-01 07:40:07 UTC ++++ 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/www/ungoogled-chromium/files/patch-build_detect__host__arch.py b/www/ungoogled-chromium/files/patch-build_detect__host__arch.py new file mode 100644 index 000000000000..2d77e503b8c6 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-build_detect__host__arch.py @@ -0,0 +1,11 @@ +--- build/detect_host_arch.py.orig 2022-10-01 07:40:07 UTC ++++ build/detect_host_arch.py +@@ -21,6 +21,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/www/ungoogled-chromium/files/patch-build_gn__run__binary.py b/www/ungoogled-chromium/files/patch-build_gn__run__binary.py new file mode 100644 index 000000000000..692808585f8b --- /dev/null +++ b/www/ungoogled-chromium/files/patch-build_gn__run__binary.py @@ -0,0 +1,11 @@ +--- build/gn_run_binary.py.orig 2022-10-01 07:40:07 UTC ++++ build/gn_run_binary.py +@@ -24,7 +24,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/www/ungoogled-chromium/files/patch-build_linux_chrome.map b/www/ungoogled-chromium/files/patch-build_linux_chrome.map new file mode 100644 index 000000000000..8a2855e7f6de --- /dev/null +++ b/www/ungoogled-chromium/files/patch-build_linux_chrome.map @@ -0,0 +1,13 @@ +--- build/linux/chrome.map.orig 2022-10-01 07:40:07 UTC ++++ 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/www/ungoogled-chromium/files/patch-build_linux_strip__binary.py b/www/ungoogled-chromium/files/patch-build_linux_strip__binary.py new file mode 100644 index 000000000000..cf324c1fabd2 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-build_linux_strip__binary.py @@ -0,0 +1,10 @@ +--- build/linux/strip_binary.py.orig 2022-10-01 07:40:07 UTC ++++ build/linux/strip_binary.py +@@ -10,6 +10,7 @@ import sys + + + def main(): ++ return 0 + argparser = argparse.ArgumentParser(description='eu-strip binary.') + + argparser.add_argument('--eu-strip-binary-path', help='eu-strip path.') diff --git a/www/ungoogled-chromium/files/patch-build_linux_unbundle_libevent.gn b/www/ungoogled-chromium/files/patch-build_linux_unbundle_libevent.gn new file mode 100644 index 000000000000..262907b65bff --- /dev/null +++ b/www/ungoogled-chromium/files/patch-build_linux_unbundle_libevent.gn @@ -0,0 +1,15 @@ +--- build/linux/unbundle/libevent.gn.orig 2022-10-01 07:40:07 UTC ++++ build/linux/unbundle/libevent.gn +@@ -9,7 +9,12 @@ shim_headers("libevent_shim") { + headers = [ "event.h" ] + } + ++config("system_libevent") { ++ defines = [ "USE_SYSTEM_LIBEVENT=1" ] ++} ++ + source_set("libevent") { + deps = [ ":libevent_shim" ] + libs = [ "event" ] ++ public_configs = [ ":system_libevent" ] + } diff --git a/www/ungoogled-chromium/files/patch-build_linux_unbundle_libusb.gn b/www/ungoogled-chromium/files/patch-build_linux_unbundle_libusb.gn new file mode 100644 index 000000000000..2144bd3922d1 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-build_linux_unbundle_libusb.gn @@ -0,0 +1,27 @@ +--- build/linux/unbundle/libusb.gn.orig 2022-10-01 07:40:07 UTC ++++ build/linux/unbundle/libusb.gn +@@ -0,0 +1,24 @@ ++# 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" ] ++} diff --git a/www/ungoogled-chromium/files/patch-build_linux_unbundle_replace__gn__files.py b/www/ungoogled-chromium/files/patch-build_linux_unbundle_replace__gn__files.py new file mode 100644 index 000000000000..f39149c396dd --- /dev/null +++ b/www/ungoogled-chromium/files/patch-build_linux_unbundle_replace__gn__files.py @@ -0,0 +1,10 @@ +--- build/linux/unbundle/replace_gn_files.py.orig 2022-10-01 07:40:07 UTC ++++ build/linux/unbundle/replace_gn_files.py +@@ -52,6 +52,7 @@ REPLACEMENTS = { + 'libjpeg': 'third_party/libjpeg.gni', + 'libjxl' : 'third_party/libjxl/BUILD.gn', + 'libpng': 'third_party/libpng/BUILD.gn', ++ 'libusb': 'third_party/libusb/BUILD.gn', + 'libvpx': 'third_party/libvpx/BUILD.gn', + 'libwebp': 'third_party/libwebp/BUILD.gn', + 'libxml': 'third_party/libxml/BUILD.gn', diff --git a/www/ungoogled-chromium/files/patch-build_toolchain_freebsd_BUILD.gn b/www/ungoogled-chromium/files/patch-build_toolchain_freebsd_BUILD.gn new file mode 100644 index 000000000000..3e36c27ec393 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-build_toolchain_freebsd_BUILD.gn @@ -0,0 +1,69 @@ +--- build/toolchain/freebsd/BUILD.gn.orig 2022-10-01 07:40:07 UTC ++++ 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/www/ungoogled-chromium/files/patch-build_toolchain_gcc__solink__wrapper.py b/www/ungoogled-chromium/files/patch-build_toolchain_gcc__solink__wrapper.py new file mode 100644 index 000000000000..49a5819c4cf1 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-build_toolchain_gcc__solink__wrapper.py @@ -0,0 +1,11 @@ +--- build/toolchain/gcc_solink_wrapper.py.orig 2022-10-01 07:40:07 UTC ++++ 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/www/ungoogled-chromium/files/patch-build_toolchain_gcc__toolchain.gni b/www/ungoogled-chromium/files/patch-build_toolchain_gcc__toolchain.gni new file mode 100644 index 000000000000..fe75be776441 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-build_toolchain_gcc__toolchain.gni @@ -0,0 +1,44 @@ +--- build/toolchain/gcc_toolchain.gni.orig 2022-10-01 07:40:07 UTC ++++ build/toolchain/gcc_toolchain.gni +@@ -53,6 +53,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). + # +@@ -786,22 +793,12 @@ template("gcc_toolchain") { + # use_gold too. + 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, + [ diff --git a/www/ungoogled-chromium/files/patch-build_toolchain_openbsd_BUILD.gn b/www/ungoogled-chromium/files/patch-build_toolchain_openbsd_BUILD.gn new file mode 100644 index 000000000000..3d32dd3fac6c --- /dev/null +++ b/www/ungoogled-chromium/files/patch-build_toolchain_openbsd_BUILD.gn @@ -0,0 +1,69 @@ +--- build/toolchain/openbsd/BUILD.gn.orig 2022-10-01 07:40:07 UTC ++++ 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/www/ungoogled-chromium/files/patch-cc_BUILD.gn b/www/ungoogled-chromium/files/patch-cc_BUILD.gn new file mode 100644 index 000000000000..ae72f0ae5023 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-cc_BUILD.gn @@ -0,0 +1,19 @@ +--- cc/BUILD.gn.orig 2022-10-01 07:40:07 UTC ++++ cc/BUILD.gn +@@ -664,7 +664,7 @@ cc_test_static_library("test_support") { + if (enable_vulkan) { + deps += [ "//gpu/vulkan/init" ] + } +- if (!is_android) { ++ if (!is_android && !is_bsd) { + data_deps = [ "//third_party/mesa_headers" ] + } + } +@@ -891,7 +891,6 @@ cc_test("cc_unittests") { + data = [ "//components/viz/test/data/" ] + data_deps = [ + "//testing/buildbot/filters:cc_unittests_filters", +- "//third_party/mesa_headers", + ] + + if (is_android && enable_chrome_android_internal) { diff --git a/www/ungoogled-chromium/files/patch-chrome_app_app__management__strings.grdp b/www/ungoogled-chromium/files/patch-chrome_app_app__management__strings.grdp new file mode 100644 index 000000000000..e454c8c799f5 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_app_app__management__strings.grdp @@ -0,0 +1,11 @@ +--- chrome/app/app_management_strings.grdp.orig 2022-10-01 07:40:07 UTC ++++ chrome/app/app_management_strings.grdp +@@ -173,7 +173,7 @@ + You can open and edit supported files with this app from Finder or other apps. To control which files open this app by default, <a href="#">learn how to set default apps on your device</a>. + + +- ++ + + You can open and edit supported files with this app from your file browser or other apps. To control which files open this app by default, <a href="#">learn how to set default apps on your device</a>. + diff --git a/www/ungoogled-chromium/files/patch-chrome_app_chrome__command__ids.h b/www/ungoogled-chromium/files/patch-chrome_app_chrome__command__ids.h new file mode 100644 index 000000000000..481758e7d612 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_app_chrome__command__ids.h @@ -0,0 +1,11 @@ +--- chrome/app/chrome_command_ids.h.orig 2022-10-01 07:40:07 UTC ++++ chrome/app/chrome_command_ids.h +@@ -67,7 +67,7 @@ + #define IDC_NAME_WINDOW 34049 + + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch of lacros-chrome is complete. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + #define IDC_USE_SYSTEM_TITLE_BAR 34051 + #define IDC_RESTORE_WINDOW 34052 + #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_app_chrome__main.cc b/www/ungoogled-chromium/files/patch-chrome_app_chrome__main.cc new file mode 100644 index 000000000000..c90beca3a400 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_app_chrome__main.cc @@ -0,0 +1,20 @@ +--- chrome/app/chrome_main.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/app/chrome_main.cc +@@ -26,7 +26,7 @@ + #include "chrome/app/notification_metrics.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 + +@@ -152,7 +152,7 @@ int ChromeMain(int argc, const char** argv) { + headless::SetUpCommandLine(command_line); + } else { + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + if (command_line->HasSwitch(switches::kHeadless)) { + #if BUILDFLAG(GOOGLE_CHROME_BRANDING) + command_line->AppendSwitch(::headless::switches::kEnableCrashReporter); diff --git a/www/ungoogled-chromium/files/patch-chrome_app_chrome__main__delegate.cc b/www/ungoogled-chromium/files/patch-chrome_app_chrome__main__delegate.cc new file mode 100644 index 000000000000..1bc0c996a5e0 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_app_chrome__main__delegate.cc @@ -0,0 +1,121 @@ +--- chrome/app/chrome_main_delegate.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/app/chrome_main_delegate.cc +@@ -126,7 +126,7 @@ + #include "components/about_ui/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 +@@ -169,16 +169,16 @@ + #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) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + #include "base/message_loop/message_pump_libevent.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 +@@ -329,7 +329,7 @@ void AdjustLinuxOOMScore(const std::string& process_ty + // 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 +@@ -415,7 +415,7 @@ bool HandleVersionSwitches(const base::CommandLine& co + + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || 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) || +@@ -506,7 +506,7 @@ void InitializeUserDataDir(base::CommandLine* 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. +@@ -589,7 +589,7 @@ void RecordMainStartupMetrics(base::TimeTicks applicat + #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::RecordStartupProcessCreationTime( +@@ -767,6 +767,8 @@ void ChromeMainDelegate::CommonEarlyInitialization() { + // not always enabled on Linux/ChromeOS. + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + bool enable_gwp_asan = crash_reporter::IsCrashpadEnabled(); ++#elif BUILDFLAG(IS_BSD) ++ bool enable_gwp_asan = false; + #else + bool enable_gwp_asan = true; + #endif +@@ -826,7 +828,7 @@ void ChromeMainDelegate::CommonEarlyInitialization() { + base::internal::TimerBase::InitializeFeatures(); + base::InitializeCpuReductionExperiment(); + base::sequence_manager::internal::SequenceManagerImpl::InitializeFeatures(); +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + base::MessagePumpLibevent::InitializeFeatures(); + #elif BUILDFLAG(IS_MAC) + base::PlatformThread::InitializeOptimizedRealtimeThreadingFeature(); +@@ -916,7 +918,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo + + // TODO(crbug.com/1052397): Revisit the macro expression once build flag + // switch of lacros-chrome is complete. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + // This will directly exit if the user asked for help. + HandleHelpSwitches(command_line); + #endif +@@ -946,7 +948,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo + #if BUILDFLAG(IS_CHROMEOS) + 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 + +@@ -1336,7 +1338,7 @@ void ChromeMainDelegate::PreSandboxStartup() { + 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) { + if (command_line.HasSwitch(switches::kPreCrashpadCrashTest)) { +@@ -1412,7 +1414,7 @@ absl::variant Chrome + + // This entry is not needed on Linux, where the NaCl loader + // process is launched via nacl_helper instead. +-#if BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) + {switches::kNaClLoaderProcess, NaClMain}, + #else + {"", nullptr}, // To avoid constant array of size 0 diff --git a/www/ungoogled-chromium/files/patch-chrome_app_chromium__strings.grd b/www/ungoogled-chromium/files/patch-chrome_app_chromium__strings.grd new file mode 100644 index 000000000000..332a015cc721 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_app_chromium__strings.grd @@ -0,0 +1,20 @@ +--- chrome/app/chromium_strings.grd.orig 2022-10-01 07:40:07 UTC ++++ chrome/app/chromium_strings.grd +@@ -296,7 +296,7 @@ If you update this file, be sure also to update google + Welcome to Chromium; new browser window opened + + +- ++ + + Welcome to Chromium + +@@ -410,7 +410,7 @@ If you update this file, be sure also to update google + Chromium may not function correctly because it is no longer supported on Windows XP or Windows Vista + + +- ++ + + Chromium may not function correctly because it is no longer supported on this Linux distribution + diff --git a/www/ungoogled-chromium/files/patch-chrome_app_generated__resources.grd b/www/ungoogled-chromium/files/patch-chrome_app_generated__resources.grd new file mode 100644 index 000000000000..6fc46e66c92a --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_app_generated__resources.grd @@ -0,0 +1,74 @@ +--- chrome/app/generated_resources.grd.orig 2022-10-01 07:40:07 UTC ++++ chrome/app/generated_resources.grd +@@ -2,7 +2,7 @@ + + +@@ -3069,7 +3069,7 @@ are declared in tools/grit/grit_rule.gni. + + + +- ++ + + Device Credentials + +@@ -4802,7 +4802,7 @@ are declared in tools/grit/grit_rule.gni. + Read information about your browser, OS, device, installed software, registry values and files + + +- ++ + + Read information about your browser, OS, device, installed software and files + +@@ -5439,7 +5439,7 @@ Keep your key file in a safe place. You will need it t + Old versions of Chrome Apps won't open on Windows devices after December 2022. Contact your administrator to update to a new version or remove this app. + + +- ++ + + Old versions of Chrome Apps won't open on Linux devices after December 2022. Contact your administrator to update to a new version or remove this app. + +@@ -5467,7 +5467,7 @@ Keep your key file in a safe place. You will need it t + Old versions of Chrome apps won't open on Windows devices after December 2022. You can check if there's a new version available. + + +- ++ + + Old versions of Chrome apps won't open on Linux devices after December 2022. You can check if there's a new version available. + +@@ -8964,7 +8964,7 @@ Check your passwords anytime in ++ + + Use system title bar and borders + +@@ -10148,7 +10148,7 @@ Please help our engineers fix this problem. Tell us wh + Set as default + + +- ++ + + Minimize + +@@ -12211,7 +12211,7 @@ Please help our engineers fix this problem. Tell us wh + Open Anyway + + +- ++ + + System Signals Utilities + diff --git a/www/ungoogled-chromium/files/patch-chrome_app_google__chrome__strings.grd b/www/ungoogled-chromium/files/patch-chrome_app_google__chrome__strings.grd new file mode 100644 index 000000000000..16fab79ee3b7 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_app_google__chrome__strings.grd @@ -0,0 +1,20 @@ +--- chrome/app/google_chrome_strings.grd.orig 2022-10-01 07:40:07 UTC ++++ chrome/app/google_chrome_strings.grd +@@ -301,7 +301,7 @@ chromium_strings.grd. --> + Welcome to Chrome; new browser window opened + + +- ++ + + Welcome to Google Chrome + +@@ -438,7 +438,7 @@ chromium_strings.grd. --> + This computer will no longer receive Google Chrome updates because Windows XP and Windows Vista are no longer supported + + +- ++ + + Google Chrome may not function correctly because it is no longer supported on this Linux distribution + diff --git a/www/ungoogled-chromium/files/patch-chrome_app_profiles__strings.grdp b/www/ungoogled-chromium/files/patch-chrome_app_profiles__strings.grdp new file mode 100644 index 000000000000..98e99a73a793 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_app_profiles__strings.grdp @@ -0,0 +1,11 @@ +--- chrome/app/profiles_strings.grdp.orig 2022-10-01 07:40:07 UTC ++++ chrome/app/profiles_strings.grdp +@@ -66,7 +66,7 @@ + Add Profile... + + +- ++ + + Add profile... + diff --git a/www/ungoogled-chromium/files/patch-chrome_app_settings__strings.grdp b/www/ungoogled-chromium/files/patch-chrome_app_settings__strings.grdp new file mode 100644 index 000000000000..533e7b17ae37 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_app_settings__strings.grdp @@ -0,0 +1,20 @@ +--- chrome/app/settings_strings.grdp.orig 2022-10-01 07:40:07 UTC ++++ chrome/app/settings_strings.grdp +@@ -134,7 +134,7 @@ + Theme + + +- ++ + + GTK+ + +@@ -148,7 +148,7 @@ + Use Classic + + +- ++ + + Reset to default + diff --git a/www/ungoogled-chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd b/www/ungoogled-chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd new file mode 100644 index 000000000000..20d89d435296 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd @@ -0,0 +1,32 @@ +--- chrome/app/theme/chrome_unscaled_resources.grd.orig 2022-10-01 07:40:07 UTC ++++ chrome/app/theme/chrome_unscaled_resources.grd +@@ -15,12 +15,12 @@ + + + +- ++ + + + + +- ++ + + + +@@ -53,12 +53,12 @@ + + + +- ++ + + + + +- ++ + + + diff --git a/www/ungoogled-chromium/files/patch-chrome_app_theme_theme__resources.grd b/www/ungoogled-chromium/files/patch-chrome_app_theme_theme__resources.grd new file mode 100644 index 000000000000..3001e745ac0e --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_app_theme_theme__resources.grd @@ -0,0 +1,34 @@ +--- chrome/app/theme/theme_resources.grd.orig 2022-10-01 07:40:07 UTC ++++ chrome/app/theme/theme_resources.grd +@@ -130,11 +130,11 @@ + + + +- ++ + + + +- ++ + + + +@@ -142,7 +142,7 @@ + + + +- ++ + + + +@@ -150,7 +150,7 @@ + + + +- ++ + + + diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc b/www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc new file mode 100644 index 000000000000..f7370af045bb --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc @@ -0,0 +1,128 @@ +--- chrome/browser/about_flags.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/about_flags.cc +@@ -213,7 +213,7 @@ + #include "ui/native_theme/native_theme_features.h" + #include "ui/ui_features.h" + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "base/allocator/buildflags.h" + #endif + +@@ -288,7 +288,7 @@ + #include "chrome/browser/supervised_user/supervised_user_features/supervised_user_features.h" // nogncheck + #endif // ENABLE_SUPERVISED_USERS + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + #include "ui/ozone/buildflags.h" + #include "ui/ozone/public/ozone_switches.h" + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +@@ -393,7 +393,7 @@ const FeatureEntry::FeatureVariation kDXGIWaitableSwap + {"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, +@@ -1263,7 +1263,7 @@ const FeatureEntry::FeatureVariation + }; + + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + const FeatureEntry::FeatureParam kOmniboxDocumentProviderServerScoring[] = { + {"DocumentUseServerScore", "true"}, + {"DocumentUseClientScore", "false"}, +@@ -3930,7 +3930,7 @@ const FeatureEntry kFeatureEntries[] = { + FEATURE_VALUE_TYPE(base::kOneGroupPerRenderer)}, + #endif // BUILDFLAG(IS_CHROMEOS) + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + { + "enable-accelerated-video-decode", + flag_descriptions::kAcceleratedVideoDecodeName, +@@ -4556,7 +4556,7 @@ const FeatureEntry kFeatureEntries[] = { + FEATURE_VALUE_TYPE(features::kWebShare)}, + #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + {"ozone-platform-hint", flag_descriptions::kOzonePlatformHintName, + flag_descriptions::kOzonePlatformHintDescription, kOsLinux, + MULTI_VALUE_TYPE(kOzonePlatformHintRuntimeChoices)}, +@@ -4575,7 +4575,7 @@ const FeatureEntry kFeatureEntries[] = { + password_manager::features::kForceInitialSyncWhenDecryptionFails)}, + #endif // BUILDFLAG(IS_LINUX) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + {"skip-undecryptable-passwords", + flag_descriptions::kSkipUndecryptablePasswordsName, + flag_descriptions::kSkipUndecryptablePasswordsDescription, +@@ -4829,7 +4829,7 @@ const FeatureEntry kFeatureEntries[] = { + "FeedCloseRefresh")}, + #endif // BUILDFLAG(IS_ANDROID) + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + {"following-feed-sidepanel", flag_descriptions::kFollowingFeedSidepanelName, + flag_descriptions::kFollowingFeedSidepanelDescription, kOsDesktop, + FEATURE_VALUE_TYPE(feed::kWebUiFeed)}, +@@ -5343,7 +5343,7 @@ const FeatureEntry kFeatureEntries[] = { + FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnWeb)}, + + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + {"omnibox-experimental-keyword-mode", + flag_descriptions::kOmniboxExperimentalKeywordModeName, + flag_descriptions::kOmniboxExperimentalKeywordModeDescription, kOsDesktop, +@@ -5880,7 +5880,7 @@ const FeatureEntry kFeatureEntries[] = { + flag_descriptions::kPointerLockOptionsDescription, kOsDesktop, + FEATURE_VALUE_TYPE(features::kPointerLockOptions)}, + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + {"enable-async-dns", flag_descriptions::kAsyncDnsName, + flag_descriptions::kAsyncDnsDescription, kOsWin | kOsLinux, + FEATURE_VALUE_TYPE(features::kAsyncDns)}, +@@ -6798,7 +6798,7 @@ const FeatureEntry kFeatureEntries[] = { + #endif // BUILDFLAG(IS_CHROMEOS) + + #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) + {"global-media-controls-modern-ui", + flag_descriptions::kGlobalMediaControlsModernUIName, + flag_descriptions::kGlobalMediaControlsModernUIDescription, +@@ -7658,7 +7658,7 @@ const FeatureEntry kFeatureEntries[] = { + #endif + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + {"quick-commands", flag_descriptions::kQuickCommandsName, + flag_descriptions::kQuickCommandsDescription, kOsDesktop, + FEATURE_VALUE_TYPE(features::kQuickCommands)}, +@@ -7957,7 +7957,7 @@ const FeatureEntry kFeatureEntries[] = { + + #if BUILDFLAG(IS_WIN) || \ + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ +- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + { + "ui-debug-tools", + flag_descriptions::kUIDebugToolsName, +@@ -8537,7 +8537,7 @@ const FeatureEntry kFeatureEntries[] = { + #endif + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + {"document-picture-in-picture-api", + flag_descriptions::kDocumentPictureInPictureApiName, + flag_descriptions::kDocumentPictureInPictureApiDescription, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_after__startup__task__utils.cc b/www/ungoogled-chromium/files/patch-chrome_browser_after__startup__task__utils.cc new file mode 100644 index 000000000000..d2e673d6bc89 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_after__startup__task__utils.cc @@ -0,0 +1,11 @@ +--- chrome/browser/after_startup_task_utils.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/after_startup_task_utils.cc +@@ -107,7 +107,7 @@ void SetBrowserStartupIsComplete() { + TRACE_EVENT0("startup", "SetBrowserStartupIsComplete"); + g_startup_complete_flag.Get().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/www/ungoogled-chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc b/www/ungoogled-chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc new file mode 100644 index 000000000000..fb06d11b9883 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc @@ -0,0 +1,20 @@ +--- chrome/browser/apps/platform_apps/platform_app_launch.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/apps/platform_apps/platform_app_launch.cc +@@ -20,7 +20,7 @@ + #include "extensions/common/extension.h" + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + #include "chrome/browser/ui/browser.h" + #include "chrome/browser/ui/browser_navigator.h" + #include "chrome/browser/ui/browser_window.h" +@@ -124,7 +124,7 @@ bool OpenExtensionApplicationTab(Profile* profile, con + } + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + bool OpenDeprecatedApplicationPrompt(Profile* profile, + const std::string& app_id) { + if (!extensions::IsExtensionUnsupportedDeprecatedApp(profile, app_id)) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h b/www/ungoogled-chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h new file mode 100644 index 000000000000..a5a1ff9f1b43 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h @@ -0,0 +1,11 @@ +--- chrome/browser/apps/platform_apps/platform_app_launch.h.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/apps/platform_apps/platform_app_launch.h +@@ -36,7 +36,7 @@ bool OpenExtensionApplicationWindow(Profile* profile, + // and false otherwise. + bool 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/www/ungoogled-chromium/files/patch-chrome_browser_autocomplete_chrome__autocomplete__scheme__classifier.cc b/www/ungoogled-chromium/files/patch-chrome_browser_autocomplete_chrome__autocomplete__scheme__classifier.cc new file mode 100644 index 000000000000..4106746cf7dd --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_autocomplete_chrome__autocomplete__scheme__classifier.cc @@ -0,0 +1,11 @@ +--- chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc +@@ -91,7 +91,7 @@ ChromeAutocompleteSchemeClassifier::GetInputTypeForSch + return metrics::OmniboxInputType::QUERY; + + case ExternalProtocolHandler::UNKNOWN: { +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // Linux impl of GetApplicationNameForProtocol doesn't distinguish + // between URL schemes with handers and those without. This will + // make the default behaviour be search on Linux. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_background_background__mode__manager.cc b/www/ungoogled-chromium/files/patch-chrome_browser_background_background__mode__manager.cc new file mode 100644 index 000000000000..cc3ebb55c455 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_background_background__mode__manager.cc @@ -0,0 +1,11 @@ +--- chrome/browser/background/background_mode_manager.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/background/background_mode_manager.cc +@@ -894,7 +894,7 @@ gfx::ImageSkia GetStatusTrayIcon() { + return gfx::ImageSkia(); + + 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/www/ungoogled-chromium/files/patch-chrome_browser_background_background__mode__optimizer.cc b/www/ungoogled-chromium/files/patch-chrome_browser_background_background__mode__optimizer.cc new file mode 100644 index 000000000000..f897e9da0058 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_background_background__mode__optimizer.cc @@ -0,0 +1,11 @@ +--- chrome/browser/background/background_mode_optimizer.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/background/background_mode_optimizer.cc +@@ -31,7 +31,7 @@ std::unique_ptr BackgroundMod + switches::kKeepAliveForTest)) + 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)) + return base::WrapUnique(new BackgroundModeOptimizer()); + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_browser__features.cc b/www/ungoogled-chromium/files/patch-chrome_browser_browser__features.cc new file mode 100644 index 000000000000..caf80fd6399d --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_browser__features.cc @@ -0,0 +1,11 @@ +--- chrome/browser/browser_features.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/browser_features.cc +@@ -29,7 +29,7 @@ const base::Feature kColorProviderRedirectionForThemeP + // the browser exits. + const 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 diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.cc new file mode 100644 index 000000000000..2c3766e7a223 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.cc @@ -0,0 +1,29 @@ +--- chrome/browser/browser_process_impl.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/browser_process_impl.cc +@@ -214,7 +214,7 @@ + #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h" + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "chrome/browser/error_reporting/chrome_js_error_report_processor.h" // nogncheck + #endif + +@@ -1172,7 +1172,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { + + ApplyMetricsReportingPolicy(); + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + ChromeJsErrorReportProcessor::Create(); + #endif + +@@ -1411,7 +1411,7 @@ void BrowserProcessImpl::Unpin() { + // Mac is currently not supported. + // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is + // complete. +-#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) ++#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) + + bool BrowserProcessImpl::IsRunningInBackground() const { + // Check if browser is in the background. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.h b/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.h new file mode 100644 index 000000000000..4fcc540153fd --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.h @@ -0,0 +1,11 @@ +--- chrome/browser/browser_process_impl.h.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/browser_process_impl.h +@@ -359,7 +359,7 @@ class BrowserProcessImpl : public BrowserProcess, + + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) ++#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) + base::RepeatingTimer autoupdate_timer_; + + // Gets called by autoupdate timer to see if browser needs restart and can be diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_browser__resources.grd b/www/ungoogled-chromium/files/patch-chrome_browser_browser__resources.grd new file mode 100644 index 000000000000..1e28174c5d3b --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_browser__resources.grd @@ -0,0 +1,11 @@ +--- chrome/browser/browser_resources.grd.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/browser_resources.grd +@@ -120,7 +120,7 @@ + + + +- ++ + + + diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc new file mode 100644 index 000000000000..930b98783547 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc @@ -0,0 +1,71 @@ +--- chrome/browser/chrome_browser_interface_binders.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/chrome_browser_interface_binders.cc +@@ -113,13 +113,13 @@ + #endif // BUILDFLAG(FULL_SAFE_BROWSING) + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || 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" + #endif + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + #include "chrome/browser/ui/webui/app_settings/web_app_settings_ui.h" + #include "ui/webui/resources/cr_components/app_management/app_management.mojom.h" + #endif +@@ -188,7 +188,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/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" +@@ -780,7 +780,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 (!render_frame_host->GetParent()) { + map->Add( + base::BindRepeating(&DraggableRegionsHostImpl::CreateIfAllowed)); +@@ -788,7 +788,7 @@ void PopulateChromeFrameBinders( + #endif + + #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + if (base::FeatureList::IsEnabled(blink::features::kDesktopPWAsSubApps) && + render_frame_host->IsInPrimaryMainFrame()) { + map->Add( +@@ -843,14 +843,14 @@ void PopulateChromeWebUIFrameBinders( + SegmentationInternalsUI>(map); + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + RegisterWebUIControllerInterfaceBinder< + connectors_internals::mojom::PageHandler, + enterprise_connectors::ConnectorsInternalsUI>(map); + #endif + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + RegisterWebUIControllerInterfaceBinder< + app_management::mojom::PageHandlerFactory, WebAppSettingsUI>(map); + #endif +@@ -1235,7 +1235,7 @@ void PopulateChromeWebUIFrameBinders( + #endif // BUILDFLAG(IS_CHROMEOS_ASH) + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + RegisterWebUIControllerInterfaceBinder(map); + diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main.cc b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main.cc new file mode 100644 index 000000000000..e889acf24a7e --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main.cc @@ -0,0 +1,52 @@ +--- chrome/browser/chrome_browser_main.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/chrome_browser_main.cc +@@ -239,11 +239,11 @@ + + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + #include "chrome/browser/first_run/upgrade_util_linux.h" + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "components/crash/core/app/breakpad_linux.h" + #include "components/crash/core/app/crashpad.h" + #endif +@@ -279,7 +279,7 @@ + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + #include "chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h" + #include "chrome/browser/metrics/desktop_session_duration/touch_mode_stats_tracker.h" + #include "chrome/browser/profiles/profile_activity_metrics_recorder.h" +@@ -1025,7 +1025,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { + browser_creator_->AddFirstRunTabs(master_prefs_->new_tabs); + } + +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || 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 . +@@ -1038,7 +1038,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { + } + #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + // Set the product channel for crash reports. + if (!crash_reporter::IsCrashpadEnabled()) { + breakpad::SetChannelCrashKey( +@@ -1060,7 +1060,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + metrics::DesktopSessionDurationTracker::Initialize(); + ProfileActivityMetricsRecorder::Initialize(); + TouchModeStatsTracker::Initialize( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__extra__parts__linux.cc b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__extra__parts__linux.cc new file mode 100644 index 000000000000..dfbe5f0d4fcc --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__extra__parts__linux.cc @@ -0,0 +1,11 @@ +--- chrome/browser/chrome_browser_main_extra_parts_linux.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/chrome_browser_main_extra_parts_linux.cc +@@ -120,7 +120,7 @@ ChromeBrowserMainExtraPartsLinux::ChromeBrowserMainExt + ChromeBrowserMainExtraPartsLinux::~ChromeBrowserMainExtraPartsLinux() = default; + + void ChromeBrowserMainExtraPartsLinux::PreEarlyInitialization() { +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // On the desktop, we fix the platform name if necessary. + // See https://crbug.com/1246928. + auto* const command_line = base::CommandLine::ForCurrentProcess(); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__linux.cc b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__linux.cc new file mode 100644 index 000000000000..eb438de0f8ad --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__linux.cc @@ -0,0 +1,28 @@ +--- chrome/browser/chrome_browser_main_linux.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/chrome_browser_main_linux.cc +@@ -57,13 +57,15 @@ ChromeBrowserMainPartsLinux::~ChromeBrowserMainPartsLi + } + + void ChromeBrowserMainPartsLinux::PostCreateMainMessageLoop() { +-#if BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // No-op: Ash and Lacros Bluetooth DBusManager initialization depend on + // FeatureList, and is done elsewhere. + #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 +@@ -123,7 +125,7 @@ void ChromeBrowserMainPartsLinux::PostBrowserStart() { + #endif // defined(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/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__posix.cc b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__posix.cc new file mode 100644 index 000000000000..b87cdc7e6940 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__posix.cc @@ -0,0 +1,11 @@ +--- chrome/browser/chrome_browser_main_posix.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/chrome_browser_main_posix.cc +@@ -72,7 +72,7 @@ void ExitHandler::ExitWhenPossibleOnUIThread(int signa + } else { + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + switch (signal) { + case SIGINT: + case SIGHUP: diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.cc b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.cc new file mode 100644 index 000000000000..60861c9a1d64 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.cc @@ -0,0 +1,150 @@ +--- chrome/browser/chrome_content_browser_client.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/chrome_content_browser_client.cc +@@ -385,7 +385,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) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + #include "chrome/browser/chrome_browser_main_linux.h" + #elif BUILDFLAG(IS_ANDROID) + #include "base/android/application_status_listener.h" +@@ -466,17 +466,17 @@ + + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + #include "chrome/browser/browser_switcher/browser_switcher_navigation_throttle.h" + #endif + +-#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 + +-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) + #if !BUILDFLAG(IS_ANDROID) + #include "base/debug/leak_annotations.h" + #include "components/crash/core/app/breakpad_linux.h" +@@ -484,12 +484,12 @@ + #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/ui/webui/app_settings/web_app_settings_navigation_throttle.h" + #endif + + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + #include "chrome/browser/enterprise/connectors/device_trust/navigation_throttle.h" + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || + // BUILDFLAG(IS_CHROMEOS_ASH) +@@ -513,11 +513,11 @@ + + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h" + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "chrome/browser/chrome_browser_main_extra_parts_linux.h" + #elif defined(USE_OZONE) + #include "chrome/browser/chrome_browser_main_extra_parts_ozone.h" +@@ -930,7 +930,7 @@ blink::mojom::AutoplayPolicy GetAutoplayPolicyForWebCo + int GetCrashSignalFD(const base::CommandLine& command_line) { + return crashpad::CrashHandlerHost::Get()->GetDeathSignalSocket(); + } +-#elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) ++#elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) + breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost( + const std::string& process_type) { + base::FilePath dumps_path; +@@ -1450,7 +1450,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo + #elif BUILDFLAG(IS_CHROMEOS_LACROS) + main_parts = std::make_unique( + is_integration_test, &startup_data_); +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + main_parts = std::make_unique( + is_integration_test, &startup_data_); + #elif BUILDFLAG(IS_ANDROID) +@@ -1489,7 +1489,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo + std::make_unique()); + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + main_parts->AddParts( + std::make_unique()); + #else +@@ -1510,7 +1510,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo + main_parts->AddParts(std::make_unique()); + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + main_parts->AddParts(std::make_unique()); + #elif defined(USE_OZONE) + main_parts->AddParts(std::make_unique()); +@@ -2279,6 +2279,8 @@ void ChromeContentBrowserClient::AppendExtraCommandLin + #elif BUILDFLAG(IS_POSIX) + #if BUILDFLAG(IS_ANDROID) + bool enable_crash_reporter = true; ++#elif BUILDFLAG(IS_BSD) ++ bool enable_crash_reporter = false; + #else + bool enable_crash_reporter = false; + if (crash_reporter::IsCrashpadEnabled()) { +@@ -2628,7 +2630,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin + ThreadProfilerConfiguration::Get()->AppendCommandLineSwitchForChildProcess( + command_line); + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || 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)) { +@@ -4071,7 +4073,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst + } + } + +-#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, +@@ -4510,14 +4512,14 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati + &throttles); + } + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + MaybeAddThrottle( + WebAppSettingsNavigationThrottle::MaybeCreateThrottleFor(handle), + &throttles); + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) + + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + MaybeAddThrottle(enterprise_connectors::DeviceTrustNavigationThrottle:: + MaybeCreateThrottleFor(handle), + &throttles); +@@ -4542,7 +4544,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati + + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + MaybeAddThrottle(browser_switcher::BrowserSwitcherNavigationThrottle:: + MaybeCreateThrottleFor(handle), diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.h b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.h new file mode 100644 index 000000000000..5bec0477496d --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.h @@ -0,0 +1,11 @@ +--- chrome/browser/chrome_content_browser_client.h.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/chrome_content_browser_client.h +@@ -436,7 +436,7 @@ class ChromeContentBrowserClient : public content::Con + void OverridePageVisibilityState( + content::RenderFrameHost* render_frame_host, + content::PageVisibilityState* visibility_state) 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/www/ungoogled-chromium/files/patch-chrome_browser_crash__upload__list_crash__upload__list.cc b/www/ungoogled-chromium/files/patch-chrome_browser_crash__upload__list_crash__upload__list.cc new file mode 100644 index 000000000000..85f05d0bf3f6 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_crash__upload__list_crash__upload__list.cc @@ -0,0 +1,11 @@ +--- chrome/browser/crash_upload_list/crash_upload_list.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/crash_upload_list/crash_upload_list.cc +@@ -50,7 +50,7 @@ scoped_refptr CreateCrashUploadList() { + // which isn't compatible with CrashUploadListCrashpad. crash_sender continues + // to log uploads in CrashUploadList::kReporterLogFilename. + // Linux is handled below. +-#if !(BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)) ++#if !(BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) + if (crash_reporter::IsCrashpadEnabled()) { + return new CrashUploadListCrashpad(); + } diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_custom__handlers_chrome__protocol__handler__registry__delegate.cc b/www/ungoogled-chromium/files/patch-chrome_browser_custom__handlers_chrome__protocol__handler__registry__delegate.cc new file mode 100644 index 000000000000..52ffde0ae7a3 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_custom__handlers_chrome__protocol__handler__registry__delegate.cc @@ -0,0 +1,11 @@ +--- chrome/browser/custom_handlers/chrome_protocol_handler_registry_delegate.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/custom_handlers/chrome_protocol_handler_registry_delegate.cc +@@ -69,7 +69,7 @@ void ChromeProtocolHandlerRegistryDelegate::CheckDefau + // 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/www/ungoogled-chromium/files/patch-chrome_browser_defaults.cc b/www/ungoogled-chromium/files/patch-chrome_browser_defaults.cc new file mode 100644 index 000000000000..825ae5b3d85e --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_defaults.cc @@ -0,0 +1,11 @@ +--- chrome/browser/defaults.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/defaults.cc +@@ -52,7 +52,7 @@ const bool kSyncAutoStarts = true; + const bool kSyncAutoStarts = 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/www/ungoogled-chromium/files/patch-chrome_browser_dev__ui__browser__resources.grd b/www/ungoogled-chromium/files/patch-chrome_browser_dev__ui__browser__resources.grd new file mode 100644 index 000000000000..d192fc515736 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_dev__ui__browser__resources.grd @@ -0,0 +1,11 @@ +--- chrome/browser/dev_ui_browser_resources.grd.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/dev_ui_browser_resources.grd +@@ -36,7 +36,7 @@ This file specifies browser resources for developer-fa + + + +- ++ + + + diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_device__identity_device__oauth2__token__service__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_device__identity_device__oauth2__token__service__factory.cc new file mode 100644 index 000000000000..d3f720a71a8a --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_device__identity_device__oauth2__token__service__factory.cc @@ -0,0 +1,11 @@ +--- chrome/browser/device_identity/device_oauth2_token_service_factory.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/device_identity/device_oauth2_token_service_factory.cc +@@ -28,7 +28,7 @@ std::unique_ptr CreatePlatform + return std::make_unique( + local_state); + #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || \ +- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) ++ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) + return std::make_unique(local_state); + #else + NOTREACHED(); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_devtools_devtools__eye__dropper.cc b/www/ungoogled-chromium/files/patch-chrome_browser_devtools_devtools__eye__dropper.cc new file mode 100644 index 000000000000..33717c627cc4 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_devtools_devtools__eye__dropper.cc @@ -0,0 +1,11 @@ +--- chrome/browser/devtools/devtools_eye_dropper.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/devtools/devtools_eye_dropper.cc +@@ -186,7 +186,7 @@ void DevToolsEyeDropper::UpdateCursor() { + // magnified projection only with centered hotspot. + // Mac Retina requires cursor to be > 120px in order to render smoothly. + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + const float kCursorSize = 63; + const float kDiameter = 63; + const float kHotspotOffset = 32; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_diagnostics_diagnostics__writer.h b/www/ungoogled-chromium/files/patch-chrome_browser_diagnostics_diagnostics__writer.h new file mode 100644 index 000000000000..b9af6f6e6c13 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_diagnostics_diagnostics__writer.h @@ -0,0 +1,11 @@ +--- chrome/browser/diagnostics/diagnostics_writer.h.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/diagnostics/diagnostics_writer.h +@@ -14,6 +14,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/www/ungoogled-chromium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc b/www/ungoogled-chromium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc new file mode 100644 index 000000000000..c32595f5375c --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc @@ -0,0 +1,29 @@ +--- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/download/chrome_download_manager_delegate.cc +@@ -1532,7 +1532,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe + bool ChromeDownloadManagerDelegate::IsOpenInBrowserPreferreredForFile( + 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(); + } +@@ -1598,7 +1598,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadAllow + 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()) { +@@ -1640,7 +1640,7 @@ std::unique_ptr + ChromeDownloadManagerDelegate::GetRenameHandlerForDownload( + download::DownloadItem* download_item) { + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + return enterprise_connectors::FileSystemRenameHandler::CreateIfNeeded( + download_item); + #else diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__commands.cc b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__commands.cc new file mode 100644 index 000000000000..9bccd3090e55 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__commands.cc @@ -0,0 +1,20 @@ +--- chrome/browser/download/download_commands.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/download/download_commands.cc +@@ -26,7 +26,7 @@ + #include "ui/base/clipboard/scoped_clipboard_writer.h" + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ +- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || 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" +@@ -167,7 +167,7 @@ void DownloadCommands::ExecuteCommand(Command command) + } + + #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) + + Browser* DownloadCommands::GetBrowser() const { + if (!model_) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__commands.h b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__commands.h new file mode 100644 index 000000000000..7f8092c2b4c6 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__commands.h @@ -0,0 +1,11 @@ +--- chrome/browser/download/download_commands.h.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/download/download_commands.h +@@ -55,7 +55,7 @@ class DownloadCommands { + void ExecuteCommand(Command command); + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ +- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + bool IsDownloadPdf() const; + bool CanOpenPdfInSystemViewer() const; + Browser* GetBrowser() const; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__file__picker.cc b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__file__picker.cc new file mode 100644 index 000000000000..3860381df525 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__file__picker.cc @@ -0,0 +1,20 @@ +--- chrome/browser/download/download_file_picker.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/download/download_file_picker.cc +@@ -16,7 +16,7 @@ + #include "content/public/browser/download_manager.h" + #include "content/public/browser/web_contents.h" + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || 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" +@@ -84,7 +84,7 @@ DownloadFilePicker::DownloadFilePicker(download::Downl + // 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_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + if (!owning_window || !owning_window->GetHost()) { + owning_window = BrowserList::GetInstance() + ->GetLastActive() diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__item__model.cc b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__item__model.cc new file mode 100644 index 000000000000..e5bb67a88071 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__item__model.cc @@ -0,0 +1,29 @@ +--- chrome/browser/download/download_item_model.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/download/download_item_model.cc +@@ -728,7 +728,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(); +@@ -770,7 +770,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand + 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); +@@ -1086,7 +1086,7 @@ void DownloadItemModel::DetermineAndSetShouldPreferOpe + 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/www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.cc b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.cc new file mode 100644 index 000000000000..0ed491509a14 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.cc @@ -0,0 +1,90 @@ +--- chrome/browser/download/download_prefs.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/download/download_prefs.cc +@@ -13,6 +13,7 @@ + #include "base/callback_helpers.h" + #include "base/check.h" + #include "base/cxx17_backports.h" ++#include "base/command_line.h" + #include "base/feature_list.h" + #include "base/files/file_util.h" + #include "base/no_destructor.h" +@@ -61,6 +62,10 @@ + #include "chrome/browser/ui/pdf/adobe_reader_info_win.h" + #endif + ++#if BUILDFLAG(IS_OPENBSD) ++#include "sandbox/policy/openbsd/sandbox_openbsd.h" ++#endif ++ + using content::BrowserContext; + using content::BrowserThread; + using content::DownloadManager; +@@ -71,7 +76,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; +@@ -182,7 +187,7 @@ DownloadPrefs::DownloadPrefs(Profile* profile) : profi + #endif // BUILDFLAG(IS_CHROMEOS_ASH) + + #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 +@@ -295,7 +300,7 @@ void DownloadPrefs::RegisterProfilePrefs( + registry->RegisterTimePref(prefs::kDownloadLastCompleteTime, + /*default_value=*/base::Time()); + #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) +@@ -472,7 +477,7 @@ void DownloadPrefs::DisableAutoOpenByUserBasedOnExtens + } + + #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; +@@ -504,7 +509,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons + + 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(); +@@ -535,7 +540,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; +@@ -659,7 +664,14 @@ base::FilePath DownloadPrefs::SanitizeDownloadTargetPa + #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/www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.h b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.h new file mode 100644 index 000000000000..befaa4cff36e --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.h @@ -0,0 +1,20 @@ +--- chrome/browser/download/download_prefs.h.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/download/download_prefs.h +@@ -125,7 +125,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); +@@ -185,7 +185,7 @@ class DownloadPrefs { + std::unique_ptr 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/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_analysis_analysis__service__settings.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_analysis_analysis__service__settings.cc new file mode 100644 index 000000000000..6153630bc620 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_analysis_analysis__service__settings.cc @@ -0,0 +1,16 @@ +--- chrome/browser/enterprise/connectors/analysis/analysis_service_settings.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/enterprise/connectors/analysis/analysis_service_settings.cc +@@ -142,11 +142,11 @@ AnalysisServiceSettings::AnalysisServiceSettings( + 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 + +-#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::Dict& dict = settings_value.GetDict(); + const base::Value::List* signatures = + dict.FindListByDottedPath(verification_key); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc new file mode 100644 index 000000000000..5bf7b470704e --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc @@ -0,0 +1,43 @@ +--- chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.cc +@@ -11,11 +11,11 @@ + #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" + #if BUILDFLAG(IS_MAC) + #include "chrome/browser/enterprise/connectors/device_trust/browser/mac_device_trust_connector_service.h" +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #include "chrome/browser/enterprise/connectors/device_trust/browser/browser_device_trust_connector_service.h" + #endif // BUILDFLAG(IS_MAC) + #include "chrome/browser/policy/chrome_browser_policy_connector.h" +@@ -40,7 +40,7 @@ DeviceTrustConnectorService* DeviceTrustConnectorServi + + 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 IsDeviceTrustConnectorFeatureEnabled(); + #else + return false; +@@ -59,7 +59,7 @@ KeyedService* DeviceTrustConnectorServiceFactory::Buil + + DeviceTrustConnectorService* service = nullptr; + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + if (IsDeviceTrustConnectorFeatureEnabled()) { + auto* key_manager = g_browser_process->browser_policy_connector() + ->chrome_browser_cloud_management_controller() +@@ -67,7 +67,7 @@ KeyedService* DeviceTrustConnectorServiceFactory::Buil + #if BUILDFLAG(IS_MAC) + service = new MacDeviceTrustConnectorService( + key_manager, profile->GetPrefs(), g_browser_process->local_state()); +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + service = new BrowserDeviceTrustConnectorService(key_manager, + profile->GetPrefs()); + #endif // BUILDFLAG(IS_MAC) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc new file mode 100644 index 000000000000..227580763735 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc @@ -0,0 +1,11 @@ +--- chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.cc.orig 2022-10-01 07:40:07 UTC ++++ 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/desktop/desktop_attestation_service.h" + #include "chrome/browser/policy/chrome_browser_policy_connector.h" diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_browser_commands_key__rotation__command__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_browser_commands_key__rotation__command__factory.cc new file mode 100644 index 000000000000..70002d22fdec --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_browser_commands_key__rotation__command__factory.cc @@ -0,0 +1,20 @@ +--- chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/key_rotation_command_factory.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/key_rotation_command_factory.cc +@@ -13,7 +13,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" +@@ -45,7 +45,7 @@ std::unique_ptr KeyRotationCommand + scoped_refptr url_loader_factory) { + #if BUILDFLAG(IS_WIN) + return std::make_unique(); +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return std::make_unique(url_loader_factory); + #elif BUILDFLAG(IS_MAC) + return std::make_unique(url_loader_factory); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_core_persistence_key__persistence__delegate__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_core_persistence_key__persistence__delegate__factory.cc new file mode 100644 index 000000000000..bc783e35a7ef --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_core_persistence_key__persistence__delegate__factory.cc @@ -0,0 +1,20 @@ +--- chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence/key_persistence_delegate_factory.cc.orig 2022-10-01 07:40:07 UTC ++++ 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 + +@@ -44,7 +44,7 @@ KeyPersistenceDelegateFactory::CreateKeyPersistenceDel + return std::make_unique(); + #elif BUILDFLAG(IS_MAC) + return std::make_unique(); +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return std::make_unique(); + #else + NOTREACHED(); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc new file mode 100644 index 000000000000..2c6ecef19882 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc @@ -0,0 +1,20 @@ +--- chrome/browser/enterprise/connectors/device_trust/signals/signals_service_factory.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/enterprise/connectors/device_trust/signals/signals_service_factory.cc +@@ -15,7 +15,7 @@ + #include "chrome/browser/profiles/profile.h" + #include "components/policy/core/common/management/management_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 "base/check.h" + #include "chrome/browser/enterprise/connectors/device_trust/signals/decorators/browser/browser_signals_decorator.h" + #include "chrome/browser/policy/chrome_browser_policy_connector.h" +@@ -52,7 +52,7 @@ std::unique_ptr CreateSignalsService( + decorators.push_back( + std::make_unique(policy_blocklist_service)); + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + policy::CloudPolicyStore* store = nullptr; + + // Managed device. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc new file mode 100644 index 000000000000..665a3e698474 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc @@ -0,0 +1,19 @@ +--- chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.cc +@@ -18,14 +18,14 @@ + #include "chrome/common/chrome_paths.h" + #include "components/version_info/version_info.h" + +-#if !BUILDFLAG(IS_FUCHSIA) ++#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_BSD) + #include "components/crash/core/app/crashpad.h" + #include "third_party/crashpad/crashpad/client/crash_report_database.h" + #endif // !BUILDFLAG(IS_FUCHSIA) + + namespace enterprise_connectors { + +-#if !BUILDFLAG(IS_FUCHSIA) ++#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_BSD) + namespace { + // key names used when building the dictionary to pass to the real-time + // reporting API diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.h b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.h new file mode 100644 index 000000000000..57ef8a068a42 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.h @@ -0,0 +1,20 @@ +--- chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.h.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.h +@@ -22,7 +22,7 @@ class BrowserCrashEventRouter + BrowserCrashEventRouter& operator=(const BrowserCrashEventRouter&) = delete; + ~BrowserCrashEventRouter() override; + +-#if !BUILDFLAG(IS_FUCHSIA) ++#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_BSD) + void OnCloudReportingLaunched( + enterprise_reporting::ReportScheduler* report_scheduler) override; + #endif // !BUILDFLAG(IS_FUCHSIA) +@@ -32,7 +32,7 @@ class BrowserCrashEventRouter + nullptr; + raw_ptr controller_ = nullptr; + +-#if !BUILDFLAG(IS_FUCHSIA) ++#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_BSD) + // ReportCrashes() checks the enterprise policy settings, retrieves crash + // reports from the crashpad local database and sends reports that have not + // been sent to the reporting server. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_remote__commands_cbcm__remote__commands__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_remote__commands_cbcm__remote__commands__factory.cc new file mode 100644 index 000000000000..befa961669e7 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_remote__commands_cbcm__remote__commands__factory.cc @@ -0,0 +1,20 @@ +--- chrome/browser/enterprise/remote_commands/cbcm_remote_commands_factory.cc.orig 2022-10-01 07:40:07 UTC ++++ 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/connectors/device_trust/device_trust_features.h" + #include "chrome/browser/enterprise/remote_commands/rotate_attestation_credential_job.h" + #include "chrome/browser/policy/chrome_browser_policy_connector.h" +@@ -31,7 +31,7 @@ CBCMRemoteCommandsFactory::BuildJobForType( + 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 (enterprise_connectors::IsDeviceTrustConnectorFeatureEnabled() && + type == enterprise_management:: + RemoteCommand_Type_BROWSER_ROTATE_ATTESTATION_CREDENTIAL) { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_signals_device__info__fetcher.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_signals_device__info__fetcher.cc new file mode 100644 index 000000000000..5c44c95d0aa1 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_signals_device__info__fetcher.cc @@ -0,0 +1,20 @@ +--- chrome/browser/enterprise/signals/device_info_fetcher.cc.orig 2022-10-01 07:40:07 UTC ++++ 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 + +@@ -70,7 +70,7 @@ std::unique_ptr DeviceInfoFetcher:: + return std::make_unique(); + #elif BUILDFLAG(IS_WIN) + return std::make_unique(); +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + return std::make_unique(); + #else + return std::make_unique(); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_signals_device__info__fetcher__linux.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_signals_device__info__fetcher__linux.cc new file mode 100644 index 000000000000..4c9ab2df1689 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_signals_device__info__fetcher__linux.cc @@ -0,0 +1,78 @@ +--- chrome/browser/enterprise/signals/device_info_fetcher_linux.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/enterprise/signals/device_info_fetcher_linux.cc +@@ -4,12 +4,23 @@ + + #include "chrome/browser/enterprise/signals/device_info_fetcher_linux.h" + ++#include "build/build_config.h" ++ + #if defined(USE_GIO) + #include + #endif // defined(USE_GIO) + #include ++#if !defined(OS_BSD) + #include ++#endif + ++#if defined(OS_BSD) ++#include ++#include ++#include ++#include ++#endif ++ + #include + + #include "base/environment.h" +@@ -118,6 +129,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 !defined(OS_BSD) + struct stat info; + // First figure out the device identifier. Fail fast if this fails. + if (stat("/", &info) != 0) +@@ -139,11 +151,35 @@ SettingValue GetDiskEncrypted() { + } + return SettingValue::UNKNOWN; + } ++#endif + return SettingValue::DISABLED; + } + + std::vector GetMacAddresses() { + std::vector result; ++#if defined(OS_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(interface->ifa_addr); ++ if (!sdl || sdl->sdl_alen != 6) ++ continue; ++ char* link_address = static_cast(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; +@@ -166,6 +202,7 @@ std::vector GetMacAddresses() { + &address); + result.push_back(address); + } ++#endif + return result; + } + diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_BUILD.gn b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_BUILD.gn new file mode 100644 index 000000000000..7006f184460a --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_BUILD.gn @@ -0,0 +1,13 @@ +--- chrome/browser/extensions/BUILD.gn.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/extensions/BUILD.gn +@@ -1326,6 +1326,10 @@ static_library("extensions") { + deps += [ "//chrome/services/printing/public/mojom" ] + } + ++ if (is_bsd) { ++ sources -= [ "api/image_writer_private/removable_storage_provider_linux.cc" ] ++ } ++ + if (enable_service_discovery) { + sources += [ + "api/mdns/mdns_api.cc", diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc new file mode 100644 index 000000000000..a1298a5a5312 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc @@ -0,0 +1,29 @@ +--- chrome/browser/extensions/api/enterprise_reporting_private/chrome_desktop_report_request_helper.cc.orig 2022-10-01 07:40:07 UTC ++++ 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 +@@ -256,7 +256,7 @@ base::FilePath GetEndpointVerificationDir() { + 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 env(base::Environment::Create()); + path = base::nix::GetXDGDirectory(env.get(), base::nix::kXdgConfigHomeEnvVar, + base::nix::kDotConfigDir); +@@ -267,7 +267,7 @@ base::FilePath GetEndpointVerificationDir() { + 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/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc new file mode 100644 index 000000000000..3b4faf05fd29 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc @@ -0,0 +1,11 @@ +--- chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.cc +@@ -6,7 +6,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 + #include diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h new file mode 100644 index 000000000000..6d34ee964ec0 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h @@ -0,0 +1,11 @@ +--- chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.h.orig 2022-10-01 07:40:07 UTC ++++ 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 + diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc new file mode 100644 index 000000000000..caf7ab125f07 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc @@ -0,0 +1,38 @@ +--- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc +@@ -31,7 +31,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 "base/strings/string_util.h" + #include "chrome/browser/enterprise/signals/signals_aggregator_factory.h" + #include "chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.h" +@@ -111,7 +111,7 @@ api::enterprise_reporting_private::ContextInfo ToConte + return info; + } + +-#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( + const std::string& user_id, +@@ -171,7 +171,7 @@ EnterpriseReportingPrivateGetDeviceIdFunction:: + + // getPersistentSecret + +-#if !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + + EnterpriseReportingPrivateGetPersistentSecretFunction:: + EnterpriseReportingPrivateGetPersistentSecretFunction() = default; +@@ -611,7 +611,7 @@ void EnterpriseReportingPrivateEnqueueRecordFunction:: + } + #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/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h new file mode 100644 index 000000000000..953ec81d8c7b --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h @@ -0,0 +1,29 @@ +--- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h +@@ -19,7 +19,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 "components/device_signals/core/browser/signals_types.h" + #endif // BUILDFLAG(IS_CHROMEOS) + +@@ -54,7 +54,7 @@ class EnterpriseReportingPrivateGetDeviceIdFunction : + ~EnterpriseReportingPrivateGetDeviceIdFunction() override; + }; + +-#if !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + + class EnterpriseReportingPrivateGetPersistentSecretFunction + : public ExtensionFunction { +@@ -264,7 +264,7 @@ class EnterpriseReportingPrivateEnqueueRecordFunction + + #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/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc new file mode 100644 index 000000000000..1f5d41a35c0b --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc @@ -0,0 +1,20 @@ +--- chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc +@@ -21,6 +21,7 @@ static base::LazyInstancePostTask( + FROM_HERE, +@@ -34,6 +35,9 @@ void RemovableStorageProvider::GetAllDevices(DeviceLis + base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}, + base::BindOnce(&RemovableStorageProvider::PopulateDeviceList), + std::move(callback)); ++#else ++ NOTIMPLEMENTED(); ++#endif + } + + // static diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_messaging_native__process__launcher__posix.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_messaging_native__process__launcher__posix.cc new file mode 100644 index 000000000000..e10be280890f --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_messaging_native__process__launcher__posix.cc @@ -0,0 +1,11 @@ +--- chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc +@@ -82,7 +82,7 @@ bool NativeProcessLauncher::LaunchNativeProcess( + + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || 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/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc new file mode 100644 index 000000000000..985b9f06df86 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc @@ -0,0 +1,20 @@ +--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/extensions/api/settings_private/prefs_util.cc +@@ -186,7 +186,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist + + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + (*s_allowlist)[::prefs::kUseCustomChromeFrame] = + settings_api::PrefType::PREF_TYPE_BOOLEAN; + #endif +@@ -200,7 +200,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist + settings_api::PrefType::PREF_TYPE_NUMBER; + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + (*s_allowlist)[::prefs::kUsesSystemTheme] = + settings_api::PrefType::PREF_TYPE_BOOLEAN; + #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc new file mode 100644 index 000000000000..562190140f2e --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc @@ -0,0 +1,29 @@ +--- chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc +@@ -29,7 +29,7 @@ + #include "extensions/browser/process_manager.h" + #include "extensions/common/error_utils.h" + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "extensions/common/permissions/permissions_data.h" + #endif + +@@ -38,7 +38,7 @@ namespace { + bool CanEnableAudioDebugRecordingsFromExtension( + const extensions::Extension* extension) { + bool enabled_by_permissions = false; +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + if (extension) { + enabled_by_permissions = + extension->permissions_data()->active_permissions().HasAPIPermission( +@@ -580,7 +580,7 @@ void WebrtcLoggingPrivateStartEventLoggingFunction::Fi + + ExtensionFunction::ResponseAction + WebrtcLoggingPrivateGetLogsDirectoryFunction::Run() { +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || 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/www/ungoogled-chromium/files/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc new file mode 100644 index 000000000000..9c6917813337 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc @@ -0,0 +1,20 @@ +--- chrome/browser/extensions/browser_context_keyed_service_factories.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/extensions/browser_context_keyed_service_factories.cc +@@ -53,7 +53,7 @@ + #include "extensions/browser/api/networking_private/networking_private_delegate_factory.h" + #include "ppapi/buildflags/buildflags.h" + +-#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/extensions/api/system_indicator/system_indicator_manager_factory.h" + #endif + +@@ -121,7 +121,7 @@ void EnsureBrowserContextKeyedServiceFactoriesBuilt() + extensions::SettingsPrivateEventRouterFactory::GetInstance(); + extensions::SettingsOverridesAPI::GetFactoryInstance(); + extensions::SidePanelService::GetFactoryInstance(); +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + extensions::SystemIndicatorManagerFactory::GetInstance(); + #endif + extensions::TabGroupsEventRouterFactory::GetInstance(); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc new file mode 100644 index 000000000000..d8994e293c79 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc @@ -0,0 +1,20 @@ +--- chrome/browser/extensions/external_provider_impl.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/extensions/external_provider_impl.cc +@@ -818,7 +818,7 @@ void ExternalProviderImpl::CreateExternalProviders( + if (!profile->GetPrefs()->GetBoolean(pref_names::kBlockExternalExtensions)) { + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + provider_list->push_back(std::make_unique( + service, + base::MakeRefCounted( +@@ -846,7 +846,7 @@ void ExternalProviderImpl::CreateExternalProviders( + 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( + service, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc b/www/ungoogled-chromium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc new file mode 100644 index 000000000000..a59faf01c0f6 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc @@ -0,0 +1,11 @@ +--- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc +@@ -252,7 +252,7 @@ const struct { + {base::DIR_HOME, FILE_PATH_LITERAL("Library/Mobile Documents"), + kDontBlockChildren}, + #endif +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // On Linux also block access to devices via /dev, as well as security + // sensitive data in /sys and /proc. + {kNoBasePathKey, FILE_PATH_LITERAL("/dev"), kBlockAllChildren}, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_first__run_first__run__dialog.h b/www/ungoogled-chromium/files/patch-chrome_browser_first__run_first__run__dialog.h new file mode 100644 index 000000000000..33184acb2312 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_first__run_first__run__dialog.h @@ -0,0 +1,11 @@ +--- chrome/browser/first_run/first_run_dialog.h.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/first_run/first_run_dialog.h +@@ -12,7 +12,7 @@ + // Hide this function on platforms where the dialog does not exist. + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) ++#if BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) + + class Profile; + diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_first__run_first__run__internal.h b/www/ungoogled-chromium/files/patch-chrome_browser_first__run_first__run__internal.h new file mode 100644 index 000000000000..4487d16175c3 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_first__run_first__run__internal.h @@ -0,0 +1,11 @@ +--- chrome/browser/first_run/first_run_internal.h.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/first_run/first_run_internal.h +@@ -56,7 +56,7 @@ FirstRunState DetermineFirstRunState(bool has_sentinel + 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/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.cc b/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.cc new file mode 100644 index 000000000000..1cf88fc6ccda --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.cc @@ -0,0 +1,65 @@ +--- chrome/browser/flag_descriptions.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/flag_descriptions.cc +@@ -6230,7 +6230,7 @@ const char kSideSearchDSESupportDescription[] = + // Random platform combinations ----------------------------------------------- + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + const char kQuickCommandsName[] = "Quick Commands"; + const char kQuickCommandsDescription[] = + "Enable a text interface to browser features. Invoke with Ctrl-Space."; +@@ -6239,7 +6239,7 @@ const char kQuickCommandsDescription[] = + // BUILDFLAG(IS_FUCHSIA) + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + const char kFollowingFeedSidepanelName[] = "Following feed in the sidepanel"; + const char kFollowingFeedSidepanelDescription[] = + "Enables the following feed in the sidepanel."; +@@ -6253,7 +6253,7 @@ const char kWebShareDescription[] = + "platforms."; + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) + +-#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) ++#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) + const char kOzonePlatformHintChoiceDefault[] = "Default"; + const char kOzonePlatformHintChoiceAuto[] = "Auto"; + const char kOzonePlatformHintChoiceX11[] = "X11"; +@@ -6273,7 +6273,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti + "Bluetooth"; + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + const char kCleanUndecryptablePasswordsLinuxName[] = + "Cleanup local undecryptable passwords during initial sync flow"; + const char kCleanUndecryptablePasswordsLinuxDescription[] = +@@ -6286,7 +6286,7 @@ const char kForcePasswordInitialSyncWhenDecryptionFail + "storage and requests initial sync."; + #endif // BUILDFLAG(IS_LINUX) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + const char kSkipUndecryptablePasswordsName[] = + "Skip undecryptable passwords to use the available decryptable " + "passwords."; +@@ -6295,7 +6295,7 @@ const char kSkipUndecryptablePasswordsDescription[] = + "there are undecryptable ones."; + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + const char kAsyncDnsName[] = "Async DNS resolver"; + const char kAsyncDnsDescription[] = "Enables the built-in DNS resolver."; + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +@@ -6400,7 +6400,7 @@ const char kElasticOverscrollDescription[] = + + #if BUILDFLAG(IS_WIN) || \ + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ +- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + const char kUIDebugToolsName[] = "Debugging tools for UI"; + const char kUIDebugToolsDescription[] = + "Enables additional keyboard shortcuts to help debugging."; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.h b/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.h new file mode 100644 index 000000000000..8fd516555478 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.h @@ -0,0 +1,51 @@ +--- chrome/browser/flag_descriptions.h.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/flag_descriptions.h +@@ -3577,7 +3577,7 @@ extern const char kSideSearchDSESupportDescription[]; + // Random platform combinations ----------------------------------------------- + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + extern const char kQuickCommandsName[]; + extern const char kQuickCommandsDescription[]; + +@@ -3594,7 +3594,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa + extern const char kWebBluetoothConfirmPairingSupportDescription[]; + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + extern const char kOzonePlatformHintChoiceDefault[]; + extern const char kOzonePlatformHintChoiceAuto[]; + extern const char kOzonePlatformHintChoiceX11[]; +@@ -3610,18 +3610,18 @@ extern const char kForcePasswordInitialSyncWhenDecrypt + extern const char kForcePasswordInitialSyncWhenDecryptionFailsDescription[]; + #endif // BUILDFLAG(IS_LINUX) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + extern const char kSkipUndecryptablePasswordsName[]; + extern const char kSkipUndecryptablePasswordsDescription[]; + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + extern const char kAsyncDnsName[]; + extern const char kAsyncDnsDescription[]; + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + extern const char kFollowingFeedSidepanelName[]; + extern const char kFollowingFeedSidepanelDescription[]; + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || +@@ -3698,7 +3698,7 @@ extern const char kElasticOverscrollDescription[]; + + #if BUILDFLAG(IS_WIN) || \ + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ +- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + extern const char kUIDebugToolsName[]; + extern const char kUIDebugToolsDescription[]; + diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_headless_headless__mode__util.cc b/www/ungoogled-chromium/files/patch-chrome_browser_headless_headless__mode__util.cc new file mode 100644 index 000000000000..3437f21bd003 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_headless_headless__mode__util.cc @@ -0,0 +1,29 @@ +--- chrome/browser/headless/headless_mode_util.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/headless/headless_mode_util.cc +@@ -9,7 +9,7 @@ + // Native headless is currently 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 + #include +@@ -17,7 +17,7 @@ + #include "base/base_switches.h" + #include "ui/gfx/switches.h" + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "ui/ozone/public/ozone_switches.h" + #endif // BUILDFLAG(IS_LINUX) + +@@ -51,7 +51,7 @@ void SetUpCommandLine(const base::CommandLine* command + base::CommandLine::ForCurrentProcess()->AppendSwitch( + ::switches::kNoErrorDialogs); + } +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Native headless chrome on Linux relies on ozone/headless platform. + base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( + ::switches::kOzonePlatform, switches::kHeadless); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_intranet__redirect__detector.h b/www/ungoogled-chromium/files/patch-chrome_browser_intranet__redirect__detector.h new file mode 100644 index 000000000000..7777bae4ded8 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_intranet__redirect__detector.h @@ -0,0 +1,11 @@ +--- chrome/browser/intranet_redirect_detector.h.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/intranet_redirect_detector.h +@@ -27,7 +27,7 @@ class SimpleURLLoader; + class PrefRegistrySimple; + + #if !(BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)) + #error "IntranetRedirectDetector should only be built on Desktop platforms." + #endif + diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc b/www/ungoogled-chromium/files/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc new file mode 100644 index 000000000000..f88898ead8e0 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc @@ -0,0 +1,15 @@ +--- chrome/browser/media_galleries/fileapi/mtp_device_map_service.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/media_galleries/fileapi/mtp_device_map_service.cc +@@ -39,10 +39,12 @@ void MTPDeviceMapService::RegisterMTPFileSystem( + // 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 !defined(OS_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/www/ungoogled-chromium/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc b/www/ungoogled-chromium/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc new file mode 100644 index 000000000000..db950777debd --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc @@ -0,0 +1,16 @@ +--- chrome/browser/media_galleries/media_file_system_registry.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/media_galleries/media_file_system_registry.cc +@@ -744,7 +744,12 @@ class MediaFileSystemRegistry::MediaFileSystemContextI + // 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/www/ungoogled-chromium/files/patch-chrome_browser_media_audio__service__util.cc b/www/ungoogled-chromium/files/patch-chrome_browser_media_audio__service__util.cc new file mode 100644 index 000000000000..786ac1a87954 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_media_audio__service__util.cc @@ -0,0 +1,20 @@ +--- chrome/browser/media/audio_service_util.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/media/audio_service_util.cc +@@ -21,7 +21,7 @@ + + namespace { + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ + (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) + bool GetPolicyOrFeature(const char* policy_name, const base::Feature& feature) { + const policy::PolicyMap& policies = +@@ -40,7 +40,7 @@ bool GetPolicyOrFeature(const char* policy_name, const + bool IsAudioServiceSandboxEnabled() { + // TODO(crbug.com/1052397): Remove !IS_CHROMEOS_LACROS once lacros starts being + // built with OS_CHROMEOS instead of OS_LINUX. +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ + (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) + return GetPolicyOrFeature(policy::key::kAudioSandboxEnabled, + features::kAudioServiceSandbox); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_media_router_discovery_BUILD.gn b/www/ungoogled-chromium/files/patch-chrome_browser_media_router_discovery_BUILD.gn new file mode 100644 index 000000000000..2a16d5cf5706 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_media_router_discovery_BUILD.gn @@ -0,0 +1,11 @@ +--- chrome/browser/media/router/discovery/BUILD.gn.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/media/router/discovery/BUILD.gn +@@ -79,7 +79,7 @@ static_library("discovery") { + "media_sink_discovery_metrics.h", + ] + +- if (is_linux || is_chromeos) { ++ if ((is_linux || is_chromeos) && !is_bsd) { + sources += [ "discovery_network_list_wifi_linux.cc" ] + } + diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_media_router_discovery_discovery__network__list__posix.cc b/www/ungoogled-chromium/files/patch-chrome_browser_media_router_discovery_discovery__network__list__posix.cc new file mode 100644 index 000000000000..60e13f141bbb --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_media_router_discovery_discovery__network__list__posix.cc @@ -0,0 +1,48 @@ +--- chrome/browser/media/router/discovery/discovery_network_list_posix.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/media/router/discovery/discovery_network_list_posix.cc +@@ -5,11 +5,12 @@ + #include "chrome/browser/media/router/discovery/discovery_network_list.h" + + #include ++#include ++#include ++#include + #include + #include + #include +-#include +-#include + + #include + +@@ -18,7 +19,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 + #else + #include +@@ -27,7 +28,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) +@@ -38,6 +39,12 @@ using sll = struct sockaddr_dl; + #define SOCKET_ARP_TYPE(s) ((s)->sdl_type) + #define SOCKET_ADDRESS_LEN(s) ((s)->sdl_alen) + #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( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_media_router_discovery_discovery__network__list__wifi__linux.cc b/www/ungoogled-chromium/files/patch-chrome_browser_media_router_discovery_discovery__network__list__wifi__linux.cc new file mode 100644 index 000000000000..5d728a5f210b --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_media_router_discovery_discovery__network__list__wifi__linux.cc @@ -0,0 +1,30 @@ +--- chrome/browser/media/router/discovery/discovery_network_list_wifi_linux.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/media/router/discovery/discovery_network_list_wifi_linux.cc +@@ -9,7 +9,11 @@ + #include + #include + ++#include "build/build_config.h" ++ ++#if !defined(OS_BSD) + #include ++#endif + + #include "base/check.h" + #include "base/files/scoped_file.h" +@@ -20,6 +24,7 @@ namespace media_router { + bool MaybeGetWifiSSID(const std::string& if_name, std::string* ssid_out) { + DCHECK(ssid_out); + ++#if !defined(OS_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 +@@ -41,6 +46,7 @@ bool MaybeGetWifiSSID(const std::string& if_name, std: + ssid_out->assign(ssid); + return true; + } ++#endif + return false; + } + diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__event__log__uploader.cc b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__event__log__uploader.cc new file mode 100644 index 000000000000..aed7b870e278 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__event__log__uploader.cc @@ -0,0 +1,11 @@ +--- chrome/browser/media/webrtc/webrtc_event_log_uploader.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/media/webrtc/webrtc_event_log_uploader.cc +@@ -40,7 +40,7 @@ const char kProduct[] = "Chrome"; + const char kProduct[] = "Chrome_Mac"; + #elif BUILDFLAG(IS_CHROMEOS_ASH) + const char kProduct[] = "Chrome_ChromeOS"; +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + const char kProduct[] = "Chrome_Linux"; + #elif BUILDFLAG(IS_ANDROID) + const char kProduct[] = "Chrome_Android"; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc new file mode 100644 index 000000000000..97aab9b5cb52 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc @@ -0,0 +1,13 @@ +--- chrome/browser/media/webrtc/webrtc_log_uploader.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/media/webrtc/webrtc_log_uploader.cc +@@ -281,6 +281,10 @@ void WebRtcLogUploader::SetupMultipart( + const char product[] = "Chrome_ChromeOS"; + #elif BUILDFLAG(IS_FUCHSIA) + const char product[] = "Chrome_Fuchsia"; ++#elif defined(OS_OPENBSD) ++ const char product[] = "Chrome_OpenBSD"; ++#elif defined(OS_FREEBSD) ++ const char product[] = "Chrome_FreeBSD"; + #else + #error Platform not supported. + #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc new file mode 100644 index 000000000000..6afca51d3c32 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc @@ -0,0 +1,33 @@ +--- chrome/browser/media/webrtc/webrtc_logging_controller.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/media/webrtc/webrtc_logging_controller.cc +@@ -24,10 +24,10 @@ + #include "content/public/browser/browser_context.h" + #include "content/public/browser/render_process_host.h" + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || 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) ++#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + + using webrtc_event_logging::WebRtcEventLogManager; + +@@ -281,7 +281,7 @@ void WebRtcLoggingController::StartEventLogging( + web_app_id, callback); + } + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + void WebRtcLoggingController::GetLogsDirectory( + LogsDirectoryCallback callback, + LogsDirectoryErrorCallback error_callback) { +@@ -327,7 +327,7 @@ void WebRtcLoggingController::GrantLogsDirectoryAccess + FROM_HERE, + base::BindOnce(std::move(callback), file_system.id(), registered_name)); + } +-#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + + void WebRtcLoggingController::OnRtpPacket( + std::unique_ptr packet_header, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h new file mode 100644 index 000000000000..d8cde46077bf --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h @@ -0,0 +1,20 @@ +--- chrome/browser/media/webrtc/webrtc_logging_controller.h.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/media/webrtc/webrtc_logging_controller.h +@@ -132,7 +132,7 @@ class WebRtcLoggingController + size_t web_app_id, + const StartEventLoggingCallback& callback); + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || 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. +@@ -191,7 +191,7 @@ class WebRtcLoggingController + bool success, + const std::string& error_message); + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || 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/www/ungoogled-chromium/files/patch-chrome_browser_memory__details.cc b/www/ungoogled-chromium/files/patch-chrome_browser_memory__details.cc new file mode 100644 index 000000000000..f331ea41994c --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_memory__details.cc @@ -0,0 +1,20 @@ +--- chrome/browser/memory_details.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/memory_details.cc +@@ -38,7 +38,7 @@ + #include "services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.h" + #include "ui/base/l10n/l10n_util.h" + +-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) ++#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD) + #include "content/public/browser/zygote_host/zygote_host_linux.h" + #endif + +@@ -329,7 +329,7 @@ void MemoryDetails::CollectChildInfoOnUIThread() { + std::ref(process))); + } + +-#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/www/ungoogled-chromium/files/patch-chrome_browser_memory__details__linux.cc b/www/ungoogled-chromium/files/patch-chrome_browser_memory__details__linux.cc new file mode 100644 index 000000000000..2407374d17a0 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_memory__details__linux.cc @@ -0,0 +1,37 @@ +--- chrome/browser/memory_details_linux.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/memory_details_linux.cc +@@ -13,6 +13,7 @@ + #include + + #include "base/bind.h" ++#include "base/command_line.h" + #include "base/files/file_util.h" + #include "base/process/process_iterator.h" + #include "base/process/process_metrics.h" +@@ -27,6 +28,7 @@ + #include "content/public/browser/browser_task_traits.h" + #include "content/public/browser/browser_thread.h" + #include "content/public/common/process_type.h" ++#include "sandbox/policy/switches.h" + #include "ui/base/l10n/l10n_util.h" + + using base::ProcessEntry; +@@ -70,9 +72,18 @@ ProcessData GetProcessDataMemoryInformation( + + std::unique_ptr metrics( + base::ProcessMetrics::CreateProcessMetrics(pid)); ++ ++ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); ++ if (!command_line->HasSwitch(sandbox::policy::switches::kNoSandbox)) { ++ pmi.num_open_fds = 0; ++ pmi.open_fds_soft_limit = 0; ++ goto out; ++ } ++ + pmi.num_open_fds = metrics->GetOpenFdCount(); + pmi.open_fds_soft_limit = metrics->GetOpenFdSoftLimit(); + ++out: + process_data.processes.push_back(pmi); + } + return process_data; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc new file mode 100644 index 000000000000..4c2a29c79a71 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc @@ -0,0 +1,23 @@ +--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc +@@ -58,8 +58,10 @@ + + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) ++#if !BUILDFLAG(IS_BSD) + #include ++#endif + + #include "base/linux_util.h" + #include "base/strings/string_split.h" +@@ -516,7 +518,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, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc new file mode 100644 index 000000000000..fa7b5da305e6 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc @@ -0,0 +1,47 @@ +--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/metrics/chrome_metrics_service_client.cc +@@ -174,7 +174,7 @@ + #include "chrome/notification_helper/notification_helper_constants.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 + +@@ -721,7 +721,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic + metrics_service_->RegisterMetricsProvider( + std::make_unique()); + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + metrics_service_->RegisterMetricsProvider( + std::make_unique()); + #endif +@@ -798,7 +798,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic + + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + metrics_service_->RegisterMetricsProvider( + std::make_unique()); +@@ -887,7 +887,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic + std::make_unique()); + #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) +@@ -1070,7 +1070,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve + #endif + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + // This creates the DesktopProfileSessionDurationsServices if it didn't exist + // already. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_metrics_perf_cpu__identity.cc b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_perf_cpu__identity.cc new file mode 100644 index 000000000000..cd82738dac34 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_perf_cpu__identity.cc @@ -0,0 +1,11 @@ +--- chrome/browser/metrics/perf/cpu_identity.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/metrics/perf/cpu_identity.cc +@@ -106,7 +106,7 @@ CPUIdentity GetCPUIdentity() { + result.release = + #if BUILDFLAG(IS_CHROMEOS_ASH) + base::SysInfo::KernelVersion(); +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + base::SysInfo::OperatingSystemVersion(); + #else + #error "Unsupported configuration" diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_metrics_power_process__metrics__recorder__util.cc b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_power_process__metrics__recorder__util.cc new file mode 100644 index 000000000000..ef175527ea26 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_power_process__metrics__recorder__util.cc @@ -0,0 +1,11 @@ +--- chrome/browser/metrics/power/process_metrics_recorder_util.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/metrics/power/process_metrics_recorder_util.cc +@@ -59,7 +59,7 @@ void RecordProcessHistograms(const char* histogram_suf + 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/www/ungoogled-chromium/files/patch-chrome_browser_metrics_power_process__monitor.cc b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_power_process__monitor.cc new file mode 100644 index 000000000000..d076f7e13161 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_power_process__monitor.cc @@ -0,0 +1,29 @@ +--- chrome/browser/metrics/power/process_monitor.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/metrics/power/process_monitor.cc +@@ -64,7 +64,7 @@ ProcessMonitor::Metrics SampleMetrics(base::ProcessMet + #endif + + #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) +@@ -81,7 +81,7 @@ void ScaleMetrics(ProcessMonitor::Metrics* metrics, do + metrics->cpu_usage *= factor; + + #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ +- BUILDFLAG(IS_AIX) ++ BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) + metrics->idle_wakeups *= factor; + #endif + +@@ -130,7 +130,7 @@ ProcessMonitor::Metrics& operator+=(ProcessMonitor::Me + lhs.cpu_usage += rhs.cpu_usage; + + #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/www/ungoogled-chromium/files/patch-chrome_browser_metrics_power_process__monitor.h b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_power_process__monitor.h new file mode 100644 index 000000000000..96d4b1b9418e --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_power_process__monitor.h @@ -0,0 +1,11 @@ +--- chrome/browser/metrics/power/process_monitor.h.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/metrics/power/process_monitor.h +@@ -70,7 +70,7 @@ class ProcessMonitor : public content::BrowserChildPro + double cpu_usage = 0.0; + + #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/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.cc b/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.cc new file mode 100644 index 000000000000..0c360e4c3d4c --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.cc @@ -0,0 +1,38 @@ +--- chrome/browser/net/system_network_context_manager.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/net/system_network_context_manager.cc +@@ -91,7 +91,7 @@ + + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + #include "chrome/common/chrome_paths_internal.h" + #include "chrome/grit/chromium_strings.h" + #include "ui/base/l10n/l10n_util.h" +@@ -173,7 +173,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut + 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) +@@ -484,7 +484,7 @@ SystemNetworkContextManager::SystemNetworkContextManag + 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) +@@ -556,7 +556,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe + registry->RegisterBooleanPref(prefs::kKerberosEnabled, false); + #endif // BUILDFLAG(IS_CHROMEOS_LACROS) + +-#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) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_new__tab__page_modules_drive_drive__service.cc b/www/ungoogled-chromium/files/patch-chrome_browser_new__tab__page_modules_drive_drive__service.cc new file mode 100644 index 000000000000..1ba6c43090e5 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_new__tab__page_modules_drive_drive__service.cc @@ -0,0 +1,11 @@ +--- chrome/browser/new_tab_page/modules/drive/drive_service.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/new_tab_page/modules/drive/drive_service.cc +@@ -28,7 +28,7 @@ + #include "services/network/public/cpp/resource_request.h" + + namespace { +-#if OS_LINUX ++#if defined(OS_LINUX) || defined(OS_BSD) + constexpr char kPlatform[] = "LINUX"; + #elif OS_WIN + constexpr char kPlatform[] = "WINDOWS"; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_new__tab__page_new__tab__page__util.cc b/www/ungoogled-chromium/files/patch-chrome_browser_new__tab__page_new__tab__page__util.cc new file mode 100644 index 000000000000..39e2e271b1f4 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_new__tab__page_new__tab__page__util.cc @@ -0,0 +1,11 @@ +--- chrome/browser/new_tab_page/new_tab_page_util.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/new_tab_page/new_tab_page_util.cc +@@ -11,7 +11,7 @@ + + namespace { + bool IsOsSupportedForRecipe() { +-#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/www/ungoogled-chromium/files/patch-chrome_browser_notifications_notification__display__service__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_notifications_notification__display__service__impl.cc new file mode 100644 index 000000000000..8787c1699a3e --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_notifications_notification__display__service__impl.cc @@ -0,0 +1,29 @@ +--- chrome/browser/notifications/notification_display_service_impl.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/notifications/notification_display_service_impl.cc +@@ -32,7 +32,7 @@ + #endif + + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + #include "chrome/browser/send_tab_to_self/desktop_notification_handler.h" + #include "chrome/browser/sharing/sharing_notification_handler.h" + #endif +@@ -65,7 +65,7 @@ NotificationDisplayServiceImpl* NotificationDisplaySer + // 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 + } +@@ -81,7 +81,7 @@ NotificationDisplayServiceImpl::NotificationDisplaySer + std::make_unique()); + + #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( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_notifications_notification__platform__bridge__delegator.cc b/www/ungoogled-chromium/files/patch-chrome_browser_notifications_notification__platform__bridge__delegator.cc new file mode 100644 index 000000000000..b07d1a108822 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_notifications_notification__platform__bridge__delegator.cc @@ -0,0 +1,11 @@ +--- chrome/browser/notifications/notification_platform_bridge_delegator.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/notifications/notification_platform_bridge_delegator.cc +@@ -57,7 +57,7 @@ bool SystemNotificationsEnabled(Profile* 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/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc new file mode 100644 index 000000000000..41d9b18fc551 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc @@ -0,0 +1,11 @@ +--- chrome/browser/password_manager/password_reuse_manager_factory.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/password_manager/password_reuse_manager_factory.cc +@@ -92,7 +92,7 @@ KeyedService* PasswordReuseManagerFactory::BuildServic + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_LACROS) ++ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + std::unique_ptr notifier = + std::make_unique( + IdentityManagerFactory::GetForProfile(profile)); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_platform__util__linux.cc b/www/ungoogled-chromium/files/patch-chrome_browser_platform__util__linux.cc new file mode 100644 index 000000000000..80fab6b84cb5 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_platform__util__linux.cc @@ -0,0 +1,12 @@ +--- chrome/browser/platform_util_linux.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/platform_util_linux.cc +@@ -295,7 +295,9 @@ void RunCommand(const std::string& command, + + base::LaunchOptions options; + options.current_directory = working_directory; ++#if !defined(OS_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/www/ungoogled-chromium/files/patch-chrome_browser_policy_browser__signin__policy__handler.cc b/www/ungoogled-chromium/files/patch-chrome_browser_policy_browser__signin__policy__handler.cc new file mode 100644 index 000000000000..734a5d051386 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_policy_browser__signin__policy__handler.cc @@ -0,0 +1,11 @@ +--- chrome/browser/policy/browser_signin_policy_handler.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/policy/browser_signin_policy_handler.cc +@@ -43,7 +43,7 @@ void BrowserSigninPolicyHandler::ApplyPolicySettings(c + policies.GetValue(policy_name(), base::Value::Type::INTEGER); + switch (static_cast(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/www/ungoogled-chromium/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc b/www/ungoogled-chromium/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc new file mode 100644 index 000000000000..85259f1d457c --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc @@ -0,0 +1,38 @@ +--- chrome/browser/policy/chrome_browser_cloud_management_controller_desktop.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/policy/chrome_browser_cloud_management_controller_desktop.cc +@@ -47,7 +47,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) + +@@ -56,7 +56,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/connectors/device_trust/device_trust_features.h" + #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/device_trust_key_manager_impl.h" + #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/key_rotation_launcher.h" +@@ -89,7 +89,7 @@ void ChromeBrowserCloudManagementControllerDesktop:: + + #if BUILDFLAG(IS_MAC) + storage_delegate = std::make_unique(); +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + storage_delegate = std::make_unique(); + #elif BUILDFLAG(IS_WIN) + storage_delegate = std::make_unique(); +@@ -244,7 +244,7 @@ ChromeBrowserCloudManagementControllerDesktop::CreateC + + std::unique_ptr + 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) + if (enterprise_connectors::IsDeviceTrustConnectorFeatureEnabled()) { + auto key_rotation_launcher = + enterprise_connectors::KeyRotationLauncher::Create( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc new file mode 100644 index 000000000000..c222fd8d6787 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc @@ -0,0 +1,120 @@ +--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/policy/configuration_policy_handler_list_factory.cc +@@ -187,12 +187,12 @@ + #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 "components/device_signals/core/browser/pref_names.h" + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + #include "chrome/browser/web_applications/policy/web_app_settings_policy_handler.h" + #endif + +@@ -699,7 +699,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + prefs::kManagedDefaultGeolocationSetting, + base::Value::Type::INTEGER }, + #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) \ +- || BUILDFLAG(IS_FUCHSIA) ++ || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + { key::kRequireOnlineRevocationChecksForLocalAnchors, + prefs::kCertRevocationCheckingRequiredLocalAnchors, + base::Value::Type::BOOLEAN }, +@@ -1304,7 +1304,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + base::Value::Type::BOOLEAN }, + #endif // BUILDFLAG(IS_CHROMEOS_ASH) + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + { key::kGSSAPILibraryName, + prefs::kGSSAPILibraryName, + base::Value::Type::STRING }, +@@ -1374,18 +1374,18 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + 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 }, + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) \ +- || BUILDFLAG(IS_FUCHSIA) ++ || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + { key::kDefaultBrowserSettingEnabled, + prefs::kDefaultBrowserSettingEnabled, + base::Value::Type::BOOLEAN }, +@@ -1398,7 +1398,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + // || BUILDFLAG(IS_FUCHSIA) + #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) + { key::kAutoplayAllowed, + prefs::kAutoplayAllowed, + base::Value::Type::BOOLEAN }, +@@ -1580,7 +1580,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + 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 }, +@@ -1639,7 +1639,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + #endif // BUILDFLAG(IS_CHROMEOS_ASH) + + #if BUILDFLAG(ENABLE_EXTENSIONS) && (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) \ +- || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA)) ++ || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA)) || BUILDFLAG(IS_BSD) + { key::kChromeAppsEnabled, + extensions::pref_names::kChromeAppsEnabled, + base::Value::Type::BOOLEAN }, +@@ -1963,7 +1963,7 @@ std::unique_ptr BuildH + 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()); + handlers->AddHandler(std::make_unique()); + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +@@ -2307,7 +2307,7 @@ std::unique_ptr BuildH + chrome_schema)); + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + handlers->AddHandler( + std::make_unique(chrome_schema)); + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || +@@ -2320,7 +2320,7 @@ std::unique_ptr BuildH + #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()); + handlers->AddHandler( + std::make_unique( +@@ -2328,7 +2328,7 @@ std::unique_ptr BuildH + #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( + key::kAllowSystemNotifications, prefs::kAllowSystemNotifications, + base::Value::Type::BOOLEAN)); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_policy_device__management__service__configuration.cc b/www/ungoogled-chromium/files/patch-chrome_browser_policy_device__management__service__configuration.cc new file mode 100644 index 000000000000..cb361c1c571f --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_policy_device__management__service__configuration.cc @@ -0,0 +1,20 @@ +--- chrome/browser/policy/device_management_service_configuration.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/policy/device_management_service_configuration.cc +@@ -21,7 +21,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 +@@ -100,7 +100,7 @@ DeviceManagementServiceConfiguration::GetReportingConn + content::BrowserContext* context) const { + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ + ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +- !BUILDFLAG(IS_ANDROID)) ++ !BUILDFLAG(IS_ANDROID)) || BUILDFLAG(IS_BSD) + auto* service = + enterprise_connectors::ConnectorsServiceFactory::GetForBrowserContext( + context); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_prefs_browser__prefs.cc b/www/ungoogled-chromium/files/patch-chrome_browser_prefs_browser__prefs.cc new file mode 100644 index 000000000000..457d9b4c6aef --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_prefs_browser__prefs.cc @@ -0,0 +1,44 @@ +--- chrome/browser/prefs/browser_prefs.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/prefs/browser_prefs.cc +@@ -437,14 +437,14 @@ + #include "components/os_crypt/os_crypt.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/url_handler_prefs.h" + #include "components/device_signals/core/browser/pref_names.h" + #endif + + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + #include "chrome/browser/browser_switcher/browser_switcher_prefs.h" + #endif +@@ -1211,7 +1211,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) + #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) + #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) + web_app::url_handler_prefs::RegisterLocalStatePrefs(registry); + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + +@@ -1525,13 +1525,13 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync + safe_browsing::PostCleanupSettingsResetter::RegisterProfilePrefs(registry); + #endif + +-#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::RegisterProfilePrefs(registry); + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + browser_switcher::BrowserSwitcherPrefs::RegisterProfilePrefs(registry); + #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc b/www/ungoogled-chromium/files/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc new file mode 100644 index 000000000000..b51d1e1f3e1e --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc @@ -0,0 +1,11 @@ +--- chrome/browser/prefs/pref_service_incognito_allowlist.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/prefs/pref_service_incognito_allowlist.cc +@@ -138,7 +138,7 @@ const char* const kPersistentPrefNames[] = { + + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || 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/www/ungoogled-chromium/files/patch-chrome_browser_printing_print__backend__service__manager.cc b/www/ungoogled-chromium/files/patch-chrome_browser_printing_print__backend__service__manager.cc new file mode 100644 index 000000000000..a1ebf697be3f --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_printing_print__backend__service__manager.cc @@ -0,0 +1,29 @@ +--- chrome/browser/printing/print_backend_service_manager.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/printing/print_backend_service_manager.cc +@@ -481,7 +481,7 @@ absl::optional PrintBackendServiceManager::R + query_clients_.insert(client_id); + break; + case ClientType::kQueryWithUi: +-#if !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + if (!query_with_ui_clients_.empty()) + return absl::nullopt; + #endif +@@ -706,7 +706,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate + break; + + 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 (query_with_ui_clients_.size() > 1) + return absl::nullopt; +@@ -763,7 +763,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate + 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 (!query_with_ui_clients_.empty()) + return absl::nullopt; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_printing_print__job__worker.cc b/www/ungoogled-chromium/files/patch-chrome_browser_printing_print__job__worker.cc new file mode 100644 index 000000000000..b2c44c8923bc --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_printing_print__job__worker.cc @@ -0,0 +1,11 @@ +--- chrome/browser/printing/print_job_worker.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/printing/print_job_worker.cc +@@ -195,7 +195,7 @@ void PrintJobWorker::SetSettings(base::Value::Dict new + crash_key = std::make_unique( + print_backend->GetPrinterDriverInfo(printer_name)); + +-#if BUILDFLAG(IS_LINUX) && defined(USE_CUPS) ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(USE_CUPS) + PrinterBasicInfo basic_info; + if (print_backend->GetPrinterBasicInfo(printer_name, &basic_info) == + mojom::ResultCode::kSuccess) { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_process__singleton__posix.cc b/www/ungoogled-chromium/files/patch-chrome_browser_process__singleton__posix.cc new file mode 100644 index 000000000000..eefe28c1247a --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_process__singleton__posix.cc @@ -0,0 +1,20 @@ +--- chrome/browser/process_singleton_posix.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/process_singleton_posix.cc +@@ -97,7 +97,7 @@ + #include "net/base/network_interfaces.h" + #include "ui/base/l10n/l10n_util.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 + +@@ -351,7 +351,7 @@ bool DisplayProfileInUseError(const base::FilePath& lo + 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/www/ungoogled-chromium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc b/www/ungoogled-chromium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc new file mode 100644 index 000000000000..6d299d7ad4ef --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc @@ -0,0 +1,25 @@ +--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc +@@ -255,7 +255,7 @@ + #include "chrome/browser/ui/cocoa/screentime/screentime_features.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/idle/idle_service_factory.h" + #endif + +@@ -435,11 +435,11 @@ void ChromeBrowserMainExtraPartsProfiles:: + #endif + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + metrics::DesktopProfileSessionDurationsServiceFactory::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) + enterprise_idle::IdleServiceFactory::GetInstance(); + #endif + ModelTypeStoreServiceFactory::GetInstance(); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profile__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profile__impl.cc new file mode 100644 index 000000000000..3c4c1c3c9f30 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profile__impl.cc @@ -0,0 +1,31 @@ +--- chrome/browser/profiles/profile_impl.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/profiles/profile_impl.cc +@@ -259,6 +259,10 @@ + #include "chrome/browser/spellchecker/spellcheck_service.h" + #endif + ++#if BUILDFLAG(IS_OPENBSD) ++#include "sandbox/policy/openbsd/sandbox_openbsd.h" ++#endif ++ + using bookmarks::BookmarkModel; + using content::BrowserThread; + using content::DownloadManagerDelegate; +@@ -838,7 +842,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) + } + + 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/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profiles__state.cc b/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profiles__state.cc new file mode 100644 index 000000000000..a14ab869289b --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profiles__state.cc @@ -0,0 +1,11 @@ +--- chrome/browser/profiles/profiles_state.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/profiles/profiles_state.cc +@@ -180,7 +180,7 @@ bool IsGuestModeRequested(const base::CommandLine& com + 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. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_renderer__preferences__util.cc b/www/ungoogled-chromium/files/patch-chrome_browser_renderer__preferences__util.cc new file mode 100644 index 000000000000..629c68d749dd --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_renderer__preferences__util.cc @@ -0,0 +1,29 @@ +--- chrome/browser/renderer_preferences_util.cc.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/renderer_preferences_util.cc +@@ -37,7 +37,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" +@@ -159,7 +159,7 @@ void UpdateFromSystemSettings(blink::RendererPreferenc + 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)) + ui::LinuxUi* linux_ui = ui::LinuxUi::instance(); + if (linux_ui) { + if (ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme()) { +@@ -179,7 +179,7 @@ void UpdateFromSystemSettings(blink::RendererPreferenc + #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/www/ungoogled-chromium/files/patch-chrome_browser_resources_plugin__metadata_plugins__linux.json b/www/ungoogled-chromium/files/patch-chrome_browser_resources_plugin__metadata_plugins__linux.json new file mode 100644 index 000000000000..dbf3f3173a88 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_resources_plugin__metadata_plugins__linux.json @@ -0,0 +1,31 @@ +--- chrome/browser/resources/plugin_metadata/plugins_linux.json.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/resources/plugin_metadata/plugins_linux.json +@@ -1,28 +1,5 @@ + { + "x-version": 46, +- "adobe-flash-player": { +- "mime_types": [ +- "application/futuresplash", +- "application/x-shockwave-flash" +- ], +- "matching_mime_types": [ +- "application/futuresplash" +- ], +- "versions": [ +- { +- "version": "32.0.0.445", +- "status": "up_to_date", +- "reference": "https://helpx.adobe.com/security/products/flash-player/apsb20-58.html" +- } +- ], +- "lang": "en-US", +- "name": "Adobe Flash Player", +- "help_url": "https://support.9oo91e.qjz9zk/chrome/?p=plugin_flash", +- "url": "https://support.9oo91e.qjz9zk/chrome/answer/6258784", +- "displayurl": true, +- "group_name_matcher": "*Shockwave Flash*", +- "plugin_is_deprecated": true +- }, + "google-chrome-pdf": { + "mime_types": [ + ], diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_resources_sandbox__internals_sandbox__internals.ts b/www/ungoogled-chromium/files/patch-chrome_browser_resources_sandbox__internals_sandbox__internals.ts new file mode 100644 index 000000000000..0ae3c35837bd --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_resources_sandbox__internals_sandbox__internals.ts @@ -0,0 +1,29 @@ +--- chrome/browser/resources/sandbox_internals/sandbox_internals.ts.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/resources/sandbox_internals/sandbox_internals.ts +@@ -2,7 +2,7 @@ + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + +-// ++// + import './strings.m.js'; + + import {loadTimeData} from 'chrome://resources/js/load_time_data.m.js'; +@@ -121,7 +121,7 @@ function androidHandler() { + } + // + +-// ++// + + /** + * Adds a status row that reports either Yes or No. +@@ -182,7 +182,7 @@ document.addEventListener('DOMContentLoaded', () => { + // + androidHandler(); + // +- // ++ // + linuxHandler(); + // + }); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__browser__proxy.ts b/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__browser__proxy.ts new file mode 100644 index 000000000000..42f8faccb9b3 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__browser__proxy.ts @@ -0,0 +1,20 @@ +--- chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.ts.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.ts +@@ -16,7 +16,7 @@ export interface AppearanceBrowserProxy { + + useDefaultTheme(): void; + +- // ++ // + useSystemTheme(): void; + // + +@@ -44,7 +44,7 @@ export class AppearanceBrowserProxyImpl implements App + chrome.send('useDefaultTheme'); + } + +- // ++ // + useSystemTheme() { + chrome.send('useSystemTheme'); + } diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html b/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html new file mode 100644 index 000000000000..b2da140def2b --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html @@ -0,0 +1,29 @@ +--- chrome/browser/resources/settings/appearance_page/appearance_page.html.orig 2022-10-01 07:40:07 UTC ++++ chrome/browser/resources/settings/appearance_page/appearance_page.html +@@ -27,7 +27,7 @@ +
+
$i18n{themes}
[[themeSublabel_]]
+
+- ++ + + +- ++ +